Re: [v5 01/12] struct device: Add function callback durable_name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27.09.2020 17:22, Tony Asleson wrote:

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 <tasleson@xxxxxxxxxx>
---
   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 buffer

    This 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

   IIRC, you only get the warnings when you try to build the kernel-docs.

different syntax.  It's interesting how common the @return syntax is in
the existing code base.

   FWIW, I'm seeing @return: for the 1st time in my Linux tenure (since 2004).

I'll re-work the function documentation return.

   OK, thanks. :-)

Thanks

MBR, Sergei



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux