From: kernel test robot <lkp@intel.com>
To: alice.guo@oss.nxp.com, wahrenst@gmx.net, shawnguo@kernel.org,
s.hauer@pengutronix.de, kernel@pengutronix.de,
festevam@gmail.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, "alice.guo" <alice.guo@nxp.com>
Subject: Re: [PATCH v2] soc: imx: Add SoC device register for i.MX9
Date: Wed, 30 Oct 2024 01:57:28 +0800 [thread overview]
Message-ID: <202410300140.9q3lC7M2-lkp@intel.com> (raw)
In-Reply-To: <20241029083406.3888861-1-alice.guo@oss.nxp.com>
Hi,
kernel test robot noticed the following build warnings:
[auto build test WARNING on shawnguo/for-next]
[also build test WARNING on linus/master v6.12-rc5 next-20241029]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/alice-guo-oss-nxp-com/soc-imx-Add-SoC-device-register-for-i-MX9/20241029-163718
base: https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git for-next
patch link: https://lore.kernel.org/r/20241029083406.3888861-1-alice.guo%40oss.nxp.com
patch subject: [PATCH v2] soc: imx: Add SoC device register for i.MX9
config: i386-buildonly-randconfig-003-20241029 (https://download.01.org/0day-ci/archive/20241030/202410300140.9q3lC7M2-lkp@intel.com/config)
compiler: clang version 19.1.2 (https://github.com/llvm/llvm-project 7ba7d8e2f7b6445b60679da826210cdde29eaf8b)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241030/202410300140.9q3lC7M2-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410300140.9q3lC7M2-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/soc/imx/soc-imx9.c:48:44: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
48 | pr_err("%s: SMC failed: %d\n", __func__, res.a0);
| ~~ ^~~~~~
| %lu
include/linux/printk.h:533:33: note: expanded from macro 'pr_err'
533 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/printk.h:490:60: note: expanded from macro 'printk'
490 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/printk.h:462:19: note: expanded from macro 'printk_index_wrap'
462 | _p_func(_fmt, ##__VA_ARGS__); \
| ~~~~ ^~~~~~~~~~~
1 warning generated.
vim +48 drivers/soc/imx/soc-imx9.c
17
18 static int imx9_soc_device_register(void)
19 {
20 struct soc_device_attribute *attr;
21 struct arm_smccc_res res;
22 struct soc_device *sdev;
23 u32 soc_id, rev_major, rev_minor;
24 u64 uid127_64, uid63_0;
25 int err;
26
27 attr = kzalloc(sizeof(*attr), GFP_KERNEL);
28 if (!attr)
29 return -ENOMEM;
30
31 err = of_property_read_string(of_root, "model", &attr->machine);
32 if (err) {
33 pr_err("%s: missing model property: %d\n", __func__, err);
34 goto attr;
35 }
36
37 attr->family = kasprintf(GFP_KERNEL, "Freescale i.MX");
38
39 /*
40 * Retrieve the soc id, rev & uid info:
41 * res.a1[31:16]: soc revision;
42 * res.a1[15:0]: soc id;
43 * res.a2: uid[127:64];
44 * res.a3: uid[63:0];
45 */
46 arm_smccc_smc(IMX_SIP_GET_SOC_INFO, 0, 0, 0, 0, 0, 0, 0, &res);
47 if (res.a0 != SMCCC_RET_SUCCESS) {
> 48 pr_err("%s: SMC failed: %d\n", __func__, res.a0);
49 err = res.a0;
50 goto family;
51 }
52
53 soc_id = SOC_ID(res.a1);
54 rev_major = SOC_REV_MAJOR(res.a1);
55 rev_minor = SOC_REV_MINOR(res.a1);
56
57 attr->soc_id = kasprintf(GFP_KERNEL, "i.MX%2x", soc_id);
58 attr->revision = kasprintf(GFP_KERNEL, "%d.%d", rev_major, rev_minor);
59
60 uid127_64 = res.a2;
61 uid63_0 = res.a3;
62 attr->serial_number = kasprintf(GFP_KERNEL, "%016llx%016llx", uid127_64, uid63_0);
63
64 sdev = soc_device_register(attr);
65 if (IS_ERR(sdev)) {
66 err = PTR_ERR(sdev);
67 goto soc_id;
68 }
69
70 return 0;
71
72 soc_id:
73 kfree(attr->soc_id);
74 kfree(attr->serial_number);
75 kfree(attr->revision);
76 family:
77 kfree(attr->family);
78 attr:
79 kfree(attr);
80 return err;
81 }
82
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2024-10-29 18:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-29 8:34 [PATCH v2] soc: imx: Add SoC device register for i.MX9 alice.guo
2024-10-29 9:13 ` Stefan Wahren
2024-10-29 14:57 ` Alexander Stein
2024-10-29 17:05 ` kernel test robot
2024-10-29 17:57 ` kernel 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=202410300140.9q3lC7M2-lkp@intel.com \
--to=lkp@intel.com \
--cc=alice.guo@nxp.com \
--cc=alice.guo@oss.nxp.com \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=wahrenst@gmx.net \
/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