All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Christoph Hellwig' <hch@lst.de>, Daniel Gomez <da.gomez@samsung.com>
Cc: Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
	"Sagi Grimberg" <sagi@grimberg.me>,
	Pankaj Raghav <p.raghav@samsung.com>,
	"mcgrof@kernel.org" <mcgrof@kernel.org>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] nvme: Increase block size variable size to 32-bit
Date: Thu, 1 Jun 2023 10:28:45 +0000	[thread overview]
Message-ID: <e203876fc20d4c7b932bbff35e8b5e1e@AcuMS.aculab.com> (raw)
In-Reply-To: <20230531130325.GE27468@lst.de>

From: Christoph Hellwig
> Sent: 31 May 2023 14:03
> 
> > +	u32 bs = 1 << ns->lba_shift;
> 
> Make that 1 a 1U so that we're not going to run into sign extension
> issues when using up all bits in the u32 :)

Not 'sign extension' but obscure integer shift/conversion issues
that really only affect 1's compliment and sign-overpunch cpu.
I'm not even sure gcc/clang support any non 2's compliment systems.

> Otherwise looks good:

Probably improves the generated code as well.

	David

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



  reply	other threads:[~2023-06-01 10:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20230530154254eucas1p241e57af99e4d4ee0e1a677904c3db68c@eucas1p2.samsung.com>
2023-05-30 15:42 ` [PATCH] nvme: Increase block size variable size to 32-bit Daniel Gomez
2023-05-30 16:24   ` Luis Chamberlain
2023-05-30 17:27   ` Keith Busch
2023-05-31 13:03   ` Christoph Hellwig
2023-06-01 10:28     ` David Laight [this message]
2023-06-01 17:10     ` Keith Busch

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=e203876fc20d4c7b932bbff35e8b5e1e@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=axboe@kernel.dk \
    --cc=da.gomez@samsung.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=mcgrof@kernel.org \
    --cc=p.raghav@samsung.com \
    --cc=sagi@grimberg.me \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.