The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* drivers/scsi/sd.c:4493:2-17: WARNING: NULL check before some freeing functions is not needed.
@ 2026-05-25  3:03 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-05-25  3:03 UTC (permalink / raw)
  To: Swarna Prabhu
  Cc: oe-kbuild-all, linux-kernel, Martin K. Petersen, Damien Le Moal,
	Pankaj Raghav

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e7ae89a0c97ce2b68b0983cd01eda67cf373517d
commit: 7179e626b76eb42f2529c6f6dd6ba88ea2445372 scsi: sd: Enable sector size > PAGE_SIZE in SCSI sd driver
date:   3 months ago
config: riscv-randconfig-r064-20260525 (https://download.01.org/0day-ci/archive/20260525/202605251009.62v7URec-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 9.5.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: 7179e626b76e ("scsi: sd: Enable sector size > PAGE_SIZE in SCSI sd driver")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605251009.62v7URec-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/scsi/sd.c:4493:2-17: WARNING: NULL check before some freeing functions is not needed.

vim +4493 drivers/scsi/sd.c

  4478	
  4479	/**
  4480	 *	exit_sd - exit point for this driver (when it is a module).
  4481	 *
  4482	 *	Note: this function unregisters this driver from the scsi mid-level.
  4483	 **/
  4484	static void __exit exit_sd(void)
  4485	{
  4486		int i;
  4487	
  4488		SCSI_LOG_HLQUEUE(3, printk("exit_sd: exiting sd driver\n"));
  4489	
  4490		scsi_unregister_driver(&sd_template);
  4491		mempool_destroy(sd_page_pool);
  4492		if (sd_large_page_pool)
> 4493			mempool_destroy(sd_large_page_pool);
  4494	
  4495		class_unregister(&sd_disk_class);
  4496	
  4497		for (i = 0; i < SD_MAJORS; i++)
  4498			unregister_blkdev(sd_major(i), "sd");
  4499	}
  4500	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

* drivers/scsi/sd.c:4493:2-17: WARNING: NULL check before some freeing functions is not needed.
@ 2026-07-13  2:01 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-07-13  2:01 UTC (permalink / raw)
  To: Swarna Prabhu
  Cc: oe-kbuild-all, linux-kernel, Martin K. Petersen, Damien Le Moal,
	Pankaj Raghav

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   44696aa3a489d2baf58efa61b37833f100072bee
commit: 7179e626b76eb42f2529c6f6dd6ba88ea2445372 scsi: sd: Enable sector size > PAGE_SIZE in SCSI sd driver
date:   4 months ago
config: hexagon-randconfig-r051-20260709 (https://download.01.org/0day-ci/archive/20260713/202607130828.bp1CccX4-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project c279890c85da307abe34f10333442bbf72a60644)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: 7179e626b76e ("scsi: sd: Enable sector size > PAGE_SIZE in SCSI sd driver")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607130828.bp1CccX4-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/scsi/sd.c:4493:2-17: WARNING: NULL check before some freeing functions is not needed.

vim +4493 drivers/scsi/sd.c

  4478	
  4479	/**
  4480	 *	exit_sd - exit point for this driver (when it is a module).
  4481	 *
  4482	 *	Note: this function unregisters this driver from the scsi mid-level.
  4483	 **/
  4484	static void __exit exit_sd(void)
  4485	{
  4486		int i;
  4487	
  4488		SCSI_LOG_HLQUEUE(3, printk("exit_sd: exiting sd driver\n"));
  4489	
  4490		scsi_unregister_driver(&sd_template);
  4491		mempool_destroy(sd_page_pool);
  4492		if (sd_large_page_pool)
> 4493			mempool_destroy(sd_large_page_pool);
  4494	
  4495		class_unregister(&sd_disk_class);
  4496	
  4497		for (i = 0; i < SD_MAJORS; i++)
  4498			unregister_blkdev(sd_major(i), "sd");
  4499	}
  4500	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

end of thread, other threads:[~2026-07-13  2:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-25  3:03 drivers/scsi/sd.c:4493:2-17: WARNING: NULL check before some freeing functions is not needed kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2026-07-13  2:01 kernel test robot

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