[PATCH v6 4/5] iio: proximity: rfd77402: Document device private data structure

Shrikant Raskar via B4 Relay posted 5 patches 2 weeks, 5 days ago
There is a newer version of this series
[PATCH v6 4/5] iio: proximity: rfd77402: Document device private data structure
Posted by Shrikant Raskar via B4 Relay 2 weeks, 5 days ago
From: Shrikant Raskar <raskar.shree97@gmail.com>

Add kernel-doc style comments for struct rfd77402_data to describe
the purpose of each member.

Signed-off-by: Shrikant Raskar <raskar.shree97@gmail.com>
---
 drivers/iio/proximity/rfd77402.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/proximity/rfd77402.c b/drivers/iio/proximity/rfd77402.c
index fce85f783ab4..dd57156a7859 100644
--- a/drivers/iio/proximity/rfd77402.c
+++ b/drivers/iio/proximity/rfd77402.c
@@ -77,9 +77,13 @@ static const struct {
 	{RFD77402_HFCFG_3,	0x45d4},
 };
 
+/**
+ * struct rfd77402_data - device-specific data for the RFD77402 sensor
+ * @client: I2C client handle
+ * @lock: mutex to serialize sensor reads
+ */
 struct rfd77402_data {
 	struct i2c_client *client;
-	/* Serialize reads from the sensor */
 	struct mutex lock;
 };
 

-- 
2.43.0
Re: [PATCH v6 4/5] iio: proximity: rfd77402: Document device private data structure
Posted by Andy Shevchenko 2 weeks, 5 days ago
On Wed, Jan 21, 2026 at 02:05:44AM +0530, Shrikant Raskar via B4 Relay wrote:

> Add kernel-doc style comments for struct rfd77402_data to describe
> the purpose of each member.

Assuming checkpatch.pl doesn't complain (see below why),
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>

...

> +/**
> + * struct rfd77402_data - device-specific data for the RFD77402 sensor
> + * @client: I2C client handle
> + * @lock: mutex to serialize sensor reads
> + */
>  struct rfd77402_data {
>  	struct i2c_client *client;
> -	/* Serialize reads from the sensor */

Not sure if this can be removed due to some checkpatch checks.
Have you run it to verify?

>  	struct mutex lock;
>  };

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH v6 4/5] iio: proximity: rfd77402: Document device private data structure
Posted by Shrikant 2 weeks, 3 days ago
On Wed, Jan 21, 2026 at 2:48 PM Andy Shevchenko
<andriy.shevchenko@intel.com> wrote:
>
> On Wed, Jan 21, 2026 at 02:05:44AM +0530, Shrikant Raskar via B4 Relay wrote:
>
> > Add kernel-doc style comments for struct rfd77402_data to describe
> > the purpose of each member.
>
> Assuming checkpatch.pl doesn't complain (see below why),
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
>
> ...
>
> > +/**
> > + * struct rfd77402_data - device-specific data for the RFD77402 sensor
> > + * @client: I2C client handle
> > + * @lock: mutex to serialize sensor reads
> > + */
> >  struct rfd77402_data {
> >       struct i2c_client *client;
> > -     /* Serialize reads from the sensor */
>
> Not sure if this can be removed due to some checkpatch checks.
> Have you run it to verify?
Yes, I verified using checkpatch and it did not complain.

Regards,
Shrikant