[djiang:cxl-security 14/16] drivers/cxl/security.c:174:59-60: disable: first occurrence line 177, second occurrence line 181 (fwd)

From: Julia Lawall
Date: Sat Jul 23 2022 - 15:58:12 EST


Double initialization of disable, with different values. See lies 177 and
181.

julia

---------- Forwarded message ----------
Date: Sat, 23 Jul 2022 13:06:56 +0800
From: kernel test robot <lkp@xxxxxxxxx>
To: kbuild@xxxxxxxxxxxx
Cc: lkp@xxxxxxxxx, Julia Lawall <julia.lawall@xxxxxxx>
Subject: [djiang:cxl-security 14/16] drivers/cxl/security.c:174:59-60: disable:
first occurrence line 177, second occurrence line 181

CC: kbuild-all@xxxxxxxxxxxx
BCC: lkp@xxxxxxxxx
CC: linux-kernel@xxxxxxxxxxxxxxx
TO: Dave Jiang <dave.jiang@xxxxxxxxx>

tree: https://git.kernel.org/pub/scm/linux/kernel/git/djiang/linux.git cxl-security
head: a9e386b59eef5db739f0706d734daa39759dab96
commit: dd8bf96f3460deaf322b580b58df9f59d33ea99f [14/16] nvdimm/cxl/pmem: Add support for master passphrase disable security command
:::::: branch date: 29 hours ago
:::::: commit date: 34 hours ago
config: ia64-randconfig-c031-20220721 (https://download.01.org/0day-ci/archive/20220723/202207231241.SmvofeIK-lkp@xxxxxxxxx/config)
compiler: ia64-linux-gcc (GCC) 12.1.0

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Reported-by: Julia Lawall <julia.lawall@xxxxxxx>

cocci warnings: (new ones prefixed by >>)
>> drivers/cxl/security.c:174:59-60: disable: first occurrence line 177, second occurrence line 181

vim +174 drivers/cxl/security.c

6d0464a727cb70c Dave Jiang 2022-07-12 173
fcbefd0f597c3ba Dave Jiang 2022-07-06 @174 static const struct nvdimm_security_ops __cxl_security_ops = {
fcbefd0f597c3ba Dave Jiang 2022-07-06 175 .get_flags = cxl_pmem_get_security_flags,
5dce760e11e79cb Dave Jiang 2022-07-11 176 .change_key = cxl_pmem_security_change_key,
6a299141fd67c72 Dave Jiang 2022-07-12 @177 .disable = cxl_pmem_security_disable,
4aac0070d1a6c80 Dave Jiang 2022-07-12 178 .freeze = cxl_pmem_security_freeze,
abef64ac4e6fcd4 Dave Jiang 2022-07-12 179 .unlock = cxl_pmem_security_unlock,
6d0464a727cb70c Dave Jiang 2022-07-12 180 .erase = cxl_pmem_security_passphrase_erase,
dd8bf96f3460dea Dave Jiang 2022-07-13 @181 .disable = cxl_pmem_security_disable_master,
fcbefd0f597c3ba Dave Jiang 2022-07-06 182 };
fcbefd0f597c3ba Dave Jiang 2022-07-06 183

:::::: The code at line 174 was first introduced by commit
:::::: fcbefd0f597c3baeb916aca4f94bcbfca3571763 cxl/pmem: Introduce nvdimm_security_ops with ->get_flags() operation

:::::: TO: Dave Jiang <dave.jiang@xxxxxxxxx>
:::::: CC: Dave Jiang <dave.jiang@xxxxxxxxx>

--
0-DAY CI Kernel Test Service
https://01.org/lkp