Hi Joe, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on scsi/for-next] [also build test WARNING on next-20190306] [cannot apply to v5.0] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Himanshu-Madhani/qla2xxx-Add-support-for-ISP28XX-Gen7-adapter/20190308-141231 base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' All warnings (new ones prefixed by >>): >> drivers/scsi/qla2xxx/qla_tmpl.c:168:22: sparse: warning: cast to restricted __le32 >> drivers/scsi/qla2xxx/qla_tmpl.c:170:23: sparse: warning: cast to restricted __le16 drivers/scsi/qla2xxx/qla_tmpl.c:185:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:187:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:203:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:204:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:206:22: sparse: warning: cast to restricted __le16 drivers/scsi/qla2xxx/qla_tmpl.c:222:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:224:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:226:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:258:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:272:23: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:273:21: sparse: warning: cast to restricted __le32 >> drivers/scsi/qla2xxx/qla_tmpl.c:286:44: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:286:44: sparse: expected unsigned int [usertype] end_addr drivers/scsi/qla2xxx/qla_tmpl.c:286:44: sparse: got restricted __le32 [usertype] drivers/scsi/qla2xxx/qla_tmpl.c:458:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:559:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:560:24: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:596:23: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:597:24: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:639:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:702:24: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:703:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:730:23: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:731:23: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:751:26: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:752:29: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:753:27: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:769:26: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:770:29: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:771:27: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:772:25: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:786:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:845:27: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:846:23: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:852:24: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:882:32: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:882:32: sparse: expected unsigned int [usertype] capture_timestamp drivers/scsi/qla2xxx/qla_tmpl.c:882:32: sparse: got restricted __le32 [usertype] drivers/scsi/qla2xxx/qla_tmpl.c:893:29: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:893:29: sparse: expected unsigned int drivers/scsi/qla2xxx/qla_tmpl.c:893:29: sparse: got restricted __le32 [usertype] drivers/scsi/qla2xxx/qla_tmpl.c:895:29: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:895:29: sparse: expected unsigned int drivers/scsi/qla2xxx/qla_tmpl.c:895:29: sparse: got restricted __le32 [usertype] drivers/scsi/qla2xxx/qla_tmpl.c:896:29: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:896:29: sparse: expected unsigned int drivers/scsi/qla2xxx/qla_tmpl.c:896:29: sparse: got restricted __le32 [usertype] drivers/scsi/qla2xxx/qla_tmpl.c:903:34: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:903:34: sparse: expected unsigned int drivers/scsi/qla2xxx/qla_tmpl.c:903:34: sparse: got restricted __le32 [usertype] drivers/scsi/qla2xxx/qla_tmpl.c:904:34: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:904:34: sparse: expected unsigned int drivers/scsi/qla2xxx/qla_tmpl.c:904:34: sparse: got restricted __le32 [usertype] drivers/scsi/qla2xxx/qla_tmpl.c:905:34: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:905:34: sparse: expected unsigned int drivers/scsi/qla2xxx/qla_tmpl.c:905:34: sparse: got restricted __le32 [usertype] drivers/scsi/qla2xxx/qla_tmpl.c:906:34: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:906:34: sparse: expected unsigned int drivers/scsi/qla2xxx/qla_tmpl.c:906:34: sparse: got restricted __le32 [usertype] drivers/scsi/qla2xxx/qla_tmpl.c:909:34: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:909:34: sparse: expected unsigned int drivers/scsi/qla2xxx/qla_tmpl.c:909:34: sparse: got restricted __le32 [usertype] drivers/scsi/qla2xxx/qla_tmpl.c:997:21: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:932:24: sparse: warning: cast to restricted __le32 sparse warnings: (new ones prefixed by >>) drivers/scsi/qla2xxx/qla_tmpl.c:168:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:170:23: sparse: warning: cast to restricted __le16 drivers/scsi/qla2xxx/qla_tmpl.c:185:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:187:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:203:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:204:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:206:22: sparse: warning: cast to restricted __le16 drivers/scsi/qla2xxx/qla_tmpl.c:222:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:224:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:226:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:258:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:272:23: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:273:21: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:286:44: sparse: warning: incorrect type in assignment (different base types) >> drivers/scsi/qla2xxx/qla_tmpl.c:286:44: sparse: expected unsigned int [usertype] end_addr >> drivers/scsi/qla2xxx/qla_tmpl.c:286:44: sparse: got restricted __le32 [usertype] drivers/scsi/qla2xxx/qla_tmpl.c:458:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:559:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:560:24: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:596:23: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:597:24: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:639:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:702:24: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:703:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:730:23: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:731:23: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:751:26: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:752:29: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:753:27: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:769:26: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:770:29: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:771:27: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:772:25: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:786:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:845:27: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:846:23: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:852:24: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:882:32: sparse: warning: incorrect type in assignment (different base types) >> drivers/scsi/qla2xxx/qla_tmpl.c:882:32: sparse: expected unsigned int [usertype] capture_timestamp drivers/scsi/qla2xxx/qla_tmpl.c:882:32: sparse: got restricted __le32 [usertype] drivers/scsi/qla2xxx/qla_tmpl.c:893:29: sparse: warning: incorrect type in assignment (different base types) >> drivers/scsi/qla2xxx/qla_tmpl.c:893:29: sparse: expected unsigned int drivers/scsi/qla2xxx/qla_tmpl.c:893:29: sparse: got restricted __le32 [usertype] drivers/scsi/qla2xxx/qla_tmpl.c:895:29: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:895:29: sparse: expected unsigned int drivers/scsi/qla2xxx/qla_tmpl.c:895:29: sparse: got restricted __le32 [usertype] drivers/scsi/qla2xxx/qla_tmpl.c:896:29: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:896:29: sparse: expected unsigned int drivers/scsi/qla2xxx/qla_tmpl.c:896:29: sparse: got restricted __le32 [usertype] drivers/scsi/qla2xxx/qla_tmpl.c:903:34: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:903:34: sparse: expected unsigned int drivers/scsi/qla2xxx/qla_tmpl.c:903:34: sparse: got restricted __le32 [usertype] drivers/scsi/qla2xxx/qla_tmpl.c:904:34: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:904:34: sparse: expected unsigned int drivers/scsi/qla2xxx/qla_tmpl.c:904:34: sparse: got restricted __le32 [usertype] drivers/scsi/qla2xxx/qla_tmpl.c:905:34: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:905:34: sparse: expected unsigned int drivers/scsi/qla2xxx/qla_tmpl.c:905:34: sparse: got restricted __le32 [usertype] drivers/scsi/qla2xxx/qla_tmpl.c:906:34: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:906:34: sparse: expected unsigned int drivers/scsi/qla2xxx/qla_tmpl.c:906:34: sparse: got restricted __le32 [usertype] drivers/scsi/qla2xxx/qla_tmpl.c:909:34: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:909:34: sparse: expected unsigned int drivers/scsi/qla2xxx/qla_tmpl.c:909:34: sparse: got restricted __le32 [usertype] drivers/scsi/qla2xxx/qla_tmpl.c:997:21: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:932:24: sparse: warning: cast to restricted __le32 vim +168 drivers/scsi/qla2xxx/qla_tmpl.c 162 163 static struct qla27xx_fwdt_entry * 164 qla27xx_fwdt_entry_t256(struct scsi_qla_host *vha, 165 struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) 166 { 167 struct device_reg_24xx __iomem *reg = qla27xx_isp_reg(vha); > 168 ulong addr = le32_to_cpu(ent->t256.base_addr); 169 uint offset = ent->t256.pci_offset; > 170 ulong count = le16_to_cpu(ent->t256.reg_count); 171 uint width = ent->t256.reg_width; 172 173 ql_dbg(ql_dbg_misc, vha, 0xd200, 174 "%s: rdio t1 [%lx]\n", __func__, *len); 175 qla27xx_read_window(reg, addr, offset, count, width, buf, len); 176 177 return qla27xx_next_entry(ent); 178 } 179 180 static struct qla27xx_fwdt_entry * 181 qla27xx_fwdt_entry_t257(struct scsi_qla_host *vha, 182 struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) 183 { 184 struct device_reg_24xx __iomem *reg = qla27xx_isp_reg(vha); 185 ulong addr = le32_to_cpu(ent->t257.base_addr); 186 uint offset = ent->t257.pci_offset; 187 ulong data = le32_to_cpu(ent->t257.write_data); 188 189 ql_dbg(ql_dbg_misc, vha, 0xd201, 190 "%s: wrio t1 [%lx]\n", __func__, *len); 191 qla27xx_write_reg(reg, IOBASE(reg), addr, buf); 192 qla27xx_write_reg(reg, offset, data, buf); 193 194 return qla27xx_next_entry(ent); 195 } 196 197 static struct qla27xx_fwdt_entry * 198 qla27xx_fwdt_entry_t258(struct scsi_qla_host *vha, 199 struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) 200 { 201 struct device_reg_24xx __iomem *reg = qla27xx_isp_reg(vha); 202 uint banksel = ent->t258.banksel_offset; > 203 ulong bank = le32_to_cpu(ent->t258.bank); > 204 ulong addr = le32_to_cpu(ent->t258.base_addr); 205 uint offset = ent->t258.pci_offset; > 206 uint count = le16_to_cpu(ent->t258.reg_count); 207 uint width = ent->t258.reg_width; 208 209 ql_dbg(ql_dbg_misc, vha, 0xd202, 210 "%s: rdio t2 [%lx]\n", __func__, *len); 211 qla27xx_write_reg(reg, banksel, bank, buf); 212 qla27xx_read_window(reg, addr, offset, count, width, buf, len); 213 214 return qla27xx_next_entry(ent); 215 } 216 217 static struct qla27xx_fwdt_entry * 218 qla27xx_fwdt_entry_t259(struct scsi_qla_host *vha, 219 struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) 220 { 221 struct device_reg_24xx __iomem *reg = qla27xx_isp_reg(vha); 222 ulong addr = le32_to_cpu(ent->t259.base_addr); 223 uint banksel = ent->t259.banksel_offset; 224 ulong bank = le32_to_cpu(ent->t259.bank); 225 uint offset = ent->t259.pci_offset; 226 ulong data = le32_to_cpu(ent->t259.write_data); 227 228 ql_dbg(ql_dbg_misc, vha, 0xd203, 229 "%s: wrio t2 [%lx]\n", __func__, *len); 230 qla27xx_write_reg(reg, IOBASE(reg), addr, buf); 231 qla27xx_write_reg(reg, banksel, bank, buf); 232 qla27xx_write_reg(reg, offset, data, buf); 233 234 return qla27xx_next_entry(ent); 235 } 236 237 static struct qla27xx_fwdt_entry * 238 qla27xx_fwdt_entry_t260(struct scsi_qla_host *vha, 239 struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) 240 { 241 struct device_reg_24xx __iomem *reg = qla27xx_isp_reg(vha); 242 uint offset = ent->t260.pci_offset; 243 244 ql_dbg(ql_dbg_misc, vha, 0xd204, 245 "%s: rdpci [%lx]\n", __func__, *len); 246 qla27xx_insert32(offset, buf, len); 247 qla27xx_read_reg(reg, offset, buf, len); 248 249 return qla27xx_next_entry(ent); 250 } 251 252 static struct qla27xx_fwdt_entry * 253 qla27xx_fwdt_entry_t261(struct scsi_qla_host *vha, 254 struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) 255 { 256 struct device_reg_24xx __iomem *reg = qla27xx_isp_reg(vha); 257 uint offset = ent->t261.pci_offset; 258 ulong data = le32_to_cpu(ent->t261.write_data); 259 260 ql_dbg(ql_dbg_misc, vha, 0xd205, 261 "%s: wrpci [%lx]\n", __func__, *len); 262 qla27xx_write_reg(reg, offset, data, buf); 263 264 return qla27xx_next_entry(ent); 265 } 266 267 static struct qla27xx_fwdt_entry * 268 qla27xx_fwdt_entry_t262(struct scsi_qla_host *vha, 269 struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) 270 { 271 uint area = ent->t262.ram_area; 272 ulong start = le32_to_cpu(ent->t262.start_addr); 273 ulong end = le32_to_cpu(ent->t262.end_addr); 274 ulong dwords; 275 276 ql_dbg(ql_dbg_misc, vha, 0xd206, 277 "%s: rdram(%x) [%lx]\n", __func__, ent->t262.ram_area, *len); 278 start = ent->t262.start_addr; 279 end = ent->t262.end_addr; 280 281 if (area == T262_RAM_AREA_CRITICAL_RAM) { 282 ; 283 } else if (area == T262_RAM_AREA_EXTERNAL_RAM) { 284 end = vha->hw->fw_memory_size; 285 if (buf) > 286 ent->t262.end_addr = cpu_to_le32(end); 287 } else if (area == T262_RAM_AREA_SHARED_RAM) { 288 start = vha->hw->fw_shared_ram_start; 289 end = vha->hw->fw_shared_ram_end; 290 if (buf) { 291 ent->t262.start_addr = start; 292 ent->t262.end_addr = end; 293 } 294 } else if (area == T262_RAM_AREA_DDR_RAM) { 295 start = vha->hw->fw_ddr_ram_start; 296 end = vha->hw->fw_ddr_ram_end; 297 if (buf) { 298 ent->t262.start_addr = start; 299 ent->t262.end_addr = end; 300 } 301 } else if (area == T262_RAM_AREA_MISC) { 302 if (buf) { 303 ent->t262.start_addr = start; 304 ent->t262.end_addr = end; 305 } 306 } else { 307 ql_dbg(ql_dbg_misc, vha, 0xd022, 308 "%s: unknown area %x\n", __func__, area); 309 qla27xx_skip_entry(ent, buf); 310 goto done; 311 } 312 313 if (end < start || start == 0 || end == 0) { 314 ql_dbg(ql_dbg_misc, vha, 0xd023, 315 "%s: unusable range (start=%lx end=%lx)\n", 316 __func__, start, end); 317 qla27xx_skip_entry(ent, buf); 318 goto done; 319 } 320 321 dwords = end - start + 1; 322 if (buf) { 323 buf += *len; 324 qla24xx_dump_ram(vha->hw, start, buf, dwords, &buf); 325 } 326 *len += dwords * sizeof(uint32_t); 327 done: 328 return qla27xx_next_entry(ent); 329 } 330 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip