Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Cc: Siddharth Menon <simeddon@gmail.com>,
	linux-iio@vger.kernel.org, lars@metafoo.de,
	Michael.Hennerich@analog.com, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev
Subject: Re: [PATCH v3] iio: frequency: ad9832: Use FIELD_PREP macro to set bit fields
Date: Thu, 27 Mar 2025 15:26:50 +0000	[thread overview]
Message-ID: <20250327152650.3c27cb2a@jic23-huawei> (raw)
In-Reply-To: <Z965Rz8NuXhbHrgy@debian-BULLSEYE-live-builder-AMD64>

> > +		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.

      parent reply	other threads:[~2025-03-27 15:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-19  4:34 [PATCH v3] iio: frequency: ad9832: Use FIELD_PREP macro to set bit fields Siddharth Menon
2025-03-22 13:21 ` Marcelo Schmitt
2025-03-25 11:59   ` Siddharth Menon
2025-03-29 13:41     ` Marcelo Schmitt
2025-03-27 15:26   ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250327152650.3c27cb2a@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=marcelo.schmitt1@gmail.com \
    --cc=simeddon@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox