The qla4xxx driver uses readq/writeq unconditionally. However, those functions are only defined in include/asm-generic/io.h when CONFIG_64BIT is set. This leads to compile errors on 32-bit platforms such as ppc: drivers/scsi/qla4xxx/ql4_nx.c: In function 'qla4_8xxx_pci_mem_read_direct': drivers/scsi/qla4xxx/ql4_nx.c:717: error: implicit declaration of function 'readq' drivers/scsi/qla4xxx/ql4_nx.c: In function 'qla4_8xxx_pci_mem_write_direct': drivers/scsi/qla4xxx/ql4_nx.c:788: error: implicit declaration of function 'writeq' Guard their use in the driver with the same #ifdef. Reported-by: Adrian Reber <adrian@xxxxxxxx> Signed-off-by: Josh Boyer <jwboyer@xxxxxxxxxxxxxxxxxx> --- diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c index 474b10d..792c3ae 100644 --- a/drivers/scsi/qla4xxx/ql4_nx.c +++ b/drivers/scsi/qla4xxx/ql4_nx.c @@ -713,9 +713,11 @@ static int qla4_8xxx_pci_mem_read_direct(struct scsi_qla_host *ha, case 4: *(u32 *)data = readl(addr); break; +#ifdef CONFIG_64BIT case 8: *(u64 *)data = readq(addr); break; +#endif default: ret = -1; break; @@ -784,9 +786,11 @@ qla4_8xxx_pci_mem_write_direct(struct scsi_qla_host *ha, u64 off, case 4: writel(*(u32 *)data, addr); break; +#ifdef CONFIG_64BIT case 8: writeq(*(u64 *)data, addr); break; +#endif default: ret = -1; break; -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html