drivers/media/platform/amd/isp4/isp4_subdev.c:35:3-9: opportunity for str_enable_disable(enable)

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild
Message-ID <[email protected]>
BCC: [email protected]
CC: [email protected]
CC: [email protected]
TO: Bin Du <[email protected]>
CC: Sakari Ailus <[email protected]>
CC: Sultan Alsawaf <[email protected]>
CC: Svetoslav Stoilov <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f5bbbfec59b4e2fb7520a91de3df8a6174325d6a
commit: 4e5e7a7ddb4ab9ac35928d7dc72efc8797639dc3 media: platform: amd: isp4 subdev and firmware loading handling added
date:   3 months ago
:::::: branch date: 25 hours ago
:::::: commit date: 3 months ago
config: x86_64-randconfig-102-20260812 (https://download.01.org/0day-ci/archive/20260812/[email protected]/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)

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: 4e5e7a7ddb4a ("media: platform: amd: isp4 subdev and firmware loading handling added")
| Reported-by: kernel test robot <[email protected]>
| Reported-by: Julia Lawall <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

cocci warnings: (new ones prefixed by >>)
>> drivers/media/platform/amd/isp4/isp4_subdev.c:35:3-9: opportunity for str_enable_disable(enable)

vim +35 drivers/media/platform/amd/isp4/isp4_subdev.c

4e5e7a7ddb4ab9 Bin Du 2026-05-06  29  
4e5e7a7ddb4ab9 Bin Du 2026-05-06  30  static void isp4sd_module_enable(struct isp4_subdev *isp_subdev, bool enable)
4e5e7a7ddb4ab9 Bin Du 2026-05-06  31  {
4e5e7a7ddb4ab9 Bin Du 2026-05-06  32  	if (isp_subdev->enable_gpio) {
4e5e7a7ddb4ab9 Bin Du 2026-05-06  33  		gpiod_set_value(isp_subdev->enable_gpio, enable ? 1 : 0);
4e5e7a7ddb4ab9 Bin Du 2026-05-06  34  		dev_dbg(isp_subdev->dev, "%s isp_subdev module\n",
4e5e7a7ddb4ab9 Bin Du 2026-05-06 @35  			enable ? "enable" : "disable");
4e5e7a7ddb4ab9 Bin Du 2026-05-06  36  	}
4e5e7a7ddb4ab9 Bin Du 2026-05-06  37  }
4e5e7a7ddb4ab9 Bin Du 2026-05-06  38  

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.