From: kernel test robot <lkp@intel.com>
To: Saravana Kannan <saravanak@google.com>
Cc: Marc Zyngier <maz@kernel.org>,
Hanks Chen <hanks.chen@mediatek.com>,
kbuild-all@lists.01.org, linux-arm-kernel@lists.infradead.org
Subject: [arm-platforms:irq/irqchip-next 41/43] drivers/irqchip/irq-mtk-sysirq.c:236:1: warning: parameter names (without types) in function declaration
Date: Sun, 26 Jul 2020 17:18:34 +0800 [thread overview]
Message-ID: <202007261731.5H1vb9oj%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5731 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git irq/irqchip-next
head: 99e05524bc722c8d3c1ab9c817afcb6829dbded3
commit: 3ae3022690e6787839dafa8ea3496450248b53e1 [41/43] irqchip/mtk-sysirq: Convert to a platform driver
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-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
git checkout 3ae3022690e6787839dafa8ea3496450248b53e1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
In file included from drivers/irqchip/irq-mtk-sysirq.c:8:
>> include/linux/irqchip.h:40:1: warning: data definition has no type or storage class
40 | MODULE_DEVICE_TABLE(of, drv_name##_irqchip_match_table); \
| ^~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-mtk-sysirq.c:236:1: note: in expansion of macro 'IRQCHIP_PLATFORM_DRIVER_END'
236 | IRQCHIP_PLATFORM_DRIVER_END(mtk_sysirq)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/irqchip.h:40:1: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' [-Werror=implicit-int]
40 | MODULE_DEVICE_TABLE(of, drv_name##_irqchip_match_table); \
| ^~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-mtk-sysirq.c:236:1: note: in expansion of macro 'IRQCHIP_PLATFORM_DRIVER_END'
236 | IRQCHIP_PLATFORM_DRIVER_END(mtk_sysirq)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/irqchip/irq-mtk-sysirq.c:236:1: warning: parameter names (without types) in function declaration
cc1: some warnings being treated as errors
vim +236 drivers/irqchip/irq-mtk-sysirq.c
121
122 static int __init mtk_sysirq_of_init(struct device_node *node,
123 struct device_node *parent)
124 {
125 struct irq_domain *domain, *domain_parent;
126 struct mtk_sysirq_chip_data *chip_data;
127 int ret, size, intpol_num = 0, nr_intpol_bases = 0, i = 0;
128
129 domain_parent = irq_find_host(parent);
130 if (!domain_parent) {
131 pr_err("mtk_sysirq: interrupt-parent not found\n");
132 return -EINVAL;
133 }
134
135 chip_data = kzalloc(sizeof(*chip_data), GFP_KERNEL);
136 if (!chip_data)
137 return -ENOMEM;
138
139 while (of_get_address(node, i++, NULL, NULL))
140 nr_intpol_bases++;
141
142 if (nr_intpol_bases == 0) {
143 pr_err("mtk_sysirq: base address not specified\n");
144 ret = -EINVAL;
145 goto out_free_chip;
146 }
147
148 chip_data->intpol_words = kcalloc(nr_intpol_bases,
149 sizeof(*chip_data->intpol_words),
150 GFP_KERNEL);
151 if (!chip_data->intpol_words) {
152 ret = -ENOMEM;
153 goto out_free_chip;
154 }
155
156 chip_data->intpol_bases = kcalloc(nr_intpol_bases,
157 sizeof(*chip_data->intpol_bases),
158 GFP_KERNEL);
159 if (!chip_data->intpol_bases) {
160 ret = -ENOMEM;
161 goto out_free_intpol_words;
162 }
163
164 for (i = 0; i < nr_intpol_bases; i++) {
165 struct resource res;
166
167 ret = of_address_to_resource(node, i, &res);
168 size = resource_size(&res);
169 intpol_num += size * 8;
170 chip_data->intpol_words[i] = size / 4;
171 chip_data->intpol_bases[i] = of_iomap(node, i);
172 if (ret || !chip_data->intpol_bases[i]) {
173 pr_err("%pOF: couldn't map region %d\n", node, i);
174 ret = -ENODEV;
175 goto out_free_intpol;
176 }
177 }
178
179 chip_data->intpol_idx = kcalloc(intpol_num,
180 sizeof(*chip_data->intpol_idx),
181 GFP_KERNEL);
182 if (!chip_data->intpol_idx) {
183 ret = -ENOMEM;
184 goto out_free_intpol;
185 }
186
187 chip_data->which_word = kcalloc(intpol_num,
188 sizeof(*chip_data->which_word),
189 GFP_KERNEL);
190 if (!chip_data->which_word) {
191 ret = -ENOMEM;
192 goto out_free_intpol_idx;
193 }
194
195 /*
196 * assign an index of the intpol_bases for each irq
197 * to set it fast later
198 */
199 for (i = 0; i < intpol_num ; i++) {
200 u32 word = i / 32, j;
201
202 for (j = 0; word >= chip_data->intpol_words[j] ; j++)
203 word -= chip_data->intpol_words[j];
204
205 chip_data->intpol_idx[i] = j;
206 chip_data->which_word[i] = word;
207 }
208
209 domain = irq_domain_add_hierarchy(domain_parent, 0, intpol_num, node,
210 &sysirq_domain_ops, chip_data);
211 if (!domain) {
212 ret = -ENOMEM;
213 goto out_free_which_word;
214 }
215 raw_spin_lock_init(&chip_data->lock);
216
217 return 0;
218
219 out_free_which_word:
220 kfree(chip_data->which_word);
221 out_free_intpol_idx:
222 kfree(chip_data->intpol_idx);
223 out_free_intpol:
224 for (i = 0; i < nr_intpol_bases; i++)
225 if (chip_data->intpol_bases[i])
226 iounmap(chip_data->intpol_bases[i]);
227 kfree(chip_data->intpol_bases);
228 out_free_intpol_words:
229 kfree(chip_data->intpol_words);
230 out_free_chip:
231 kfree(chip_data);
232 return ret;
233 }
234 IRQCHIP_PLATFORM_DRIVER_BEGIN(mtk_sysirq)
235 IRQCHIP_MATCH("mediatek,mt6577-sysirq", mtk_sysirq_of_init)
> 236 IRQCHIP_PLATFORM_DRIVER_END(mtk_sysirq)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 52664 bytes --]
[-- Attachment #3: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [arm-platforms:irq/irqchip-next 41/43] drivers/irqchip/irq-mtk-sysirq.c:236:1: warning: parameter names (without types) in function declaration
Date: Sun, 26 Jul 2020 17:18:34 +0800 [thread overview]
Message-ID: <202007261731.5H1vb9oj%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5888 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git irq/irqchip-next
head: 99e05524bc722c8d3c1ab9c817afcb6829dbded3
commit: 3ae3022690e6787839dafa8ea3496450248b53e1 [41/43] irqchip/mtk-sysirq: Convert to a platform driver
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-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
git checkout 3ae3022690e6787839dafa8ea3496450248b53e1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
In file included from drivers/irqchip/irq-mtk-sysirq.c:8:
>> include/linux/irqchip.h:40:1: warning: data definition has no type or storage class
40 | MODULE_DEVICE_TABLE(of, drv_name##_irqchip_match_table); \
| ^~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-mtk-sysirq.c:236:1: note: in expansion of macro 'IRQCHIP_PLATFORM_DRIVER_END'
236 | IRQCHIP_PLATFORM_DRIVER_END(mtk_sysirq)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/irqchip.h:40:1: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' [-Werror=implicit-int]
40 | MODULE_DEVICE_TABLE(of, drv_name##_irqchip_match_table); \
| ^~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-mtk-sysirq.c:236:1: note: in expansion of macro 'IRQCHIP_PLATFORM_DRIVER_END'
236 | IRQCHIP_PLATFORM_DRIVER_END(mtk_sysirq)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/irqchip/irq-mtk-sysirq.c:236:1: warning: parameter names (without types) in function declaration
cc1: some warnings being treated as errors
vim +236 drivers/irqchip/irq-mtk-sysirq.c
121
122 static int __init mtk_sysirq_of_init(struct device_node *node,
123 struct device_node *parent)
124 {
125 struct irq_domain *domain, *domain_parent;
126 struct mtk_sysirq_chip_data *chip_data;
127 int ret, size, intpol_num = 0, nr_intpol_bases = 0, i = 0;
128
129 domain_parent = irq_find_host(parent);
130 if (!domain_parent) {
131 pr_err("mtk_sysirq: interrupt-parent not found\n");
132 return -EINVAL;
133 }
134
135 chip_data = kzalloc(sizeof(*chip_data), GFP_KERNEL);
136 if (!chip_data)
137 return -ENOMEM;
138
139 while (of_get_address(node, i++, NULL, NULL))
140 nr_intpol_bases++;
141
142 if (nr_intpol_bases == 0) {
143 pr_err("mtk_sysirq: base address not specified\n");
144 ret = -EINVAL;
145 goto out_free_chip;
146 }
147
148 chip_data->intpol_words = kcalloc(nr_intpol_bases,
149 sizeof(*chip_data->intpol_words),
150 GFP_KERNEL);
151 if (!chip_data->intpol_words) {
152 ret = -ENOMEM;
153 goto out_free_chip;
154 }
155
156 chip_data->intpol_bases = kcalloc(nr_intpol_bases,
157 sizeof(*chip_data->intpol_bases),
158 GFP_KERNEL);
159 if (!chip_data->intpol_bases) {
160 ret = -ENOMEM;
161 goto out_free_intpol_words;
162 }
163
164 for (i = 0; i < nr_intpol_bases; i++) {
165 struct resource res;
166
167 ret = of_address_to_resource(node, i, &res);
168 size = resource_size(&res);
169 intpol_num += size * 8;
170 chip_data->intpol_words[i] = size / 4;
171 chip_data->intpol_bases[i] = of_iomap(node, i);
172 if (ret || !chip_data->intpol_bases[i]) {
173 pr_err("%pOF: couldn't map region %d\n", node, i);
174 ret = -ENODEV;
175 goto out_free_intpol;
176 }
177 }
178
179 chip_data->intpol_idx = kcalloc(intpol_num,
180 sizeof(*chip_data->intpol_idx),
181 GFP_KERNEL);
182 if (!chip_data->intpol_idx) {
183 ret = -ENOMEM;
184 goto out_free_intpol;
185 }
186
187 chip_data->which_word = kcalloc(intpol_num,
188 sizeof(*chip_data->which_word),
189 GFP_KERNEL);
190 if (!chip_data->which_word) {
191 ret = -ENOMEM;
192 goto out_free_intpol_idx;
193 }
194
195 /*
196 * assign an index of the intpol_bases for each irq
197 * to set it fast later
198 */
199 for (i = 0; i < intpol_num ; i++) {
200 u32 word = i / 32, j;
201
202 for (j = 0; word >= chip_data->intpol_words[j] ; j++)
203 word -= chip_data->intpol_words[j];
204
205 chip_data->intpol_idx[i] = j;
206 chip_data->which_word[i] = word;
207 }
208
209 domain = irq_domain_add_hierarchy(domain_parent, 0, intpol_num, node,
210 &sysirq_domain_ops, chip_data);
211 if (!domain) {
212 ret = -ENOMEM;
213 goto out_free_which_word;
214 }
215 raw_spin_lock_init(&chip_data->lock);
216
217 return 0;
218
219 out_free_which_word:
220 kfree(chip_data->which_word);
221 out_free_intpol_idx:
222 kfree(chip_data->intpol_idx);
223 out_free_intpol:
224 for (i = 0; i < nr_intpol_bases; i++)
225 if (chip_data->intpol_bases[i])
226 iounmap(chip_data->intpol_bases[i]);
227 kfree(chip_data->intpol_bases);
228 out_free_intpol_words:
229 kfree(chip_data->intpol_words);
230 out_free_chip:
231 kfree(chip_data);
232 return ret;
233 }
234 IRQCHIP_PLATFORM_DRIVER_BEGIN(mtk_sysirq)
235 IRQCHIP_MATCH("mediatek,mt6577-sysirq", mtk_sysirq_of_init)
> 236 IRQCHIP_PLATFORM_DRIVER_END(mtk_sysirq)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 52664 bytes --]
next reply other threads:[~2020-07-26 9:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-26 9:18 kernel test robot [this message]
2020-07-26 9:18 ` [arm-platforms:irq/irqchip-next 41/43] drivers/irqchip/irq-mtk-sysirq.c:236:1: warning: parameter names (without types) in function declaration kernel test robot
2020-07-26 10:25 ` Marc Zyngier
2020-07-26 10:25 ` Marc Zyngier
2020-07-27 22:34 ` Saravana Kannan
2020-07-27 22:34 ` Saravana Kannan
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=202007261731.5H1vb9oj%lkp@intel.com \
--to=lkp@intel.com \
--cc=hanks.chen@mediatek.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=maz@kernel.org \
--cc=saravanak@google.com \
/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.