All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com>,
	linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/1] ata: libata-scsi: Refactor scsi_6_lba_len() with use of get_unaligned_be24()
Date: Tue, 26 Jul 2022 10:55:21 -0700	[thread overview]
Message-ID: <YuAqiUcsR5R3uhJ1@infradead.org> (raw)
In-Reply-To: <20220726154518.73248-1-andriy.shevchenko@linux.intel.com>

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.

  reply	other threads:[~2022-07-26 17:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-26 15:45 [PATCH v1 1/1] ata: libata-scsi: Refactor scsi_6_lba_len() with use of get_unaligned_be24() Andy Shevchenko
2022-07-26 17:55 ` Christoph Hellwig [this message]
2022-07-29  3:25 ` kernel test robot
2022-07-29  3:25 ` kernel test robot
2022-07-29  3:36 ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2024-10-16 13:18 Andy Shevchenko
2024-10-17  0:32 ` Damien Le Moal
2024-10-17  8:14 ` Niklas Cassel

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=YuAqiUcsR5R3uhJ1@infradead.org \
    --to=hch@infradead.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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.