[xlnx:xlnx_rebase_v5.10 961/1760] drivers/irqchip/irq-xilinx-intc.c:175:10: error: implicit declaration of function 'handle_domain_irq'
by kernel test robot
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.10
head: bf98c1493fb23bfd7e2678498b7e337ce2cd1d53
commit: ec26ada995b2cdeda14911845e1884150e099d5b [961/1760] irqchip: xilinx: Use handle_domain_irq()
config: s390-randconfig-r011-20210812 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 767496d19cb9a1fbba57ff08095faa161998ee36)
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 s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://github.com/Xilinx/linux-xlnx/commit/ec26ada995b2cdeda14911845e188...
git remote add xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xlnx xlnx_rebase_v5.10
git checkout ec26ada995b2cdeda14911845e1884150e099d5b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 >>):
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:19:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
^
In file included from drivers/irqchip/irq-xilinx-intc.c:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
^
In file included from drivers/irqchip/irq-xilinx-intc.c:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from drivers/irqchip/irq-xilinx-intc.c:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from drivers/irqchip/irq-xilinx-intc.c:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from drivers/irqchip/irq-xilinx-intc.c:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
drivers/irqchip/irq-xilinx-intc.c:173:17: error: no member named 'read_fn' in 'struct xintc_irq_chip'
hwirq = irqc->read_fn(irqc->base + IVR);
~~~~ ^
>> drivers/irqchip/irq-xilinx-intc.c:175:10: error: implicit declaration of function 'handle_domain_irq' [-Werror,-Wimplicit-function-declaration]
ret = handle_domain_irq(irqc->root_domain, hwirq, regs);
^
drivers/irqchip/irq-xilinx-intc.c:192:2: error: use of undeclared identifier 'ret'
ret = of_property_read_u32(intc, "cpu-id", &cpu_id);
^
drivers/irqchip/irq-xilinx-intc.c:193:6: error: use of undeclared identifier 'ret'
if (ret < 0)
^
drivers/irqchip/irq-xilinx-intc.c:213:2: error: use of undeclared identifier 'ret'
ret = of_property_read_u32(intc, "xlnx,num-intr-inputs", &irqc->nr_irq);
^
drivers/irqchip/irq-xilinx-intc.c:214:6: error: use of undeclared identifier 'ret'
if (ret < 0) {
^
drivers/irqchip/irq-xilinx-intc.c:219:2: error: use of undeclared identifier 'ret'
ret = of_property_read_u32(intc, "xlnx,kind-of-intr", &irqc->intr_mask);
^
drivers/irqchip/irq-xilinx-intc.c:220:6: error: use of undeclared identifier 'ret'
if (ret < 0) {
^
drivers/irqchip/irq-xilinx-intc.c:252:3: error: use of undeclared identifier 'ret'
ret = -EINVAL;
^
drivers/irqchip/irq-xilinx-intc.c:257:3: error: use of undeclared identifier 'irq'; did you mean 'irqc'?
irq = irq_of_parse_and_map(intc, 0);
^~~
irqc
drivers/irqchip/irq-xilinx-intc.c:188:25: note: 'irqc' declared here
struct xintc_irq_chip *irqc;
^
drivers/irqchip/irq-xilinx-intc.c:257:7: warning: incompatible integer to pointer conversion assigning to 'struct xintc_irq_chip *' from 'unsigned int' [-Wint-conversion]
irq = irq_of_parse_and_map(intc, 0);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-xilinx-intc.c:258:7: error: use of undeclared identifier 'irq'; did you mean 'irqc'?
if (irq) {
^~~
irqc
drivers/irqchip/irq-xilinx-intc.c:188:25: note: 'irqc' declared here
struct xintc_irq_chip *irqc;
^
drivers/irqchip/irq-xilinx-intc.c:259:37: error: use of undeclared identifier 'irq'; did you mean 'irqc'?
irq_set_chained_handler_and_data(irq,
^~~
irqc
drivers/irqchip/irq-xilinx-intc.c:188:25: note: 'irqc' declared here
struct xintc_irq_chip *irqc;
^
drivers/irqchip/irq-xilinx-intc.c:264:4: error: use of undeclared identifier 'ret'
ret = -EINVAL;
^
drivers/irqchip/irq-xilinx-intc.c:278:9: error: use of undeclared identifier 'ret'
return ret;
^
21 warnings and 14 errors generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for MFD_SUN6I_PRCM
Depends on HAS_IOMEM && (ARCH_SUNXI || COMPILE_TEST
Selected by
- CLK_SUNXI_PRCM_SUN6I && COMMON_CLK && CLK_SUNXI
- CLK_SUNXI_PRCM_SUN8I && COMMON_CLK && CLK_SUNXI
vim +/handle_domain_irq +175 drivers/irqchip/irq-xilinx-intc.c
165
166 static void xil_intc_handle_irq(struct pt_regs *regs)
167 {
168 int ret;
169 unsigned int hwirq, cpu_id = smp_processor_id();
170 struct xintc_irq_chip *irqc = per_cpu_ptr(&primary_intc, cpu_id);
171
172 do {
173 hwirq = irqc->read_fn(irqc->base + IVR);
174 if (hwirq != -1U) {
> 175 ret = handle_domain_irq(irqc->root_domain, hwirq, regs);
176 WARN_ONCE(ret, "cpu %d: Unhandled HWIRQ %d\n",
177 cpu_id, hwirq);
178 continue;
179 }
180
181 break;
182 } while (1);
183 }
184
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[xlnx:xlnx_rebase_v5.10 1018/1760] drivers/clk/clk-xlnx-clock-wizard-v.c:119:21: warning: cast from pointer to integer of different size
by kernel test robot
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.10
head: bf98c1493fb23bfd7e2678498b7e337ce2cd1d53
commit: 81494997bdd4943edc98a4d7689dd28db2960307 [1018/1760] clocking-wizard: Add versal clocking wizard support
config: i386-randconfig-r013-20210812 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/Xilinx/linux-xlnx/commit/81494997bdd4943edc98a4d7689dd...
git remote add xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xlnx xlnx_rebase_v5.10
git checkout 81494997bdd4943edc98a4d7689dd28db2960307
# save the attached .config to linux build tree
make W=1 ARCH=i386
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/clk/clk-xlnx-clock-wizard-v.c: In function 'clk_wzrd_recalc_rate':
>> drivers/clk/clk-xlnx-clock-wizard-v.c:119:21: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
119 | (void __iomem *)((u64)divider->base + divider->offset);
| ^
>> drivers/clk/clk-xlnx-clock-wizard-v.c:119:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
119 | (void __iomem *)((u64)divider->base + divider->offset);
| ^
drivers/clk/clk-xlnx-clock-wizard-v.c: In function 'clk_wzrd_dynamic_reconfig':
drivers/clk/clk-xlnx-clock-wizard-v.c:149:21: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
149 | (void __iomem *)((u64)divider->base + divider->offset);
| ^
drivers/clk/clk-xlnx-clock-wizard-v.c:149:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
149 | (void __iomem *)((u64)divider->base + divider->offset);
| ^
vim +119 drivers/clk/clk-xlnx-clock-wizard-v.c
113
114 static unsigned long clk_wzrd_recalc_rate(struct clk_hw *hw,
115 unsigned long parent_rate)
116 {
117 struct clk_wzrd_divider *divider = to_clk_wzrd_divider(hw);
118 void __iomem *div_addr =
> 119 (void __iomem *)((u64)divider->base + divider->offset);
120 unsigned int vall, valh;
121 u32 div;
122 u32 p5en, edge, prediv2;
123 u32 all;
124
125 edge = !!(readl(div_addr) & BIT(8));
126 p5en = !!(readl(div_addr) & BIT(13));
127 prediv2 = !!(readl(div_addr) & BIT(11));
128 vall = readl(div_addr + 4) & 0xff;
129 valh = readl(div_addr + 4) >> 8;
130 all = valh + vall + edge;
131 if (!all)
132 all = 1;
133 div = (prediv2 + 1) * (all + (prediv2 * p5en) / 2);
134 return DIV_ROUND_UP_ULL((u64)parent_rate, div);
135 }
136
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[xlnx:xlnx_rebase_v5.10 1363/1760] drivers/uio/uio_xilinx_ai_engine.c:39:6: warning: variable 'irq' set but not used
by kernel test robot
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.10
head: bf98c1493fb23bfd7e2678498b7e337ce2cd1d53
commit: b0c3669ae8f124715469bae21ac86b25f3c48cf6 [1363/1760] uio: Add the UIO driver for AI engine
config: arm-randconfig-r016-20210812 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 10.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/Xilinx/linux-xlnx/commit/b0c3669ae8f124715469bae21ac86...
git remote add xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xlnx xlnx_rebase_v5.10
git checkout b0c3669ae8f124715469bae21ac86b25f3c48cf6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=arm
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/uio/uio_xilinx_ai_engine.c: In function 'xilinx_ai_engine_debugfs_write':
>> drivers/uio/uio_xilinx_ai_engine.c:39:6: warning: variable 'irq' set but not used [-Wunused-but-set-variable]
39 | int irq, ret;
| ^~~
vim +/irq +39 drivers/uio/uio_xilinx_ai_engine.c
33
34 static ssize_t xilinx_ai_engine_debugfs_write(struct file *f,
35 const char __user *buf,
36 size_t size, loff_t *pos)
37 {
38 struct irq_domain *irq_sim_domain = file_inode(f)->i_private;
> 39 int irq, ret;
40
41 irq = irq_find_mapping(irq_sim_domain, 1);
42 ret = irq_set_irqchip_state(1, IRQCHIP_STATE_PENDING, true);
43 if (ret)
44 return ret;
45
46 return size;
47 }
48
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[xlnx:xlnx_rebase_v5.10 625/1760] drivers/of/configfs.c:134:9: warning: no previous prototype for function 'cfs_overlay_item_dtbo_read'
by kernel test robot
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.10
head: bf98c1493fb23bfd7e2678498b7e337ce2cd1d53
commit: e6de170decc96254704d77b4726ad658c6a2f42c [625/1760] OF: DT-Overlay configfs interface (v8)
config: s390-randconfig-r011-20210812 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 767496d19cb9a1fbba57ff08095faa161998ee36)
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 s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://github.com/Xilinx/linux-xlnx/commit/e6de170decc96254704d77b4726ad...
git remote add xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xlnx xlnx_rebase_v5.10
git checkout e6de170decc96254704d77b4726ad658c6a2f42c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 warnings (new ones prefixed by >>):
>> drivers/of/configfs.c:134:9: warning: no previous prototype for function 'cfs_overlay_item_dtbo_read' [-Wmissing-prototypes]
ssize_t cfs_overlay_item_dtbo_read(struct config_item *item,
^
drivers/of/configfs.c:134:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
ssize_t cfs_overlay_item_dtbo_read(struct config_item *item,
^
static
>> drivers/of/configfs.c:156:9: warning: no previous prototype for function 'cfs_overlay_item_dtbo_write' [-Wmissing-prototypes]
ssize_t cfs_overlay_item_dtbo_write(struct config_item *item,
^
drivers/of/configfs.c:156:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
ssize_t cfs_overlay_item_dtbo_write(struct config_item *item,
^
static
2 warnings generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for MFD_SUN6I_PRCM
Depends on HAS_IOMEM && (ARCH_SUNXI || COMPILE_TEST
Selected by
- CLK_SUNXI_PRCM_SUN6I && COMMON_CLK && CLK_SUNXI
- CLK_SUNXI_PRCM_SUN8I && COMMON_CLK && CLK_SUNXI
vim +/cfs_overlay_item_dtbo_read +134 drivers/of/configfs.c
133
> 134 ssize_t cfs_overlay_item_dtbo_read(struct config_item *item,
135 void *buf, size_t max_count)
136 {
137 struct cfs_overlay_item *overlay = to_cfs_overlay_item(item);
138
139 pr_debug("%s: buf=%p max_count=%zu\n", __func__, buf, max_count);
140
141 if (!overlay->dtbo)
142 return 0;
143
144 /* copy if buffer provided */
145 if (buf) {
146 /* the buffer must be large enough */
147 if (overlay->dtbo_size > max_count)
148 return -ENOSPC;
149
150 memcpy(buf, overlay->dtbo, overlay->dtbo_size);
151 }
152
153 return overlay->dtbo_size;
154 }
155
> 156 ssize_t cfs_overlay_item_dtbo_write(struct config_item *item,
157 const void *buf, size_t count)
158 {
159 struct cfs_overlay_item *overlay = to_cfs_overlay_item(item);
160 int err;
161
162 /* if it's set do not allow changes */
163 if (overlay->path[0] != '\0' || overlay->dtbo_size > 0)
164 return -EPERM;
165
166 /* copy the contents */
167 overlay->dtbo = kmemdup(buf, count, GFP_KERNEL);
168 if (!overlay->dtbo)
169 return -ENOMEM;
170
171 overlay->dtbo_size = count;
172
173 err = create_overlay(overlay, overlay->dtbo);
174 if (err < 0)
175 goto out_err;
176
177 return count;
178
179 out_err:
180 kfree(overlay->dtbo);
181 overlay->dtbo = NULL;
182 overlay->dtbo_size = 0;
183
184 return err;
185 }
186
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH mptcp-next 4/5] mptcp: add MPTCP_SUBFLOW_ADDRS getsockopt support
by kernel test robot
Hi Florian,
I love your patch! Yet something to improve:
[auto build test ERROR on kselftest/next]
[also build test ERROR on mptcp/export linus/master v5.14-rc5 next-20210811]
[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/Florian-Westphal/mptcp-add-SOL_M...
base: https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git next
config: x86_64-randconfig-a004-20210811 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d39ebdae674c8efc84ebe8dc32716ec353220530)
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/bd7031682bfb2cfd717fde49bd7f943c0...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Florian-Westphal/mptcp-add-SOL_MPTCP-getsockopt-support/20210811-212510
git checkout bd7031682bfb2cfd717fde49bd7f943c09f7a9a5
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=x86_64 SHELL=/bin/bash
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 >>):
In file included from <built-in>:1:
>> ./usr/include/linux/mptcp.h:205:3: error: unknown type name 'sa_family_t'
sa_family_t sa_family;
^
>> ./usr/include/linux/mptcp.h:206:19: error: field has incomplete type 'struct sockaddr'
struct sockaddr sa_local;
^
./usr/include/linux/mptcp.h:206:10: note: forward declaration of 'struct sockaddr'
struct sockaddr sa_local;
^
>> ./usr/include/linux/mptcp.h:208:23: error: field has incomplete type 'struct sockaddr_in6'
struct sockaddr_in6 sin6_local;
^
./usr/include/linux/mptcp.h:208:10: note: forward declaration of 'struct sockaddr_in6'
struct sockaddr_in6 sin6_local;
^
>> ./usr/include/linux/mptcp.h:209:27: error: field has incomplete type 'struct sockaddr_storage'
struct sockaddr_storage ss_local;
^
./usr/include/linux/mptcp.h:209:10: note: forward declaration of 'struct sockaddr_storage'
struct sockaddr_storage ss_local;
^
./usr/include/linux/mptcp.h:212:19: error: field has incomplete type 'struct sockaddr'
struct sockaddr sa_remote;
^
./usr/include/linux/mptcp.h:206:10: note: forward declaration of 'struct sockaddr'
struct sockaddr sa_local;
^
./usr/include/linux/mptcp.h:214:23: error: field has incomplete type 'struct sockaddr_in6'
struct sockaddr_in6 sin6_remote;
^
./usr/include/linux/mptcp.h:208:10: note: forward declaration of 'struct sockaddr_in6'
struct sockaddr_in6 sin6_local;
^
./usr/include/linux/mptcp.h:215:27: error: field has incomplete type 'struct sockaddr_storage'
struct sockaddr_storage ss_remote;
^
./usr/include/linux/mptcp.h:209:10: note: forward declaration of 'struct sockaddr_storage'
struct sockaddr_storage ss_local;
^
7 errors generated.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
drivers/pci/controller/pci-ixp4xx.c:148:12: error: 'ixp4xx_pci_read' redeclared as different kind of symbol
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 761c6d7ec820f123b931e7b8ef7ec7c8564e450f
commit: 5f291bfd33c8995c69f5a50f21445a4a93584ed2 arm: Typo s/PCI_IXP4XX_LEGACY/IXP4XX_PCI_LEGACY/
date: 4 weeks ago
config: arm-randconfig-r032-20210811 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 10.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 5f291bfd33c8995c69f5a50f21445a4a93584ed2
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash
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/pci/controller/pci-ixp4xx.c:38: warning: "IXP4XX_PCI_CSR" redefined
38 | #define IXP4XX_PCI_CSR 0x1c
|
In file included from arch/arm/mach-ixp4xx/include/mach/hardware.h:23,
from arch/arm/mach-ixp4xx/include/mach/io.h:15,
from arch/arm/include/asm/io.h:198,
from include/linux/io.h:13,
from drivers/pci/controller/pci-ixp4xx.c:20:
arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h:221: note: this is the location of the previous definition
221 | #define IXP4XX_PCI_CSR(x) ((volatile u32 *)(IXP4XX_PCI_CFG_BASE_VIRT+(x)))
|
>> drivers/pci/controller/pci-ixp4xx.c:148:12: error: 'ixp4xx_pci_read' redeclared as different kind of symbol
148 | static int ixp4xx_pci_read(struct ixp4xx_pci *p, u32 addr, u32 cmd, u32 *data)
| ^~~~~~~~~~~~~~~
In file included from arch/arm/include/asm/io.h:198,
from include/linux/io.h:13,
from drivers/pci/controller/pci-ixp4xx.c:20:
arch/arm/mach-ixp4xx/include/mach/io.h:17:14: note: previous declaration of 'ixp4xx_pci_read' was here
17 | extern int (*ixp4xx_pci_read)(u32 addr, u32 cmd, u32* data);
| ^~~~~~~~~~~~~~~
>> drivers/pci/controller/pci-ixp4xx.c:173:12: error: conflicting types for 'ixp4xx_pci_write'
173 | static int ixp4xx_pci_write(struct ixp4xx_pci *p, u32 addr, u32 cmd, u32 data)
| ^~~~~~~~~~~~~~~~
In file included from arch/arm/include/asm/io.h:198,
from include/linux/io.h:13,
from drivers/pci/controller/pci-ixp4xx.c:20:
arch/arm/mach-ixp4xx/include/mach/io.h:18:12: note: previous declaration of 'ixp4xx_pci_write' was here
18 | extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data);
| ^~~~~~~~~~~~~~~~
vim +/ixp4xx_pci_read +148 drivers/pci/controller/pci-ixp4xx.c
f7821b49345848 Linus Walleij 2021-05-03 @20 #include <linux/io.h>
f7821b49345848 Linus Walleij 2021-05-03 21 #include <linux/kernel.h>
f7821b49345848 Linus Walleij 2021-05-03 22 #include <linux/of_address.h>
f7821b49345848 Linus Walleij 2021-05-03 23 #include <linux/of_device.h>
f7821b49345848 Linus Walleij 2021-05-03 24 #include <linux/of_pci.h>
f7821b49345848 Linus Walleij 2021-05-03 25 #include <linux/pci.h>
f7821b49345848 Linus Walleij 2021-05-03 26 #include <linux/platform_device.h>
f7821b49345848 Linus Walleij 2021-05-03 27 #include <linux/slab.h>
f7821b49345848 Linus Walleij 2021-05-03 28 #include <linux/bits.h>
f7821b49345848 Linus Walleij 2021-05-03 29
f7821b49345848 Linus Walleij 2021-05-03 30 /* Register offsets */
f7821b49345848 Linus Walleij 2021-05-03 31 #define IXP4XX_PCI_NP_AD 0x00
f7821b49345848 Linus Walleij 2021-05-03 32 #define IXP4XX_PCI_NP_CBE 0x04
f7821b49345848 Linus Walleij 2021-05-03 33 #define IXP4XX_PCI_NP_WDATA 0x08
f7821b49345848 Linus Walleij 2021-05-03 34 #define IXP4XX_PCI_NP_RDATA 0x0c
f7821b49345848 Linus Walleij 2021-05-03 35 #define IXP4XX_PCI_CRP_AD_CBE 0x10
f7821b49345848 Linus Walleij 2021-05-03 36 #define IXP4XX_PCI_CRP_WDATA 0x14
f7821b49345848 Linus Walleij 2021-05-03 37 #define IXP4XX_PCI_CRP_RDATA 0x18
f7821b49345848 Linus Walleij 2021-05-03 38 #define IXP4XX_PCI_CSR 0x1c
f7821b49345848 Linus Walleij 2021-05-03 39 #define IXP4XX_PCI_ISR 0x20
f7821b49345848 Linus Walleij 2021-05-03 40 #define IXP4XX_PCI_INTEN 0x24
f7821b49345848 Linus Walleij 2021-05-03 41 #define IXP4XX_PCI_DMACTRL 0x28
f7821b49345848 Linus Walleij 2021-05-03 42 #define IXP4XX_PCI_AHBMEMBASE 0x2c
f7821b49345848 Linus Walleij 2021-05-03 43 #define IXP4XX_PCI_AHBIOBASE 0x30
f7821b49345848 Linus Walleij 2021-05-03 44 #define IXP4XX_PCI_PCIMEMBASE 0x34
f7821b49345848 Linus Walleij 2021-05-03 45 #define IXP4XX_PCI_AHBDOORBELL 0x38
f7821b49345848 Linus Walleij 2021-05-03 46 #define IXP4XX_PCI_PCIDOORBELL 0x3c
f7821b49345848 Linus Walleij 2021-05-03 47 #define IXP4XX_PCI_ATPDMA0_AHBADDR 0x40
f7821b49345848 Linus Walleij 2021-05-03 48 #define IXP4XX_PCI_ATPDMA0_PCIADDR 0x44
f7821b49345848 Linus Walleij 2021-05-03 49 #define IXP4XX_PCI_ATPDMA0_LENADDR 0x48
f7821b49345848 Linus Walleij 2021-05-03 50 #define IXP4XX_PCI_ATPDMA1_AHBADDR 0x4c
f7821b49345848 Linus Walleij 2021-05-03 51 #define IXP4XX_PCI_ATPDMA1_PCIADDR 0x50
f7821b49345848 Linus Walleij 2021-05-03 52 #define IXP4XX_PCI_ATPDMA1_LENADDR 0x54
f7821b49345848 Linus Walleij 2021-05-03 53
f7821b49345848 Linus Walleij 2021-05-03 54 /* CSR bit definitions */
f7821b49345848 Linus Walleij 2021-05-03 55 #define IXP4XX_PCI_CSR_HOST BIT(0)
f7821b49345848 Linus Walleij 2021-05-03 56 #define IXP4XX_PCI_CSR_ARBEN BIT(1)
f7821b49345848 Linus Walleij 2021-05-03 57 #define IXP4XX_PCI_CSR_ADS BIT(2)
f7821b49345848 Linus Walleij 2021-05-03 58 #define IXP4XX_PCI_CSR_PDS BIT(3)
f7821b49345848 Linus Walleij 2021-05-03 59 #define IXP4XX_PCI_CSR_ABE BIT(4)
f7821b49345848 Linus Walleij 2021-05-03 60 #define IXP4XX_PCI_CSR_DBT BIT(5)
f7821b49345848 Linus Walleij 2021-05-03 61 #define IXP4XX_PCI_CSR_ASE BIT(8)
f7821b49345848 Linus Walleij 2021-05-03 62 #define IXP4XX_PCI_CSR_IC BIT(15)
f7821b49345848 Linus Walleij 2021-05-03 63 #define IXP4XX_PCI_CSR_PRST BIT(16)
f7821b49345848 Linus Walleij 2021-05-03 64
f7821b49345848 Linus Walleij 2021-05-03 65 /* ISR (Interrupt status) Register bit definitions */
f7821b49345848 Linus Walleij 2021-05-03 66 #define IXP4XX_PCI_ISR_PSE BIT(0)
f7821b49345848 Linus Walleij 2021-05-03 67 #define IXP4XX_PCI_ISR_PFE BIT(1)
f7821b49345848 Linus Walleij 2021-05-03 68 #define IXP4XX_PCI_ISR_PPE BIT(2)
f7821b49345848 Linus Walleij 2021-05-03 69 #define IXP4XX_PCI_ISR_AHBE BIT(3)
f7821b49345848 Linus Walleij 2021-05-03 70 #define IXP4XX_PCI_ISR_APDC BIT(4)
f7821b49345848 Linus Walleij 2021-05-03 71 #define IXP4XX_PCI_ISR_PADC BIT(5)
f7821b49345848 Linus Walleij 2021-05-03 72 #define IXP4XX_PCI_ISR_ADB BIT(6)
f7821b49345848 Linus Walleij 2021-05-03 73 #define IXP4XX_PCI_ISR_PDB BIT(7)
f7821b49345848 Linus Walleij 2021-05-03 74
f7821b49345848 Linus Walleij 2021-05-03 75 /* INTEN (Interrupt Enable) Register bit definitions */
f7821b49345848 Linus Walleij 2021-05-03 76 #define IXP4XX_PCI_INTEN_PSE BIT(0)
f7821b49345848 Linus Walleij 2021-05-03 77 #define IXP4XX_PCI_INTEN_PFE BIT(1)
f7821b49345848 Linus Walleij 2021-05-03 78 #define IXP4XX_PCI_INTEN_PPE BIT(2)
f7821b49345848 Linus Walleij 2021-05-03 79 #define IXP4XX_PCI_INTEN_AHBE BIT(3)
f7821b49345848 Linus Walleij 2021-05-03 80 #define IXP4XX_PCI_INTEN_APDC BIT(4)
f7821b49345848 Linus Walleij 2021-05-03 81 #define IXP4XX_PCI_INTEN_PADC BIT(5)
f7821b49345848 Linus Walleij 2021-05-03 82 #define IXP4XX_PCI_INTEN_ADB BIT(6)
f7821b49345848 Linus Walleij 2021-05-03 83 #define IXP4XX_PCI_INTEN_PDB BIT(7)
f7821b49345848 Linus Walleij 2021-05-03 84
f7821b49345848 Linus Walleij 2021-05-03 85 /* Shift value for byte enable on NP cmd/byte enable register */
f7821b49345848 Linus Walleij 2021-05-03 86 #define IXP4XX_PCI_NP_CBE_BESL 4
f7821b49345848 Linus Walleij 2021-05-03 87
f7821b49345848 Linus Walleij 2021-05-03 88 /* PCI commands supported by NP access unit */
f7821b49345848 Linus Walleij 2021-05-03 89 #define NP_CMD_IOREAD 0x2
f7821b49345848 Linus Walleij 2021-05-03 90 #define NP_CMD_IOWRITE 0x3
f7821b49345848 Linus Walleij 2021-05-03 91 #define NP_CMD_CONFIGREAD 0xa
f7821b49345848 Linus Walleij 2021-05-03 92 #define NP_CMD_CONFIGWRITE 0xb
f7821b49345848 Linus Walleij 2021-05-03 93 #define NP_CMD_MEMREAD 0x6
f7821b49345848 Linus Walleij 2021-05-03 94 #define NP_CMD_MEMWRITE 0x7
f7821b49345848 Linus Walleij 2021-05-03 95
f7821b49345848 Linus Walleij 2021-05-03 96 /* Constants for CRP access into local config space */
f7821b49345848 Linus Walleij 2021-05-03 97 #define CRP_AD_CBE_BESL 20
f7821b49345848 Linus Walleij 2021-05-03 98 #define CRP_AD_CBE_WRITE 0x00010000
f7821b49345848 Linus Walleij 2021-05-03 99
f7821b49345848 Linus Walleij 2021-05-03 100 /* Special PCI configuration space registers for this controller */
f7821b49345848 Linus Walleij 2021-05-03 101 #define IXP4XX_PCI_RTOTTO 0x40
f7821b49345848 Linus Walleij 2021-05-03 102
f7821b49345848 Linus Walleij 2021-05-03 103 struct ixp4xx_pci {
f7821b49345848 Linus Walleij 2021-05-03 104 struct device *dev;
f7821b49345848 Linus Walleij 2021-05-03 105 void __iomem *base;
f7821b49345848 Linus Walleij 2021-05-03 106 bool errata_hammer;
f7821b49345848 Linus Walleij 2021-05-03 107 bool host_mode;
f7821b49345848 Linus Walleij 2021-05-03 108 };
f7821b49345848 Linus Walleij 2021-05-03 109
f7821b49345848 Linus Walleij 2021-05-03 110 /*
f7821b49345848 Linus Walleij 2021-05-03 111 * The IXP4xx has a peculiar address bus that will change the
f7821b49345848 Linus Walleij 2021-05-03 112 * byte order on SoC peripherals depending on whether the device
f7821b49345848 Linus Walleij 2021-05-03 113 * operates in big-endian or little-endian mode. That means that
f7821b49345848 Linus Walleij 2021-05-03 114 * readl() and writel() that always use little-endian access
f7821b49345848 Linus Walleij 2021-05-03 115 * will not work for SoC peripherals such as the PCI controller
f7821b49345848 Linus Walleij 2021-05-03 116 * when used in big-endian mode. The accesses to the individual
f7821b49345848 Linus Walleij 2021-05-03 117 * PCI devices on the other hand, are always little-endian and
f7821b49345848 Linus Walleij 2021-05-03 118 * can use readl() and writel().
f7821b49345848 Linus Walleij 2021-05-03 119 *
f7821b49345848 Linus Walleij 2021-05-03 120 * For local AHB bus access we need to use __raw_[readl|writel]()
f7821b49345848 Linus Walleij 2021-05-03 121 * to make sure that we access the SoC devices in the CPU native
f7821b49345848 Linus Walleij 2021-05-03 122 * endianness.
f7821b49345848 Linus Walleij 2021-05-03 123 */
f7821b49345848 Linus Walleij 2021-05-03 124 static inline u32 ixp4xx_readl(struct ixp4xx_pci *p, u32 reg)
f7821b49345848 Linus Walleij 2021-05-03 125 {
f7821b49345848 Linus Walleij 2021-05-03 126 return __raw_readl(p->base + reg);
f7821b49345848 Linus Walleij 2021-05-03 127 }
f7821b49345848 Linus Walleij 2021-05-03 128
f7821b49345848 Linus Walleij 2021-05-03 129 static inline void ixp4xx_writel(struct ixp4xx_pci *p, u32 reg, u32 val)
f7821b49345848 Linus Walleij 2021-05-03 130 {
f7821b49345848 Linus Walleij 2021-05-03 131 __raw_writel(val, p->base + reg);
f7821b49345848 Linus Walleij 2021-05-03 132 }
f7821b49345848 Linus Walleij 2021-05-03 133
f7821b49345848 Linus Walleij 2021-05-03 134 static int ixp4xx_pci_check_master_abort(struct ixp4xx_pci *p)
f7821b49345848 Linus Walleij 2021-05-03 135 {
f7821b49345848 Linus Walleij 2021-05-03 136 u32 isr = ixp4xx_readl(p, IXP4XX_PCI_ISR);
f7821b49345848 Linus Walleij 2021-05-03 137
f7821b49345848 Linus Walleij 2021-05-03 138 if (isr & IXP4XX_PCI_ISR_PFE) {
f7821b49345848 Linus Walleij 2021-05-03 139 /* Make sure the master abort bit is reset */
f7821b49345848 Linus Walleij 2021-05-03 140 ixp4xx_writel(p, IXP4XX_PCI_ISR, IXP4XX_PCI_ISR_PFE);
f7821b49345848 Linus Walleij 2021-05-03 141 dev_dbg(p->dev, "master abort detected\n");
f7821b49345848 Linus Walleij 2021-05-03 142 return -EINVAL;
f7821b49345848 Linus Walleij 2021-05-03 143 }
f7821b49345848 Linus Walleij 2021-05-03 144
f7821b49345848 Linus Walleij 2021-05-03 145 return 0;
f7821b49345848 Linus Walleij 2021-05-03 146 }
f7821b49345848 Linus Walleij 2021-05-03 147
f7821b49345848 Linus Walleij 2021-05-03 @148 static int ixp4xx_pci_read(struct ixp4xx_pci *p, u32 addr, u32 cmd, u32 *data)
f7821b49345848 Linus Walleij 2021-05-03 149 {
f7821b49345848 Linus Walleij 2021-05-03 150 ixp4xx_writel(p, IXP4XX_PCI_NP_AD, addr);
f7821b49345848 Linus Walleij 2021-05-03 151
f7821b49345848 Linus Walleij 2021-05-03 152 if (p->errata_hammer) {
f7821b49345848 Linus Walleij 2021-05-03 153 int i;
f7821b49345848 Linus Walleij 2021-05-03 154
f7821b49345848 Linus Walleij 2021-05-03 155 /*
f7821b49345848 Linus Walleij 2021-05-03 156 * PCI workaround - only works if NP PCI space reads have
f7821b49345848 Linus Walleij 2021-05-03 157 * no side effects. Hammer the register and read twice 8
f7821b49345848 Linus Walleij 2021-05-03 158 * times. last one will be good.
f7821b49345848 Linus Walleij 2021-05-03 159 */
f7821b49345848 Linus Walleij 2021-05-03 160 for (i = 0; i < 8; i++) {
f7821b49345848 Linus Walleij 2021-05-03 161 ixp4xx_writel(p, IXP4XX_PCI_NP_CBE, cmd);
f7821b49345848 Linus Walleij 2021-05-03 162 *data = ixp4xx_readl(p, IXP4XX_PCI_NP_RDATA);
f7821b49345848 Linus Walleij 2021-05-03 163 *data = ixp4xx_readl(p, IXP4XX_PCI_NP_RDATA);
f7821b49345848 Linus Walleij 2021-05-03 164 }
f7821b49345848 Linus Walleij 2021-05-03 165 } else {
f7821b49345848 Linus Walleij 2021-05-03 166 ixp4xx_writel(p, IXP4XX_PCI_NP_CBE, cmd);
f7821b49345848 Linus Walleij 2021-05-03 167 *data = ixp4xx_readl(p, IXP4XX_PCI_NP_RDATA);
f7821b49345848 Linus Walleij 2021-05-03 168 }
f7821b49345848 Linus Walleij 2021-05-03 169
f7821b49345848 Linus Walleij 2021-05-03 170 return ixp4xx_pci_check_master_abort(p);
f7821b49345848 Linus Walleij 2021-05-03 171 }
f7821b49345848 Linus Walleij 2021-05-03 172
f7821b49345848 Linus Walleij 2021-05-03 @173 static int ixp4xx_pci_write(struct ixp4xx_pci *p, u32 addr, u32 cmd, u32 data)
f7821b49345848 Linus Walleij 2021-05-03 174 {
f7821b49345848 Linus Walleij 2021-05-03 175 ixp4xx_writel(p, IXP4XX_PCI_NP_AD, addr);
f7821b49345848 Linus Walleij 2021-05-03 176
f7821b49345848 Linus Walleij 2021-05-03 177 /* Set up the write */
f7821b49345848 Linus Walleij 2021-05-03 178 ixp4xx_writel(p, IXP4XX_PCI_NP_CBE, cmd);
f7821b49345848 Linus Walleij 2021-05-03 179
f7821b49345848 Linus Walleij 2021-05-03 180 /* Execute the write by writing to NP_WDATA */
f7821b49345848 Linus Walleij 2021-05-03 181 ixp4xx_writel(p, IXP4XX_PCI_NP_WDATA, data);
f7821b49345848 Linus Walleij 2021-05-03 182
f7821b49345848 Linus Walleij 2021-05-03 183 return ixp4xx_pci_check_master_abort(p);
f7821b49345848 Linus Walleij 2021-05-03 184 }
f7821b49345848 Linus Walleij 2021-05-03 185
:::::: The code at line 148 was first introduced by commit
:::::: f7821b49345848246692c6e0aa170c8bc6723f86 PCI: ixp4xx: Add a new driver for IXP4xx
:::::: TO: Linus Walleij <linus.walleij(a)linaro.org>
:::::: CC: Linus Walleij <linus.walleij(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[linux-next:pending-fixes 99/240] drivers/soc/fsl/qe/qe_ic.c:438 qe_ic_init() warn: unsigned 'qe_ic->virq_low' is never less than zero.
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git pending-fixes
head: 5c6ff2f54dee49d1c75558d08c0a4fb50f0ede14
commit: be7ecbd240b2f9ec544d3ce6fccf4cec3cd15dca [99/240] soc: fsl: qe: convert QE interrupt controller to platform_device
config: openrisc-randconfig-m031-20210811 (attached as .config)
compiler: or1k-linux-gcc (GCC) 10.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
drivers/soc/fsl/qe/qe_ic.c:438 qe_ic_init() warn: unsigned 'qe_ic->virq_low' is never less than zero.
vim +438 drivers/soc/fsl/qe/qe_ic.c
407
408 static int qe_ic_init(struct platform_device *pdev)
409 {
410 struct device *dev = &pdev->dev;
411 void (*low_handler)(struct irq_desc *desc);
412 void (*high_handler)(struct irq_desc *desc);
413 struct qe_ic *qe_ic;
414 struct resource *res;
415 struct device_node *node = pdev->dev.of_node;
416
417 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
418 if (res == NULL) {
419 dev_err(dev, "no memory resource defined\n");
420 return -ENODEV;
421 }
422
423 qe_ic = devm_kzalloc(dev, sizeof(*qe_ic), GFP_KERNEL);
424 if (qe_ic == NULL)
425 return -ENOMEM;
426
427 qe_ic->regs = devm_ioremap(dev, res->start, resource_size(res));
428 if (qe_ic->regs == NULL) {
429 dev_err(dev, "failed to ioremap() registers\n");
430 return -ENODEV;
431 }
432
433 qe_ic->hc_irq = qe_ic_irq_chip;
434
435 qe_ic->virq_high = platform_get_irq(pdev, 0);
436 qe_ic->virq_low = platform_get_irq(pdev, 1);
437
> 438 if (qe_ic->virq_low < 0) {
439 return -ENODEV;
440 }
441
442 if (qe_ic->virq_high != qe_ic->virq_low) {
443 low_handler = qe_ic_cascade_low;
444 high_handler = qe_ic_cascade_high;
445 } else {
446 low_handler = qe_ic_cascade_muxed_mpic;
447 high_handler = NULL;
448 }
449
450 qe_ic->irqhost = irq_domain_add_linear(node, NR_QE_IC_INTS,
451 &qe_ic_host_ops, qe_ic);
452 if (qe_ic->irqhost == NULL) {
453 dev_err(dev, "failed to add irq domain\n");
454 return -ENODEV;
455 }
456
457 qe_ic_write(qe_ic->regs, QEIC_CICR, 0);
458
459 irq_set_handler_data(qe_ic->virq_low, qe_ic);
460 irq_set_chained_handler(qe_ic->virq_low, low_handler);
461
462 if (qe_ic->virq_high && qe_ic->virq_high != qe_ic->virq_low) {
463 irq_set_handler_data(qe_ic->virq_high, qe_ic);
464 irq_set_chained_handler(qe_ic->virq_high, high_handler);
465 }
466 return 0;
467 }
468 static const struct of_device_id qe_ic_ids[] = {
469 { .compatible = "fsl,qe-ic"},
470 { .type = "qeic"},
471 {},
472 };
473
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month