From: kernel test robot <lkp@intel.com>
To: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>,
Jean Delvare <jdelvare@suse.com>,
Andi Shyti <andi.shyti@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-i2c@vger.kernel.org, Sanket.Goswami@amd.com,
Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Subject: Re: [PATCH 3/5] i2c: piix4: Add ACPI support for ASF SMBus device
Date: Mon, 26 Aug 2024 18:54:35 +0800 [thread overview]
Message-ID: <202408261816.iYeJHXHU-lkp@intel.com> (raw)
In-Reply-To: <20240822142200.686842-4-Shyam-sundar.S-k@amd.com>
Hi Shyam,
kernel test robot noticed the following build warnings:
[auto build test WARNING on andi-shyti/i2c/i2c-host]
[also build test WARNING on linus/master v6.11-rc5 next-20240823]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Shyam-Sundar-S-K/i2c-piix4-Allow-more-than-two-algo-selection-for-SMBus/20240826-113028
base: https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git i2c/i2c-host
patch link: https://lore.kernel.org/r/20240822142200.686842-4-Shyam-sundar.S-k%40amd.com
patch subject: [PATCH 3/5] i2c: piix4: Add ACPI support for ASF SMBus device
config: i386-buildonly-randconfig-003-20240826 (https://download.01.org/0day-ci/archive/20240826/202408261816.iYeJHXHU-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240826/202408261816.iYeJHXHU-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/202408261816.iYeJHXHU-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/i2c/busses/i2c-piix4.c:935:6: warning: variable 'cmd' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
935 | if (!(reg & SB800_ASF_ERROR_STATUS)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/i2c/busses/i2c-piix4.c:971:8: note: uninitialized use occurs here
971 | if (!(cmd & BIT(0))) {
| ^~~
drivers/i2c/busses/i2c-piix4.c:935:2: note: remove the 'if' if its condition is always true
935 | if (!(reg & SB800_ASF_ERROR_STATUS)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/i2c/busses/i2c-piix4.c:927:19: note: initialize the variable 'cmd' to silence this warning
927 | u8 bank, reg, cmd;
| ^
| = '\0'
1 warning generated.
vim +935 drivers/i2c/busses/i2c-piix4.c
920
921 static void sb800_asf_process_slave(struct work_struct *work)
922 {
923 struct i2c_piix4_adapdata *adapdata = container_of(work, struct i2c_piix4_adapdata,
924 work_buf.work);
925 unsigned short piix4_smba = adapdata->smba;
926 u8 data[SB800_ASF_BLOCK_MAX_BYTES];
927 u8 bank, reg, cmd;
928 u8 len, val = 0;
929 int i;
930
931 /* Read slave status register */
932 reg = inb_p(ASFSLVSTA);
933
934 /* Check if no error bits are set in slave status register */
> 935 if (!(reg & SB800_ASF_ERROR_STATUS)) {
936 /* Read data bank */
937 reg = inb_p(ASFDATABNKSEL);
938 bank = (reg & BIT(3)) >> 3;
939
940 /* Set read data bank */
941 if (bank) {
942 reg = reg | BIT(4);
943 reg = reg & (~BIT(3));
944 } else {
945 reg = reg & (~BIT(4));
946 reg = reg & (~BIT(2));
947 }
948
949 /* Read command register */
950 outb_p(reg, ASFDATABNKSEL);
951 cmd = inb_p(ASFINDEX);
952 len = inb_p(ASFDATARWPTR);
953 for (i = 0; i < len; i++)
954 data[i] = inb_p(ASFINDEX);
955
956 /* Clear data bank status */
957 if (bank) {
958 reg = reg | BIT(3);
959 outb_p(reg, ASFDATABNKSEL);
960 } else {
961 reg = reg | BIT(2);
962 outb_p(reg, ASFDATABNKSEL);
963 }
964 } else {
965 /* Set bank as full */
966 reg = reg | (BIT(3) | BIT(2));
967 outb_p(reg, ASFDATABNKSEL);
968 }
969
970 outb_p(0, ASFSETDATARDPTR);
971 if (!(cmd & BIT(0))) {
972 i2c_slave_event(adapdata->slave, I2C_SLAVE_WRITE_REQUESTED, &val);
973 for (i = 0; i < len; i++) {
974 val = data[i];
975 i2c_slave_event(adapdata->slave, I2C_SLAVE_WRITE_RECEIVED, &val);
976 }
977 i2c_slave_event(adapdata->slave, I2C_SLAVE_STOP, &val);
978 }
979 }
980
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-08-26 10:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-22 14:21 [PATCH 0/5] Add ASF Controller Support to the i2c-piix4 driver Shyam Sundar S K
2024-08-22 14:21 ` [PATCH 1/5] i2c: piix4: Allow more than two algo selection for SMBus Shyam Sundar S K
2024-09-03 21:49 ` Andi Shyti
2024-08-22 14:21 ` [PATCH 2/5] i2c: piix4: Add i2c_algorithm operations to support AMD ASF with SMBus Shyam Sundar S K
2024-08-26 10:54 ` kernel test robot
2024-08-26 11:04 ` kernel test robot
2024-08-22 14:21 ` [PATCH 3/5] i2c: piix4: Add ACPI support for ASF SMBus device Shyam Sundar S K
2024-08-26 10:54 ` kernel test robot [this message]
2024-09-03 19:36 ` Shyam Sundar S K
2024-09-03 20:06 ` Andy Shevchenko
2024-09-04 11:03 ` Shyam Sundar S K
2024-08-22 14:21 ` [PATCH 4/5] i2c: piix4: Adjust the SMBus debug message Shyam Sundar S K
2024-09-03 21:51 ` Andi Shyti
2024-09-04 11:01 ` Shyam Sundar S K
2024-08-22 14:22 ` [PATCH 5/5] i2c: piix4: Clear remote IRR bit to get successive interrupt Shyam Sundar S K
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=202408261816.iYeJHXHU-lkp@intel.com \
--to=lkp@intel.com \
--cc=Sanket.Goswami@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=andi.shyti@kernel.org \
--cc=jdelvare@suse.com \
--cc=linux-i2c@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox