From: Christoph Hellwig <hch@lst.de>
To: "Ionut Nechita (Wind River)" <ionut.nechita@windriver.com>
Cc: James.Bottomley@HansenPartnership.com,
martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org, hch@lst.de,
dlemoal@kernel.org, robin.murphy@arm.com,
john.g.garry@oracle.com, axboe@kernel.dk,
m.szyprowski@samsung.com, ahuang12@lenovo.com,
ionut_n2001@yahoo.com, sunlightlinux@gmail.com
Subject: Re: [PATCH v8 1/1] scsi: sas: skip opt_sectors when DMA reports no real optimization hint
Date: Mon, 25 May 2026 08:02:14 +0200 [thread overview]
Message-ID: <20260525060214.GA3479@lst.de> (raw)
In-Reply-To: <20260519135238.373784-2-ionut.nechita@windriver.com>
On Tue, May 19, 2026 at 04:52:33PM +0300, Ionut Nechita (Wind River) wrote:
> +static void sas_dma_setup_opt_sectors(struct Scsi_Host *shost)
> +{
> + struct device *dma_dev = shost->dma_dev;
> + size_t opt, max;
> + unsigned int opt_sectors;
> +
> + opt = dma_opt_mapping_size(dma_dev);
> + max = dma_max_mapping_size(dma_dev);
I'm almost feeling bad for suggesting more changes, but this would read
much cleaner by doing:
struct device *dma_dev = shost->dma_dev;
size_t opt = dma_opt_mapping_size(dma_dev);
size_t max = dma_max_mapping_size(dma_dev);
unsigned int opt_sectors;
but otherwise this looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
prev parent reply other threads:[~2026-05-25 6:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 13:52 [PATCH v8 0/1] scsi: sas: fix mkfs.xfs failure due to bogus optimal_io_size Ionut Nechita (Wind River)
2026-05-19 13:52 ` [PATCH v8 1/1] scsi: sas: skip opt_sectors when DMA reports no real optimization hint Ionut Nechita (Wind River)
2026-05-25 6:02 ` Christoph Hellwig [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=20260525060214.GA3479@lst.de \
--to=hch@lst.de \
--cc=James.Bottomley@HansenPartnership.com \
--cc=ahuang12@lenovo.com \
--cc=axboe@kernel.dk \
--cc=dlemoal@kernel.org \
--cc=ionut.nechita@windriver.com \
--cc=ionut_n2001@yahoo.com \
--cc=john.g.garry@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=martin.petersen@oracle.com \
--cc=robin.murphy@arm.com \
--cc=stable@vger.kernel.org \
--cc=sunlightlinux@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