[netdev-net:master 24/38] net/ipv6/netfilter/nf_conntrack_reasm.c:462: undefined reference to `ipv6_frag_thdr_truncated'
by kernel test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git master
head: d5bd32a876c8cb677c9cc88dcc7eb498cd0c9397
commit: 9d9e937b1c8be97b424e3e11938e183fcde905c0 [24/38] ipv6/netfilter: Discard first fragment not including all headers
config: x86_64-randconfig-a012-20201115 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id...
git remote add netdev-net git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
git fetch --no-tags netdev-net master
git checkout 9d9e937b1c8be97b424e3e11938e183fcde905c0
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
ld: net/ipv6/netfilter/nf_conntrack_reasm.o: in function `nf_ct_frag6_gather':
>> net/ipv6/netfilter/nf_conntrack_reasm.c:462: undefined reference to `ipv6_frag_thdr_truncated'
vim +462 net/ipv6/netfilter/nf_conntrack_reasm.c
439
440 int nf_ct_frag6_gather(struct net *net, struct sk_buff *skb, u32 user)
441 {
442 u16 savethdr = skb->transport_header;
443 u8 nexthdr = NEXTHDR_FRAGMENT;
444 int fhoff, nhoff, ret;
445 struct frag_hdr *fhdr;
446 struct frag_queue *fq;
447 struct ipv6hdr *hdr;
448 u8 prevhdr;
449
450 /* Jumbo payload inhibits frag. header */
451 if (ipv6_hdr(skb)->payload_len == 0) {
452 pr_debug("payload len = 0\n");
453 return 0;
454 }
455
456 if (find_prev_fhdr(skb, &prevhdr, &nhoff, &fhoff) < 0)
457 return 0;
458
459 /* Discard the first fragment if it does not include all headers
460 * RFC 8200, Section 4.5
461 */
> 462 if (ipv6_frag_thdr_truncated(skb, fhoff, &nexthdr)) {
463 pr_debug("Drop incomplete fragment\n");
464 return 0;
465 }
466
467 if (!pskb_may_pull(skb, fhoff + sizeof(*fhdr)))
468 return -ENOMEM;
469
470 skb_set_transport_header(skb, fhoff);
471 hdr = ipv6_hdr(skb);
472 fhdr = (struct frag_hdr *)skb_transport_header(skb);
473
474 skb_orphan(skb);
475 fq = fq_find(net, fhdr->identification, user, hdr,
476 skb->dev ? skb->dev->ifindex : 0);
477 if (fq == NULL) {
478 pr_debug("Can't find and can't create new queue\n");
479 return -ENOMEM;
480 }
481
482 spin_lock_bh(&fq->q.lock);
483
484 ret = nf_ct_frag6_queue(fq, skb, fhdr, nhoff);
485 if (ret == -EPROTO) {
486 skb->transport_header = savethdr;
487 ret = 0;
488 }
489
490 spin_unlock_bh(&fq->q.lock);
491 inet_frag_put(&fq->q);
492 return ret;
493 }
494 EXPORT_SYMBOL_GPL(nf_ct_frag6_gather);
495
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
[PATCH v2] net: phy: mscc: fix excluded_middle.cocci warnings
by Julia Lawall
From: kernel test robot <lkp(a)intel.com>
Condition !A || A && B is equivalent to !A || B.
Generated by: scripts/coccinelle/misc/excluded_middle.cocci
Fixes: b76f0ea01312 ("coccinelle: misc: add excluded_middle.cocci script")
CC: Denis Efremov <efremov(a)linux.com>
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: Julia Lawall <julia.lawall(a)inria.fr>
---
v2: add netdev mailing list
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e28c0d7c92c89016c12a677616668957351e7542
commit: b76f0ea013125358d1b4ca147a6f9b6883dd2493 coccinelle: misc: add excluded_middle.cocci script
:::::: branch date: 8 hours ago
:::::: commit date: 8 weeks ago
Please take the patch only if it's a positive warning. Thanks!
mscc_ptp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/phy/mscc/mscc_ptp.c
+++ b/drivers/net/phy/mscc/mscc_ptp.c
@@ -136,7 +136,7 @@ static void vsc85xx_ts_write_csr(struct
phy_ts_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_1588);
- if (!cond || (cond && upper))
+ if (!cond || upper)
phy_ts_base_write(phydev, MSCC_PHY_TS_CSR_DATA_MSB, upper);
phy_ts_base_write(phydev, MSCC_PHY_TS_CSR_DATA_LSB, lower);
1 year, 10 months
Re: [PATCH] drivers: gpio: use of_match_ptr() and ACPI_PTR() macros
by kernel test robot
Hi "Enrico,
I love your patch! Perhaps something to improve:
[auto build test WARNING on gpio/for-next]
[also build test WARNING on joel-aspeed/for-next v5.10-rc4 next-20201117]
[cannot apply to xlnx/master]
[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]
url: https://github.com/0day-ci/linux/commits/Enrico-Weigelt-metux-IT-consult/...
base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git for-next
config: x86_64-randconfig-a004-20201117 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ace9653c11c6308401dcda2e8b26bf97e6e66e30)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/36e4dc1edd4f6c7679f654c393616dafd...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Enrico-Weigelt-metux-IT-consult/drivers-gpio-use-of_match_ptr-and-ACPI_PTR-macros/20201117-234621
git checkout 36e4dc1edd4f6c7679f654c393616dafd4ffa73c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/gpio/gpio-lp3943.c:208:34: warning: unused variable 'lp3943_gpio_of_match' [-Wunused-const-variable]
static const struct of_device_id lp3943_gpio_of_match[] = {
^
1 warning generated.
--
>> drivers/gpio/gpio-pca953x.c:1236:34: warning: unused variable 'pca953x_dt_ids' [-Wunused-const-variable]
static const struct of_device_id pca953x_dt_ids[] = {
^
1 warning generated.
--
>> drivers/gpio/gpio-tpic2810.c:103:34: warning: unused variable 'tpic2810_of_match_table' [-Wunused-const-variable]
static const struct of_device_id tpic2810_of_match_table[] = {
^
1 warning generated.
--
>> drivers/gpio/gpio-twl4030.c:619:34: warning: unused variable 'twl_gpio_match' [-Wunused-const-variable]
static const struct of_device_id twl_gpio_match[] = {
^
1 warning generated.
--
>> drivers/gpio/gpio-xilinx.c:348:34: warning: unused variable 'xgpio_of_match' [-Wunused-const-variable]
static const struct of_device_id xgpio_of_match[] = {
^
1 warning generated.
vim +/lp3943_gpio_of_match +208 drivers/gpio/gpio-lp3943.c
0cc59b9d98d5541 Milo Kim 2013-12-06 207
0cc59b9d98d5541 Milo Kim 2013-12-06 @208 static const struct of_device_id lp3943_gpio_of_match[] = {
0cc59b9d98d5541 Milo Kim 2013-12-06 209 { .compatible = "ti,lp3943-gpio", },
0cc59b9d98d5541 Milo Kim 2013-12-06 210 { }
0cc59b9d98d5541 Milo Kim 2013-12-06 211 };
0cc59b9d98d5541 Milo Kim 2013-12-06 212 MODULE_DEVICE_TABLE(of, lp3943_gpio_of_match);
0cc59b9d98d5541 Milo Kim 2013-12-06 213
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
drivers/net/ethernet/netronome/nfp/crypto/tls.c:477:18: warning: variable 'ipv6h' set but not used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9c87c9f41245baa3fc4716cf39141439cf405b01
commit: b142083b585c2c03af24cca4d274f797796a4064 mptcp: MPTCP_KUNIT_TESTS should depend on MPTCP instead of selecting it
date: 4 weeks ago
config: arc-randconfig-r005-20201117 (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout b142083b585c2c03af24cca4d274f797796a4064
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/netronome/nfp/crypto/tls.c: In function 'nfp_net_tls_rx_resync_req':
>> drivers/net/ethernet/netronome/nfp/crypto/tls.c:477:18: warning: variable 'ipv6h' set but not used [-Wunused-but-set-variable]
477 | struct ipv6hdr *ipv6h;
| ^~~~~
In file included from include/linux/compiler_types.h:65,
from <command-line>:
drivers/net/ethernet/netronome/nfp/crypto/tls.c: In function 'nfp_net_tls_add':
include/linux/compiler_attributes.h:208:41: warning: statement will never be executed [-Wswitch-unreachable]
208 | # define fallthrough __attribute__((__fallthrough__))
| ^~~~~~~~~~~~~
drivers/net/ethernet/netronome/nfp/crypto/tls.c:299:3: note: in expansion of macro 'fallthrough'
299 | fallthrough;
| ^~~~~~~~~~~
vim +/ipv6h +477 drivers/net/ethernet/netronome/nfp/crypto/tls.c
232eeb1f84eb2d4 Jakub Kicinski 2019-06-05 470
6a35ddc5445a829 Jakub Kicinski 2019-12-17 471 int nfp_net_tls_rx_resync_req(struct net_device *netdev,
6a35ddc5445a829 Jakub Kicinski 2019-12-17 472 struct nfp_net_tls_resync_req *req,
6a35ddc5445a829 Jakub Kicinski 2019-12-17 473 void *pkt, unsigned int pkt_len)
6a35ddc5445a829 Jakub Kicinski 2019-12-17 474 {
6a35ddc5445a829 Jakub Kicinski 2019-12-17 475 struct nfp_net *nn = netdev_priv(netdev);
6a35ddc5445a829 Jakub Kicinski 2019-12-17 476 struct nfp_net_tls_offload_ctx *ntls;
6a35ddc5445a829 Jakub Kicinski 2019-12-17 @477 struct ipv6hdr *ipv6h;
6a35ddc5445a829 Jakub Kicinski 2019-12-17 478 struct tcphdr *th;
6a35ddc5445a829 Jakub Kicinski 2019-12-17 479 struct iphdr *iph;
6a35ddc5445a829 Jakub Kicinski 2019-12-17 480 struct sock *sk;
6a35ddc5445a829 Jakub Kicinski 2019-12-17 481 __be32 tcp_seq;
6a35ddc5445a829 Jakub Kicinski 2019-12-17 482 int err;
6a35ddc5445a829 Jakub Kicinski 2019-12-17 483
6a35ddc5445a829 Jakub Kicinski 2019-12-17 484 iph = pkt + req->l3_offset;
6a35ddc5445a829 Jakub Kicinski 2019-12-17 485 ipv6h = pkt + req->l3_offset;
6a35ddc5445a829 Jakub Kicinski 2019-12-17 486 th = pkt + req->l4_offset;
6a35ddc5445a829 Jakub Kicinski 2019-12-17 487
6a35ddc5445a829 Jakub Kicinski 2019-12-17 488 if ((u8 *)&th[1] > (u8 *)pkt + pkt_len) {
6a35ddc5445a829 Jakub Kicinski 2019-12-17 489 netdev_warn_once(netdev, "invalid TLS RX resync request (l3_off: %hhu l4_off: %hhu pkt_len: %u)\n",
6a35ddc5445a829 Jakub Kicinski 2019-12-17 490 req->l3_offset, req->l4_offset, pkt_len);
6a35ddc5445a829 Jakub Kicinski 2019-12-17 491 err = -EINVAL;
6a35ddc5445a829 Jakub Kicinski 2019-12-17 492 goto err_cnt_ign;
6a35ddc5445a829 Jakub Kicinski 2019-12-17 493 }
6a35ddc5445a829 Jakub Kicinski 2019-12-17 494
6a35ddc5445a829 Jakub Kicinski 2019-12-17 495 switch (iph->version) {
6a35ddc5445a829 Jakub Kicinski 2019-12-17 496 case 4:
6a35ddc5445a829 Jakub Kicinski 2019-12-17 497 sk = inet_lookup_established(dev_net(netdev), &tcp_hashinfo,
6a35ddc5445a829 Jakub Kicinski 2019-12-17 498 iph->saddr, th->source, iph->daddr,
6a35ddc5445a829 Jakub Kicinski 2019-12-17 499 th->dest, netdev->ifindex);
6a35ddc5445a829 Jakub Kicinski 2019-12-17 500 break;
6a35ddc5445a829 Jakub Kicinski 2019-12-17 501 #if IS_ENABLED(CONFIG_IPV6)
6a35ddc5445a829 Jakub Kicinski 2019-12-17 502 case 6:
6a35ddc5445a829 Jakub Kicinski 2019-12-17 503 sk = __inet6_lookup_established(dev_net(netdev), &tcp_hashinfo,
6a35ddc5445a829 Jakub Kicinski 2019-12-17 504 &ipv6h->saddr, th->source,
6a35ddc5445a829 Jakub Kicinski 2019-12-17 505 &ipv6h->daddr, ntohs(th->dest),
6a35ddc5445a829 Jakub Kicinski 2019-12-17 506 netdev->ifindex, 0);
6a35ddc5445a829 Jakub Kicinski 2019-12-17 507 break;
6a35ddc5445a829 Jakub Kicinski 2019-12-17 508 #endif
6a35ddc5445a829 Jakub Kicinski 2019-12-17 509 default:
6a35ddc5445a829 Jakub Kicinski 2019-12-17 510 netdev_warn_once(netdev, "invalid TLS RX resync request (l3_off: %hhu l4_off: %hhu ipver: %u)\n",
6a35ddc5445a829 Jakub Kicinski 2019-12-17 511 req->l3_offset, req->l4_offset, iph->version);
6a35ddc5445a829 Jakub Kicinski 2019-12-17 512 err = -EINVAL;
6a35ddc5445a829 Jakub Kicinski 2019-12-17 513 goto err_cnt_ign;
6a35ddc5445a829 Jakub Kicinski 2019-12-17 514 }
6a35ddc5445a829 Jakub Kicinski 2019-12-17 515
6a35ddc5445a829 Jakub Kicinski 2019-12-17 516 err = 0;
6a35ddc5445a829 Jakub Kicinski 2019-12-17 517 if (!sk)
6a35ddc5445a829 Jakub Kicinski 2019-12-17 518 goto err_cnt_ign;
6a35ddc5445a829 Jakub Kicinski 2019-12-17 519 if (!tls_is_sk_rx_device_offloaded(sk) ||
6a35ddc5445a829 Jakub Kicinski 2019-12-17 520 sk->sk_shutdown & RCV_SHUTDOWN)
6a35ddc5445a829 Jakub Kicinski 2019-12-17 521 goto err_put_sock;
6a35ddc5445a829 Jakub Kicinski 2019-12-17 522
6a35ddc5445a829 Jakub Kicinski 2019-12-17 523 ntls = tls_driver_ctx(sk, TLS_OFFLOAD_CTX_DIR_RX);
6a35ddc5445a829 Jakub Kicinski 2019-12-17 524 /* some FW versions can't report the handle and report 0s */
6a35ddc5445a829 Jakub Kicinski 2019-12-17 525 if (memchr_inv(&req->fw_handle, 0, sizeof(req->fw_handle)) &&
6a35ddc5445a829 Jakub Kicinski 2019-12-17 526 memcmp(&req->fw_handle, &ntls->fw_handle, sizeof(ntls->fw_handle)))
6a35ddc5445a829 Jakub Kicinski 2019-12-17 527 goto err_put_sock;
6a35ddc5445a829 Jakub Kicinski 2019-12-17 528
6a35ddc5445a829 Jakub Kicinski 2019-12-17 529 /* copy to ensure alignment */
6a35ddc5445a829 Jakub Kicinski 2019-12-17 530 memcpy(&tcp_seq, &req->tcp_seq, sizeof(tcp_seq));
6a35ddc5445a829 Jakub Kicinski 2019-12-17 531 tls_offload_rx_resync_request(sk, tcp_seq);
6a35ddc5445a829 Jakub Kicinski 2019-12-17 532 atomic_inc(&nn->ktls_rx_resync_req);
6a35ddc5445a829 Jakub Kicinski 2019-12-17 533
6a35ddc5445a829 Jakub Kicinski 2019-12-17 534 sock_gen_put(sk);
6a35ddc5445a829 Jakub Kicinski 2019-12-17 535 return 0;
6a35ddc5445a829 Jakub Kicinski 2019-12-17 536
6a35ddc5445a829 Jakub Kicinski 2019-12-17 537 err_put_sock:
6a35ddc5445a829 Jakub Kicinski 2019-12-17 538 sock_gen_put(sk);
6a35ddc5445a829 Jakub Kicinski 2019-12-17 539 err_cnt_ign:
6a35ddc5445a829 Jakub Kicinski 2019-12-17 540 atomic_inc(&nn->ktls_rx_resync_ign);
6a35ddc5445a829 Jakub Kicinski 2019-12-17 541 return err;
6a35ddc5445a829 Jakub Kicinski 2019-12-17 542 }
6a35ddc5445a829 Jakub Kicinski 2019-12-17 543
:::::: The code at line 477 was first introduced by commit
:::::: 6a35ddc5445a8291ced6247a67977e110275acde nfp: tls: implement the stream sync RX resync
:::::: TO: Jakub Kicinski <jakub.kicinski(a)netronome.com>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
[zen-kernel-zen-kernel:5.9/muqss 1/20] kernel/sched/MuQSS.c:4407:35: warning: no previous prototype for 'schedule_user'
by kernel test robot
tree: https://github.com/zen-kernel/zen-kernel 5.9/muqss
head: 8969d3bb632504cea984c900b71176e2d4c7997e
commit: 49e82d66c704858ba77947984535811593d6dacb [1/20] MultiQueue Skiplist Scheduler v0.204
config: x86_64-randconfig-m001-20201117 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/zen-kernel/zen-kernel/commit/49e82d66c704858ba77947984...
git remote add zen-kernel-zen-kernel https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen-kernel-zen-kernel 5.9/muqss
git checkout 49e82d66c704858ba77947984535811593d6dacb
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
kernel/sched/MuQSS.c:639:6: warning: no previous prototype for 'resched_task' [-Wmissing-prototypes]
639 | void resched_task(struct task_struct *p)
| ^~~~~~~~~~~~
kernel/sched/MuQSS.c:2386:5: warning: no previous prototype for 'sysctl_schedstats' [-Wmissing-prototypes]
2386 | int sysctl_schedstats(struct ctl_table *table, int write, void *buffer,
| ^~~~~~~~~~~~~~~~~
kernel/sched/MuQSS.c:3076:15: warning: no previous prototype for 'nr_active' [-Wmissing-prototypes]
3076 | unsigned long nr_active(void)
| ^~~~~~~~~
>> kernel/sched/MuQSS.c:4407:35: warning: no previous prototype for 'schedule_user' [-Wmissing-prototypes]
4407 | asmlinkage __visible void __sched schedule_user(void)
| ^~~~~~~~~~~~~
kernel/sched/MuQSS.c:6234:6: warning: no previous prototype for 'resched_cpu' [-Wmissing-prototypes]
6234 | void resched_cpu(int cpu)
| ^~~~~~~~~~~
kernel/sched/MuQSS.c:7697:6: warning: no previous prototype for 'init_idle_bootup_task' [-Wmissing-prototypes]
7697 | void init_idle_bootup_task(struct task_struct *idle)
| ^~~~~~~~~~~~~~~~~~~~~
vim +/schedule_user +4407 kernel/sched/MuQSS.c
4405
4406 #ifdef CONFIG_CONTEXT_TRACKING
> 4407 asmlinkage __visible void __sched schedule_user(void)
4408 {
4409 /*
4410 * If we come here after a random call to set_need_resched(),
4411 * or we have been woken up remotely but the IPI has not yet arrived,
4412 * we haven't yet exited the RCU idle mode. Do it here manually until
4413 * we find a better solution.
4414 *
4415 * NB: There are buggy callers of this function. Ideally we
4416 * should warn if prev_state != IN_USER, but that will trigger
4417 * too frequently to make sense yet.
4418 */
4419 enum ctx_state prev_state = exception_enter();
4420 schedule();
4421 exception_exit(prev_state);
4422 }
4423 #endif
4424
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
Re: [PATCH 2/2] fpga: dfl: look for vendor specific capability
by kernel test robot
Hi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linux/master]
[also build test WARNING on linus/master v5.10-rc4 next-20201117]
[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]
url: https://github.com/0day-ci/linux/commits/matthew-gerlach-linux-intel-com/...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 09162bc32c880a791c6c0668ce0745cf7958f576
config: xtensa-randconfig-r015-20201116 (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/b7db30a055d8c6a2cb8fade07b60918c5...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review matthew-gerlach-linux-intel-com/fpga-dfl-optional-VSEC-for-start-of-dfl/20201117-092704
git checkout b7db30a055d8c6a2cb8fade07b60918c59ecceb7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/device.h:15,
from include/linux/pci.h:37,
from drivers/fpga/dfl-pci.c:17:
drivers/fpga/dfl-pci.c: In function 'find_dfl_in_cfg':
>> drivers/fpga/dfl-pci.c:183:26: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 5 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
183 | dev_err(&pcidev->dev, "%s bad offset %u >= %llu\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
drivers/fpga/dfl-pci.c:183:4: note: in expansion of macro 'dev_err'
183 | dev_err(&pcidev->dev, "%s bad offset %u >= %llu\n",
| ^~~~~~~
drivers/fpga/dfl-pci.c:183:50: note: format string is defined here
183 | dev_err(&pcidev->dev, "%s bad offset %u >= %llu\n",
| ~~~^
| |
| long long unsigned int
| %u
In file included from include/linux/device.h:15,
from include/linux/pci.h:37,
from drivers/fpga/dfl-pci.c:17:
>> drivers/fpga/dfl-pci.c:194:26: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
194 | dev_err(&pcidev->dev, "%s unaliged start 0x%llx\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
drivers/fpga/dfl-pci.c:194:4: note: in expansion of macro 'dev_err'
194 | dev_err(&pcidev->dev, "%s unaliged start 0x%llx\n",
| ^~~~~~~
drivers/fpga/dfl-pci.c:194:50: note: format string is defined here
194 | dev_err(&pcidev->dev, "%s unaliged start 0x%llx\n",
| ~~~^
| |
| long long unsigned int
| %x
vim +183 drivers/fpga/dfl-pci.c
128
129 static int find_dfl_in_cfg(struct pci_dev *pcidev,
130 struct dfl_fpga_enum_info *info)
131 {
132 u32 bar, offset, vndr_hdr, dfl_cnt, dfl_res;
133 int dfl_res_off, i, voff = 0;
134 resource_size_t start, len;
135
136 while ((voff = pci_find_next_ext_capability(pcidev, voff, PCI_EXT_CAP_ID_VNDR))) {
137
138 pci_read_config_dword(pcidev, voff + PCI_VNDR_HEADER, &vndr_hdr);
139
140 dev_dbg(&pcidev->dev,
141 "vendor-specific capability id 0x%x, rev 0x%x len 0x%x\n",
142 PCI_VNDR_HEADER_ID(vndr_hdr),
143 PCI_VNDR_HEADER_REV(vndr_hdr),
144 PCI_VNDR_HEADER_LEN(vndr_hdr));
145
146 if (PCI_VNDR_HEADER_ID(vndr_hdr) == PCI_VNDR_ID_DFLS)
147 break;
148 }
149
150 if (!voff) {
151 dev_dbg(&pcidev->dev, "%s no VSEC found\n", __func__);
152 return -ENODEV;
153 }
154
155 pci_read_config_dword(pcidev, voff + PCI_VNDR_DFLS_CNT_OFFSET, &dfl_cnt);
156 dev_info(&pcidev->dev, "dfl_cnt %d\n", dfl_cnt);
157 for (i = 0; i < dfl_cnt; i++) {
158 dfl_res_off = voff + PCI_VNDR_DFLS_RES_OFFSET +
159 (i * sizeof(dfl_res));
160 pci_read_config_dword(pcidev, dfl_res_off, &dfl_res);
161
162 dev_dbg(&pcidev->dev, "dfl_res 0x%x\n", dfl_res);
163
164 bar = dfl_res & PCI_VND_DFLS_RES_BAR_MASK;
165
166 if (bar >= PCI_STD_NUM_BARS) {
167 dev_err(&pcidev->dev, "%s bad bar number %d\n",
168 __func__, bar);
169 return -EINVAL;
170 }
171
172 len = pci_resource_len(pcidev, bar);
173
174 if (len == 0) {
175 dev_err(&pcidev->dev, "%s unmapped bar number %d\n",
176 __func__, bar);
177 return -EINVAL;
178 }
179
180 offset = dfl_res & ~PCI_VND_DFLS_RES_BAR_MASK;
181
182 if (offset >= len) {
> 183 dev_err(&pcidev->dev, "%s bad offset %u >= %llu\n",
184 __func__, offset, len);
185 return -EINVAL;
186 }
187
188 dev_info(&pcidev->dev, "%s BAR %d offset 0x%x\n", __func__, bar, offset);
189
190 start = pci_resource_start(pcidev, bar) + offset;
191 len -= offset;
192
193 if (!PAGE_ALIGNED(start)) {
> 194 dev_err(&pcidev->dev, "%s unaliged start 0x%llx\n",
195 __func__, start);
196 return -EINVAL;
197 }
198
199 dfl_fpga_enum_info_add_dfl(info, start, len);
200 }
201
202 return 0;
203 }
204
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
altera_tse_main.c:undefined reference to `devm_ioremap'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9c87c9f41245baa3fc4716cf39141439cf405b01
commit: 4bdc0d676a643140bdf17dbf7eafedee3d496a3c remove ioremap_nocache and devm_ioremap_nocache
date: 11 months ago
config: s390-randconfig-c004-20201116 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 4bdc0d676a643140bdf17dbf7eafedee3d496a3c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
s390-linux-ld: drivers/irqchip/irq-renesas-intc-irqpin.o: in function `intc_irqpin_probe':
irq-renesas-intc-irqpin.c:(.text+0x86c): undefined reference to `devm_ioremap'
s390-linux-ld: drivers/irqchip/irq-renesas-irqc.o: in function `irqc_probe':
irq-renesas-irqc.c:(.text+0x354): undefined reference to `devm_platform_ioremap_resource'
s390-linux-ld: drivers/irqchip/irq-renesas-rza1.o: in function `rza1_irqc_probe':
irq-renesas-rza1.c:(.text+0xa4): undefined reference to `devm_platform_ioremap_resource'
s390-linux-ld: drivers/phy/hisilicon/phy-histb-combphy.o: in function `histb_combphy_probe':
phy-histb-combphy.c:(.text+0x52): undefined reference to `devm_platform_ioremap_resource'
s390-linux-ld: drivers/phy/hisilicon/phy-hisi-inno-usb2.o: in function `hisi_inno_phy_probe':
phy-hisi-inno-usb2.c:(.text+0x50): undefined reference to `devm_platform_ioremap_resource'
s390-linux-ld: drivers/phy/marvell/phy-mmp3-usb.o: in function `mmp3_usb_phy_probe':
phy-mmp3-usb.c:(.text+0x192): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/phy/st/phy-stm32-usbphyc.o: in function `stm32_usbphyc_probe':
phy-stm32-usbphyc.c:(.text+0x24e): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/soc/mediatek/mtk-scpsys.o: in function `scpsys_probe':
mtk-scpsys.c:(.text+0x15e): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/soc/amlogic/meson-canvas.o: in function `meson_canvas_probe':
meson-canvas.c:(.text+0x62): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/soc/amlogic/meson-clk-measure.o: in function `meson_msr_probe':
meson-clk-measure.c:(.text+0x12c): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/soc/qcom/qcom_gsbi.o:qcom_gsbi.c:(.text+0xb4): more undefined references to `devm_ioremap_resource' follow
s390-linux-ld: drivers/regulator/stm32-vrefbuf.o: in function `stm32_vrefbuf_probe':
stm32-vrefbuf.c:(.text+0x354): undefined reference to `devm_platform_ioremap_resource'
s390-linux-ld: drivers/reset/reset-ath79.o: in function `ath79_reset_probe':
reset-ath79.c:(.text+0x238): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/reset/reset-axs10x.o: in function `axs10x_reset_probe':
reset-axs10x.c:(.text+0xd2): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/reset/reset-brcmstb.o: in function `brcmstb_reset_probe':
reset-brcmstb.c:(.text+0x1ce): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/reset/reset-lpc18xx.o: in function `lpc18xx_rgu_probe':
reset-lpc18xx.c:(.text+0x322): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/reset/reset-meson.o: in function `meson_reset_probe':
reset-meson.c:(.text+0x5e): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/reset/reset-qcom-pdc.o:reset-qcom-pdc.c:(.text+0x152): more undefined references to `devm_ioremap_resource' follow
s390-linux-ld: drivers/char/hw_random/exynos-trng.o: in function `exynos_trng_probe':
exynos-trng.c:(.text+0x2ca): undefined reference to `devm_platform_ioremap_resource'
s390-linux-ld: drivers/char/hw_random/mtk-rng.o: in function `mtk_rng_probe':
mtk-rng.c:(.text+0x2e2): undefined reference to `devm_platform_ioremap_resource'
s390-linux-ld: drivers/char/hw_random/ks-sa-rng.o: in function `ks_sa_rng_probe':
ks-sa-rng.c:(.text+0x396): undefined reference to `devm_platform_ioremap_resource'
s390-linux-ld: drivers/char/hw_random/npcm-rng.o: in function `npcm_rng_probe':
npcm-rng.c:(.text+0x2d0): undefined reference to `devm_platform_ioremap_resource'
s390-linux-ld: drivers/mfd/syscon.o: in function `syscon_probe':
syscon.c:(.text+0xaa): undefined reference to `devm_ioremap'
s390-linux-ld: drivers/net/phy/mdio-moxart.o: in function `moxart_mdio_probe':
mdio-moxart.c:(.text+0x34e): undefined reference to `devm_platform_ioremap_resource'
s390-linux-ld: drivers/net/phy/mdio-sun4i.o: in function `sun4i_mdio_probe':
mdio-sun4i.c:(.text+0x330): undefined reference to `devm_platform_ioremap_resource'
s390-linux-ld: drivers/net/ethernet/altera/altera_tse_main.o: in function `request_and_map':
>> altera_tse_main.c:(.text+0x1b0): undefined reference to `devm_ioremap'
s390-linux-ld: drivers/net/ethernet/freescale/fec_main.o: in function `fec_probe':
fec_main.c:(.text+0x5e5a): undefined reference to `devm_platform_ioremap_resource'
s390-linux-ld: drivers/net/ethernet/freescale/fsl_pq_mdio.o: in function `fsl_pq_mdio_remove':
fsl_pq_mdio.c:(.text+0x76): undefined reference to `iounmap'
s390-linux-ld: drivers/net/ethernet/nxp/lpc_eth.o: in function `lpc_eth_drv_remove':
lpc_eth.c:(.text+0x3a8): undefined reference to `iounmap'
s390-linux-ld: drivers/net/ethernet/nxp/lpc_eth.o: in function `lpc_eth_drv_probe':
lpc_eth.c:(.text+0x160a): undefined reference to `ioremap'
s390-linux-ld: lpc_eth.c:(.text+0x1806): undefined reference to `iounmap'
s390-linux-ld: drivers/net/ethernet/renesas/ravb_main.o: in function `ravb_probe':
ravb_main.c:(.text+0x13f8): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/input/serio/olpc_apsp.o: in function `olpc_apsp_probe':
olpc_apsp.c:(.text+0x378): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/input/serio/sun4i-ps2.o: in function `sun4i_ps2_remove':
sun4i-ps2.c:(.text+0xfc): undefined reference to `iounmap'
s390-linux-ld: drivers/input/serio/sun4i-ps2.o: in function `sun4i_ps2_probe':
sun4i-ps2.c:(.text+0x426): undefined reference to `ioremap'
s390-linux-ld: sun4i-ps2.c:(.text+0x586): undefined reference to `iounmap'
s390-linux-ld: drivers/input/keyboard/st-keyscan.o: in function `keyscan_probe':
st-keyscan.c:(.text+0x31c): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/input/touchscreen/imx6ul_tsc.o: in function `imx6ul_tsc_probe':
imx6ul_tsc.c:(.text+0x466): undefined reference to `devm_platform_ioremap_resource'
s390-linux-ld: imx6ul_tsc.c:(.text+0x48e): undefined reference to `devm_platform_ioremap_resource'
s390-linux-ld: drivers/power/reset/brcm-kona-reset.o: in function `kona_reset_probe':
brcm-kona-reset.c:(.text+0x94): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/thermal/broadcom/brcmstb_thermal.o: in function `brcmstb_thermal_probe':
brcmstb_thermal.c:(.text+0x62): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/thermal/broadcom/ns-thermal.o: in function `ns_thermal_remove':
ns-thermal.c:(.text+0x2e): undefined reference to `iounmap'
s390-linux-ld: drivers/thermal/broadcom/sr-thermal.o: in function `sr_thermal_probe':
sr-thermal.c:(.text+0x84): undefined reference to `devm_memremap'
s390-linux-ld: drivers/thermal/zx2967_thermal.o: in function `zx2967_thermal_probe':
zx2967_thermal.c:(.text+0xca): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/watchdog/armada_37xx_wdt.o: in function `armada_37xx_wdt_probe':
armada_37xx_wdt.c:(.text+0x3da): undefined reference to `devm_ioremap'
s390-linux-ld: drivers/watchdog/at91sam9_wdt.o: in function `at91wdt_probe':
at91sam9_wdt.c:(.init.text+0x138): undefined reference to `devm_platform_ioremap_resource'
s390-linux-ld: drivers/watchdog/omap_wdt.o: in function `omap_wdt_probe':
omap_wdt.c:(.text+0x7fc): undefined reference to `devm_platform_ioremap_resource'
s390-linux-ld: drivers/watchdog/ftwdt010_wdt.o: in function `ftwdt010_wdt_probe':
ftwdt010_wdt.c:(.text+0x228): undefined reference to `devm_platform_ioremap_resource'
s390-linux-ld: drivers/watchdog/s3c2410_wdt.o: in function `s3c2410wdt_probe':
s3c2410_wdt.c:(.text+0x606): undefined reference to `devm_platform_ioremap_resource'
s390-linux-ld: drivers/watchdog/sama5d4_wdt.o: in function `sama5d4_wdt_probe':
sama5d4_wdt.c:(.text+0x41a): undefined reference to `devm_platform_ioremap_resource'
s390-linux-ld: drivers/watchdog/davinci_wdt.o:davinci_wdt.c:(.text+0x38a): more undefined references to `devm_platform_ioremap_resource' follow
s390-linux-ld: drivers/watchdog/mv64x60_wdt.o: in function `mv64x60_wdt_probe':
mv64x60_wdt.c:(.text+0x33c): undefined reference to `devm_ioremap'
s390-linux-ld: drivers/crypto/atmel-aes.o: in function `atmel_aes_probe':
atmel-aes.c:(.text+0x11ac): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/crypto/atmel-sha.o: in function `atmel_sha_probe':
atmel-sha.c:(.text+0x1e84): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/crypto/qcom-rng.o: in function `qcom_rng_probe':
qcom-rng.c:(.text+0xf4): undefined reference to `devm_platform_ioremap_resource'
s390-linux-ld: drivers/clocksource/timer-of.o: in function `timer_of_init':
timer-of.c:(.init.text+0x1c2): undefined reference to `iounmap'
s390-linux-ld: drivers/clocksource/timer-of.o: in function `timer_of_cleanup':
timer-of.c:(.init.text+0x326): undefined reference to `iounmap'
s390-linux-ld: drivers/mailbox/rockchip-mailbox.o: in function `rockchip_mbox_probe':
rockchip-mailbox.c:(.text+0x558): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/mailbox/bcm-pdc-mailbox.o: in function `pdc_probe':
bcm-pdc-mailbox.c:(.text+0x88a): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/mailbox/qcom-apcs-ipc-mailbox.o: in function `qcom_apcs_ipc_probe':
qcom-apcs-ipc-mailbox.c:(.text+0x102): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/mailbox/mtk-cmdq-mailbox.o: in function `cmdq_probe':
mtk-cmdq-mailbox.c:(.text+0x2e2): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/devfreq/event/exynos-ppmu.o: in function `exynos_ppmu_probe':
exynos-ppmu.c:(.text+0xcc): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/iio/adc/stm32-dfsdm-core.o:stm32-dfsdm-core.c:(.text+0x1be): more undefined references to `devm_ioremap_resource' follow
s390-linux-ld: drivers/nvmem/imx-iim.o: in function `imx_iim_probe':
imx-iim.c:(.text+0x48): undefined reference to `devm_platform_ioremap_resource'
s390-linux-ld: drivers/fpga/socfpga.o: in function `socfpga_fpga_probe':
socfpga.c:(.text+0x26a): undefined reference to `devm_ioremap_resource'
s390-linux-ld: socfpga.c:(.text+0x2a4): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/fpga/socfpga-a10.o: in function `socfpga_a10_fpga_probe':
socfpga-a10.c:(.text+0x46a): undefined reference to `devm_ioremap_resource'
s390-linux-ld: socfpga-a10.c:(.text+0x49e): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/fpga/zynq-fpga.o: in function `zynq_fpga_probe':
zynq-fpga.c:(.text+0x9a8): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/counter/ti-eqep.o: in function `ti_eqep_probe':
ti-eqep.c:(.text+0x740): undefined reference to `devm_platform_ioremap_resource'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
Re: [PATCH 2/8] spmi: hi6421-spmi-pmic: move driver from staging
by kernel test robot
Hi Mauro,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.10-rc4 next-20201117]
[cannot apply to staging/staging-testing robh/for-next lee-mfd/for-mfd-next]
[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]
url: https://github.com/0day-ci/linux/commits/Mauro-Carvalho-Chehab/Move-Hikey...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 09162bc32c880a791c6c0668ce0745cf7958f576
config: x86_64-randconfig-s022-20201115 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-107-gaf3512a6-dirty
# https://github.com/0day-ci/linux/commit/b972250f20fc571defa4b23c9cc959df6...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mauro-Carvalho-Chehab/Move-Hikey-970-USB-support-out-of-staging-and-add-DT/20201116-210334
git checkout b972250f20fc571defa4b23c9cc959df61eb0803
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/spmi/hisi-spmi-controller.c:164:24: sparse: sparse: cast to restricted __be32
>> drivers/spmi/hisi-spmi-controller.c:164:24: sparse: sparse: cast to restricted __be32
>> drivers/spmi/hisi-spmi-controller.c:164:24: sparse: sparse: cast to restricted __be32
>> drivers/spmi/hisi-spmi-controller.c:164:24: sparse: sparse: cast to restricted __be32
>> drivers/spmi/hisi-spmi-controller.c:164:24: sparse: sparse: cast to restricted __be32
>> drivers/spmi/hisi-spmi-controller.c:164:24: sparse: sparse: cast to restricted __be32
>> drivers/spmi/hisi-spmi-controller.c:239:25: sparse: sparse: cast from restricted __be32
vim +164 drivers/spmi/hisi-spmi-controller.c
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 110
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 111 static int spmi_read_cmd(struct spmi_controller *ctrl,
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 112 u8 opc, u8 slave_id, u16 slave_addr, u8 *__buf, size_t bc)
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 113 {
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 114 struct spmi_controller_dev *spmi_controller = dev_get_drvdata(&ctrl->dev);
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 115 u32 chnl_ofst = SPMI_CHANNEL_OFFSET * spmi_controller->channel;
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 116 unsigned long flags;
6af364501949d99 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 117 u8 *buf = __buf;
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 118 u32 cmd, data;
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 119 int rc;
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 120 u8 op_code, i;
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 121
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 122 if (bc > SPMI_CONTROLLER_MAX_TRANS_BYTES) {
4d914a8c480c312 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 123 dev_err(&ctrl->dev,
4c6491a343e91a5 drivers/staging/hikey9xx/hisi-spmi-controller.c YueHaibing 2020-09-01 124 "spmi_controller supports 1..%d bytes per trans, but:%zu requested\n",
4d914a8c480c312 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 125 SPMI_CONTROLLER_MAX_TRANS_BYTES, bc);
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 126 return -EINVAL;
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 127 }
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 128
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 129 switch (opc) {
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 130 case SPMI_CMD_READ:
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 131 op_code = SPMI_CMD_REG_READ;
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 132 break;
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 133 case SPMI_CMD_EXT_READ:
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 134 op_code = SPMI_CMD_EXT_REG_READ;
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 135 break;
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 136 case SPMI_CMD_EXT_READL:
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 137 op_code = SPMI_CMD_EXT_REG_READ_L;
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 138 break;
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 139 default:
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 140 dev_err(&ctrl->dev, "invalid read cmd 0x%x\n", opc);
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 141 return -EINVAL;
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 142 }
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 143
2ea3f6a03b155f4 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 144 cmd = SPMI_APB_SPMI_CMD_EN |
2ea3f6a03b155f4 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 145 (op_code << SPMI_APB_SPMI_CMD_TYPE_OFFSET) |
2ea3f6a03b155f4 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 146 ((bc - 1) << SPMI_APB_SPMI_CMD_LENGTH_OFFSET) |
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 147 ((slave_id & 0xf) << SPMI_APB_SPMI_CMD_SLAVEID_OFFSET) | /* slvid */
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 148 ((slave_addr & 0xffff) << SPMI_APB_SPMI_CMD_ADDR_OFFSET); /* slave_addr */
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 149
2ea3f6a03b155f4 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 150 spin_lock_irqsave(&spmi_controller->lock, flags);
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 151
2ea3f6a03b155f4 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 152 writel(cmd, spmi_controller->base + chnl_ofst + SPMI_APB_SPMI_CMD_BASE_ADDR);
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 153
4d914a8c480c312 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 154 rc = spmi_controller_wait_for_done(&ctrl->dev, spmi_controller,
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 155 spmi_controller->base, slave_id, slave_addr);
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 156 if (rc)
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 157 goto done;
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 158
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 159 for (i = 0; bc > i * SPMI_PER_DATAREG_BYTE; i++) {
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 160 data = readl(spmi_controller->base + chnl_ofst +
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 161 SPMI_SLAVE_OFFSET * slave_id +
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 162 SPMI_APB_SPMI_RDATA0_BASE_ADDR +
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 163 i * SPMI_PER_DATAREG_BYTE);
8788a30c12c7884 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 @164 data = be32_to_cpu((__be32)data);
2ea3f6a03b155f4 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 165 if ((bc - i * SPMI_PER_DATAREG_BYTE) >> 2) {
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 166 memcpy(buf, &data, sizeof(data));
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 167 buf += sizeof(data);
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 168 } else {
2ea3f6a03b155f4 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 169 memcpy(buf, &data, bc % SPMI_PER_DATAREG_BYTE);
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 170 buf += (bc % SPMI_PER_DATAREG_BYTE);
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 171 }
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 172 }
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 173
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 174 done:
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 175 spin_unlock_irqrestore(&spmi_controller->lock, flags);
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 176 if (rc)
4d914a8c480c312 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 177 dev_err(&ctrl->dev,
4c6491a343e91a5 drivers/staging/hikey9xx/hisi-spmi-controller.c YueHaibing 2020-09-01 178 "spmi read wait timeout op:0x%x slave_id:%d slave_addr:0x%x bc:%zu\n",
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 179 opc, slave_id, slave_addr, bc + 1);
6af364501949d99 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 180 else
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 181 dev_dbg(&ctrl->dev, "%s: id:%d slave_addr:0x%x, read value: %*ph\n",
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 182 __func__, slave_id, slave_addr, (int)bc, __buf);
6af364501949d99 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 183
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 184 return rc;
2ea3f6a03b155f4 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 185 }
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 186
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 187 static int spmi_write_cmd(struct spmi_controller *ctrl,
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 188 u8 opc, u8 slave_id, u16 slave_addr, const u8 *__buf, size_t bc)
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 189 {
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 190 struct spmi_controller_dev *spmi_controller = dev_get_drvdata(&ctrl->dev);
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 191 u32 chnl_ofst = SPMI_CHANNEL_OFFSET * spmi_controller->channel;
6af364501949d99 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 192 const u8 *buf = __buf;
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 193 unsigned long flags;
8788a30c12c7884 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 194 u32 cmd, data;
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 195 int rc;
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 196 u8 op_code, i;
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 197
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 198 if (bc > SPMI_CONTROLLER_MAX_TRANS_BYTES) {
4d914a8c480c312 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 199 dev_err(&ctrl->dev,
4c6491a343e91a5 drivers/staging/hikey9xx/hisi-spmi-controller.c YueHaibing 2020-09-01 200 "spmi_controller supports 1..%d bytes per trans, but:%zu requested\n",
4d914a8c480c312 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 201 SPMI_CONTROLLER_MAX_TRANS_BYTES, bc);
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 202 return -EINVAL;
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 203 }
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 204
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 205 switch (opc) {
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 206 case SPMI_CMD_WRITE:
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 207 op_code = SPMI_CMD_REG_WRITE;
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 208 break;
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 209 case SPMI_CMD_EXT_WRITE:
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 210 op_code = SPMI_CMD_EXT_REG_WRITE;
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 211 break;
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 212 case SPMI_CMD_EXT_WRITEL:
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 213 op_code = SPMI_CMD_EXT_REG_WRITE_L;
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 214 break;
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 215 default:
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 216 dev_err(&ctrl->dev, "invalid write cmd 0x%x\n", opc);
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 217 return -EINVAL;
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 218 }
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 219
2ea3f6a03b155f4 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 220 cmd = SPMI_APB_SPMI_CMD_EN |
2ea3f6a03b155f4 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 221 (op_code << SPMI_APB_SPMI_CMD_TYPE_OFFSET) |
2ea3f6a03b155f4 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 222 ((bc - 1) << SPMI_APB_SPMI_CMD_LENGTH_OFFSET) |
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 223 ((slave_id & 0xf) << SPMI_APB_SPMI_CMD_SLAVEID_OFFSET) |
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 224 ((slave_addr & 0xffff) << SPMI_APB_SPMI_CMD_ADDR_OFFSET);
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 225
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 226 /* Write data to FIFOs */
2ea3f6a03b155f4 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 227 spin_lock_irqsave(&spmi_controller->lock, flags);
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 228
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 229 for (i = 0; bc > i * SPMI_PER_DATAREG_BYTE; i++) {
8788a30c12c7884 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 230 data = 0;
2ea3f6a03b155f4 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 231 if ((bc - i * SPMI_PER_DATAREG_BYTE) >> 2) {
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 232 memcpy(&data, buf, sizeof(data));
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 233 buf += sizeof(data);
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 234 } else {
2ea3f6a03b155f4 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 235 memcpy(&data, buf, bc % SPMI_PER_DATAREG_BYTE);
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 236 buf += (bc % SPMI_PER_DATAREG_BYTE);
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 237 }
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 238
8788a30c12c7884 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 @239 writel((u32)cpu_to_be32(data),
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 240 spmi_controller->base + chnl_ofst +
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 241 SPMI_APB_SPMI_WDATA0_BASE_ADDR +
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 242 SPMI_PER_DATAREG_BYTE * i);
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 243 }
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 244
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 245 /* Start the transaction */
2ea3f6a03b155f4 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 246 writel(cmd, spmi_controller->base + chnl_ofst + SPMI_APB_SPMI_CMD_BASE_ADDR);
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 247
4d914a8c480c312 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 248 rc = spmi_controller_wait_for_done(&ctrl->dev, spmi_controller,
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 249 spmi_controller->base, slave_id,
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 250 slave_addr);
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 251 spin_unlock_irqrestore(&spmi_controller->lock, flags);
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 252
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 253 if (rc)
4c6491a343e91a5 drivers/staging/hikey9xx/hisi-spmi-controller.c YueHaibing 2020-09-01 254 dev_err(&ctrl->dev, "spmi write wait timeout op:0x%x slave_id:%d slave_addr:0x%x bc:%zu\n",
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 255 opc, slave_id, slave_addr, bc);
6af364501949d99 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 256 else
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 257 dev_dbg(&ctrl->dev, "%s: id:%d slave_addr:0x%x, wrote value: %*ph\n",
7f3ac6c502fd7ff drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 258 __func__, slave_id, slave_addr, (int)bc, __buf);
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 259
70f59c90c8199e8 drivers/staging/hikey9xx/hisi-spmi-controller.c Mayulong 2020-08-17 260 return rc;
2ea3f6a03b155f4 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 261 }
2ea3f6a03b155f4 drivers/staging/hikey9xx/hisi-spmi-controller.c Mauro Carvalho Chehab 2020-08-17 262
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
[linux-next:master 5857/6320] drivers/irqchip/irq-renesas-h8s.c:54:35: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 7c8ca8129ee9724cb1527895fe6dec942ef07f19
commit: e5afedde24451009af1f6b258044f6a1fa88a860 [5857/6320] Merge remote-tracking branch 'h8300/h8300-next' into master
config: mips-randconfig-s031-20201116 (attached as .config)
compiler: mips64el-linux-gcc (GCC) 9.3.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.3-107-gaf3512a6-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
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 e5afedde24451009af1f6b258044f6a1fa88a860
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
command-line: note: in included file:
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQUIRE redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_SEQ_CST redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQ_REL redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_RELEASE redefined
builtin:0:0: sparse: this was the original definition
drivers/irqchip/irq-renesas-h8s.c:48:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void * @@
drivers/irqchip/irq-renesas-h8s.c:48:14: sparse: expected void [noderef] __iomem *addr
drivers/irqchip/irq-renesas-h8s.c:48:14: sparse: got void *
>> drivers/irqchip/irq-renesas-h8s.c:54:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got void * @@
>> drivers/irqchip/irq-renesas-h8s.c:54:35: sparse: expected void const volatile [noderef] __iomem *mem
drivers/irqchip/irq-renesas-h8s.c:54:35: sparse: got void *
drivers/irqchip/irq-renesas-h8s.c:56:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void * @@
drivers/irqchip/irq-renesas-h8s.c:56:35: sparse: expected void volatile [noderef] __iomem *mem
drivers/irqchip/irq-renesas-h8s.c:56:35: sparse: got void *
drivers/irqchip/irq-renesas-h8s.c:71:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void * @@
drivers/irqchip/irq-renesas-h8s.c:71:14: sparse: expected void [noderef] __iomem *addr
drivers/irqchip/irq-renesas-h8s.c:71:14: sparse: got void *
drivers/irqchip/irq-renesas-h8s.c:78:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got void * @@
drivers/irqchip/irq-renesas-h8s.c:78:35: sparse: expected void const volatile [noderef] __iomem *mem
drivers/irqchip/irq-renesas-h8s.c:78:35: sparse: got void *
drivers/irqchip/irq-renesas-h8s.c:80:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void * @@
drivers/irqchip/irq-renesas-h8s.c:80:35: sparse: expected void volatile [noderef] __iomem *mem
drivers/irqchip/irq-renesas-h8s.c:80:35: sparse: got void *
drivers/irqchip/irq-renesas-h8s.c:91:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got void * @@
drivers/irqchip/irq-renesas-h8s.c:91:35: sparse: expected void const volatile [noderef] __iomem *mem
drivers/irqchip/irq-renesas-h8s.c:91:35: sparse: got void *
drivers/irqchip/irq-renesas-h8s.c:93:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void * @@
drivers/irqchip/irq-renesas-h8s.c:93:35: sparse: expected void volatile [noderef] __iomem *mem
drivers/irqchip/irq-renesas-h8s.c:93:35: sparse: got void *
drivers/irqchip/irq-renesas-h8s.c:123:18: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *static [toplevel] ipr_base @@ got void [noderef] __iomem * @@
drivers/irqchip/irq-renesas-h8s.c:123:18: sparse: expected void *static [toplevel] ipr_base
drivers/irqchip/irq-renesas-h8s.c:123:18: sparse: got void [noderef] __iomem *
drivers/irqchip/irq-renesas-h8s.c:124:18: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *static [toplevel] icr_base @@ got void [noderef] __iomem * @@
drivers/irqchip/irq-renesas-h8s.c:124:18: sparse: expected void *static [toplevel] icr_base
drivers/irqchip/irq-renesas-h8s.c:124:18: sparse: got void [noderef] __iomem *
drivers/irqchip/irq-renesas-h8s.c:130:43: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void * @@
drivers/irqchip/irq-renesas-h8s.c:130:43: sparse: expected void volatile [noderef] __iomem *mem
drivers/irqchip/irq-renesas-h8s.c:130:43: sparse: got void *
drivers/irqchip/irq-renesas-h8s.c:132:30: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void * @@
drivers/irqchip/irq-renesas-h8s.c:132:30: sparse: expected void volatile [noderef] __iomem *mem
drivers/irqchip/irq-renesas-h8s.c:132:30: sparse: got void *
vim +54 drivers/irqchip/irq-renesas-h8s.c
8a7644821ae00b7 Yoshinori Sato 2015-05-10 36
8a7644821ae00b7 Yoshinori Sato 2015-05-10 37 static void h8s_disable_irq(struct irq_data *data)
8a7644821ae00b7 Yoshinori Sato 2015-05-10 38 {
8a7644821ae00b7 Yoshinori Sato 2015-05-10 39 int pos;
558e6694cd4da8d Yoshinori Sato 2018-08-13 40 void __iomem *addr;
8a7644821ae00b7 Yoshinori Sato 2015-05-10 41 unsigned short pri;
beab3d5cb0e14e6 Yoshinori Sato 2020-04-15 42 int irq = data->irq - 16;
beab3d5cb0e14e6 Yoshinori Sato 2020-04-15 43 unsigned short ier;
beab3d5cb0e14e6 Yoshinori Sato 2020-04-15 44
beab3d5cb0e14e6 Yoshinori Sato 2020-04-15 45 if (irq < 0)
beab3d5cb0e14e6 Yoshinori Sato 2020-04-15 46 return;
8a7644821ae00b7 Yoshinori Sato 2015-05-10 47
beab3d5cb0e14e6 Yoshinori Sato 2020-04-15 48 addr = IPRA + ((ipr_table[irq] & 0xf0) >> 3);
beab3d5cb0e14e6 Yoshinori Sato 2020-04-15 49 pos = (ipr_table[irq] & 0x0f) * 4;
8a7644821ae00b7 Yoshinori Sato 2015-05-10 50 pri = ~(0x000f << pos);
2c496a11304da82 Yoshinori Sato 2019-12-26 51 pri &= __raw_readw(addr);
2c496a11304da82 Yoshinori Sato 2019-12-26 52 __raw_writew(pri, addr);
beab3d5cb0e14e6 Yoshinori Sato 2020-04-15 53 if (irq < 16) {
beab3d5cb0e14e6 Yoshinori Sato 2020-04-15 @54 ier = __raw_readw(IER);
beab3d5cb0e14e6 Yoshinori Sato 2020-04-15 55 ier &= ~(1 << irq);
beab3d5cb0e14e6 Yoshinori Sato 2020-04-15 56 __raw_writew(ier, IER);
beab3d5cb0e14e6 Yoshinori Sato 2020-04-15 57 }
8a7644821ae00b7 Yoshinori Sato 2015-05-10 58 }
8a7644821ae00b7 Yoshinori Sato 2015-05-10 59
:::::: The code at line 54 was first introduced by commit
:::::: beab3d5cb0e14e6397c4e596b3dbf1d36bf49d06 irq-renesas-h8s: Fix external interrupt control.
:::::: TO: Yoshinori Sato <ysato(a)users.sourceforge.jp>
:::::: CC: Yoshinori Sato <ysato(a)users.sourceforge.jp>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months