[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202302111542.y6a7wZeb-lkp@intel.com>
Date: Sat, 11 Feb 2023 15:37:02 +0800
From: kernel test robot <lkp@...el.com>
To: Asmaa Mnebhi <asmaa@...dia.com>, linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, Asmaa Mnebhi <asmaa@...dia.com>
Subject: Re: [PATCH v3 1/2] Support NVIDIA BlueField-3 GPIO controller
Hi Asmaa,
I love your patch! Yet something to improve:
[auto build test ERROR on brgl/gpio/for-next]
[also build test ERROR on linusw-pinctrl/devel linusw-pinctrl/for-next linus/master v6.2-rc7 next-20230210]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Asmaa-Mnebhi/Support-NVIDIA-BlueField-3-GPIO-controller/20230210-234043
base: https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git gpio/for-next
patch link: https://lore.kernel.org/r/c1bf45a868edcd3df5263fa76a32b28e6c9ca3d1.1676042188.git.asmaa%40nvidia.com
patch subject: [PATCH v3 1/2] Support NVIDIA BlueField-3 GPIO controller
config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20230211/202302111542.y6a7wZeb-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/ea731fc5718b591e6c84ee33049e46b60882009d
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Asmaa-Mnebhi/Support-NVIDIA-BlueField-3-GPIO-controller/20230210-234043
git checkout ea731fc5718b591e6c84ee33049e46b60882009d
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch SHELL=/bin/bash drivers/gpio/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302111542.y6a7wZeb-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/gpio/gpio-mlxbf3.c: In function 'mlxbf3_gpio_probe':
>> drivers/gpio/gpio-mlxbf3.c:225:23: error: implicit declaration of function 'devm_request_irq'; did you mean 'can_request_irq'? [-Werror=implicit-function-declaration]
225 | ret = devm_request_irq(dev, irq, mlxbf3_gpio_irq_handler,
| ^~~~~~~~~~~~~~~~
| can_request_irq
>> drivers/gpio/gpio-mlxbf3.c:226:40: error: 'IRQF_SHARED' undeclared (first use in this function); did you mean 'VM_SHARED'?
226 | IRQF_SHARED, name, gs);
| ^~~~~~~~~~~
| VM_SHARED
drivers/gpio/gpio-mlxbf3.c:226:40: note: each undeclared identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors
vim +225 drivers/gpio/gpio-mlxbf3.c
148
149 static int
150 mlxbf3_gpio_probe(struct platform_device *pdev)
151 {
152 struct device *dev = &pdev->dev;
153 struct mlxbf3_gpio_context *gs;
154 unsigned int npins, valid_mask;
155 struct gpio_irq_chip *girq;
156 struct gpio_chip *gc;
157 struct resource *res;
158 const char *name;
159 int ret, irq;
160
161 name = dev_name(dev);
162
163 gs = devm_kzalloc(dev, sizeof(*gs), GFP_KERNEL);
164 if (!gs)
165 return -ENOMEM;
166
167 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
168 if (!res)
169 return -ENODEV;
170
171 /* Resource shared with pinctrl driver */
172 gs->gpio_io = devm_ioremap(dev, res->start, resource_size(res));
173 if (!gs->gpio_io)
174 return -ENOMEM;
175
176 /* YU GPIO block address */
177 gs->gpio_cause_io = devm_platform_ioremap_resource(pdev, 1);
178 if (IS_ERR(gs->gpio_cause_io))
179 return PTR_ERR(gs->gpio_cause_io);
180
181 if (device_property_read_u32(dev, "npins", &npins))
182 npins = MLXBF3_GPIO_MAX_PINS_PER_BLOCK;
183
184 if (device_property_read_u32(dev, "valid_mask", &valid_mask))
185 valid_mask = 0x0;
186
187 gs->valid_mask = valid_mask;
188
189 gc = &gs->gc;
190
191 ret = bgpio_init(gc, dev, 4,
192 gs->gpio_io + MLXBF_GPIO_READ_DATA_IN,
193 gs->gpio_io + MLXBF_GPIO_FW_DATA_OUT_SET,
194 gs->gpio_io + MLXBF_GPIO_FW_DATA_OUT_CLEAR,
195 gs->gpio_io + MLXBF_GPIO_FW_OUTPUT_ENABLE_SET,
196 gs->gpio_io + MLXBF_GPIO_FW_OUTPUT_ENABLE_CLEAR, 0);
197
198 gc->request = gpiochip_generic_request;
199 gc->free = gpiochip_generic_free;
200 gc->init_valid_mask = mlxbf3_gpio_init_valid_mask;
201
202 gc->ngpio = npins;
203 gc->owner = THIS_MODULE;
204
205 irq = platform_get_irq(pdev, 0);
206 if (irq >= 0) {
207 gs->irq_chip.name = name;
208 gs->irq_chip.irq_set_type = mlxbf3_gpio_irq_set_type;
209 gs->irq_chip.irq_enable = mlxbf3_gpio_irq_enable;
210 gs->irq_chip.irq_disable = mlxbf3_gpio_irq_disable;
211
212 girq = &gs->gc.irq;
213 girq->chip = &gs->irq_chip;
214 girq->handler = handle_simple_irq;
215 girq->default_type = IRQ_TYPE_NONE;
216 /* This will let us handle the parent IRQ in the driver */
217 girq->num_parents = 0;
218 girq->parents = NULL;
219 girq->parent_handler = NULL;
220
221 /*
222 * Directly request the irq here instead of passing
223 * a flow-handler because the irq is shared.
224 */
> 225 ret = devm_request_irq(dev, irq, mlxbf3_gpio_irq_handler,
> 226 IRQF_SHARED, name, gs);
227 if (ret) {
228 dev_err(dev, "failed to request IRQ");
229 return ret;
230 }
231 }
232
233 platform_set_drvdata(pdev, gs);
234
235 ret = devm_gpiochip_add_data(dev, &gs->gc, gs);
236 if (ret) {
237 dev_err(dev, "Failed adding memory mapped gpiochip\n");
238 return ret;
239 }
240
241 return 0;
242 }
243
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
Powered by blists - more mailing lists