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]
Message-ID: <20251004143029.02f026a2@jic23-huawei>
Date: Sat, 4 Oct 2025 14:30:29 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@...esas.com>, David Lechner
 <dlechner@...libre.com>, Nuno Sá <nuno.sa@...log.com>, Andy
 Shevchenko <andy@...nel.org>, Rob Herring <robh@...nel.org>, Krzysztof
 Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, Magnus
 Damm <magnus.damm@...il.com>, linux-iio@...r.kernel.org,
 linux-renesas-soc@...r.kernel.org, devicetree@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 3/7] iio: adc: add RZ/T2H / RZ/N2H ADC driver


> > --- /dev/null
> > +++ b/drivers/iio/adc/rzt2h_adc.c
> > @@ -0,0 +1,309 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +
> > +#include <linux/bitfield.h>
> > +#include <linux/cleanup.h>
> > +#include <linux/completion.h>
> > +#include <linux/delay.h>
> > +#include <linux/iio/adc-helpers.h>
> > +#include <linux/iio/iio.h>
> > +#include <linux/interrupt.h>
> > +#include <linux/io.h>
> > +#include <linux/iopoll.h>
> > +#include <linux/mod_devicetable.h>
> > +#include <linux/module.h>
> > +#include <linux/platform_device.h>
> > +#include <linux/pm_runtime.h>
> > +#include <linux/property.h>
> > +
> > +#define RZT2H_NAME                     "rzt2h-adc"
> > +
> > +#define RZT2H_ADCSR_REG                        0x00  
> 
> I would drop the "_REG"-suffix from register definitions...
> 
> > +#define RZT2H_ADCSR_ADIE_MASK          BIT(12)  
> 
> ... and the "_MASK"-suffix from single-bit definitions.  But this is
> my personal preference/taste.  Perhaps IIO uses a different convention?

Problem with dropping _REG is we regularly see registers with complex
multi part names and it can be come confusing at point of use wrt to
whether a given define is a register address, or field.  

I don't mind dropping MASK for single bits though as there inherently can't
be confusion between those and field values as the 'mask' defines the value
as well.

Jonathan

> 
> > +#define RZT2H_ADCSR_ADCS_MASK          GENMASK(14, 13)
> > +#define RZT2H_ADCSR_ADCS_SINGLE                0b00
> > +#define RZT2H_ADCSR_ADST_MASK          BIT(15)  
> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ