[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250327152650.3c27cb2a@jic23-huawei>
Date: Thu, 27 Mar 2025 15:26:50 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Marcelo Schmitt <marcelo.schmitt1@...il.com>
Cc: Siddharth Menon <simeddon@...il.com>, linux-iio@...r.kernel.org,
lars@...afoo.de, Michael.Hennerich@...log.com, gregkh@...uxfoundation.org,
linux-kernel@...r.kernel.org, linux-staging@...ts.linux.dev
Subject: Re: [PATCH v3] iio: frequency: ad9832: Use FIELD_PREP macro to set
bit fields
> > + phase_cmd = (i % 2 == 0) ? AD9832_CMD_PHA8BITSW : AD9832_CMD_PHA16BITSW;
> > +
> > + st->phase_data[i] = cpu_to_be16(FIELD_PREP(AD9832_CMD_MSK, phase_cmd) |
> > + FIELD_PREP(AD9832_ADD_MSK, addr - i) |
> > + FIELD_PREP(AD9832_DAT_MSK, phase_bytes[i]));
> Would suggest to align with the first cpu_to_be16 argument here too, but better
> wait for Jonathan's opinion about this.
I'd typically go for one tab as done here.
Powered by blists - more mailing lists