[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202212041718.jMw8MfVl-lkp@intel.com>
Date: Sun, 4 Dec 2022 17:50:58 +0800
From: kernel test robot <lkp@...el.com>
To: Badhri Jagan Sridharan <badhri@...gle.com>,
Guenter Roeck <linux@...ck-us.net>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
Kyle Tso <kyletso@...gle.com>,
Badhri Jagan Sridharan <badhri@...gle.com>
Subject: Re: [PATCH v3 3/3] usb: typec: maxim_contaminant: Implement
check_contaminant callback
Hi Badhri,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on 1524ceb14dd5ebd6f724d993c5ec1a9a8d445d8e]
url: https://github.com/intel-lab-lkp/linux/commits/Badhri-Jagan-Sridharan/usb-typec-tcpm-Add-callbacks-to-mitigate-wakeups-due-to-contaminant/20221204-165036
base: 1524ceb14dd5ebd6f724d993c5ec1a9a8d445d8e
patch link: https://lore.kernel.org/r/20221204084844.3573800-3-badhri%40google.com
patch subject: [PATCH v3 3/3] usb: typec: maxim_contaminant: Implement check_contaminant callback
config: i386-randconfig-a002
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/e04cbf4a4f166e35752780b9a2a89740a1114b80
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Badhri-Jagan-Sridharan/usb-typec-tcpm-Add-callbacks-to-mitigate-wakeups-due-to-contaminant/20221204-165036
git checkout e04cbf4a4f166e35752780b9a2a89740a1114b80
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/usb/typec/tcpm/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> drivers/usb/typec/tcpm/maxim_contaminant.c:316:8: warning: variable 'state' is uninitialized when used here [-Wuninitialized]
if (state == DETECTED) {
^~~~~
drivers/usb/typec/tcpm/maxim_contaminant.c:294:2: note: variable 'state' is declared here
enum contamiant_state state;
^
1 warning generated.
vim +/state +316 drivers/usb/typec/tcpm/maxim_contaminant.c
290
291 bool is_contaminant(struct max_tcpci_chip *chip, bool disconnect_while_debounce)
292 {
293 u8 cc_status, pwr_cntl;
294 enum contamiant_state state;
295
296 max_tcpci_read8(chip, TCPC_CC_STATUS, &cc_status);
297 max_tcpci_read8(chip, TCPC_POWER_CTRL, &pwr_cntl);
298
299 if (chip->contaminant_state == NOT_DETECTED || chip->contaminant_state == SINK) {
300 if (!disconnect_while_debounce)
301 msleep(100);
302
303 max_tcpci_read8(chip, TCPC_CC_STATUS, &cc_status);
304 if (IS_CC_OPEN(cc_status)) {
305 u8 role_ctrl, role_ctrl_backup;
306
307 max_tcpci_read8(chip, TCPC_ROLE_CTRL, &role_ctrl);
308 role_ctrl_backup = role_ctrl;
309 role_ctrl |= 0x0F;
310 role_ctrl &= ~(TCPC_ROLE_CTRL_DRP);
311 max_tcpci_write8(chip, TCPC_ROLE_CTRL, role_ctrl);
312
313 chip->contaminant_state = detect_contaminant(chip);
314
315 max_tcpci_write8(chip, TCPC_ROLE_CTRL, role_ctrl_backup);
> 316 if (state == DETECTED) {
317 enable_dry_detection(chip);
318 return true;
319 }
320 }
321 return false;
322 } else if (chip->contaminant_state == DETECTED) {
323 if (STATUS_CHECK(cc_status, TCPC_CC_STATUS_TOGGLING, 0)) {
324 chip->contaminant_state = detect_contaminant(chip);
325 if (state == DETECTED) {
326 enable_dry_detection(chip);
327 return true;
328 }
329 }
330 }
331
332 return false;
333 }
334 EXPORT_SYMBOL_GPL(is_contaminant);
335
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (167979 bytes)
Powered by blists - more mailing lists