From: kernel test robot <lkp@intel.com>
To: Nikita Yushchenko <nikita.yoush@cogentembedded.com>,
Thomas Gleixner <tglx@linutronix.de>,
Marc Zyngier <maz@kernel.org>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Eugeniu Rosca <erosca@de.adit-jv.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Subject: Re: [PATCH] drivers: irqchip: add irq-type-changer
Date: Mon, 24 Jan 2022 17:48:14 +0800 [thread overview]
Message-ID: <202201241716.mt2XBMZQ-lkp@intel.com> (raw)
In-Reply-To: <20220119201741.717770-1-nikita.yoush@cogentembedded.com>
Hi Nikita,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tip/irq/core]
[also build test WARNING on v5.17-rc1 next-20220124]
[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/Nikita-Yushchenko/drivers-irqchip-add-irq-type-changer/20220120-041926
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 67d50b5f9114ae55d45e08e1fd1d6ae152622bf3
config: microblaze-randconfig-s032-20220124 (https://download.01.org/0day-ci/archive/20220124/202201241716.mt2XBMZQ-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 11.2.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-dirty
# https://github.com/0day-ci/linux/commit/08692091f6fa9d1ee51baef78ce2adf983b2248a
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Nikita-Yushchenko/drivers-irqchip-add-irq-type-changer/20220120-041926
git checkout 08692091f6fa9d1ee51baef78ce2adf983b2248a
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=microblaze SHELL=/bin/bash drivers/irqchip/
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/irqchip/irq-type-changer.c:111:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] size @@ got restricted gfp_t @@
drivers/irqchip/irq-type-changer.c:111:22: sparse: expected unsigned int [usertype] size
drivers/irqchip/irq-type-changer.c:111:22: sparse: got restricted gfp_t
>> drivers/irqchip/irq-type-changer.c:111:46: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted gfp_t [usertype] flags @@ got unsigned int @@
drivers/irqchip/irq-type-changer.c:111:46: sparse: expected restricted gfp_t [usertype] flags
drivers/irqchip/irq-type-changer.c:111:46: sparse: got unsigned int
vim +111 drivers/irqchip/irq-type-changer.c
81
82 static int __init changer_of_init(struct device_node *node,
83 struct device_node *parent)
84 {
85 struct irq_domain *domain, *parent_domain;
86 int count, i, ret;
87 struct changer *ch;
88 struct of_phandle_args pargs;
89 irq_hw_number_t unused;
90
91 if (!parent) {
92 pr_err("%pOF: no parent node\n", node);
93 return -EINVAL;
94 }
95
96 parent_domain = irq_find_host(parent);
97 if (!parent_domain) {
98 pr_err("%pOF: no parent domain\n", node);
99 return -EINVAL;
100 }
101
102 if (WARN_ON(!parent_domain->ops->translate))
103 return -EINVAL;
104
105 count = of_irq_count(node);
106 if (count < 1) {
107 pr_err("%pOF: no interrupts defined\n", node);
108 return -EINVAL;
109 }
110
> 111 ch = kzalloc(GFP_KERNEL, sizeof(*ch) + count * sizeof(ch->out[0]));
112 if (!ch)
113 return -ENOMEM;
114 ch->count = count;
115
116 for (i = 0; i < count; i++) {
117 ret = of_irq_parse_one(node, i, &pargs);
118 if (ret) {
119 pr_err("%pOF: interrupt %d: error %d parsing\n",
120 node, i, ret);
121 goto out_free;
122 }
123 of_phandle_args_to_fwspec(pargs.np, pargs.args,
124 pargs.args_count,
125 &ch->out[i].fwspec);
126 ret = parent_domain->ops->translate(parent_domain,
127 &ch->out[i].fwspec,
128 &unused,
129 &ch->out[i].type);
130 if (ret) {
131 pr_err("%pOF: interrupt %d: error %d extracting type\n",
132 node, i, ret);
133 goto out_free;
134 }
135 if (ch->out[i].type == IRQ_TYPE_NONE) {
136 pr_err("%pOF: interrupt %d: no type\n", node, i);
137 ret = -ENXIO;
138 goto out_free;
139 }
140 }
141
142 domain = irq_domain_create_hierarchy(parent_domain, 0, count,
143 of_node_to_fwnode(node),
144 &changer_domain_ops, ch);
145 if (!domain) {
146 ret = -ENOMEM;
147 goto out_free;
148 }
149
150 return 0;
151
152 out_free:
153 kfree(ch);
154 return ret;
155 }
156
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
next prev parent reply other threads:[~2022-01-24 9:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-19 20:17 Nikita Yushchenko
2022-01-24 9:48 ` kernel test robot [this message]
2022-01-24 9:57 ` Geert Uytterhoeven
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=202201241716.mt2XBMZQ-lkp@intel.com \
--to=lkp@intel.com \
--cc=erosca@de.adit-jv.com \
--cc=geert@linux-m68k.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=nikita.yoush@cogentembedded.com \
--cc=tglx@linutronix.de \
/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
Powered by JetHome