[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGd6pzPFdPGSxn13r4b8mA+do1KCpjBgGp6iCDfkHuAyb_nCeg@mail.gmail.com>
Date: Tue, 18 Mar 2025 10:44:26 +0530
From: Siddharth Menon <simeddon@...il.com>
To: Marcelo Schmitt <marcelo.schmitt1@...il.com>
Cc: linux-iio@...r.kernel.org, lars@...afoo.de, Michael.Hennerich@...log.com,
jic23@...nel.org, gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
linux-staging@...ts.linux.dev
Subject: Re: [PATCH v2] iio: frequency: ad9832: Use FIELD_PREP macro to set
bit fields
On Tue, 18 Mar 2025 at 10:12, Marcelo Schmitt
<marcelo.schmitt1@...il.com> wrote:
>
> Hi Siddharth,
>
> On 03/17, Siddharth Menon wrote:
> > Refactor code to use the FIELD_PREP macro for setting bit fields
> > instead of manual bit manipulation.
> >
> > Suggested-by: Marcelo Schmitt <marcelo.schmitt1@...il.com>
> > Signed-off-by: Siddharth Menon <simeddon@...il.com>
> > ---
> ...
> > +#define CMD_MASK_2 GENMASK(15, 12)
> > +#define ADD_MASK_2 GENMASK(11, 8)
> > +#define DATA_MASK_2 GENMASK(7, 0)
>
> DATA_MASK_2? Did we already have a data mask?
> What about adding the device prefix to the mask name (e.g. AD9832_CMD_MASK)?
I'm sorry, I was comparing the values in a custom driver and copy pasted
the wrong variable names.
> Also, this patch fails to compile. Please, apply your patches and build the
> kernel before sending the patches to the mailing list. Also, run checkpatch on them.
> E.g.
> ./scripts/checkpatch.pl --terse --codespell --color=always -strict my_patch.patch
I shall send in a new patch after testing.
Powered by blists - more mailing lists