[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250820144511.15329-1-abinashsinghlalotra@gmail.com>
Date: Wed, 20 Aug 2025 20:15:08 +0530
From: Abinash Singh <abinashsinghlalotra@...il.com>
To: martin.petersen@...cle.com,
James.Bottomley@...senPartnership.com
Cc: linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org,
bvanassche@....org,
abinashsinghlalotra@...il.com,
dlemoal@...nel.org
Subject: [PATCH v8 0/2] scsi: sd: Fix build warning in sd_revalidate_disk()
Hi all,
This v8 series follows up on v7 of the
"scsi: sd: Fix build warning in sd_revalidate_disk()" patches.
On Tue, 19 Aug 2025 Bart Van Assche wrote:
> The traditional order for kfree() statements is the opposite order of
> the corresponding kmalloc() calls.
>
> Shouldn't this patch remove the initializer from the 'err' variable?
> Otherwise this patch looks good to me.
Based on Bart’s feedback, I have addressed the following in v8:
Changes in v8:
- Patch 1/2:
* Reverse the order of kfree() calls to follow the conventional
opposite-of-kmalloc() order.
* Added Bart Van Assche’s Reviewed-by tag.
- Patch 2/2:
* Removed the unused ‘err’ variable initializer.
As before, the first patch fixes the stack usage warning by moving a
large struct off the stack (with Fixes and Cc: stable tags). The second
patch then simplifies sd_revalidate_disk() by making it return void.
Many thanks to Bart and Damien for their reviews and guidance.
Abinash Singh (2):
scsi: sd: Fix build warning in sd_revalidate_disk()
scsi: sd: make sd_revalidate_disk() return void
drivers/scsi/sd.c | 56 +++++++++++++++++++++++++++--------------------
1 file changed, 32 insertions(+), 24 deletions(-)
--
2.43.0
Powered by blists - more mailing lists