Hi Lad,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.16-rc5 next-20211217]
[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/Lad-Prabhakar/ata-pata_platform-...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
6441998e2e37131b0a4c310af9156d79d3351c16
config: x86_64-randconfig-a015-20211216
(
https://download.01.org/0day-ci/archive/20211218/202112181626.BwlfTnhn-lk...)
compiler: clang version 14.0.0 (
https://github.com/llvm/llvm-project
9043c3d65b11b442226015acfbf8167684586cfa)
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/2afb31eaebf47bea2adaec197e8aa2574...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Lad-Prabhakar/ata-pata_platform-Refurbish-the-driver/20211217-222115
git checkout 2afb31eaebf47bea2adaec197e8aa25744c15bf6
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir
ARCH=x86_64 SHELL=/bin/bash drivers/
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 >>):
> drivers/ata/pata_platform.c:232:37: error: implicit declaration
of function 'irq_get_trigger_type' [-Werror,-Wimplicit-function-declaration]
irq_res->flags = IORESOURCE_IRQ | irq_get_trigger_type(irq);
^
1 error generated.
vim +/irq_get_trigger_type +232 drivers/ata/pata_platform.c
193
194 static int pata_of_platform_get_pdata(struct platform_device *ofdev,
195 struct pata_platform_priv *priv)
196 {
197 struct device_node *dn = ofdev->dev.of_node;
198 struct resource *ctl_res;
199 struct resource *irq_res;
200 struct resource *io_res;
201 int pio_mode = 0;
202 int irq;
203 int ret;
204
205 ctl_res = devm_kzalloc(&ofdev->dev, sizeof(*ctl_res), GFP_KERNEL);
206 io_res = devm_kzalloc(&ofdev->dev, sizeof(*io_res), GFP_KERNEL);
207 irq_res = devm_kzalloc(&ofdev->dev, sizeof(*irq_res), GFP_KERNEL);
208 if (!ctl_res || !io_res || !irq_res)
209 return -ENOMEM;
210
211 ret = of_address_to_resource(dn, 0, io_res);
212 if (ret) {
213 dev_err(&ofdev->dev, "can't get IO address from device
tree\n");
214 return -EINVAL;
215 }
216 priv->io_res = io_res;
217
218 ret = of_address_to_resource(dn, 1, ctl_res);
219 if (ret) {
220 dev_err(&ofdev->dev, "can't get CTL address from device
tree\n");
221 return -EINVAL;
222 }
223 priv->ctl_res = ctl_res;
224
225 irq = platform_get_irq_optional(ofdev, 0);
226 if (irq <= 0 && irq != -ENXIO)
227 return irq ? irq : -ENXIO;
228
229 if (irq > 0) {
230 irq_res->start = irq;
231 irq_res->end = irq;
232 irq_res->flags = IORESOURCE_IRQ | irq_get_trigger_type(irq);
233 priv->irq_res = irq_res;
234 } else {
235 devm_kfree(&ofdev->dev, io_res);
236 }
237
238 of_property_read_u32(dn, "reg-shift", &priv->ioport_shift);
239
240 if (!of_property_read_u32(dn, "pio-mode", &pio_mode)) {
241 if (pio_mode > 6) {
242 dev_err(&ofdev->dev, "invalid pio-mode\n");
243 return -EINVAL;
244 }
245 } else {
246 dev_info(&ofdev->dev, "pio-mode unspecified, assuming PIO0\n");
247 }
248
249 priv->use16bit = of_property_read_bool(dn, "ata-generic,use16bit");
250
251 priv->mask = 1 << pio_mode;
252 priv->mask |= (1 << pio_mode) - 1;
253
254 return 0;
255 }
256
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org