From: kernel test robot <lkp@intel.com>
To: Hector Martin <marcan@marcan.st>
Cc: oe-kbuild-all@lists.linux.dev, Janne Grunau <j@jannau.net>
Subject: [asahilinux:bits/110-smc 2/33] drivers/platform/apple/smc_core.c:210:26: sparse: sparse: cast to restricted __be32
Date: Fri, 29 Nov 2024 22:27:33 +0800 [thread overview]
Message-ID: <202411292256.AA0JdB4O-lkp@intel.com> (raw)
tree: https://github.com/AsahiLinux/linux bits/110-smc
head: 7206767c881874e25142cc6e862aa43778c051a2
commit: 0eff6efa8e45c0c214f38c401ebb1b4e5c675ae8 [2/33] platform/apple: Add new Apple Mac SMC driver
config: alpha-randconfig-r131-20241118 (https://download.01.org/0day-ci/archive/20241129/202411292256.AA0JdB4O-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 14.2.0
reproduce: (https://download.01.org/0day-ci/archive/20241129/202411292256.AA0JdB4O-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/202411292256.AA0JdB4O-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/platform/apple/smc_core.c:210:26: sparse: sparse: cast to restricted __be32
>> drivers/platform/apple/smc_core.c:210:26: sparse: sparse: cast to restricted __be32
>> drivers/platform/apple/smc_core.c:210:26: sparse: sparse: cast to restricted __be32
>> drivers/platform/apple/smc_core.c:210:26: sparse: sparse: cast to restricted __be32
>> drivers/platform/apple/smc_core.c:210:26: sparse: sparse: cast to restricted __be32
>> drivers/platform/apple/smc_core.c:210:26: sparse: sparse: cast to restricted __be32
vim +210 drivers/platform/apple/smc_core.c
190
191 struct apple_smc *apple_smc_probe(struct device *dev, const struct apple_smc_backend_ops *ops, void *cookie)
192 {
193 struct apple_smc *smc;
194 u32 count;
195 int ret;
196
197 smc = devm_kzalloc(dev, sizeof(*smc), GFP_KERNEL);
198 if (!smc)
199 return ERR_PTR(-ENOMEM);
200
201 smc->dev = dev;
202 smc->be_cookie = cookie;
203 smc->be = ops;
204 mutex_init(&smc->mutex);
205 BLOCKING_INIT_NOTIFIER_HEAD(&smc->event_handlers);
206
207 ret = apple_smc_read_u32(smc, SMC_KEY(#KEY), &count);
208 if (ret)
209 return ERR_PTR(dev_err_probe(dev, ret, "Failed to get key count"));
> 210 smc->key_count = be32_to_cpu(count);
211
212 ret = apple_smc_get_key_by_index(smc, 0, &smc->first_key);
213 if (ret)
214 return ERR_PTR(dev_err_probe(dev, ret, "Failed to get first key"));
215
216 ret = apple_smc_get_key_by_index(smc, smc->key_count - 1, &smc->last_key);
217 if (ret)
218 return ERR_PTR(dev_err_probe(dev, ret, "Failed to get last key"));
219
220 /* Enable notifications */
221 apple_smc_write_flag(smc, SMC_KEY(NTAP), 1);
222
223 dev_info(dev, "Initialized (%d keys %p4ch..%p4ch)\n",
224 smc->key_count, &smc->first_key, &smc->last_key);
225
226 dev_set_drvdata(dev, smc);
227
228 ret = mfd_add_devices(dev, -1, apple_smc_devs, ARRAY_SIZE(apple_smc_devs), NULL, 0, NULL);
229 if (ret)
230 return ERR_PTR(dev_err_probe(dev, ret, "Subdevice initialization failed"));
231
232 return smc;
233 }
234 EXPORT_SYMBOL(apple_smc_probe);
235
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-11-29 14:28 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=202411292256.AA0JdB4O-lkp@intel.com \
--to=lkp@intel.com \
--cc=j@jannau.net \
--cc=marcan@marcan.st \
--cc=oe-kbuild-all@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.