linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: kbuild-all@lists.01.org,
	Linux Memory Management List <linux-mm@kvack.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>
Subject: [linux-next:master 3938/4500] drivers/soc/qcom/socinfo.c:322:36: sparse: sparse: cast to restricted __le32
Date: Mon, 18 Jan 2021 17:30:40 +0800	[thread overview]
Message-ID: <202101181731.zvB1gwLT-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   93bf8b946e5f9a0b0c68155597b53fd8ccce2827
commit: 734c78e7febf879a79e9b34e38df35cc63794350 [3938/4500] soc: qcom: socinfo: add info from PMIC models array
config: i386-randconfig-s002-20210118 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-208-g46a52ca4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=734c78e7febf879a79e9b34e38df35cc63794350
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 734c78e7febf879a79e9b34e38df35cc63794350
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


"sparse warnings: (new ones prefixed by >>)"
>> drivers/soc/qcom/socinfo.c:322:36: sparse: sparse: cast to restricted __le32
   drivers/soc/qcom/socinfo.c:323:36: sparse: sparse: cast to restricted __le32

vim +322 drivers/soc/qcom/socinfo.c

   304	
   305	static int qcom_show_pmic_model_array(struct seq_file *seq, void *p)
   306	{
   307		struct socinfo *socinfo = seq->private;
   308		unsigned int num_pmics = le32_to_cpu(socinfo->num_pmics);
   309		unsigned int pmic_array_offset = le32_to_cpu(socinfo->pmic_array_offset);
   310		int i;
   311		void *ptr = socinfo;
   312	
   313		ptr += pmic_array_offset;
   314	
   315		/* No need for bounds checking, it happened at socinfo_debugfs_init */
   316		for (i = 0; i < num_pmics; i++) {
   317			unsigned int model = SOCINFO_MINOR(get_unaligned_le32(ptr + 2 * i * sizeof(u32)));
   318			unsigned int die_rev = get_unaligned_le32(ptr + (2 * i + 1) * sizeof(u32));
   319	
   320			if (model <= ARRAY_SIZE(pmic_models) && pmic_models[model])
   321				seq_printf(seq, "%s %u.%u\n", pmic_models[model],
 > 322					   SOCINFO_MAJOR(le32_to_cpu(die_rev)),
   323					   SOCINFO_MINOR(le32_to_cpu(die_rev)));
   324			else
   325				seq_printf(seq, "unknown (%d)\n", model);
   326		}
   327	
   328		return 0;
   329	}
   330	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

                 reply	other threads:[~2021-01-18  9:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202101181731.zvB1gwLT-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-mm@kvack.org \
    /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