mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Evan Green <evgreen@chromium.org>
Cc: kbuild-all@01.org, Vinayak Holikatti <vinholikatti@gmail.com>,
	"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Bart Van Assche <Bart.VanAssche@wdc.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	Evan Green <evgreen@chromium.org>
Subject: Re: [PATCH v2 4/4] scsi: ufs: Enable writing config descriptor
Date: Sat, 16 Jun 2018 05:33:31 +0800	[thread overview]
Message-ID: <201806160500.jV3e5cB1%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180615210049.126123-5-evgreen@chromium.org>

[-- Attachment #1: Type: text/plain, Size: 5378 bytes --]

Hi Evan,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on next-20180615]
[cannot apply to scsi/for-next v4.17]
[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/Evan-Green/Enable-UFS-provisioning-via-Linux/20180616-050548
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: x86_64-randconfig-x016-201823 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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 >>):

   include/linux/huge_mm.h:230:34: sparse: constant 0xffffea0000000000 is so big it is unsigned long
   include/linux/mm.h:533:24: sparse: constant 0xffffc90000000000 is so big it is unsigned long
   include/linux/mm.h:533:48: sparse: constant 0xffffc90000000000 is so big it is unsigned long
   include/linux/mm.h:624:29: sparse: constant 0xffffea0000000000 is so big it is unsigned long
   include/linux/mm.h:1098:16: sparse: constant 0xffffea0000000000 is so big it is unsigned long
   include/linux/mm.h:1796:27: sparse: constant 0xffffea0000000000 is so big it is unsigned long
   include/linux/mm.h:1888:16: sparse: constant 0xffffea0000000000 is so big it is unsigned long
   include/linux/scatterlist.h:151:25: sparse: constant 0xffffea0000000000 is so big it is unsigned long
   include/linux/scatterlist.h:236:16: sparse: constant 0xffffea0000000000 is so big it is unsigned long
   include/linux/scatterlist.h:387:16: sparse: constant 0xffffea0000000000 is so big it is unsigned long
   include/linux/scatterlist.h:387:16: sparse: constant 0xffffea0000000000 is so big it is unsigned long
   include/linux/dma-mapping.h:235:35: sparse: constant 0xffffea0000000000 is so big it is unsigned long
   include/linux/dma-mapping.h:238:33: sparse: constant 0xffffea0000000000 is so big it is unsigned long
   include/linux/highmem.h:51:16: sparse: constant 0xffffea0000000000 is so big it is unsigned long
   include/linux/blkdev.h:1721:14: sparse: constant 0xffffea0000000000 is so big it is unsigned long
   include/linux/blkdev.h:1721:14: sparse: constant 0xffffea0000000000 is so big it is unsigned long
   include/linux/blkdev.h:1723:14: sparse: constant 0xffffea0000000000 is so big it is unsigned long
   include/linux/blkdev.h:1723:14: sparse: constant 0xffffea0000000000 is so big it is unsigned long
   drivers/scsi/ufs/ufs-sysfs.c:897:1: sparse: symbol 'dev_attr_current_power_mode' was not declared. Should it be static?
   drivers/scsi/ufs/ufs-sysfs.c:900:1: sparse: symbol 'dev_attr_bkops_status' was not declared. Should it be static?
   drivers/scsi/ufs/ufs-sysfs.c:901:1: sparse: symbol 'dev_attr_purge_status' was not declared. Should it be static?
   drivers/scsi/ufs/ufs-sysfs.c:909:1: sparse: symbol 'dev_attr_ffu_status' was not declared. Should it be static?
   drivers/scsi/ufs/ufs-sysfs.c:910:1: sparse: symbol 'dev_attr_psa_state' was not declared. Should it be static?
   drivers/scsi/ufs/ufs-sysfs.c:911:1: sparse: symbol 'dev_attr_psa_data_size' was not declared. Should it be static?
   drivers/scsi/ufs/ufs-sysfs.c: In function 'ufs_cfg_attr_store':
>> drivers/scsi/ufs/ufs-sysfs.c:296:6: warning: 'valueptr' may be used uninitialized in this function [-Wmaybe-uninitialized]
     ret = ufshcd_rw_desc_param(hba, UPIU_QUERY_OPCODE_WRITE_DESC, desc_id,
     ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        desc_index, param_offset,
        ~~~~~~~~~~~~~~~~~~~~~~~~~
        valueptr, width);
        ~~~~~~~~~~~~~~~~
   drivers/scsi/ufs/ufs-sysfs.c:269:6: note: 'valueptr' was declared here
     u8 *valueptr;
         ^~~~~~~~

vim +/valueptr +296 drivers/scsi/ufs/ufs-sysfs.c

   254	
   255	static ssize_t ufs_sysfs_write_desc_param(struct ufs_hba *hba,
   256					  enum desc_idn desc_id,
   257					  u8 desc_index,
   258					  u8 param_offset,
   259					  const char *buf,
   260					  ssize_t buf_size,
   261					  u8 width)
   262	{
   263		int ret;
   264		unsigned long long value;
   265		u8 value8;
   266		__be16 value16;
   267		__be32 value32;
   268		__be64 value64;
   269		u8 *valueptr;
   270	
   271		if (kstrtoull(buf, 0, &value))
   272			return -EINVAL;
   273	
   274		switch (width) {
   275		case 1:
   276			value8 = (u8)value;
   277			valueptr = &value8;
   278			break;
   279	
   280		case 2:
   281			value16 = cpu_to_be16(value);
   282			valueptr = (u8 *)&value16;
   283			break;
   284	
   285		case 4:
   286			value32 = cpu_to_be32(value);
   287			valueptr = (u8 *)&value32;
   288			break;
   289	
   290		case 8:
   291			value64 = cpu_to_be64(value);
   292			valueptr = (u8 *)&value64;
   293			break;
   294		}
   295	
 > 296		ret = ufshcd_rw_desc_param(hba, UPIU_QUERY_OPCODE_WRITE_DESC, desc_id,
   297					desc_index, param_offset,
   298					valueptr, width);
   299		if (ret)
   300			return -EINVAL;
   301	
   302		return buf_size;
   303	}
   304	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28553 bytes --]

      reply	other threads:[~2018-06-15 21:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-15 21:00 [PATCH v2 0/4] Enable UFS provisioning via Linux Evan Green
2018-06-15 21:00 ` [PATCH v2 1/4] scsi: ufs: Add Configuration Descriptor to sysfs Evan Green
2018-06-16  7:16   ` Greg Kroah-Hartman
2018-06-18 16:54     ` Evan Green
2018-06-15 21:00 ` [PATCH v2 2/4] scsi: ufs: Make sysfs attributes writable Evan Green
2018-06-15 21:00 ` [PATCH v2 3/4] scsi: ufs: Refactor descriptor read for write Evan Green
2018-06-15 21:00 ` [PATCH v2 4/4] scsi: ufs: Enable writing config descriptor Evan Green
2018-06-15 21:33   ` kbuild test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201806160500.jV3e5cB1%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=Bart.VanAssche@wdc.com \
    --cc=adrian.hunter@intel.com \
    --cc=evgreen@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=stanislav.nijnikov@wdc.com \
    --cc=vinholikatti@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®