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