Hi Javier,

[auto build test WARNING on tj-libata/for-next -- if it's inappropriate base, 
please suggest rules for selecting the more suitable base]

url:    
https://github.com/0day-ci/linux/commits/Javier-Martinez-Canillas/ata-Allow-drivers-to-build-if-COMPILE_TEST-is-enabled/20151013-214138
reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> drivers/ata/sata_fsl.c:428:30: sparse: incorrect type in assignment 
>> (different base types)
   drivers/ata/sata_fsl.c:428:30:    expected unsigned int [unsigned] 
[usertype] cda
   drivers/ata/sata_fsl.c:428:30:    got restricted __le32 [usertype] <noident>
>> drivers/ata/sata_fsl.c:429:39: sparse: incorrect type in assignment 
>> (different base types)
   drivers/ata/sata_fsl.c:429:39:    expected unsigned int [unsigned] 
[usertype] prde_fis_len
   drivers/ata/sata_fsl.c:429:39:    got restricted __le32 [usertype] <noident>
>> drivers/ata/sata_fsl.c:431:30: sparse: incorrect type in assignment 
>> (different base types)
   drivers/ata/sata_fsl.c:431:30:    expected unsigned int [unsigned] 
[usertype] ttl
   drivers/ata/sata_fsl.c:431:30:    got restricted __le32 [usertype] <noident>
>> drivers/ata/sata_fsl.c:432:36: sparse: incorrect type in assignment 
>> (different base types)
   drivers/ata/sata_fsl.c:432:36:    expected unsigned int [unsigned] 
[usertype] desc_info
   drivers/ata/sata_fsl.c:432:36:    got restricted __le32 [usertype] <noident>
>> drivers/ata/sata_fsl.c:484:34: sparse: incorrect type in assignment 
>> (different base types)
   drivers/ata/sata_fsl.c:484:34:    expected unsigned int [unsigned] 
[usertype] dba
   drivers/ata/sata_fsl.c:484:34:    got restricted __le32 [usertype] <noident>
   drivers/ata/sata_fsl.c:491:26: sparse: incorrect type in assignment 
(different base types)
   drivers/ata/sata_fsl.c:491:26:    expected unsigned int [unsigned] 
[usertype] dba
   drivers/ata/sata_fsl.c:491:26:    got restricted __le32 [usertype] <noident>
>> drivers/ata/sata_fsl.c:492:34: sparse: incorrect type in assignment 
>> (different base types)
   drivers/ata/sata_fsl.c:492:34:    expected unsigned int [unsigned] 
[usertype] ddc_and_ext
   drivers/ata/sata_fsl.c:492:34:    got restricted __le32 [usertype] <noident>
   drivers/ata/sata_fsl.c:505:54: sparse: incorrect type in assignment 
(different base types)
   drivers/ata/sata_fsl.c:505:54:    expected unsigned int [unsigned] 
[usertype] ddc_and_ext
   drivers/ata/sata_fsl.c:505:54:    got restricted __le32 [usertype] <noident>
   drivers/ata/sata_fsl.c:1410:9: sparse: Initializer entry defined twice
   drivers/ata/sata_fsl.c:1411:10:   also defined here

vim +428 drivers/ata/sata_fsl.c

faf0b2e5 Li Yang            2007-10-16  422  
faf0b2e5 Li Yang            2007-10-16  423     cmd_descriptor_address = 
pp->cmdentry_paddr +
faf0b2e5 Li Yang            2007-10-16  424         tag * 
SATA_FSL_CMD_DESC_SIZE;
faf0b2e5 Li Yang            2007-10-16  425  
faf0b2e5 Li Yang            2007-10-16  426     /* NOTE: both data_xfer_len & 
fis_len are Dword counts */
faf0b2e5 Li Yang            2007-10-16  427  
faf0b2e5 Li Yang            2007-10-16 @428     pp->cmdslot[tag].cda = 
cpu_to_le32(cmd_descriptor_address);
faf0b2e5 Li Yang            2007-10-16 @429     pp->cmdslot[tag].prde_fis_len =
faf0b2e5 Li Yang            2007-10-16  430         cpu_to_le32((num_prde << 
16) | (fis_len << 2));
faf0b2e5 Li Yang            2007-10-16 @431     pp->cmdslot[tag].ttl = 
cpu_to_le32(data_xfer_len & ~0x03);
520d3a1a Li Yang            2007-10-31 @432     pp->cmdslot[tag].desc_info = 
cpu_to_le32(desc_info | (tag & 0x1F));
faf0b2e5 Li Yang            2007-10-16  433  
faf0b2e5 Li Yang            2007-10-16  434     VPRINTK("cda=0x%x, 
prde_fis_len=0x%x, ttl=0x%x, di=0x%x\n",
faf0b2e5 Li Yang            2007-10-16  435             pp->cmdslot[tag].cda,
faf0b2e5 Li Yang            2007-10-16  436             
pp->cmdslot[tag].prde_fis_len,
faf0b2e5 Li Yang            2007-10-16  437             pp->cmdslot[tag].ttl, 
pp->cmdslot[tag].desc_info);
faf0b2e5 Li Yang            2007-10-16  438  
faf0b2e5 Li Yang            2007-10-16  439  }
faf0b2e5 Li Yang            2007-10-16  440  
faf0b2e5 Li Yang            2007-10-16  441  static unsigned int 
sata_fsl_fill_sg(struct ata_queued_cmd *qc, void *cmd_desc,
2f957fc9 Xulei              2011-01-19  442                                  
u32 *ttl, dma_addr_t cmd_desc_paddr,
2f957fc9 Xulei              2011-01-19  443                                  
int data_snoop)
faf0b2e5 Li Yang            2007-10-16  444  {
faf0b2e5 Li Yang            2007-10-16  445     struct scatterlist *sg;
faf0b2e5 Li Yang            2007-10-16  446     unsigned int num_prde = 0;
faf0b2e5 Li Yang            2007-10-16  447     u32 ttl_dwords = 0;
faf0b2e5 Li Yang            2007-10-16  448  
faf0b2e5 Li Yang            2007-10-16  449     /*
af901ca1 André Goddard Rosa 2009-11-14  450      * NOTE : direct & indirect 
prdt's are contiguously allocated
faf0b2e5 Li Yang            2007-10-16  451      */
faf0b2e5 Li Yang            2007-10-16  452     struct prde *prd = (struct prde 
*)&((struct command_desc *)
faf0b2e5 Li Yang            2007-10-16  453                                     
    cmd_desc)->prdt;
faf0b2e5 Li Yang            2007-10-16  454  
faf0b2e5 Li Yang            2007-10-16  455     struct prde 
*prd_ptr_to_indirect_ext = NULL;
faf0b2e5 Li Yang            2007-10-16  456     unsigned 
indirect_ext_segment_sz = 0;
faf0b2e5 Li Yang            2007-10-16  457     dma_addr_t 
indirect_ext_segment_paddr;
ff2aeb1e Tejun Heo          2007-12-05  458     unsigned int si;
faf0b2e5 Li Yang            2007-10-16  459  
b1f5dc48 Anton Vorontsov    2008-02-22  460     VPRINTK("SATA FSL : cd = 0x%p, 
prd = 0x%p\n", cmd_desc, prd);
faf0b2e5 Li Yang            2007-10-16  461  
faf0b2e5 Li Yang            2007-10-16  462     indirect_ext_segment_paddr = 
cmd_desc_paddr +
faf0b2e5 Li Yang            2007-10-16  463         
SATA_FSL_CMD_DESC_OFFSET_TO_PRDT + SATA_FSL_MAX_PRD_DIRECT * 16;
faf0b2e5 Li Yang            2007-10-16  464  
ff2aeb1e Tejun Heo          2007-12-05  465     for_each_sg(qc->sg, sg, 
qc->n_elem, si) {
faf0b2e5 Li Yang            2007-10-16  466             dma_addr_t sg_addr = 
sg_dma_address(sg);
faf0b2e5 Li Yang            2007-10-16  467             u32 sg_len = 
sg_dma_len(sg);
faf0b2e5 Li Yang            2007-10-16  468  
f48c019f Kumar Gala         2009-05-13  469             VPRINTK("SATA FSL : 
fill_sg, sg_addr = 0x%llx, sg_len = %d\n",
f48c019f Kumar Gala         2009-05-13  470                     (unsigned long 
long)sg_addr, sg_len);
faf0b2e5 Li Yang            2007-10-16  471  
faf0b2e5 Li Yang            2007-10-16  472             /* warn if each s/g 
element is not dword aligned */
6b4b8fc8 Qiang Liu          2012-02-15  473             if (unlikely(sg_addr & 
0x03))
a9a79dfe Joe Perches        2011-04-15  474                     
ata_port_err(qc->ap, "s/g addr unaligned : 0x%llx\n",
f48c019f Kumar Gala         2009-05-13  475                                  
(unsigned long long)sg_addr);
6b4b8fc8 Qiang Liu          2012-02-15  476             if (unlikely(sg_len & 
0x03))
a9a79dfe Joe Perches        2011-04-15  477                     
ata_port_err(qc->ap, "s/g len unaligned : 0x%x\n",
a9a79dfe Joe Perches        2011-04-15  478                                  
sg_len);
faf0b2e5 Li Yang            2007-10-16  479  
37198e30 James Bottomley    2008-02-05  480             if (num_prde == 
(SATA_FSL_MAX_PRD_DIRECT - 1) &&
37198e30 James Bottomley    2008-02-05  481                 sg_next(sg) != 
NULL) {
faf0b2e5 Li Yang            2007-10-16  482                     
VPRINTK("setting indirect prde\n");
faf0b2e5 Li Yang            2007-10-16  483                     
prd_ptr_to_indirect_ext = prd;
faf0b2e5 Li Yang            2007-10-16 @484                     prd->dba = 
cpu_to_le32(indirect_ext_segment_paddr);
faf0b2e5 Li Yang            2007-10-16  485                     
indirect_ext_segment_sz = 0;
faf0b2e5 Li Yang            2007-10-16  486                     ++prd;
faf0b2e5 Li Yang            2007-10-16  487                     ++num_prde;
faf0b2e5 Li Yang            2007-10-16  488             }
faf0b2e5 Li Yang            2007-10-16  489  
faf0b2e5 Li Yang            2007-10-16  490             ttl_dwords += sg_len;
faf0b2e5 Li Yang            2007-10-16  491             prd->dba = 
cpu_to_le32(sg_addr);
2f957fc9 Xulei              2011-01-19 @492             prd->ddc_and_ext = 
cpu_to_le32(data_snoop | (sg_len & ~0x03));
faf0b2e5 Li Yang            2007-10-16  493  
faf0b2e5 Li Yang            2007-10-16  494             VPRINTK("sg_fill, 
ttl=%d, dba=0x%x, ddc=0x%x\n",
faf0b2e5 Li Yang            2007-10-16  495                     ttl_dwords, 
prd->dba, prd->ddc_and_ext);

:::::: The code at line 428 was first introduced by commit
:::::: faf0b2e5afe7dae072d2715763c7f992b612b628 drivers/ata: add support to 
Freescale 3.0Gbps SATA Controller

:::::: TO: Li Yang <[email protected]>
:::::: CC: Jeff Garzik <[email protected]>

---
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-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to