Re: [v5 01/12] struct device: Add function callback durable_name
From: Tony Asleson <hidden>
Date: 2020-09-27 14:22:11
Also in:
linux-ide, linux-scsi
On 9/26/20 4:08 AM, Sergei Shtylyov wrote:
On 25.09.2020 19:19, Tony Asleson wrote:quoted
Function callback and function to be used to write a persistent durable name to the supplied character buffer. This will be used to add structured key-value data to log messages for hardware related errors which allows end users to correlate message and specific hardware. Signed-off-by: Tony Asleson <redacted> --- drivers/base/core.c | 24 ++++++++++++++++++++++++ include/linux/device.h | 4 ++++ 2 files changed, 28 insertions(+)diff --git a/drivers/base/core.c b/drivers/base/core.c index 05d414e9e8a4..88696ade8bfc 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c@@ -2489,6 +2489,30 @@ int dev_set_name(struct device *dev, const char*fmt, ...) } EXPORT_SYMBOL_GPL(dev_set_name); +/** + * dev_durable_name - Write "DURABLE_NAME"=<durable name> in buffer + * @dev: device + * @buffer: character buffer to write results + * @len: length of buffer + * @return: Number of bytes written to bufferThis is not how the kernel-doc commenta describe the function result, IIRC...
I did my compile with `make W=1` and there isn't any warnings/error with source documentation, but the documentation does indeed outline a different syntax. It's interesting how common the @return syntax is in the existing code base. I'll re-work the function documentation return. Thanks