[tj-libata:for-4.8 22/22] drivers/ata/libata-scsi.c:3346:2: warning: 'fp' may be used uninitialized in this function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git for-4.8
head:   811c969eb8588661e54b1ae665e236c365809ea9
commit: 811c969eb8588661e54b1ae665e236c365809ea9 [22/22] libata-scsi: reject WRITE SAME (16) with n_block that exceeds limit
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 5.3.1-8) 5.3.1 20160205
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 811c969eb8588661e54b1ae665e236c365809ea9
        # save the attached .config to linux build tree
        make.cross ARCH=sparc64 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   drivers/ata/libata-scsi.c: In function 'ata_scsi_write_same_xlat':
>> drivers/ata/libata-scsi.c:3346:2: warning: 'fp' may be used uninitialized in this function [-Wmaybe-uninitialized]
     ata_scsi_set_invalid_field(dev, scmd, fp, bp);
     ^

vim +/fp +3346 drivers/ata/libata-scsi.c

18f0f978 Christoph Hellwig 2009-11-17  3330  		tf->protocol = ATA_PROT_DMA;
18f0f978 Christoph Hellwig 2009-11-17  3331  		tf->hob_feature = 0;
18f0f978 Christoph Hellwig 2009-11-17  3332  		tf->feature = ATA_DSM_TRIM;
18f0f978 Christoph Hellwig 2009-11-17  3333  		tf->hob_nsect = (size / 512) >> 8;
18f0f978 Christoph Hellwig 2009-11-17  3334  		tf->nsect = size / 512;
18f0f978 Christoph Hellwig 2009-11-17  3335  		tf->command = ATA_CMD_DSM;
87fb6c31 Marc Carino       2013-08-24  3336  	}
87fb6c31 Marc Carino       2013-08-24  3337  
18f0f978 Christoph Hellwig 2009-11-17  3338  	tf->flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE | ATA_TFLAG_LBA48 |
18f0f978 Christoph Hellwig 2009-11-17  3339  		     ATA_TFLAG_WRITE;
18f0f978 Christoph Hellwig 2009-11-17  3340  
18f0f978 Christoph Hellwig 2009-11-17  3341  	ata_qc_set_pc_nbytes(qc);
18f0f978 Christoph Hellwig 2009-11-17  3342  
18f0f978 Christoph Hellwig 2009-11-17  3343  	return 0;
18f0f978 Christoph Hellwig 2009-11-17  3344  
18f0f978 Christoph Hellwig 2009-11-17  3345  invalid_fld:
0df10b84 Hannes Reinecke   2016-04-04 @3346  	ata_scsi_set_invalid_field(dev, scmd, fp, bp);
bcfc867d Hannes Reinecke   2016-04-04  3347  	return 1;
bcfc867d Hannes Reinecke   2016-04-04  3348  invalid_param_len:
bcfc867d Hannes Reinecke   2016-04-04  3349  	/* "Parameter list length error" */
bcfc867d Hannes Reinecke   2016-04-04  3350  	ata_scsi_set_sense(dev, scmd, ILLEGAL_REQUEST, 0x1a, 0x0);
bcfc867d Hannes Reinecke   2016-04-04  3351  	return 1;
bcfc867d Hannes Reinecke   2016-04-04  3352  invalid_opcode:
bcfc867d Hannes Reinecke   2016-04-04  3353  	/* "Invalid command operation code" */
bcfc867d Hannes Reinecke   2016-04-04  3354  	ata_scsi_set_sense(dev, scmd, ILLEGAL_REQUEST, 0x20, 0x0);

:::::: The code at line 3346 was first introduced by commit
:::::: 0df10b84af88a482beea982f5f27a2e42157f600 libata-scsi: set bit pointer for sense code information

:::::: TO: Hannes Reinecke <hare@xxxxxxx>
:::::: CC: Tejun Heo <tj@xxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: Binary data


[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux