Re: [PATCH v6 5/9] w1_therm: adding resolution sysfs entry

From: Randy Dunlap
Date: Sun May 10 2020 - 23:25:44 EST


Hi,

The kernel-doc comment changes look good. Thanks for doing that.


On 5/10/20 7:17 AM, Akira Shimahara wrote:

> diff --git a/drivers/w1/slaves/w1_therm.c b/drivers/w1/slaves/w1_therm.c
> index 08579dc..b1734ae 100644
> --- a/drivers/w1/slaves/w1_therm.c
> +++ b/drivers/w1/slaves/w1_therm.c
> @@ -50,12 +50,24 @@ module_param_named(strong_pullup, w1_strong_pullup, int, 0);
>
> /* Helpers Macros */
>
> +/* return a pointer on the slave w1_therm_family_converter struct:
> + * always test family data existence before
> + */

/*
* Kernel multi-line comment coding style (except for networking source code)
* is like this.
*/

(in multiple places)

> +/**
> + * write_scratchpad() - write nb_bytes in the device RAM
> + * @sl: pointer to the slave to write in
> + * @data: pointer to an array of 3 bytes, as 3 bytes MUST be written
> + * @nb_bytes: Nb bytes to be written (2 for DS18S20, 3 for other devices)

If Nb means Number, please spell it out.

> + *
> + * Return: 0 if success, -kernel error code otherwise
> + */
> +static int write_scratchpad(struct w1_slave *sl, const u8 *data, u8 nb_bytes);
> +
> /**
> * read_powermode() - Query the power mode of the slave
> * @sl: slave to retrieve the power mode


thanks.
--
~Randy