swh:1:snp:49cd9498d6cccc5e78252c27dcb645bcf7bf0c91
Raw File
Tip revision: b3a9e3b9622ae10064826dccb4f7a52bd88c7407 authored by Linus Torvalds on 14 June 2020, 19:45:04 UTC
Linux 5.8-rc1
Tip revision: b3a9e3b
null_blk_trace.c
// SPDX-License-Identifier: GPL-2.0
/*
 * null_blk trace related helpers.
 *
 * Copyright (C) 2020 Western Digital Corporation or its affiliates.
 */
#include "null_blk_trace.h"

/*
 * Helper to use for all null_blk traces to extract disk name.
 */
const char *nullb_trace_disk_name(struct trace_seq *p, char *name)
{
	const char *ret = trace_seq_buffer_ptr(p);

	if (name && *name)
		trace_seq_printf(p, "disk=%s, ", name);
	trace_seq_putc(p, 0);

	return ret;
}
back to top