CC: [email protected]
BCC: [email protected]
CC: [email protected]
TO: Cosmin Tanislav <[email protected]>
CC: Jonathan Cameron <[email protected]>
CC: Linus Walleij <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   9050ba3a61a4b5bd84c2cde092a100404f814f31
commit: fea251b6a5dbdf8ba8af64abcd013d66ab6b05ee iio: addac: add AD74413R driver
date:   5 months ago
:::::: branch date: 15 hours ago
:::::: commit date: 5 months ago
compiler: arm-linux-gnueabi-gcc (GCC) 11.3.0
reproduce (cppcheck warning):
        # apt-get install cppcheck
        git checkout fea251b6a5dbdf8ba8af64abcd013d66ab6b05ee
        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 <[email protected]>


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

>> drivers/iio/addac/ad74413r.c:283:27: warning: Parameter 'bits' can be 
>> declared with const [constParameter]
              unsigned long *bits)
                             ^

vim +/bits +283 drivers/iio/addac/ad74413r.c

fea251b6a5dbdf Cosmin Tanislav 2021-12-05  280  
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  281  static void 
ad74413r_gpio_set_multiple(struct gpio_chip *chip,
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  282                                  
       unsigned long *mask,
fea251b6a5dbdf Cosmin Tanislav 2021-12-05 @283                                  
       unsigned long *bits)
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  284  {
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  285          struct ad74413r_state 
*st = gpiochip_get_data(chip);
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  286          unsigned long real_mask 
= 0;
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  287          unsigned long real_bits 
= 0;
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  288          unsigned int offset = 0;
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  289          int ret;
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  290  
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  291          
for_each_set_bit_from(offset, mask, AD74413R_CHANNEL_MAX) {
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  292                  unsigned int 
real_offset = st->gpo_gpio_offsets[offset];
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  293  
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  294                  ret = 
ad74413r_set_gpo_config(st, real_offset,
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  295                          
AD74413R_GPO_CONFIG_LOGIC_PARALLEL);
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  296                  if (ret)
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  297                          return;
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  298  
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  299                  real_mask |= 
BIT(real_offset);
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  300                  if (*bits & 
offset)
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  301                          
real_bits |= BIT(real_offset);
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  302          }
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  303  
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  304          
regmap_update_bits(st->regmap, AD74413R_REG_GPO_PAR_DATA,
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  305                             
real_mask, real_bits);
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  306  }
fea251b6a5dbdf Cosmin Tanislav 2021-12-05  307  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to