All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC PATCH 02/17] atm: Drop uses of pci_read_config_*() return value
Date: Wed, 05 Aug 2020 18:51:15 +0800	[thread overview]
Message-ID: <202008051802.6A41qYp2%lkp@intel.com> (raw)
In-Reply-To: <20200801112446.149549-3-refactormyself@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 8316 bytes --]

Hi "Saheed,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on wsa/i2c/for-next]
[also build test WARNING on linus/master ide/master v5.8 next-20200804]
[cannot apply to ras/edac-for-next]
[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]

url:    https://github.com/0day-ci/linux/commits/Saheed-O-Bolarinwa/Drop-uses-of-pci_read_config_-return-value/20200801-202925
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
config: x86_64-randconfig-r032-20200805 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project e8b7edafc3dd0ab85903eebdfdb3bb7cc2d66743)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

>> drivers/atm/zatm.c:1117:12: warning: result of comparison of constant 18446744073709551615 with expression of type 'unsigned int' is always false [-Wtautological-constant-out-of-range-compare]
           if (value == (u64)~0)
               ~~~~~ ^  ~~~~~~~
>> drivers/atm/zatm.c:1203:19: warning: variable 'error' is uninitialized when used here [-Wuninitialized]
                       dev->number,error);
                                   ^~~~~
   drivers/atm/zatm.c:1191:11: note: initialize the variable 'error' to silence this warning
           int error,i,last;
                    ^
                     = 0
   2 warnings generated.
--
>> drivers/atm/lanai.c:1103:30: warning: variable 'result' is uninitialized when used here [-Wuninitialized]
                       "%d\n", lanai->number, result);
                                              ^~~~~~
   drivers/atm/lanai.c:1099:12: note: initialize the variable 'result' to silence this warning
           int result;
                     ^
                      = 0
   1 warning generated.

vim +1117 drivers/atm/zatm.c

  1110	
  1111	
  1112	static unsigned long eprom_get(struct zatm_dev *zatm_dev, unsigned short cmd)
  1113	{
  1114		unsigned int value;
  1115	
  1116		pci_read_config_dword(zatm_dev->pci_dev, cmd, &value);
> 1117		if (value == (u64)~0)
  1118			printk(KERN_ERR DEV_LABEL ": PCI read failed (0x%02x)\n",
  1119			    value);
  1120		return value;
  1121	}
  1122	
  1123	
  1124	static void eprom_put_bits(struct zatm_dev *zatm_dev, unsigned long data,
  1125				   int bits, unsigned short cmd)
  1126	{
  1127		unsigned long value;
  1128		int i;
  1129	
  1130		for (i = bits-1; i >= 0; i--) {
  1131			value = ZEPROM_CS | (((data >> i) & 1) ? ZEPROM_DI : 0);
  1132			eprom_set(zatm_dev,value,cmd);
  1133			eprom_set(zatm_dev,value | ZEPROM_SK,cmd);
  1134			eprom_set(zatm_dev,value,cmd);
  1135		}
  1136	}
  1137	
  1138	
  1139	static void eprom_get_byte(struct zatm_dev *zatm_dev, unsigned char *byte,
  1140				   unsigned short cmd)
  1141	{
  1142		int i;
  1143	
  1144		*byte = 0;
  1145		for (i = 8; i; i--) {
  1146			eprom_set(zatm_dev,ZEPROM_CS,cmd);
  1147			eprom_set(zatm_dev,ZEPROM_CS | ZEPROM_SK,cmd);
  1148			*byte <<= 1;
  1149			if (eprom_get(zatm_dev,cmd) & ZEPROM_DO) *byte |= 1;
  1150			eprom_set(zatm_dev,ZEPROM_CS,cmd);
  1151		}
  1152	}
  1153	
  1154	
  1155	static int eprom_try_esi(struct atm_dev *dev, unsigned short cmd, int offset,
  1156				 int swap)
  1157	{
  1158		unsigned char buf[ZEPROM_SIZE];
  1159		struct zatm_dev *zatm_dev;
  1160		int i;
  1161	
  1162		zatm_dev = ZATM_DEV(dev);
  1163		for (i = 0; i < ZEPROM_SIZE; i += 2) {
  1164			eprom_set(zatm_dev,ZEPROM_CS,cmd); /* select EPROM */
  1165			eprom_put_bits(zatm_dev,ZEPROM_CMD_READ,ZEPROM_CMD_LEN,cmd);
  1166			eprom_put_bits(zatm_dev,i >> 1,ZEPROM_ADDR_LEN,cmd);
  1167			eprom_get_byte(zatm_dev,buf+i+swap,cmd);
  1168			eprom_get_byte(zatm_dev,buf+i+1-swap,cmd);
  1169			eprom_set(zatm_dev,0,cmd); /* deselect EPROM */
  1170		}
  1171		memcpy(dev->esi,buf+offset,ESI_LEN);
  1172		return memcmp(dev->esi,"\0\0\0\0\0",ESI_LEN); /* assumes ESI_LEN == 6 */
  1173	}
  1174	
  1175	
  1176	static void eprom_get_esi(struct atm_dev *dev)
  1177	{
  1178		if (eprom_try_esi(dev,ZEPROM_V1_REG,ZEPROM_V1_ESI_OFF,1)) return;
  1179		(void) eprom_try_esi(dev,ZEPROM_V2_REG,ZEPROM_V2_ESI_OFF,0);
  1180	}
  1181	
  1182	
  1183	/*--------------------------------- entries ---------------------------------*/
  1184	
  1185	
  1186	static int zatm_init(struct atm_dev *dev)
  1187	{
  1188		struct zatm_dev *zatm_dev;
  1189		struct pci_dev *pci_dev;
  1190		unsigned short command;
  1191		int error,i,last;
  1192		unsigned long t0,t1,t2;
  1193	
  1194		DPRINTK(">zatm_init\n");
  1195		zatm_dev = ZATM_DEV(dev);
  1196		spin_lock_init(&zatm_dev->lock);
  1197		pci_dev = zatm_dev->pci_dev;
  1198		zatm_dev->base = pci_resource_start(pci_dev, 0);
  1199		zatm_dev->irq = pci_dev->irq;
  1200		pci_read_config_word(pci_dev, PCI_COMMAND, &command);
  1201		if (command == (u16)~0) {
  1202			printk(KERN_ERR DEV_LABEL "(itf %d): init error 0x%02x\n",
> 1203			    dev->number,error);
  1204			return -EINVAL;
  1205		}
  1206		if ((error = pci_write_config_word(pci_dev,PCI_COMMAND,
  1207		    command | PCI_COMMAND_IO | PCI_COMMAND_MASTER))) {
  1208			printk(KERN_ERR DEV_LABEL "(itf %d): can't enable IO (0x%02x)"
  1209			    "\n",dev->number,error);
  1210			return -EIO;
  1211		}
  1212		eprom_get_esi(dev);
  1213		printk(KERN_NOTICE DEV_LABEL "(itf %d): rev.%d,base=0x%x,irq=%d,",
  1214		    dev->number,pci_dev->revision,zatm_dev->base,zatm_dev->irq);
  1215		/* reset uPD98401 */
  1216		zout(0,SWR);
  1217		while (!(zin(GSR) & uPD98401_INT_IND));
  1218		zout(uPD98401_GMR_ONE /*uPD98401_BURST4*/,GMR);
  1219		last = MAX_CRAM_SIZE;
  1220		for (i = last-RAM_INCREMENT; i >= 0; i -= RAM_INCREMENT) {
  1221			zpokel(zatm_dev,0x55555555,i);
  1222			if (zpeekl(zatm_dev,i) != 0x55555555) last = i;
  1223			else {
  1224				zpokel(zatm_dev,0xAAAAAAAA,i);
  1225				if (zpeekl(zatm_dev,i) != 0xAAAAAAAA) last = i;
  1226				else zpokel(zatm_dev,i,i);
  1227			}
  1228		}
  1229		for (i = 0; i < last; i += RAM_INCREMENT)
  1230			if (zpeekl(zatm_dev,i) != i) break;
  1231		zatm_dev->mem = i << 2;
  1232		while (i) zpokel(zatm_dev,0,--i);
  1233		/* reset again to rebuild memory pointers */
  1234		zout(0,SWR);
  1235		while (!(zin(GSR) & uPD98401_INT_IND));
  1236		zout(uPD98401_GMR_ONE | uPD98401_BURST8 | uPD98401_BURST4 |
  1237		    uPD98401_BURST2 | uPD98401_GMR_PM | uPD98401_GMR_DR,GMR);
  1238		/* TODO: should shrink allocation now */
  1239		printk("mem=%dkB,%s (",zatm_dev->mem >> 10,zatm_dev->copper ? "UTP" :
  1240		    "MMF");
  1241		for (i = 0; i < ESI_LEN; i++)
  1242			printk("%02X%s",dev->esi[i],i == ESI_LEN-1 ? ")\n" : "-");
  1243		do {
  1244			unsigned long flags;
  1245	
  1246			spin_lock_irqsave(&zatm_dev->lock, flags);
  1247			t0 = zpeekl(zatm_dev,uPD98401_TSR);
  1248			udelay(10);
  1249			t1 = zpeekl(zatm_dev,uPD98401_TSR);
  1250			udelay(1010);
  1251			t2 = zpeekl(zatm_dev,uPD98401_TSR);
  1252			spin_unlock_irqrestore(&zatm_dev->lock, flags);
  1253		}
  1254		while (t0 > t1 || t1 > t2); /* loop if wrapping ... */
  1255		zatm_dev->khz = t2-2*t1+t0;
  1256		printk(KERN_NOTICE DEV_LABEL "(itf %d): uPD98401 %d.%d at %d.%03d "
  1257		    "MHz\n",dev->number,
  1258		    (zin(VER) & uPD98401_MAJOR) >> uPD98401_MAJOR_SHIFT,
  1259	            zin(VER) & uPD98401_MINOR,zatm_dev->khz/1000,zatm_dev->khz % 1000);
  1260		return uPD98402_init(dev);
  1261	}
  1262	

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 42104 bytes --]

  reply	other threads:[~2020-08-05 10:51 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-01 11:24 [RFC PATCH 00/17] Drop uses of pci_read_config_*() return value Saheed O. Bolarinwa
2020-08-01 11:24 ` [Intel-gfx] " Saheed O. Bolarinwa
2020-08-01 11:24 ` Saheed O. Bolarinwa
2020-08-01 11:24 ` [Linux-kernel-mentees] " Saheed O. Bolarinwa
2020-08-01 11:24 ` Saheed O. Bolarinwa
2020-08-01 11:24 ` Saheed O. Bolarinwa
2020-08-01 11:24 ` [RFC PATCH 01/17] ata: " Saheed O. Bolarinwa
2020-08-01 11:24   ` [Linux-kernel-mentees] " Saheed O. Bolarinwa
2020-08-01 11:24 ` [RFC PATCH 02/17] atm: " Saheed O. Bolarinwa
2020-08-01 11:24   ` [Linux-kernel-mentees] " Saheed O. Bolarinwa
2020-08-05 10:51   ` kernel test robot [this message]
2020-08-01 11:24 ` [RFC PATCH 03/17] bcma: " Saheed O. Bolarinwa
2020-08-01 11:24   ` [Linux-kernel-mentees] " Saheed O. Bolarinwa
2020-08-01 11:24 ` [RFC PATCH 04/17] hwrng: " Saheed O. Bolarinwa
2020-08-01 11:24   ` [Linux-kernel-mentees] " Saheed O. Bolarinwa
2020-08-01 11:24 ` [RFC PATCH 05/17] dmaengine: ioat: " Saheed O. Bolarinwa
2020-08-01 11:24   ` [Linux-kernel-mentees] " Saheed O. Bolarinwa
2020-08-01 11:24 ` [RFC PATCH 06/17] edac: " Saheed O. Bolarinwa
2020-08-01 11:24   ` [Linux-kernel-mentees] " Saheed O. Bolarinwa
2020-08-01 21:38   ` kernel test robot
2020-08-01 11:24 ` [RFC PATCH 07/17] fpga: altera-cvp: " Saheed O. Bolarinwa
2020-08-01 11:24   ` [Linux-kernel-mentees] " Saheed O. Bolarinwa
2020-08-01 22:32   ` kernel test robot
2020-08-05 12:31   ` kernel test robot
2020-08-01 11:24 ` [RFC PATCH 08/17] gpio: " Saheed O. Bolarinwa
2020-08-01 11:24   ` [Linux-kernel-mentees] " Saheed O. Bolarinwa
2020-08-18 19:59   ` Bartosz Golaszewski
2020-08-18 19:59     ` [Linux-kernel-mentees] " Bartosz Golaszewski
2020-08-19  2:21     ` Bjorn Helgaas
2020-08-19  2:21       ` [Linux-kernel-mentees] " Bjorn Helgaas
2020-08-01 11:24 ` [RFC PATCH 09/17] drm/i915/vga: " Saheed O. Bolarinwa
2020-08-01 11:24   ` [Intel-gfx] " Saheed O. Bolarinwa
2020-08-01 11:24   ` Saheed O. Bolarinwa
2020-08-01 11:24   ` [Linux-kernel-mentees] " Saheed O. Bolarinwa
2020-08-01 11:24 ` [RFC PATCH 10/17] hwmon: " Saheed O. Bolarinwa
2020-08-01 11:24   ` [Linux-kernel-mentees] " Saheed O. Bolarinwa
2020-08-04 21:26   ` Guenter Roeck
2020-08-04 21:26     ` [Linux-kernel-mentees] " Guenter Roeck
2020-08-01 11:24 ` [RFC PATCH 11/17] intel_th: pci: " Saheed O. Bolarinwa
2020-08-01 11:24   ` [Linux-kernel-mentees] " Saheed O. Bolarinwa
2020-08-01 11:24 ` [RFC PATCH 12/17] i2c: " Saheed O. Bolarinwa
2020-08-01 11:24   ` [Linux-kernel-mentees] " Saheed O. Bolarinwa
2020-08-01 11:24 ` [RFC PATCH 13/17] ide: " Saheed O. Bolarinwa
2020-08-01 11:24   ` [Linux-kernel-mentees] " Saheed O. Bolarinwa
2020-08-01 11:24 ` [RFC PATCH 14/17] IB: " Saheed O. Bolarinwa
2020-08-01 11:24   ` [Linux-kernel-mentees] " Saheed O. Bolarinwa
2020-08-01 14:18   ` kernel test robot
2020-08-01 11:24 ` [RFC PATCH 15/17] iommu/vt-d: " Saheed O. Bolarinwa
2020-08-01 11:24   ` [Linux-kernel-mentees] " Saheed O. Bolarinwa
2020-08-01 11:24   ` Saheed O. Bolarinwa
2020-08-01 11:24 ` [RFC PATCH 16/17] mtd: " Saheed O. Bolarinwa
2020-08-01 11:24   ` [Linux-kernel-mentees] " Saheed O. Bolarinwa
2020-08-01 11:24   ` Saheed O. Bolarinwa
2020-08-01 11:24 ` [RFC PATCH 17/17] net: " Saheed O. Bolarinwa
2020-08-01 11:24   ` [Linux-kernel-mentees] " Saheed O. Bolarinwa
2020-08-01 14:58   ` kernel test robot
2020-08-01 12:56 ` [RFC PATCH 00/17] " Borislav Petkov
2020-08-01 12:56   ` [Intel-gfx] " Borislav Petkov
2020-08-01 12:56   ` Borislav Petkov
2020-08-01 12:56   ` [Linux-kernel-mentees] " Borislav Petkov
2020-08-01 12:56   ` Borislav Petkov
2020-08-01 12:56   ` Borislav Petkov
2020-08-02 14:53   ` Tom Rix
2020-08-02 14:53     ` [Intel-gfx] " Tom Rix
2020-08-02 14:53     ` Tom Rix
2020-08-02 14:53     ` [Linux-kernel-mentees] " Tom Rix
2020-08-02 14:53     ` Tom Rix
2020-08-02 14:53     ` Tom Rix
2020-08-02 17:28   ` Saheed Bolarinwa
2020-08-02 17:28     ` [Intel-gfx] " Saheed Bolarinwa
2020-08-02 17:28     ` Saheed Bolarinwa
2020-08-02 17:28     ` [Linux-kernel-mentees] " Saheed Bolarinwa
2020-08-02 17:28     ` Saheed Bolarinwa
2020-08-02 17:28     ` Saheed Bolarinwa
2020-08-02 18:46     ` Borislav Petkov
2020-08-02 18:46       ` [Intel-gfx] " Borislav Petkov
2020-08-02 18:46       ` Borislav Petkov
2020-08-02 18:46       ` [Linux-kernel-mentees] " Borislav Petkov
2020-08-02 18:46       ` Borislav Petkov
2020-08-02 18:46       ` Borislav Petkov
2020-08-02 19:14       ` Bjorn Helgaas
2020-08-02 19:14         ` [Intel-gfx] " Bjorn Helgaas
2020-08-02 19:14         ` Bjorn Helgaas
2020-08-02 19:14         ` [Linux-kernel-mentees] " Bjorn Helgaas
2020-08-02 19:14         ` Bjorn Helgaas
2020-08-02 19:14         ` Bjorn Helgaas
2020-08-02 20:18         ` Borislav Petkov
2020-08-02 20:18           ` [Intel-gfx] " Borislav Petkov
2020-08-02 20:18           ` Borislav Petkov
2020-08-02 20:18           ` [Linux-kernel-mentees] " Borislav Petkov
2020-08-02 20:18           ` Borislav Petkov
2020-08-02 20:18           ` Borislav Petkov
2020-08-03  6:56         ` Christoph Hellwig
2020-08-03  6:56           ` [Intel-gfx] " Christoph Hellwig
2020-08-03  6:56           ` [Linux-kernel-mentees] " Christoph Hellwig
2020-08-03  6:56           ` Christoph Hellwig
2020-08-03  6:56           ` Christoph Hellwig

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=202008051802.6A41qYp2%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.