lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 3 Jun 2024 12:18:58 +0000
From: Arthur Becker <arthur.becker@...tec.com>
To: Jonathan Cameron <jic23@...nel.org>, Arthur Becker via B4 Relay
	<devnull+arthur.becker.sentec.com@...nel.org>
CC: Lars-Peter Clausen <lars@...afoo.de>, Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: Re: [PATCH v3 1/2] iio: light: driver for Vishay VEML6040

From: Jonathan Cameron <jic23@...nel.org>
Sent: 02 June 2024 15:22
To: Arthur Becker via B4 Relay
Cc: Arthur Becker; Lars-Peter Clausen; Rob Herring; Krzysztof Kozlowski; Conor Dooley; linux-kernel@...r.kernel.org; linux-iio@...r.kernel.org; devicetree@...r.kernel.org
Subject: [EXTERNAL]Re: [PATCH v3 1/2] iio: light: driver for Vishay VEML6040

> Hi Arthur,
> 
> A few really trivial things inline. I'd have just tidied them up whilst
> applying, but I think you are doing a v4 anyway to merge the bindings
> so I'll leave the requested tweaks to you.
> 
> Jonathan

Hi Jonathan,

Thanks for the feedback!
Small question about that comment:

> > +
> > +     ret = devm_regulator_get_enable(dev, "vdd");
> > +     if (ret)
> > +             return ret;
> > +
> > +     int init_config =
>
> Generally we are still sticking to traditional C rules so keep the
> local variable definition at the top of the file.
> The only common exception is when cleanup.h functionality is involved and
> we want to ensure ordering by moving the variable definitions into the code.

Do you mean at the start of the function, or rather a #define at the top of the
file after the masks and register definitions?
The use of 'FIELD_PREP' discards the 'static const int' option to initialise the
variable at the top of the file.

Kind regards,
Arthur

>
> > +             FIELD_PREP(VEML6040_CONF_IT_MSK, VEML6040_CONF_IT_40_MS) |
> > +             FIELD_PREP(VEML6040_CONF_AF_MSK, 0) |
> > +             FIELD_PREP(VEML6040_CONF_SD_MSK, 0);
> > +
> > +     ret = regmap_write(regmap, VEML6040_CONF_REG, init_config);
> > +     if (ret)
> > +             return dev_err_probe(dev, ret,
> > +                                  "Could not set initial config\n");
> > +



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ