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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202108210143.H7kfGMOL-lkp@intel.com>
Date:   Sat, 21 Aug 2021 02:07:44 +0800
From:   kernel test robot <lkp@...el.com>
To:     CGEL <cgel.zte@...il.com>,
        "James E . J . Bottomley" <jejb@...ux.ibm.com>
Cc:     kbuild-all@...ts.01.org,
        "Martin K . Petersen" <martin.petersen@...cle.com>,
        linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
        jing yangyang <jing.yangyang@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH linux-next] scsi/ncr53c8xx: Use bitwise instead of
 arithmetic operator for flags

Hi CGEL,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on next-20210819]

url:    https://github.com/0day-ci/linux/commits/CGEL/scsi-ncr53c8xx-Use-bitwise-instead-of-arithmetic-operator-for-flags/20210820-111510
base:    33e65b1f975cd2814fc0ea9617250fc4c1d7a553
config: parisc-defconfig (attached as .config)
compiler: hppa-linux-gcc (GCC) 11.2.0
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/0day-ci/linux/commit/1c952d92c3d9f7e1609d3770e0c9194fdcf05603
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review CGEL/scsi-ncr53c8xx-Use-bitwise-instead-of-arithmetic-operator-for-flags/20210820-111510
        git checkout 1c952d92c3d9f7e1609d3770e0c9194fdcf05603
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=parisc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   drivers/scsi/ncr53c8xx.c: In function 'ncr_getclock':
>> drivers/scsi/ncr53c8xx.c:7913:53: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses]
    7913 |         if (mult > 1 && (stest1 & (DBLEN | DBLSEL)) == DBLEN | DBLSEL) {


vim +7913 drivers/scsi/ncr53c8xx.c

  7897	
  7898	/*
  7899	 *	Get/probe NCR SCSI clock frequency
  7900	 */
  7901	static void __init ncr_getclock (struct ncb *np, int mult)
  7902	{
  7903		unsigned char scntl3 = INB(nc_scntl3);
  7904		unsigned char stest1 = INB(nc_stest1);
  7905		unsigned f1;
  7906	
  7907		np->multiplier = 1;
  7908		f1 = 40000;
  7909	
  7910		/*
  7911		**	True with 875 or 895 with clock multiplier selected
  7912		*/
> 7913		if (mult > 1 && (stest1 & (DBLEN | DBLSEL)) == DBLEN | DBLSEL) {
  7914			if (bootverbose >= 2)
  7915				printk ("%s: clock multiplier found\n", ncr_name(np));
  7916			np->multiplier = mult;
  7917		}
  7918	
  7919		/*
  7920		**	If multiplier not found or scntl3 not 7,5,3,
  7921		**	reset chip and get frequency from general purpose timer.
  7922		**	Otherwise trust scntl3 BIOS setting.
  7923		*/
  7924		if (np->multiplier != mult || (scntl3 & 7) < 3 || !(scntl3 & 1)) {
  7925			unsigned f2;
  7926	
  7927			ncr_chip_reset(np, 5);
  7928	
  7929			(void) ncrgetfreq (np, 11);	/* throw away first result */
  7930			f1 = ncrgetfreq (np, 11);
  7931			f2 = ncrgetfreq (np, 11);
  7932	
  7933			if(bootverbose)
  7934				printk ("%s: NCR clock is %uKHz, %uKHz\n", ncr_name(np), f1, f2);
  7935	
  7936			if (f1 > f2) f1 = f2;		/* trust lower result	*/
  7937	
  7938			if	(f1 <	45000)		f1 =  40000;
  7939			else if (f1 <	55000)		f1 =  50000;
  7940			else				f1 =  80000;
  7941	
  7942			if (f1 < 80000 && mult > 1) {
  7943				if (bootverbose >= 2)
  7944					printk ("%s: clock multiplier assumed\n", ncr_name(np));
  7945				np->multiplier	= mult;
  7946			}
  7947		} else {
  7948			if	((scntl3 & 7) == 3)	f1 =  40000;
  7949			else if	((scntl3 & 7) == 5)	f1 =  80000;
  7950			else 				f1 = 160000;
  7951	
  7952			f1 /= np->multiplier;
  7953		}
  7954	
  7955		/*
  7956		**	Compute controller synchronous parameters.
  7957		*/
  7958		f1		*= np->multiplier;
  7959		np->clock_khz	= f1;
  7960	}
  7961	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (18850 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ