* [jarkko-tpmdd:tpm2key-v8 7/7] security/keys/key.c:705:37: warning: format specifies type 'int' but the argument has type 'long'
@ 2024-06-13 3:36 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-06-13 3:36 UTC (permalink / raw)
To: Jarkko Sakkinen; +Cc: llvm, oe-kbuild-all
tree: git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git tpm2key-v8
head: d9163bc5bda8b6415ef960406b9bc952fa1b1b9f
commit: d9163bc5bda8b6415ef960406b9bc952fa1b1b9f [7/7] fixup
config: riscv-defconfig (https://download.01.org/0day-ci/archive/20240613/202406131149.L4cvaVlD-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 4403cdbaf01379de96f8d0d6ea4f51a085e37766)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240613/202406131149.L4cvaVlD-lkp@intel.com/reproduce)
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
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406131149.L4cvaVlD-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from security/keys/key.c:13:
In file included from include/linux/security.h:33:
In file included from include/linux/mm.h:2253:
include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
514 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> security/keys/key.c:705:37: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
705 | pr_info("%s: ret=%d\n", __func__, PTR_ERR(key));
| ~~ ^~~~~~~~~~~~
| %ld
include/linux/printk.h:537:34: note: expanded from macro 'pr_info'
537 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/printk.h:464:60: note: expanded from macro 'printk'
464 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/printk.h:436:19: note: expanded from macro 'printk_index_wrap'
436 | _p_func(_fmt, ##__VA_ARGS__); \
| ~~~~ ^~~~~~~~~~~
2 warnings generated.
vim +705 security/keys/key.c
666
667 /*
668 * Find a key by its serial number.
669 */
670 struct key *key_lookup(key_serial_t id)
671 {
672 struct rb_node *n;
673 struct key *key;
674
675 pr_info("%s: enter\n", __func__);
676 spin_lock(&key_serial_lock);
677
678 /* search the tree for the specified key */
679 n = key_serial_tree.rb_node;
680 while (n) {
681 key = rb_entry(n, struct key, serial_node);
682
683 if (id < key->serial)
684 n = n->rb_left;
685 else if (id > key->serial)
686 n = n->rb_right;
687 else
688 goto found;
689 }
690
691 not_found:
692 key = ERR_PTR(-ENOKEY);
693 goto error;
694
695 found:
696 /* A key is allowed to be looked up only if someone still owns a
697 * reference to it - otherwise it's awaiting the gc.
698 */
699 if (!refcount_inc_not_zero(&key->usage))
700 goto not_found;
701
702 error:
703 spin_unlock(&key_serial_lock);
704 if (IS_ERR(key))
> 705 pr_info("%s: ret=%d\n", __func__, PTR_ERR(key));
706 return key;
707 }
708 EXPORT_SYMBOL(key_lookup);
709
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-06-13 3:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-13 3:36 [jarkko-tpmdd:tpm2key-v8 7/7] security/keys/key.c:705:37: warning: format specifies type 'int' but the argument has type 'long' 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;
as well as URLs for NNTP newsgroup(s).