[PATCH v6 0/2] scsi: sd: Fix build warning in sd_revalidate_disk()

Abinash Singh posted 2 patches 4 months ago
There is a newer version of this series
drivers/scsi/sd.c | 54 +++++++++++++++++++++++++++--------------------
1 file changed, 31 insertions(+), 23 deletions(-)
[PATCH v6 0/2] scsi: sd: Fix build warning in sd_revalidate_disk()
Posted by Abinash Singh 4 months ago
This v6 series follows up on v5 of the "scsi: sd: Fix build warning in
sd_revalidate_disk()" patches.
In v5, the change was split into two
patches: the first patch refactors sd_revalidate_disk() to return void,
and the second patch addresses excessive stack usage by allocating
certain structures dynamically.

Apologies for the oversight in v5 — although I built and tested the
kernel locally with the correct changes, I mistakenly sent an older
version of patch 2/2 that still had `size(*lim)` instead of
`sizeof(*lim)`. This caused a build error reported by the kernel test
robot when building with clang.

Changes in v6:
 - Replace `size(*lim)` with `sizeof(*lim)` in patch 2/2


Now there are no build errors.
I am very sorry for that .

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202508091640.gvFPjI6O-lkp@intel.com/


Abinash Singh (2):
  scsi: sd: make sd_revalidate_disk() return void
  scsi: sd: Fix build warning in sd_revalidate_disk()

 drivers/scsi/sd.c | 54 +++++++++++++++++++++++++++--------------------
 1 file changed, 31 insertions(+), 23 deletions(-)

-- 
2.50.1

Re: [PATCH v6 0/2] scsi: sd: Fix build warning in sd_revalidate_disk()
Posted by Damien Le Moal 4 months ago
On 8/9/25 18:35, Abinash Singh wrote:
> This v6 series follows up on v5 of the "scsi: sd: Fix build warning in
> sd_revalidate_disk()" patches.
> In v5, the change was split into two
> patches: the first patch refactors sd_revalidate_disk() to return void,
> and the second patch addresses excessive stack usage by allocating
> certain structures dynamically.
> 
> Apologies for the oversight in v5 — although I built and tested the
> kernel locally with the correct changes, I mistakenly sent an older
> version of patch 2/2 that still had `size(*lim)` instead of
> `sizeof(*lim)`. This caused a build error reported by the kernel test
> robot when building with clang.
> 
> Changes in v6:
>  - Replace `size(*lim)` with `sizeof(*lim)` in patch 2/2
> 
> 
> Now there are no build errors.
> I am very sorry for that .
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202508091640.gvFPjI6O-lkp@intel.com/
> 
> 
> Abinash Singh (2):
>   scsi: sd: make sd_revalidate_disk() return void
>   scsi: sd: Fix build warning in sd_revalidate_disk()

The order of the patches must be reversed because the fix build warning patch
must be CC-ed to stable with a Fixes tag. The cleanup making
sd_revalidate_disk() a void function must come after the fix. That will avoid
the weird placeholder comment and also will allow a more extensive cleanup to
replace several "goto out" with a simple return.

> 
>  drivers/scsi/sd.c | 54 +++++++++++++++++++++++++++--------------------
>  1 file changed, 31 insertions(+), 23 deletions(-)
> 


-- 
Damien Le Moal
Western Digital Research