* [jarkko-tpmdd:master 3/3] drivers/char/tpm/tpm_tis_synquacer.c:42:9: warning: Unused variable: result_le16 [unusedVariable]
@ 2022-04-09 19:14 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-04-09 19:14 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 5009 bytes --]
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Johannes Holland <johannes.holland@infineon.com>
CC: Jarkko Sakkinen <jarkko@kernel.org>
tree: git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git master
head: b6e0cdb87bf37357489de1069d55bd59f008daeb
commit: b6e0cdb87bf37357489de1069d55bd59f008daeb [3/3] tpm: Remove read16/read32/write32 calls from tpm_tis_phy_ops
:::::: branch date: 8 days ago
:::::: commit date: 8 days ago
compiler: riscv64-linux-gcc (GCC) 11.2.0
reproduce (cppcheck warning):
# apt-get install cppcheck
git checkout b6e0cdb87bf37357489de1069d55bd59f008daeb
cppcheck --quiet --enable=style,performance,portability --template=gcc FILE
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> drivers/crypto/gemini/sl3516-ce-core.c:139:2: warning: Possible null pointer dereference: rdd [nullPointer]
rdd->next_desc.bits.eofie = 1;
^
drivers/crypto/gemini/sl3516-ce-core.c:122:32: note: Assignment 'rdd=NULL', assigned value is 0
struct descriptor *dd, *rdd = NULL;
^
drivers/crypto/gemini/sl3516-ce-core.c:131:16: note: Assuming condition is false
for (i = 0; i < rctx->nr_sgd; i++) {
^
drivers/crypto/gemini/sl3516-ce-core.c:139:2: note: Null pointer dereference
rdd->next_desc.bits.eofie = 1;
^
>> drivers/char/tpm/tpm_tis_synquacer.c:42:9: warning: Unused variable: result_le16 [unusedVariable]
__le16 result_le16;
^
>> drivers/char/tpm/tpm_tis_synquacer.c:43:9: warning: Unused variable: result_le32 [unusedVariable]
__le32 result_le32;
^
>> drivers/char/tpm/tpm_tis_synquacer.c:44:6: warning: Unused variable: result16 [unusedVariable]
u16 result16;
^
>> drivers/char/tpm/tpm_tis_synquacer.c:45:6: warning: Unused variable: result32 [unusedVariable]
u32 result32;
^
drivers/char/tpm/tpm_tis_synquacer.c:72:9: warning: Unused variable: result_le16 [unusedVariable]
__le16 result_le16;
^
drivers/char/tpm/tpm_tis_synquacer.c:73:9: warning: Unused variable: result_le32 [unusedVariable]
__le32 result_le32;
^
drivers/char/tpm/tpm_tis_synquacer.c:74:6: warning: Unused variable: result16 [unusedVariable]
u16 result16;
^
drivers/char/tpm/tpm_tis_synquacer.c:75:6: warning: Unused variable: result32 [unusedVariable]
u32 result32;
^
vim +42 drivers/char/tpm/tpm_tis_synquacer.c
d5ae56a4fe5178 Masahisa Kojima 2020-07-28 36
d5ae56a4fe5178 Masahisa Kojima 2020-07-28 37 static int tpm_tis_synquacer_read_bytes(struct tpm_tis_data *data, u32 addr,
b6e0cdb87bf373 Johannes Holland 2022-03-21 38 u16 len, u8 *result,
b6e0cdb87bf373 Johannes Holland 2022-03-21 39 enum tpm_tis_io_mode io_mode)
d5ae56a4fe5178 Masahisa Kojima 2020-07-28 40 {
d5ae56a4fe5178 Masahisa Kojima 2020-07-28 41 struct tpm_tis_synquacer_phy *phy = to_tpm_tis_tcg_phy(data);
b6e0cdb87bf373 Johannes Holland 2022-03-21 @42 __le16 result_le16;
b6e0cdb87bf373 Johannes Holland 2022-03-21 @43 __le32 result_le32;
b6e0cdb87bf373 Johannes Holland 2022-03-21 @44 u16 result16;
b6e0cdb87bf373 Johannes Holland 2022-03-21 @45 u32 result32;
d5ae56a4fe5178 Masahisa Kojima 2020-07-28 46
b6e0cdb87bf373 Johannes Holland 2022-03-21 47 switch (io_mode) {
b6e0cdb87bf373 Johannes Holland 2022-03-21 48 case TPM_TIS_PHYS_8:
d5ae56a4fe5178 Masahisa Kojima 2020-07-28 49 while (len--)
d5ae56a4fe5178 Masahisa Kojima 2020-07-28 50 *result++ = ioread8(phy->iobase + addr);
b6e0cdb87bf373 Johannes Holland 2022-03-21 51 break;
b6e0cdb87bf373 Johannes Holland 2022-03-21 52 case TPM_TIS_PHYS_16:
b6e0cdb87bf373 Johannes Holland 2022-03-21 53 result[1] = ioread8(phy->iobase + addr + 1);
b6e0cdb87bf373 Johannes Holland 2022-03-21 54 result[0] = ioread8(phy->iobase + addr);
b6e0cdb87bf373 Johannes Holland 2022-03-21 55 break;
b6e0cdb87bf373 Johannes Holland 2022-03-21 56 case TPM_TIS_PHYS_32:
b6e0cdb87bf373 Johannes Holland 2022-03-21 57 result[3] = ioread8(phy->iobase + addr + 3);
b6e0cdb87bf373 Johannes Holland 2022-03-21 58 result[2] = ioread8(phy->iobase + addr + 2);
b6e0cdb87bf373 Johannes Holland 2022-03-21 59 result[1] = ioread8(phy->iobase + addr + 1);
b6e0cdb87bf373 Johannes Holland 2022-03-21 60 result[0] = ioread8(phy->iobase + addr);
b6e0cdb87bf373 Johannes Holland 2022-03-21 61 break;
b6e0cdb87bf373 Johannes Holland 2022-03-21 62 }
d5ae56a4fe5178 Masahisa Kojima 2020-07-28 63
d5ae56a4fe5178 Masahisa Kojima 2020-07-28 64 return 0;
d5ae56a4fe5178 Masahisa Kojima 2020-07-28 65 }
d5ae56a4fe5178 Masahisa Kojima 2020-07-28 66
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-09 19:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-09 19:14 [jarkko-tpmdd:master 3/3] drivers/char/tpm/tpm_tis_synquacer.c:42:9: warning: Unused variable: result_le16 [unusedVariable] kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.