mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Joy Chakraborty' <joychakr@google.com>,
	Serge Semin <fancer.lancer@gmail.com>
Cc: Mark Brown <broonie@kernel.org>,
	Andy Shevchenko <andriy.shevchenko@intel.com>,
	"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"manugautam@google.com" <manugautam@google.com>,
	"rohitner@google.com" <rohitner@google.com>
Subject: RE: [PATCH v8 5/5] spi: dw: Round of n_bytes to power of 2
Date: Fri, 21 Apr 2023 16:39:30 +0000	[thread overview]
Message-ID: <969a083998224016947f5e77218f4587@AcuMS.aculab.com> (raw)
In-Reply-To: <CAOSNQF1aK2EdgeUbNN4Bpp8hjPHTzBwt-q6+-Wb24VSsUOtSqA@mail.gmail.com>

From: Joy Chakraborty
> Sent: 21 April 2023 10:22
...
> Sure, I can make the following change in the formatting and send the
> patch series:
>          dws->n_bytes =
>                  roundup_pow_of_two(DIV_ROUND_UP(transfer->bits_per_word,
>                                                  BITS_PER_BYTE));

Won't checkpatch bleat about that?

Is it ever actually valid for the caller to provide a
value that isn't 8, 16 or 32 ?

I'm sure it looked as though some other lengths/counts
where likely to go badly wrong.

I know there are times when it is useful to bit-bang 'odd'
numbers of bits - like command+address+delay for fast reads
but that is a sub-32bit transfer so (at least somewhere)
is 1 word but not all the bits.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

  parent reply	other threads:[~2023-04-21 16:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-20  5:51 [PATCH v8 0/5] spi: dw: DW SPI DMA Driver updates Joy Chakraborty
2023-04-20  5:51 ` [PATCH v8 1/5] spi: dw: Add 32 bpw support to SPI DW DMA driver Joy Chakraborty
2023-04-20  5:51 ` [PATCH v8 2/5] spi: dw: Move dw_spi_can_dma() Joy Chakraborty
2023-04-20  5:51 ` [PATCH v8 3/5] spi: dw: Add DMA directional capability check Joy Chakraborty
2023-04-20  5:51 ` [PATCH v8 4/5] spi: dw: Add DMA address widths " Joy Chakraborty
2023-04-20  5:51 ` [PATCH v8 5/5] spi: dw: Round of n_bytes to power of 2 Joy Chakraborty
2023-04-21  8:53   ` Serge Semin
2023-04-21  9:21     ` Joy Chakraborty
2023-04-21 11:17       ` Serge Semin
2023-04-21 16:39       ` David Laight [this message]
2023-04-21 16:48         ` Serge Semin
2023-04-21 17:10           ` Joy Chakraborty
2023-04-21 17:15             ` Serge Semin
2023-04-21 17:48               ` Joy Chakraborty
2023-04-21  9:04 ` [PATCH v8 0/5] spi: dw: DW SPI DMA Driver updates Serge Semin

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=969a083998224016947f5e77218f4587@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=broonie@kernel.org \
    --cc=fancer.lancer@gmail.com \
    --cc=joychakr@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=manugautam@google.com \
    --cc=rohitner@google.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

all inboxes | Powered by JetHome®