From: kernel test robot <lkp@intel.com>
To: Hector Martin <marcan@marcan.st>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [asahilinux:bits/110-smc 4/17] drivers/platform/apple/smc_core.c:210:26: sparse: sparse: cast to restricted __be32
Date: Sun, 31 Jul 2022 23:10:46 +0800 [thread overview]
Message-ID: <202207312332.oiwfkI9y-lkp@intel.com> (raw)
tree: https://github.com/AsahiLinux/linux bits/110-smc
head: b1ba46a24716bd39ca22059fc93705a727c39890
commit: 58a839ca536e6de7bf1b2dff7441509c3ac9c8e7 [4/17] platform/apple: Add new Apple Mac SMC driver
config: arm64-randconfig-s043-20220721 (https://download.01.org/0day-ci/archive/20220731/202207312332.oiwfkI9y-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 12.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://github.com/AsahiLinux/linux/commit/58a839ca536e6de7bf1b2dff7441509c3ac9c8e7
git remote add asahilinux https://github.com/AsahiLinux/linux
git fetch --no-tags asahilinux bits/110-smc
git checkout 58a839ca536e6de7bf1b2dff7441509c3ac9c8e7
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/platform/apple/ sound/soc/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <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://01.org/lkp
next reply other threads:[~2022-07-31 15:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-31 15:10 kernel test robot [this message]
2022-08-16 4:09 [asahilinux:bits/110-smc 4/17] drivers/platform/apple/smc_core.c:210:26: sparse: sparse: cast to restricted __be32 kernel test robot
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=202207312332.oiwfkI9y-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcan@marcan.st \
/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.