mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v8 0/2] scsi: sd: Fix build warning in sd_revalidate_disk()
@ 2025-08-20 14:45 Abinash Singh
  2025-08-20 14:45 ` [PATCH v8 1/2] " Abinash Singh
  2025-08-20 14:45 ` [PATCH v8 2/2] scsi: sd: make sd_revalidate_disk() return void Abinash Singh
  0 siblings, 2 replies; 5+ messages in thread
From: Abinash Singh @ 2025-08-20 14:45 UTC (permalink / raw)
  To: martin.petersen, James.Bottomley
  Cc: linux-scsi, linux-kernel, bvanassche, abinashsinghlalotra, dlemoal

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-08-24 16:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-20 14:45 [PATCH v8 0/2] scsi: sd: Fix build warning in sd_revalidate_disk() Abinash Singh
2025-08-20 14:45 ` [PATCH v8 1/2] " Abinash Singh
2025-08-22 19:47   ` Bart Van Assche
2025-08-24 16:29     ` Abinash Singh
2025-08-20 14:45 ` [PATCH v8 2/2] scsi: sd: make sd_revalidate_disk() return void Abinash Singh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®