All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com
Subject: block/blk-crypto-sysfs.c:82:33: warning: Parameter 'attr' can be declared as pointer to const [constParameter]
Date: Mon, 7 Nov 2022 01:06:37 +0800	[thread overview]
Message-ID: <202211070146.Me8ASvqt-lkp@intel.com> (raw)

:::::: 
:::::: 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

             reply	other threads:[~2022-11-06 17:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-06 17:06 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
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
2023-02-14 15:23 kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202211070146.Me8ASvqt-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.