[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202110281624.lV6hDzvG-lkp@intel.com>
Date: Wed, 3 Nov 2021 17:57:33 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: kbuild@...ts.01.org, Alex Helms <alexander.helms.jy@...esas.com>,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
linux-clk@...r.kernel.org, linux-renesas-soc@...r.kernel.org
Cc: lkp@...el.com, kbuild-all@...ts.01.org, robh+dt@...nel.org,
sboyd@...nel.org, mturquette@...libre.com, geert+renesas@...der.be,
alexander.helms.jy@...esas.com, david.cater.jc@...esas.com
Subject: Re: [PATCH v8 2/2] clk: Add ccf driver for Renesas 8T49N241
Hi Alex,
url: https://github.com/0day-ci/linux/commits/Alex-Helms/Renesas-8T49N241-device-driver/20211022-053306
base: 519d81956ee277b4419c723adfb154603c2565ba
config: x86_64-randconfig-m001-20211027 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
New smatch warnings:
drivers/clk/8t49n24x-core.c:94 __renesas_i2c_write_bulk() error: uninitialized symbol 'err'.
drivers/clk/8t49n24x.c:416 r8t49n24x_probe() warn: excess argument passed to 'sprintf'
drivers/clk/8t49n24x.c:448 r8t49n24x_probe() warn: inconsistent indenting
vim +/err +94 drivers/clk/8t49n24x-core.c
38bfc1ee0c46d7 Alex Helms 2021-10-21 67 int __renesas_i2c_write_bulk(struct i2c_client *client, struct regmap *map,
38bfc1ee0c46d7 Alex Helms 2021-10-21 68 unsigned int reg, u8 val[], size_t val_count)
38bfc1ee0c46d7 Alex Helms 2021-10-21 69 {
38bfc1ee0c46d7 Alex Helms 2021-10-21 70 u8 block[WRITE_BLOCK_SIZE];
38bfc1ee0c46d7 Alex Helms 2021-10-21 71 unsigned int block_offset = reg;
38bfc1ee0c46d7 Alex Helms 2021-10-21 72 unsigned int i, currentOffset = 0;
38bfc1ee0c46d7 Alex Helms 2021-10-21 73 int err;
38bfc1ee0c46d7 Alex Helms 2021-10-21 74
38bfc1ee0c46d7 Alex Helms 2021-10-21 75 dev_dbg(&client->dev,
38bfc1ee0c46d7 Alex Helms 2021-10-21 76 "I2C->0x%04x : [hex] . First byte: %02x, Second byte: %02x",
38bfc1ee0c46d7 Alex Helms 2021-10-21 77 reg, reg >> 8, reg & 0xFF);
38bfc1ee0c46d7 Alex Helms 2021-10-21 78
38bfc1ee0c46d7 Alex Helms 2021-10-21 79 print_hex_dump_debug("i2c_write_bulk: ", DUMP_PREFIX_NONE,
38bfc1ee0c46d7 Alex Helms 2021-10-21 80 16, 1, val, val_count, false);
38bfc1ee0c46d7 Alex Helms 2021-10-21 81
38bfc1ee0c46d7 Alex Helms 2021-10-21 82 for (i = 0; i < val_count; i++) {
38bfc1ee0c46d7 Alex Helms 2021-10-21 83 block[currentOffset++] = val[i];
38bfc1ee0c46d7 Alex Helms 2021-10-21 84
38bfc1ee0c46d7 Alex Helms 2021-10-21 85 if (i > 0 && (i + 1) % WRITE_BLOCK_SIZE == 0) {
38bfc1ee0c46d7 Alex Helms 2021-10-21 86 err = regmap_bulk_write(map, block_offset, block, WRITE_BLOCK_SIZE);
"err" is not set if val_count is 1 or in a bunch of other success paths.
38bfc1ee0c46d7 Alex Helms 2021-10-21 87 if (err)
38bfc1ee0c46d7 Alex Helms 2021-10-21 88 break;
38bfc1ee0c46d7 Alex Helms 2021-10-21 89 block_offset += WRITE_BLOCK_SIZE;
38bfc1ee0c46d7 Alex Helms 2021-10-21 90 currentOffset = 0;
38bfc1ee0c46d7 Alex Helms 2021-10-21 91 }
38bfc1ee0c46d7 Alex Helms 2021-10-21 92 }
38bfc1ee0c46d7 Alex Helms 2021-10-21 93
38bfc1ee0c46d7 Alex Helms 2021-10-21 @94 if (err == 0 && currentOffset > 0)
38bfc1ee0c46d7 Alex Helms 2021-10-21 95 err = regmap_bulk_write(map, block_offset, block, currentOffset);
38bfc1ee0c46d7 Alex Helms 2021-10-21 96
38bfc1ee0c46d7 Alex Helms 2021-10-21 97 return err;
38bfc1ee0c46d7 Alex Helms 2021-10-21 98 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Powered by blists - more mailing lists