oe-kbuild.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* block/blk-crypto-sysfs.c:82:33: warning: Parameter 'attr' can be declared as pointer to const [constParameter]
@ 2022-12-05 18:32 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-12-05 18:32 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "low confidence static check warning: block/blk-crypto-sysfs.c:82:33: warning: Parameter 'attr' can be declared as pointer to const [constParameter]"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Eric Biggers <ebiggers@google.com>
CC: Jens Axboe <axboe@kernel.dk>
CC: Hannes Reinecke <hare@suse.de>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   76dcd734eca23168cb008912c0f69ff408905235
commit: 20f01f163203666010ee1560852590a0c0572726 blk-crypto: show crypto capabilities in sysfs
date:   9 months ago
:::::: branch date: 20 hours ago
:::::: commit date: 9 months ago
compiler: mipsel-linux-gcc (GCC) 12.1.0
reproduce (cppcheck warning):
        # apt-get install cppcheck
        git checkout 20f01f163203666010ee1560852590a0c0572726
        cppcheck --quiet --enable=style,performance,portability --template=gcc FILE

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> block/blk-crypto-sysfs.c:82:33: warning: Parameter 'attr' can be declared as pointer to const [constParameter]
           struct blk_crypto_attr *attr, char *page)
                                   ^

vim +/attr +82 block/blk-crypto-sysfs.c

20f01f163203666 Eric Biggers 2022-01-24  80  
20f01f163203666 Eric Biggers 2022-01-24  81  static ssize_t blk_crypto_mode_show(struct blk_crypto_profile *profile,
20f01f163203666 Eric Biggers 2022-01-24 @82  				    struct blk_crypto_attr *attr, char *page)
20f01f163203666 Eric Biggers 2022-01-24  83  {
20f01f163203666 Eric Biggers 2022-01-24  84  	int mode_num = attr - __blk_crypto_mode_attrs;
20f01f163203666 Eric Biggers 2022-01-24  85  
20f01f163203666 Eric Biggers 2022-01-24  86  	return sysfs_emit(page, "0x%x\n", profile->modes_supported[mode_num]);
20f01f163203666 Eric Biggers 2022-01-24  87  }
20f01f163203666 Eric Biggers 2022-01-24  88  

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

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

* block/blk-crypto-sysfs.c:82:33: warning: Parameter 'attr' can be declared as pointer to const [constParameter]
@ 2023-02-14 15:23 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2023-02-14 15:23 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "low confidence static check warning: block/blk-crypto-sysfs.c:82:33: warning: Parameter 'attr' can be declared as pointer to const [constParameter]"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Eric Biggers <ebiggers@google.com>
CC: Jens Axboe <axboe@kernel.dk>
CC: Hannes Reinecke <hare@suse.de>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f6feea56f66d34259c4222fa02e8171c4f2673d1
commit: 20f01f163203666010ee1560852590a0c0572726 blk-crypto: show crypto capabilities in sysfs
date:   12 months ago
:::::: branch date: 17 hours ago
:::::: commit date: 12 months ago
compiler: sparc-linux-gcc (GCC) 12.1.0
reproduce (cppcheck warning):
        # apt-get install cppcheck
        git checkout 20f01f163203666010ee1560852590a0c0572726
        cppcheck --quiet --enable=style,performance,portability --template=gcc FILE

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/r/202302142347.7XAcfTOc-lkp@intel.com/


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> crypto/testmgr.c:3661:6: warning: Redundant initialization for 'ret'. The initialized value is overwritten before it is read. [redundantInitialization]
    ret = crypto_drbg_reset_test(drng, &pers, &test_data);
        ^
   crypto/testmgr.c:3641:10: note: ret is initialized
    int ret = -EAGAIN;
            ^
   crypto/testmgr.c:3661:6: note: ret is overwritten
    ret = crypto_drbg_reset_test(drng, &pers, &test_data);
        ^
>> crypto/testmgr.c:915:41: warning: Parameter 'end' can be declared as pointer to const [constParameter]
           size_t max_divs, char *p, char *end,
                                           ^
>> block/blk-crypto-sysfs.c:82:33: warning: Parameter 'attr' can be declared as pointer to const [constParameter]
           struct blk_crypto_attr *attr, char *page)
                                   ^
--
>> block/blk-integrity.c:263:9: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
    return sprintf(page, "%un",
           ^
--
>> block/blk-wbt.c:618:62: warning: Parameter 'rq' can be declared as pointer to const [constParameter]
   static void wbt_requeue(struct rq_qos *rqos, struct request *rq)
                                                                ^
--
>> block/blk-throttle.c:1473:3: warning: %llu in format string (no. 1) requires 'unsigned long long' but the argument type is 'unsigned long'. [invalidPrintfArgType_uint]
     snprintf(bufs[0], sizeof(bufs[0]), "%llu",
     ^
   block/blk-throttle.c:1476:3: warning: %llu in format string (no. 1) requires 'unsigned long long' but the argument type is 'unsigned long'. [invalidPrintfArgType_uint]
     snprintf(bufs[1], sizeof(bufs[1]), "%llu",
     ^
>> block/blk-throttle.c:1770:21: warning: Parameter 'this_tg' can be declared as pointer to const [constParameter]
    struct throtl_grp *this_tg)
                       ^

vim +/attr +82 block/blk-crypto-sysfs.c

20f01f16320366 Eric Biggers 2022-01-24  80  
20f01f16320366 Eric Biggers 2022-01-24  81  static ssize_t blk_crypto_mode_show(struct blk_crypto_profile *profile,
20f01f16320366 Eric Biggers 2022-01-24 @82  				    struct blk_crypto_attr *attr, char *page)
20f01f16320366 Eric Biggers 2022-01-24  83  {
20f01f16320366 Eric Biggers 2022-01-24  84  	int mode_num = attr - __blk_crypto_mode_attrs;
20f01f16320366 Eric Biggers 2022-01-24  85  
20f01f16320366 Eric Biggers 2022-01-24  86  	return sysfs_emit(page, "0x%x\n", profile->modes_supported[mode_num]);
20f01f16320366 Eric Biggers 2022-01-24  87  }
20f01f16320366 Eric Biggers 2022-01-24  88  

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

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

* block/blk-crypto-sysfs.c:82:33: warning: Parameter 'attr' can be declared as pointer to const [constParameter]
@ 2022-11-06 17:06 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-11-06 17:06 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "low confidence static check warning: block/blk-crypto-sysfs.c:82:33: warning: Parameter 'attr' can be declared as pointer to const [constParameter]"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Eric Biggers <ebiggers@google.com>
CC: Jens Axboe <axboe@kernel.dk>
CC: Hannes Reinecke <hare@suse.de>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   2f5065a0bc9d0afb45f2ae284bd525d55ce82c33
commit: 20f01f163203666010ee1560852590a0c0572726 blk-crypto: show crypto capabilities in sysfs
date:   8 months ago
:::::: branch date: 22 hours ago
:::::: commit date: 8 months ago
compiler: sh4-linux-gcc (GCC) 12.1.0
reproduce (cppcheck warning):
        # apt-get install cppcheck
        git checkout 20f01f163203666010ee1560852590a0c0572726
        cppcheck --quiet --enable=style,performance,portability --template=gcc FILE

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> block/blk-crypto-sysfs.c:82:33: warning: Parameter 'attr' can be declared as pointer to const [constParameter]
           struct blk_crypto_attr *attr, char *page)
                                   ^

vim +/attr +82 block/blk-crypto-sysfs.c

20f01f16320366 Eric Biggers 2022-01-24  80  
20f01f16320366 Eric Biggers 2022-01-24  81  static ssize_t blk_crypto_mode_show(struct blk_crypto_profile *profile,
20f01f16320366 Eric Biggers 2022-01-24 @82  				    struct blk_crypto_attr *attr, char *page)
20f01f16320366 Eric Biggers 2022-01-24  83  {
20f01f16320366 Eric Biggers 2022-01-24  84  	int mode_num = attr - __blk_crypto_mode_attrs;
20f01f16320366 Eric Biggers 2022-01-24  85  
20f01f16320366 Eric Biggers 2022-01-24  86  	return sysfs_emit(page, "0x%x\n", profile->modes_supported[mode_num]);
20f01f16320366 Eric Biggers 2022-01-24  87  }
20f01f16320366 Eric Biggers 2022-01-24  88  

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

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

end of thread, other threads:[~2023-02-14 15:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-05 18:32 block/blk-crypto-sysfs.c:82:33: warning: Parameter 'attr' can be declared as pointer to const [constParameter] kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2023-02-14 15:23 kernel test robot
2022-11-06 17:06 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).