lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202206140056.8QrXxr1C-lkp@intel.com>
Date:   Tue, 14 Jun 2022 00:10:14 +0800
From:   kernel test robot <lkp@...el.com>
To:     Alexander Lobakin <alexandr.lobakin@...el.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [alobakin:bitops 6/6] arch/x86/platform/olpc/olpc-xo1-sci.c:83:63:
 warning: logical not is only applied to the left hand side of comparison

tree:   https://github.com/alobakin/linux bitops
head:   d8371d0e4328c4cb6fa25350bd5132f25b386672
commit: d8371d0e4328c4cb6fa25350bd5132f25b386672 [6/6] bitops: let optimize out non-atomic bitops on compile-time constants
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220614/202206140056.8QrXxr1C-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/alobakin/linux/commit/d8371d0e4328c4cb6fa25350bd5132f25b386672
        git remote add alobakin https://github.com/alobakin/linux
        git fetch --no-tags alobakin bitops
        git checkout d8371d0e4328c4cb6fa25350bd5132f25b386672
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash arch/x86/platform/olpc/

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

   arch/x86/platform/olpc/olpc-xo1-sci.c: In function 'send_ebook_state':
>> arch/x86/platform/olpc/olpc-xo1-sci.c:83:63: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
      83 |         if (!!test_bit(SW_TABLET_MODE, ebook_switch_idev->sw) == state)
         |                                                               ^~
   arch/x86/platform/olpc/olpc-xo1-sci.c:83:13: note: add parentheses around left hand side expression to silence this warning
      83 |         if (!!test_bit(SW_TABLET_MODE, ebook_switch_idev->sw) == state)
   arch/x86/platform/olpc/olpc-xo1-sci.c: In function 'setup_sci_interrupt':
   arch/x86/platform/olpc/olpc-xo1-sci.c:316:13: warning: variable 'sts' set but not used [-Wunused-but-set-variable]
     316 |         u32 sts;
         |             ^~~


vim +83 arch/x86/platform/olpc/olpc-xo1-sci.c

e1040ac693bac1 Daniel Drake 2011-06-25  72  
7bc74b3df73776 Daniel Drake 2011-06-25  73  /* Report current ebook switch state through input layer */
7bc74b3df73776 Daniel Drake 2011-06-25  74  static void send_ebook_state(void)
7bc74b3df73776 Daniel Drake 2011-06-25  75  {
7bc74b3df73776 Daniel Drake 2011-06-25  76  	unsigned char state;
7bc74b3df73776 Daniel Drake 2011-06-25  77  
7bc74b3df73776 Daniel Drake 2011-06-25  78  	if (olpc_ec_cmd(EC_READ_EB_MODE, NULL, 0, &state, 1)) {
7bc74b3df73776 Daniel Drake 2011-06-25  79  		pr_err(PFX "failed to get ebook state\n");
7bc74b3df73776 Daniel Drake 2011-06-25  80  		return;
7bc74b3df73776 Daniel Drake 2011-06-25  81  	}
7bc74b3df73776 Daniel Drake 2011-06-25  82  
d2aa37411b8e65 Daniel Drake 2012-04-12 @83  	if (!!test_bit(SW_TABLET_MODE, ebook_switch_idev->sw) == state)
d2aa37411b8e65 Daniel Drake 2012-04-12  84  		return; /* Nothing new to report. */
d2aa37411b8e65 Daniel Drake 2012-04-12  85  
7bc74b3df73776 Daniel Drake 2011-06-25  86  	input_report_switch(ebook_switch_idev, SW_TABLET_MODE, state);
7bc74b3df73776 Daniel Drake 2011-06-25  87  	input_sync(ebook_switch_idev);
d2aa37411b8e65 Daniel Drake 2012-04-12  88  	pm_wakeup_event(&ebook_switch_idev->dev, 0);
7bc74b3df73776 Daniel Drake 2011-06-25  89  }
7bc74b3df73776 Daniel Drake 2011-06-25  90  

:::::: The code at line 83 was first introduced by commit
:::::: d2aa37411b8e65d57d2c5ae36f0222274292020d x86/olpc/xo1/sci: Produce wakeup events for buttons and switches

:::::: TO: Daniel Drake <dsd@...top.org>
:::::: CC: Ingo Molnar <mingo@...nel.org>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ