[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YuAqiUcsR5R3uhJ1@infradead.org>
Date: Tue, 26 Jul 2022 10:55:21 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Damien Le Moal <damien.lemoal@...nsource.wdc.com>,
linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 1/1] ata: libata-scsi: Refactor scsi_6_lba_len() with
use of get_unaligned_be24()
On Tue, Jul 26, 2022 at 06:45:18PM +0300, Andy Shevchenko wrote:
> static void scsi_6_lba_len(const u8 *cdb, u64 *plba, u32 *plen)
> {
> + *plba = get_unaligned_be24(cdb[1]) & 0x1fffff;
> + *plen = cdb[4];
I think just pen coding this in the caller would be a lot cleaner.
Same for scsi_10_lba_len and scsi_16_lba_len in their two callers each.
Powered by blists - more mailing lists