Hi Neil, [auto build test WARNING on balbi-usb/next -- if it's inappropriate base, please suggest rules for selecting the more suitable base] url: https://github.com/0day-ci/linux/commits/Neil-Armstrong/usb-gadget-Introduce-Cadence-USB2-UDC-Driver/20151016-225656 reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) >> drivers/usb/gadget/udc/cadence_hsudc.c:225:63: sparse: incorrect type in argument 4 (invalid types) drivers/usb/gadget/udc/cadence_hsudc.c:225:63: expected incomplete type dmashortirq drivers/usb/gadget/udc/cadence_hsudc.c:225:63: got unsigned int [unsigned] [assigned] dmashortirq drivers/usb/gadget/udc/cadence_hsudc.c:156:29: sparse: undefined identifier 'i' drivers/usb/gadget/udc/cadence_hsudc.c:158:17: sparse: undefined identifier 'i' >> drivers/usb/gadget/udc/cadence_hsudc.c:163:26: sparse: incompatible types for operation (&) drivers/usb/gadget/udc/cadence_hsudc.c:163:26: left side has type incomplete type dmashortirq drivers/usb/gadget/udc/cadence_hsudc.c:163:26: right side has type int drivers/usb/gadget/udc/cadence_hsudc.c:151:24: error: unknown type name 'dmashortirq' unsigned dmairq, dmashortirq) ^ drivers/usb/gadget/udc/cadence_hsudc.c: In function 'cadence_hsudc_irq': drivers/usb/gadget/udc/cadence_hsudc.c:224:5: error: implicit declaration of function 'cadence_hsudc_dma_irq' [-Werror=implicit-function-declaration] cadence_hsudc_dma_irq(hsudc_dev, i, ^ drivers/usb/gadget/udc/cadence_hsudc.c: In function 'hsudc_copy_to_fifo': drivers/usb/gadget/udc/cadence_hsudc.c:854:36: warning: dereferencing 'void *' pointer hsudc_write32(*(uint32_t *)(&buf[i]), reg); ^ drivers/usb/gadget/udc/cadence_hsudc.c:143:11: note: in definition of macro 'hsudc_write32' writel((value), hsudc_dev->io_base + (reg)) ^ drivers/usb/gadget/udc/cadence_hsudc.c:854:32: warning: taking address of expression of type 'void' hsudc_write32(*(uint32_t *)(&buf[i]), reg); ^ drivers/usb/gadget/udc/cadence_hsudc.c:143:11: note: in definition of macro 'hsudc_write32' writel((value), hsudc_dev->io_base + (reg)) ^ drivers/usb/gadget/udc/cadence_hsudc.c:858:36: warning: dereferencing 'void *' pointer hsudc_write16(*(uint16_t *)(&buf[i]), reg); ^ drivers/usb/gadget/udc/cadence_hsudc.c:141:11: note: in definition of macro 'hsudc_write16' writew((value)&0xFFFF, hsudc_dev->io_base + (reg)) ^ drivers/usb/gadget/udc/cadence_hsudc.c:858:32: warning: taking address of expression of type 'void' hsudc_write16(*(uint16_t *)(&buf[i]), reg); ^ drivers/usb/gadget/udc/cadence_hsudc.c:141:11: note: in definition of macro 'hsudc_write16' writew((value)&0xFFFF, hsudc_dev->io_base + (reg)) ^ drivers/usb/gadget/udc/cadence_hsudc.c:861:34: warning: dereferencing 'void *' pointer hsudc_write8(*(uint8_t *)(&buf[i]), reg); ^ drivers/usb/gadget/udc/cadence_hsudc.c:139:11: note: in definition of macro 'hsudc_write8' writeb((value)&0xFF, hsudc_dev->io_base + (reg)) ^ drivers/usb/gadget/udc/cadence_hsudc.c:861:30: warning: taking address of expression of type 'void' hsudc_write8(*(uint8_t *)(&buf[i]), reg); ^ drivers/usb/gadget/udc/cadence_hsudc.c:139:11: note: in definition of macro 'hsudc_write8' writeb((value)&0xFF, hsudc_dev->io_base + (reg)) ^ drivers/usb/gadget/udc/cadence_hsudc.c: In function 'hsudc_copy_from_fifo': drivers/usb/gadget/udc/cadence_hsudc.c:877:23: warning: dereferencing 'void *' pointer *((uint32_t *) &buf[i]) = hsudc_read32(reg); ^ drivers/usb/gadget/udc/cadence_hsudc.c:877:19: warning: taking address of expression of type 'void' *((uint32_t *) &buf[i]) = hsudc_read32(reg); ^ drivers/usb/gadget/udc/cadence_hsudc.c:880:23: warning: dereferencing 'void *' pointer *((uint16_t *) &buf[i]) = hsudc_read16(reg); ^ drivers/usb/gadget/udc/cadence_hsudc.c:880:19: warning: taking address of expression of type 'void' *((uint16_t *) &buf[i]) = hsudc_read16(reg); ^ drivers/usb/gadget/udc/cadence_hsudc.c:883:7: warning: dereferencing 'void *' pointer buf[i] = hsudc_read8(reg); ^ drivers/usb/gadget/udc/cadence_hsudc.c:883:4: error: invalid use of void expression buf[i] = hsudc_read8(reg); ^ drivers/usb/gadget/udc/cadence_hsudc.c: In function 'hsudc_ep_completion': drivers/usb/gadget/udc/cadence_hsudc.c:928:13: warning: unused variable 'i' [-Wunused-variable] unsigned i; ^ cc1: some warnings being treated as errors vim +225 drivers/usb/gadget/udc/cadence_hsudc.c 157 /* Clear and disable DMAIRQ */ 158 hsudc_write32(1 << i, HSUDC_DMA_IRQ_REG32); 159 hsudc_write32(hsudc_read32(HSUDC_DMA_IEN_REG32) & 160 ~(1 << dma_channel), 161 HSUDC_DMA_IEN_REG32); 162 } > 163 if ((dmashortirq & (1 << dma_channel))) { 164 /* Clear and disable DMASHORTIRQ */ 165 hsudc_write32(1 << dma_channel, HSUDC_DMA_SHORTIRQ_REG32); 166 hsudc_write32(hsudc_read32(HSUDC_DMA_SHORTIEN_REG32) & 167 ~(1 << dma_channel), 168 HSUDC_DMA_SHORTIEN_REG32); 169 } 170 if (channel->is_available & 171 channel->in_use && 172 channel->cur_ep->cur) { 173 struct cadence_hsudc_request *hsudc_req = 174 channel->cur_ep->cur; 175 unsigned remain = 176 hsudc_read32(HSUDC_DMA_CNT_REG32(dma_channel)); 177 178 hsudc_req->req.actual = hsudc_req->req.length - remain; 179 180 queue_work(hsudc_dev->wq_ep, 181 &channel->cur_ep->comp); 182 183 channel->cur_ep->dma_channel = NULL; 184 channel->cur_ep = NULL; 185 channel->in_use = 0; 186 187 /* Free DMA channel */ 188 up(&hsudc_dev->dma_sem); 189 } 190 } 191 192 static irqreturn_t cadence_hsudc_irq(int irq, void *data) 193 { 194 struct cadence_hsudc *hsudc_dev = data; 195 196 unsigned in_packet_irq; 197 unsigned out_packet_irq; 198 unsigned usbirq; 199 unsigned dmairq, dmashortirq; 200 201 (void)irq; 202 203 in_packet_irq = hsudc_read16(HSUDC_INIRQ_REG16) & 204 hsudc_read16(HSUDC_INIEN_REG16); 205 out_packet_irq = hsudc_read16(HSUDC_OUTIRQ_REG16) & 206 hsudc_read16(HSUDC_OUTIEN_REG16); 207 usbirq = hsudc_read8(HSUDC_USBIRQ_REG8) & 208 hsudc_read8(HSUDC_USBIEN_REG8); 209 210 dmairq = hsudc_read32(HSUDC_DMA_IRQ_REG32) & 211 hsudc_read32(HSUDC_DMA_IEN_REG32); 212 dmashortirq = hsudc_read32(HSUDC_DMA_SHORTIRQ_REG32) & 213 hsudc_read32(HSUDC_DMA_SHORTIEN_REG32); 214 215 dev_vdbg(&hsudc_dev->pdev->dev, "irq: in %04X out %04X usb %04X dma %x/%x\n", 216 in_packet_irq, out_packet_irq, 217 usbirq, dmairq, dmashortirq); 218 219 if (dmairq || dmashortirq) { 220 unsigned i; 221 222 for (i = 0; i < hsudc_dev->hw_config->dma_channels; ++i) 223 if ((dmairq & (1 << i)) || (dmashortirq & (1 << i))) 224 cadence_hsudc_dma_irq(hsudc_dev, i, > 225 dmairq, dmashortirq); 226 } 227 228 if (in_packet_irq || out_packet_irq) { --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html