Re: [PATCH v5 2/2] PCI/ERR: Split the fatal and non-fatal error recovery handling
by kernel test robot
Hi Kuppuswamy,
I love your patch! Yet something to improve:
[auto build test ERROR on pci/next]
[also build test ERROR on v5.9]
[cannot apply to next-20201013]
[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/Kuppuswamy-Sathyanarayanan/PCI-E...
base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-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
# https://github.com/0day-ci/linux/commit/7c892978aa57817ac512ea311d0d87dd6...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kuppuswamy-Sathyanarayanan/PCI-ERR-Call-pci_bus_reset-before-calling-slot_reset-callback/20201014-172736
git checkout 7c892978aa57817ac512ea311d0d87dd6e1ced80
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
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/pcie/err.c:144:25: error: static declaration of 'pcie_do_fatal_recovery' follows non-static declaration
144 | static pci_ers_result_t pcie_do_fatal_recovery(struct pci_dev *dev,
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/pci/pcie/err.c:21:
drivers/pci/pcie/../pci.h:559:18: note: previous declaration of 'pcie_do_fatal_recovery' was here
559 | pci_ers_result_t pcie_do_fatal_recovery(struct pci_dev *dev,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/pci/pcie/err.c:144:25: warning: 'pcie_do_fatal_recovery' defined but not used [-Wunused-function]
144 | static pci_ers_result_t pcie_do_fatal_recovery(struct pci_dev *dev,
| ^~~~~~~~~~~~~~~~~~~~~~
vim +/pcie_do_fatal_recovery +144 drivers/pci/pcie/err.c
143
> 144 static pci_ers_result_t pcie_do_fatal_recovery(struct pci_dev *dev,
145 pci_ers_result_t (*reset_link)(struct pci_dev *pdev))
146 {
147 struct pci_dev *udev;
148 struct pci_bus *parent;
149 struct pci_dev *pdev, *temp;
150 pci_ers_result_t result;
151
152 if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE)
153 udev = dev;
154 else
155 udev = dev->bus->self;
156
157 parent = udev->subordinate;
158 pci_walk_bus(parent, pci_dev_set_disconnected, NULL);
159
160 pci_lock_rescan_remove();
161 pci_dev_get(dev);
162 list_for_each_entry_safe_reverse(pdev, temp, &parent->devices,
163 bus_list) {
164 pci_stop_and_remove_bus_device(pdev);
165 }
166
167 result = reset_link(udev);
168
169 if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
170 /*
171 * If the error is reported by a bridge, we think this error
172 * is related to the downstream link of the bridge, so we
173 * do error recovery on all subordinates of the bridge instead
174 * of the bridge and clear the error status of the bridge.
175 */
176 pci_aer_clear_fatal_status(dev);
177 if (pcie_aer_is_native(dev))
178 pcie_clear_device_status(dev);
179 }
180
181 if (result == PCI_ERS_RESULT_RECOVERED) {
182 if (pcie_wait_for_link(udev, true))
183 pci_rescan_bus(udev->bus);
184 pci_info(dev, "Device recovery from fatal error successful\n");
185 } else {
186 pci_uevent_ers(dev, PCI_ERS_RESULT_DISCONNECT);
187 pci_info(dev, "Device recovery from fatal error failed\n");
188 }
189
190 pci_dev_put(dev);
191 pci_unlock_rescan_remove();
192
193 return result;
194 }
195
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
Re: [PATCH] [PATCH] [v3] wireless: Initial driver submission for pureLiFi STA devices
by kernel test robot
Hi Srinivasan,
I love your patch! Perhaps something to improve:
[auto build test WARNING on wireless-drivers-next/master]
[also build test WARNING on wireless-drivers/master net-next/master net/master linus/master v5.9 next-20201013]
[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/Srinivasan-Raju/wireless-Initial...
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-ne... master
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-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
# https://github.com/0day-ci/linux/commit/2f1cd7604f364eba9428b88e2ab38c2a4...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Srinivasan-Raju/wireless-Initial-driver-submission-for-pureLiFi-STA-devices/20201014-142216
git checkout 2f1cd7604f364eba9428b88e2ab38c2a42272fcd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
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/net/wireless/purelifi/usb.c:74:6: warning: no previous prototype for 'send_packet_from_data_queue' [-Wmissing-prototypes]
74 | void send_packet_from_data_queue(struct purelifi_usb *usb)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/purelifi/usb.c: In function 'rx_urb_complete':
>> drivers/net/wireless/purelifi/usb.c:124:26: warning: variable 'rx' set but not used [-Wunused-but-set-variable]
124 | struct purelifi_usb_rx *rx;
| ^~
drivers/net/wireless/purelifi/usb.c: In function 'tx_urb_complete':
>> drivers/net/wireless/purelifi/usb.c:416:26: warning: variable 'tx' set but not used [-Wunused-but-set-variable]
416 | struct purelifi_usb_tx *tx;
| ^~
drivers/net/wireless/purelifi/usb.c: In function 'purelifi_store_frequency':
>> drivers/net/wireless/purelifi/usb.c:1101:9: warning: variable 'r' set but not used [-Wunused-but-set-variable]
1101 | int i, r, row, col, predivider, feedback_divider, output_div_0;
| ^
drivers/net/wireless/purelifi/usb.c: At top level:
>> drivers/net/wireless/purelifi/usb.c:1544:9: warning: no previous prototype for 'modulation_write' [-Wmissing-prototypes]
1544 | ssize_t modulation_write(struct file *file_p,
| ^~~~~~~~~~~~~~~~
--
drivers/net/wireless/purelifi/mac.c: In function 'purelifi_restore_settings':
>> drivers/net/wireless/purelifi/mac.c:137:26: warning: variable 'multicast_hash' set but not used [-Wunused-but-set-variable]
137 | struct purelifi_mc_hash multicast_hash;
| ^~~~~~~~~~~~~~
drivers/net/wireless/purelifi/mac.c: In function 'purelifi_mac_tx_status':
>> drivers/net/wireless/purelifi/mac.c:190:19: warning: variable 'retry' set but not used [-Wunused-but-set-variable]
190 | int success = 1, retry = 1;
| ^~~~~
drivers/net/wireless/purelifi/mac.c: In function 'purelifi_op_configure_filter':
>> drivers/net/wireless/purelifi/mac.c:656:6: warning: variable 'r' set but not used [-Wunused-but-set-variable]
656 | int r;
| ^
vim +/send_packet_from_data_queue +74 drivers/net/wireless/purelifi/usb.c
73
> 74 void send_packet_from_data_queue(struct purelifi_usb *usb)
75 {
76 struct sk_buff *skb = NULL;
77 unsigned long flags;
78 static u8 sidx;
79 u8 last_served_sidx;
80
81 spin_lock_irqsave(&usb->tx.lock, flags);
82 last_served_sidx = sidx;
83 do {
84 sidx = (sidx + 1) % MAX_STA_NUM;
85 if ((usb->tx.station[sidx].flag &
86 STATION_CONNECTED_FLAG)) {
87 if (!(usb->tx.station[sidx].flag &
88 STATION_FIFO_FULL_FLAG)) {
89 skb = skb_peek(&usb->tx.station
90 [sidx].data_list);
91 }
92 }
93 } while ((sidx != last_served_sidx) && (!skb));
94
95 if (skb) {
96 skb = skb_dequeue(&usb->tx.station[sidx].data_list);
97 usb_write_req_async(usb, skb->data, skb->len, USB_REQ_DATA_TX,
98 tx_urb_complete, skb);
99 if (skb_queue_len(&usb->tx.station[sidx].data_list)
100 <= 60) {
101 block_queue(usb, usb->tx.station[sidx].mac,
102 false);
103 }
104 }
105 spin_unlock_irqrestore(&usb->tx.lock, flags);
106 }
107
108 static void handle_rx_packet(struct purelifi_usb *usb, const u8 *buffer,
109 unsigned int length)
110 {
111 purelifi_mac_rx(purelifi_usb_to_hw(usb), buffer, length);
112 }
113
114 #define STATION_FIFO_ALMOST_FULL_MESSAGE 0
115 #define STATION_FIFO_ALMOST_FULL_NOT_MESSAGE 1
116 #define STATION_CONNECT_MESSAGE 2
117 #define STATION_DISCONNECT_MESSAGE 3
118
119 int rx_usb_enabled;
120 static void rx_urb_complete(struct urb *urb)
121 {
122 int r;
123 struct purelifi_usb *usb;
> 124 struct purelifi_usb_rx *rx;
125 struct purelifi_usb_tx *tx;
126 const u8 *buffer;
127 static u8 fpga_link_connection_f;
128 unsigned int length;
129 u16 status;
130 u8 sidx;
131
132 if (!urb) {
133 dev_err(purelifi_usb_dev(usb), "urb is NULL.\n");
134 return;
135 } else if (!urb->context) {
136 dev_err(purelifi_usb_dev(usb), "urb ctx is NULL.\n");
137 return;
138 }
139 usb = urb->context;
140
141 if (usb->initialized != 1)
142 return;
143
144 switch (urb->status) {
145 case 0:
146 break;
147 case -ESHUTDOWN:
148 case -EINVAL:
149 case -ENODEV:
150 case -ENOENT:
151 case -ECONNRESET:
152 case -EPIPE:
153 dev_dbg(urb_dev(urb), "urb %p error %d\n", urb, urb->status);
154 return;
155 default:
156 dev_dbg(urb_dev(urb), "urb %p error %d\n", urb, urb->status);
157 goto resubmit;
158 }
159
160 buffer = urb->transfer_buffer;
161 length = (*(u32 *)(buffer + sizeof(struct rx_status))) + sizeof(u32);
162
163 rx = &usb->rx;
164 tx = &usb->tx;
165
166 if (urb->actual_length != 8) {
167 if (usb->initialized && fpga_link_connection_f)
168 handle_rx_packet(usb, buffer, length);
169 goto resubmit;
170 }
171
172 status = buffer[7];
173
174 dev_info(&usb->intf->dev, "Recv status=%u\n", status);
175 dev_info(&usb->intf->dev, "Tx packet MAC=%x:%x:%x:%x:%x:%x\n",
176 buffer[0], buffer[1], buffer[2], buffer[3],
177 buffer[4], buffer[5]);
178
179 switch (status) {
180 case STATION_FIFO_ALMOST_FULL_NOT_MESSAGE:
181 dev_info(&usb->intf->dev,
182 "FIFO full not packet receipt.\n");
183 tx->mac_fifo_full = 1;
184 for (sidx = 0; sidx < MAX_STA_NUM; sidx++) {
185 usb->tx.station[sidx].flag |=
186 STATION_FIFO_FULL_FLAG;
187 }
188 break;
189 case STATION_FIFO_ALMOST_FULL_MESSAGE:
190 dev_info(&usb->intf->dev, "FIFO full packet receipt.\n");
191
192 for (sidx = 0; sidx < MAX_STA_NUM; sidx++)
193 usb->tx.station[sidx].flag &= 0xFD;
194
195 send_packet_from_data_queue(usb);
196 break;
197 case STATION_CONNECT_MESSAGE:
198 fpga_link_connection_f = 1;
199 dev_info(&usb->intf->dev, "ST_CONNECT_MSG packet receipt.\n");
200 break;
201 case STATION_DISCONNECT_MESSAGE:
202 fpga_link_connection_f = 0;
203 dev_info(&usb->intf->dev, "ST_DISCONN_MSG packet receipt.\n");
204 break;
205 default:
206 dev_info(&usb->intf->dev, "Unknown packet receipt.\n");
207 break;
208 }
209
210 resubmit:
211 r = usb_submit_urb(urb, GFP_ATOMIC);
212 if (r)
213 dev_dbg(urb_dev(urb), "urb %p resubmit error %d\n", urb, r);
214 }
215
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
Re: [PATCH] i2c: designware: fix slave omitted IC_INTR_STOP_DET
by Andy Shevchenko
On Wed, Oct 14, 2020 at 09:58:54AM +0000, Michael.Wu(a)vatics.com wrote:
> On 10/14/20 4:53 PM, andriy.shevchenko(a)linux.intel.com wrote:
> >
> > Wondering if you compile this at all...
>
>
> I'm very sorry that I did not compile it because I only have ARM SoC with my
> linux 4.9.170, but I've verified the logic of this patch in my linux.
>
> I'll correct these two syntax errors in next version. The reported
> warnings occurs from drivers/i2c/busses/i2c-designware-slave.c:13 seems
> not made by this modification. Please correct me if I'm wrong....
So, you have a chance to create a follow up patch to fix the warnings. :-)
--
With Best Regards,
Andy Shevchenko
1 year, 11 months
Re: [PATCH] i2c: designware: fix slave omitted IC_INTR_STOP_DET
by kernel test robot
Hi Michael,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on wsa/i2c/for-next]
[also build test ERROR on v5.9 next-20201013]
[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/Michael-Wu/i2c-designware-fix-sl...
base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
config: riscv-randconfig-r036-20201014 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project e7fe3c6dfede8d5781bd000741c3dea7088307a4)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/6bb28b0fda0a3f133918077bbfb1c6fe4...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Michael-Wu/i2c-designware-fix-slave-omitted-IC_INTR_STOP_DET/20201014-132759
git checkout 6bb28b0fda0a3f133918077bbfb1c6fe4809bf30
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
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 include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:564:9: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return inw(addr);
^~~~~~~~~
arch/riscv/include/asm/io.h:55:76: note: expanded from macro 'inw'
#define inw(c) ({ u16 __v; __io_pbr(); __v = readw_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:88:76: note: expanded from macro 'readw_cpu'
#define readw_cpu(c) ({ u16 __r = le16_to_cpu((__force __le16)__raw_readw(c)); __r; })
^
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from drivers/i2c/busses/i2c-designware-slave.c:13:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:572:9: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return inl(addr);
^~~~~~~~~
arch/riscv/include/asm/io.h:56:76: note: expanded from macro 'inl'
#define inl(c) ({ u32 __v; __io_pbr(); __v = readl_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:89:76: note: expanded from macro 'readl_cpu'
#define readl_cpu(c) ({ u32 __r = le32_to_cpu((__force __le32)__raw_readl(c)); __r; })
^
include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from drivers/i2c/busses/i2c-designware-slave.c:13:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:580:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outb(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:58:68: note: expanded from macro 'outb'
#define outb(v,c) ({ __io_pbw(); writeb_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:91:52: note: expanded from macro 'writeb_cpu'
#define writeb_cpu(v, c) ((void)__raw_writeb((v), (c)))
^
In file included from drivers/i2c/busses/i2c-designware-slave.c:13:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:588:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outw(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:59:68: note: expanded from macro 'outw'
#define outw(v,c) ({ __io_pbw(); writew_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:92:76: note: expanded from macro 'writew_cpu'
#define writew_cpu(v, c) ((void)__raw_writew((__force u16)cpu_to_le16(v), (c)))
^
In file included from drivers/i2c/busses/i2c-designware-slave.c:13:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:596:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outl(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:60:68: note: expanded from macro 'outl'
#define outl(v,c) ({ __io_pbw(); writel_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:93:76: note: expanded from macro 'writel_cpu'
#define writel_cpu(v, c) ((void)__raw_writel((__force u32)cpu_to_le32(v), (c)))
^
In file included from drivers/i2c/busses/i2c-designware-slave.c:13:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:1017:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
>> drivers/i2c/busses/i2c-designware-slave.c:181:42: error: expected ';' after expression
dev->status = STATUS_WRITE_IN_PROGRESS
^
;
>> drivers/i2c/busses/i2c-designware-slave.c:195:22: error: use of undeclared identifier 'STATUS_IDEL'
if (dev->status != STATUS_IDEL) {
^
7 warnings and 2 errors generated.
vim +181 drivers/i2c/busses/i2c-designware-slave.c
151
152 /*
153 * Interrupt service routine. This gets called whenever an I2C slave interrupt
154 * occurs.
155 */
156
157 static int i2c_dw_irq_handler_slave(struct dw_i2c_dev *dev)
158 {
159 u32 raw_stat, stat, enabled, tmp;
160 u8 val = 0, slave_activity;
161
162 regmap_read(dev->map, DW_IC_ENABLE, &enabled);
163 regmap_read(dev->map, DW_IC_RAW_INTR_STAT, &raw_stat);
164 regmap_read(dev->map, DW_IC_STATUS, &tmp);
165 slave_activity = ((tmp & DW_IC_STATUS_SLAVE_ACTIVITY) >> 6);
166
167 if (!enabled || !(raw_stat & ~DW_IC_INTR_ACTIVITY) || !dev->slave)
168 return 0;
169
170 stat = i2c_dw_read_clear_intrbits_slave(dev);
171 dev_dbg(dev->dev,
172 "%#x STATUS SLAVE_ACTIVITY=%#x : RAW_INTR_STAT=%#x : INTR_STAT=%#x\n",
173 enabled, slave_activity, raw_stat, stat);
174
175 if (stat & DW_IC_INTR_RX_FULL) {
176 if (dev->status != STATUS_WRITE_IN_PROGRESS) {
177 if (dev->status != STATUS_IDLE)
178 i2c_slave_event(dev->slave, I2C_SLAVE_STOP,
179 &val);
180
> 181 dev->status = STATUS_WRITE_IN_PROGRESS
182 i2c_slave_event(dev->slave, I2C_SLAVE_WRITE_REQUESTED,
183 &val);
184 }
185
186 regmap_read(dev->map, DW_IC_DATA_CMD, &tmp);
187 val = tmp;
188
189 if (!i2c_slave_event(dev->slave, I2C_SLAVE_WRITE_RECEIVED,
190 &val))
191 dev_vdbg(dev->dev, "Byte %X acked!", val);
192 }
193
194 if (stat & DW_IC_INTR_RD_REQ) {
> 195 if (dev->status != STATUS_IDEL) {
196 dev->status = STATUS_IDLE;
197 i2c_slave_event(dev->slave, I2C_SLAVE_STOP, &val);
198 }
199
200 if (slave_activity) {
201 regmap_read(dev->map, DW_IC_CLR_RD_REQ, &tmp);
202 regmap_read(dev->map, DW_IC_CLR_RX_UNDER, &tmp);
203
204 dev->status = STATUS_READ_IN_PROGRESS;
205 i2c_slave_event(dev->slave, I2C_SLAVE_READ_REQUESTED,
206 &val);
207 regmap_write(dev->map, DW_IC_DATA_CMD, val);
208 }
209 }
210
211 if (stat & DW_IC_INTR_RX_DONE) {
212 i2c_slave_event(dev->slave, I2C_SLAVE_READ_PROCESSED, &val);
213 regmap_read(dev->map, DW_IC_CLR_RX_DONE, &tmp);
214
215 dev->status = STATUS_IDLE;
216 i2c_slave_event(dev->slave, I2C_SLAVE_STOP, &val);
217 }
218
219 if (stat & DW_IC_INTR_STOP_DET) {
220 if (dev->status != STATUS_IDLE) {
221 dev->status = STATUS_IDLE;
222
223 i2c_slave_event(dev->slave, I2C_SLAVE_STOP, &val);
224 }
225 }
226
227 return 1;
228 }
229
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
Re: [PATCH] Add support for mv88e6393x family of Marvell.
by kernel test robot
Hi Pavana,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.9 next-20201013]
[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/Pavana-Sharma/Add-support-for-mv...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b5fc7a89e58bcc059a3d5e4db79c481fb437de59
config: riscv-randconfig-r035-20201014 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project e7fe3c6dfede8d5781bd000741c3dea7088307a4)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/0baa6c1f154d28ded190828d5b70521d7...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Pavana-Sharma/Add-support-for-mv88e6393x-family-of-Marvell/20201014-130754
git checkout 0baa6c1f154d28ded190828d5b70521d78bf1239
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
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 >>):
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:564:9: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return inw(addr);
^~~~~~~~~
arch/riscv/include/asm/io.h:55:76: note: expanded from macro 'inw'
#define inw(c) ({ u16 __v; __io_pbr(); __v = readw_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:88:76: note: expanded from macro 'readw_cpu'
#define readw_cpu(c) ({ u16 __r = le16_to_cpu((__force __le16)__raw_readw(c)); __r; })
^
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from drivers/net/dsa/mv88e6xxx/serdes.c:10:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:572:9: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return inl(addr);
^~~~~~~~~
arch/riscv/include/asm/io.h:56:76: note: expanded from macro 'inl'
#define inl(c) ({ u32 __v; __io_pbr(); __v = readl_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:89:76: note: expanded from macro 'readl_cpu'
#define readl_cpu(c) ({ u32 __r = le32_to_cpu((__force __le32)__raw_readl(c)); __r; })
^
include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from drivers/net/dsa/mv88e6xxx/serdes.c:10:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:580:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outb(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:58:68: note: expanded from macro 'outb'
#define outb(v,c) ({ __io_pbw(); writeb_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:91:52: note: expanded from macro 'writeb_cpu'
#define writeb_cpu(v, c) ((void)__raw_writeb((v), (c)))
^
In file included from drivers/net/dsa/mv88e6xxx/serdes.c:10:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:588:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outw(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:59:68: note: expanded from macro 'outw'
#define outw(v,c) ({ __io_pbw(); writew_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:92:76: note: expanded from macro 'writew_cpu'
#define writew_cpu(v, c) ((void)__raw_writew((__force u16)cpu_to_le16(v), (c)))
^
In file included from drivers/net/dsa/mv88e6xxx/serdes.c:10:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:596:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outl(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:60:68: note: expanded from macro 'outl'
#define outl(v,c) ({ __io_pbw(); writel_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:93:76: note: expanded from macro 'writel_cpu'
#define writel_cpu(v, c) ((void)__raw_writel((__force u32)cpu_to_le32(v), (c)))
^
In file included from drivers/net/dsa/mv88e6xxx/serdes.c:10:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:148:
include/asm-generic/io.h:1017:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
>> drivers/net/dsa/mv88e6xxx/serdes.c:1221:11: warning: result of comparison of constant -19 with expression of type 'u8' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare]
if (lane == -ENODEV)
~~~~ ^ ~~~~~~~
8 warnings generated.
vim +1221 drivers/net/dsa/mv88e6xxx/serdes.c
1216
1217 int mv88e6393x_serdes_power(struct mv88e6xxx_chip *chip, int port, u8 lane,
1218 bool on)
1219 {
1220 lane = mv88e6393x_serdes_get_lane(chip, port);
> 1221 if (lane == -ENODEV)
1222 return 0;
1223
1224 if (lane < 0)
1225 return lane;
1226
1227 if (port == 0 || port == 9 || port == 10) {
1228 u8 cmode = chip->ports[port].cmode;
1229
1230 mv88e6393x_serdes_port_config(chip, lane, on);
1231
1232 switch (cmode) {
1233 case MV88E6XXX_PORT_STS_CMODE_1000BASEX:
1234 case MV88E6XXX_PORT_STS_CMODE_2500BASEX:
1235 return mv88e6390_serdes_power_sgmii(chip, lane, on);
1236 case MV88E6XXX_PORT_STS_CMODE_10GBASER:
1237 return mv88e6390_serdes_power_10g(chip, lane, on);
1238 }
1239 }
1240
1241 return 0;
1242 }
1243
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[shenki:ftgmac100-remove-fixes 120/179] drivers/fsi/fsi-occ.c:570:17: warning: cast to smaller integer type 'enum versions' from 'const void
by kernel test robot
tree: https://github.com/shenki/linux ftgmac100-remove-fixes
head: 2aeac1ae702229bd4f70fb1c4971a28a527a919e
commit: 0f099b795d61ec929a685d444cc2566f57ac081f [120/179] fsi: occ: Add support for P10
config: x86_64-randconfig-a002-20201014 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project e7fe3c6dfede8d5781bd000741c3dea7088307a4)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/shenki/linux/commit/0f099b795d61ec929a685d444cc2566f57...
git remote add shenki https://github.com/shenki/linux
git fetch --no-tags shenki ftgmac100-remove-fixes
git checkout 0f099b795d61ec929a685d444cc2566f57ac081f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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/fsi/fsi-occ.c:570:17: warning: cast to smaller integer type 'enum versions' from 'const void *' [-Wvoid-pointer-to-enum-cast]
occ->version = (enum versions)md;
^~~~~~~~~~~~~~~~~
1 warning generated.
vim +570 drivers/fsi/fsi-occ.c
552
553 static int occ_probe(struct platform_device *pdev)
554 {
555 int rc;
556 u32 reg;
557 struct occ *occ;
558 struct platform_device *hwmon_dev;
559 struct device *dev = &pdev->dev;
560 const void *md = of_device_get_match_data(dev);
561 struct platform_device_info hwmon_dev_info = {
562 .parent = dev,
563 .name = "occ-hwmon",
564 };
565
566 occ = devm_kzalloc(dev, sizeof(*occ), GFP_KERNEL);
567 if (!occ)
568 return -ENOMEM;
569
> 570 occ->version = (enum versions)md;
571 occ->dev = dev;
572 occ->sbefifo = dev->parent;
573 mutex_init(&occ->occ_lock);
574
575 if (dev->of_node) {
576 rc = of_property_read_u32(dev->of_node, "reg", ®);
577 if (!rc) {
578 /* make sure we don't have a duplicate from dts */
579 occ->idx = ida_simple_get(&occ_ida, reg, reg + 1,
580 GFP_KERNEL);
581 if (occ->idx < 0)
582 occ->idx = ida_simple_get(&occ_ida, 1, INT_MAX,
583 GFP_KERNEL);
584 } else {
585 occ->idx = ida_simple_get(&occ_ida, 1, INT_MAX,
586 GFP_KERNEL);
587 }
588 } else {
589 occ->idx = ida_simple_get(&occ_ida, 1, INT_MAX, GFP_KERNEL);
590 }
591
592 platform_set_drvdata(pdev, occ);
593
594 snprintf(occ->name, sizeof(occ->name), "occ%d", occ->idx);
595 occ->mdev.fops = &occ_fops;
596 occ->mdev.minor = MISC_DYNAMIC_MINOR;
597 occ->mdev.name = occ->name;
598 occ->mdev.parent = dev;
599
600 rc = misc_register(&occ->mdev);
601 if (rc) {
602 dev_err(dev, "failed to register miscdevice: %d\n", rc);
603 ida_simple_remove(&occ_ida, occ->idx);
604 return rc;
605 }
606
607 hwmon_dev_info.id = occ->idx;
608 hwmon_dev = platform_device_register_full(&hwmon_dev_info);
609 if (IS_ERR(hwmon_dev))
610 dev_warn(dev, "failed to create hwmon device\n");
611
612 return 0;
613 }
614
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[jirislaby:devel 44/52] drivers/video/console/vgacon.c:323:23: sparse: sparse: incorrect type in assignment (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git devel
head: 82a313407ec913c11e42b0759a716809d42edffc
commit: 82337fd93f471d51590a65991c4ca9498ab2473b [44/52] make VGA_MAP_MEM return pointer
config: mips-randconfig-s031-20201014 (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.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.3-rc1-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git/commi...
git remote add jirislaby https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git
git fetch --no-tags jirislaby devel
git checkout 82337fd93f471d51590a65991c4ca9498ab2473b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/video/console/vgacon.c:323:23: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected unsigned short [usertype] *static [toplevel] vga_vram_base @@ got void [noderef] __iomem * @@
>> drivers/video/console/vgacon.c:323:23: sparse: expected unsigned short [usertype] *static [toplevel] vga_vram_base
>> drivers/video/console/vgacon.c:323:23: sparse: got void [noderef] __iomem *
>> drivers/video/console/vgacon.c:874:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected char *charmap @@ got void [noderef] __iomem * @@
>> drivers/video/console/vgacon.c:874:25: sparse: expected char *charmap
drivers/video/console/vgacon.c:874:25: sparse: got void [noderef] __iomem *
drivers/video/console/vgacon.c:877:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected char *charmap @@ got void [noderef] __iomem * @@
drivers/video/console/vgacon.c:877:25: sparse: expected char *charmap
drivers/video/console/vgacon.c:877:25: sparse: got void [noderef] __iomem *
drivers/video/console/vgacon.c: note: in included file (through include/linux/vt_buffer.h, include/linux/selection.h):
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:37:15: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short volatile [usertype] @@ got restricted __le16 [usertype] @@
arch/mips/include/asm/vga.h:37:15: sparse: expected unsigned short volatile [usertype]
arch/mips/include/asm/vga.h:37:15: sparse: got restricted __le16 [usertype]
arch/mips/include/asm/vga.h:37:15: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short volatile [usertype] @@ got restricted __le16 [usertype] @@
arch/mips/include/asm/vga.h:37:15: sparse: expected unsigned short volatile [usertype]
arch/mips/include/asm/vga.h:37:15: sparse: got restricted __le16 [usertype]
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:37:15: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short volatile [usertype] @@ got restricted __le16 [usertype] @@
arch/mips/include/asm/vga.h:37:15: sparse: expected unsigned short volatile [usertype]
arch/mips/include/asm/vga.h:37:15: sparse: got restricted __le16 [usertype]
arch/mips/include/asm/vga.h:37:15: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short volatile [usertype] @@ got restricted __le16 [usertype] @@
arch/mips/include/asm/vga.h:37:15: sparse: expected unsigned short volatile [usertype]
arch/mips/include/asm/vga.h:37:15: sparse: got restricted __le16 [usertype]
arch/mips/include/asm/vga.h:37:15: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short volatile [usertype] @@ got restricted __le16 [usertype] @@
arch/mips/include/asm/vga.h:37:15: sparse: expected unsigned short volatile [usertype]
arch/mips/include/asm/vga.h:37:15: sparse: got restricted __le16 [usertype]
arch/mips/include/asm/vga.h:37:15: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short volatile [usertype] @@ got restricted __le16 [usertype] @@
arch/mips/include/asm/vga.h:37:15: sparse: expected unsigned short volatile [usertype]
arch/mips/include/asm/vga.h:37:15: sparse: got restricted __le16 [usertype]
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:37:15: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short volatile [usertype] @@ got restricted __le16 [usertype] @@
arch/mips/include/asm/vga.h:37:15: sparse: expected unsigned short volatile [usertype]
arch/mips/include/asm/vga.h:37:15: sparse: got restricted __le16 [usertype]
arch/mips/include/asm/vga.h:37:15: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short volatile [usertype] @@ got restricted __le16 [usertype] @@
arch/mips/include/asm/vga.h:37:15: sparse: expected unsigned short volatile [usertype]
arch/mips/include/asm/vga.h:37:15: sparse: got restricted __le16 [usertype]
arch/mips/include/asm/vga.h:37:15: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short volatile [usertype] @@ got restricted __le16 [usertype] @@
arch/mips/include/asm/vga.h:37:15: sparse: expected unsigned short volatile [usertype]
arch/mips/include/asm/vga.h:37:15: sparse: got restricted __le16 [usertype]
arch/mips/include/asm/vga.h:37:15: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short volatile [usertype] @@ got restricted __le16 [usertype] @@
arch/mips/include/asm/vga.h:37:15: sparse: expected unsigned short volatile [usertype]
arch/mips/include/asm/vga.h:37:15: sparse: got restricted __le16 [usertype]
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:42:16: sparse: sparse: cast to restricted __le16
arch/mips/include/asm/vga.h:37:15: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short volatile [usertype] @@ got restricted __le16 [usertype] @@
arch/mips/include/asm/vga.h:37:15: sparse: expected unsigned short volatile [usertype]
arch/mips/include/asm/vga.h:37:15: sparse: got restricted __le16 [usertype]
arch/mips/include/asm/vga.h:47:21: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned short [usertype] @@ got restricted __le16 [usertype] @@
arch/mips/include/asm/vga.h:47:21: sparse: expected unsigned short [usertype]
arch/mips/include/asm/vga.h:47:21: sparse: got restricted __le16 [usertype]
arch/mips/include/asm/vga.h:47:21: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned short [usertype] @@ got restricted __le16 [usertype] @@
arch/mips/include/asm/vga.h:47:21: sparse: expected unsigned short [usertype]
arch/mips/include/asm/vga.h:47:21: sparse: got restricted __le16 [usertype]
arch/mips/include/asm/vga.h:47:21: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned short [usertype] @@ got restricted __le16 [usertype] @@
arch/mips/include/asm/vga.h:47:21: sparse: expected unsigned short [usertype]
arch/mips/include/asm/vga.h:47:21: sparse: got restricted __le16 [usertype]
vim +323 drivers/video/console/vgacon.c
180
181 static const char *vgacon_startup(void)
182 {
183 const char *display_desc = NULL;
184 phys_addr_t vram_phys;
185 u16 saved1, saved2;
186 volatile u16 *p;
187
188 if (screen_info.orig_video_isVGA == VIDEO_TYPE_VLFB ||
189 screen_info.orig_video_isVGA == VIDEO_TYPE_EFI) {
190 no_vga:
191 #ifdef CONFIG_DUMMY_CONSOLE
192 conswitchp = &dummy_con;
193 return conswitchp->con_startup();
194 #else
195 return NULL;
196 #endif
197 }
198
199 /* boot_params.screen_info reasonably initialized? */
200 if ((screen_info.orig_video_lines == 0) ||
201 (screen_info.orig_video_cols == 0))
202 goto no_vga;
203
204 /* VGA16 modes are not handled by VGACON */
205 if ((screen_info.orig_video_mode == 0x0D) || /* 320x200/4 */
206 (screen_info.orig_video_mode == 0x0E) || /* 640x200/4 */
207 (screen_info.orig_video_mode == 0x10) || /* 640x350/4 */
208 (screen_info.orig_video_mode == 0x12) || /* 640x480/4 */
209 (screen_info.orig_video_mode == 0x6A)) /* 800x600/4 (VESA) */
210 goto no_vga;
211
212 vga_video_num_lines = screen_info.orig_video_lines;
213 vga_video_num_columns = screen_info.orig_video_cols;
214 vgastate.vgabase = NULL;
215
216 if (screen_info.orig_video_mode == 7) {
217 /* Monochrome display */
218 vram_phys = 0xb0000;
219 vga_video_port_reg = VGA_CRT_IM;
220 vga_video_port_val = VGA_CRT_DM;
221 if ((screen_info.orig_video_ega_bx & 0xff) != 0x10) {
222 static struct resource ega_console_resource =
223 { .name = "ega",
224 .flags = IORESOURCE_IO,
225 .start = 0x3B0,
226 .end = 0x3BF };
227 vga_video_type = VIDEO_TYPE_EGAM;
228 vga_vram_size = 0x8000;
229 display_desc = "EGA+";
230 request_resource(&ioport_resource,
231 &ega_console_resource);
232 } else {
233 static struct resource mda1_console_resource =
234 { .name = "mda",
235 .flags = IORESOURCE_IO,
236 .start = 0x3B0,
237 .end = 0x3BB };
238 static struct resource mda2_console_resource =
239 { .name = "mda",
240 .flags = IORESOURCE_IO,
241 .start = 0x3BF,
242 .end = 0x3BF };
243 vga_video_type = VIDEO_TYPE_MDA;
244 vga_vram_size = 0x2000;
245 display_desc = "*MDA";
246 request_resource(&ioport_resource,
247 &mda1_console_resource);
248 request_resource(&ioport_resource,
249 &mda2_console_resource);
250 vga_video_font_height = 14;
251 }
252 } else {
253 /* If not, it is color. */
254 vga_can_do_color = true;
255 vram_phys = 0xb8000;
256 vga_video_port_reg = VGA_CRT_IC;
257 vga_video_port_val = VGA_CRT_DC;
258 if ((screen_info.orig_video_ega_bx & 0xff) != 0x10) {
259 int i;
260
261 vga_vram_size = 0x8000;
262
263 if (!screen_info.orig_video_isVGA) {
264 static struct resource ega_console_resource =
265 { .name = "ega",
266 .flags = IORESOURCE_IO,
267 .start = 0x3C0,
268 .end = 0x3DF };
269 vga_video_type = VIDEO_TYPE_EGAC;
270 display_desc = "EGA";
271 request_resource(&ioport_resource,
272 &ega_console_resource);
273 } else {
274 static struct resource vga_console_resource =
275 { .name = "vga+",
276 .flags = IORESOURCE_IO,
277 .start = 0x3C0,
278 .end = 0x3DF };
279 vga_video_type = VIDEO_TYPE_VGAC;
280 display_desc = "VGA+";
281 request_resource(&ioport_resource,
282 &vga_console_resource);
283
284 /*
285 * Normalise the palette registers, to point
286 * the 16 screen colours to the first 16
287 * DAC entries.
288 */
289
290 for (i = 0; i < 16; i++) {
291 inb_p(VGA_IS1_RC);
292 outb_p(i, VGA_ATT_W);
293 outb_p(i, VGA_ATT_W);
294 }
295 outb_p(0x20, VGA_ATT_W);
296
297 /*
298 * Now set the DAC registers back to their
299 * default values
300 */
301 for (i = 0; i < 16; i++) {
302 outb_p(color_table[i], VGA_PEL_IW);
303 outb_p(default_red[i], VGA_PEL_D);
304 outb_p(default_grn[i], VGA_PEL_D);
305 outb_p(default_blu[i], VGA_PEL_D);
306 }
307 }
308 } else {
309 static struct resource cga_console_resource =
310 { .name = "cga",
311 .flags = IORESOURCE_IO,
312 .start = 0x3D4,
313 .end = 0x3D5 };
314 vga_video_type = VIDEO_TYPE_CGA;
315 vga_vram_size = 0x2000;
316 display_desc = "*CGA";
317 request_resource(&ioport_resource,
318 &cga_console_resource);
319 vga_video_font_height = 8;
320 }
321 }
322
> 323 vga_vram_base = VGA_MAP_MEM(vram_phys, vga_vram_size);
324 vga_vram_end = (void *)vga_vram_base + vga_vram_size;
325
326 /*
327 * Find out if there is a graphics card present.
328 * Are there smarter methods around?
329 */
330 p = (volatile u16 *) vga_vram_base;
331 saved1 = scr_readw(p);
332 saved2 = scr_readw(p + 1);
333 scr_writew(0xAA55, p);
334 scr_writew(0x55AA, p + 1);
335 if (scr_readw(p) != 0xAA55 || scr_readw(p + 1) != 0x55AA) {
336 scr_writew(saved1, p);
337 scr_writew(saved2, p + 1);
338 goto no_vga;
339 }
340 scr_writew(0x55AA, p);
341 scr_writew(0xAA55, p + 1);
342 if (scr_readw(p) != 0x55AA || scr_readw(p + 1) != 0xAA55) {
343 scr_writew(saved1, p);
344 scr_writew(saved2, p + 1);
345 goto no_vga;
346 }
347 scr_writew(saved1, p);
348 scr_writew(saved2, p + 1);
349
350 if (vga_video_type == VIDEO_TYPE_EGAC
351 || vga_video_type == VIDEO_TYPE_VGAC
352 || vga_video_type == VIDEO_TYPE_EGAM) {
353 vga_hardscroll_enabled = vga_hardscroll_user_enable;
354 vga_default_font_height = screen_info.orig_video_points;
355 vga_video_font_height = screen_info.orig_video_points;
356 /* This may be suboptimal but is a safe bet - go with it */
357 vga_scan_lines =
358 vga_video_font_height * vga_video_num_lines;
359 }
360
361 vgacon_xres = screen_info.orig_video_cols * VGA_FONTWIDTH;
362 vgacon_yres = vga_scan_lines;
363
364 vga_init_done = true;
365
366 return display_desc;
367 }
368
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[dlech-linux:bone-counter 9/12] drivers/counter/ti-eqep.c:115:17: warning: unused variable 'ti_qep_t2c_functions_map'
by kernel test robot
tree: https://github.com/dlech/linux bone-counter
head: f8f0ad10f30b5c1bea1a22f5de5dc9f2c6b7db1a
commit: fe7af503e7b7739f178c52e3c0b89ba416c6a493 [9/12] fixup! counter: Internalize sysfs interface code
config: arm-randconfig-r012-20201014 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project e7fe3c6dfede8d5781bd000741c3dea7088307a4)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/dlech/linux/commit/fe7af503e7b7739f178c52e3c0b89ba416c...
git remote add dlech-linux https://github.com/dlech/linux
git fetch --no-tags dlech-linux bone-counter
git checkout fe7af503e7b7739f178c52e3c0b89ba416c6a493
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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/counter/ti-eqep.c:115:17: warning: unused variable 'ti_qep_t2c_functions_map' [-Wunused-const-variable]
static const u8 ti_qep_t2c_functions_map[] = {
^
1 warning generated.
vim +/ti_qep_t2c_functions_map +115 drivers/counter/ti-eqep.c
f213729f679619e David Lechner 2019-09-01 114
5251e7147d627fb William Breathitt Gray 2020-09-26 @115 static const u8 ti_qep_t2c_functions_map[] = {
5251e7147d627fb William Breathitt Gray 2020-09-26 116 };
5251e7147d627fb William Breathitt Gray 2020-09-26 117
:::::: The code at line 115 was first introduced by commit
:::::: 5251e7147d627fbe13308dc390347dc16efeb85b counter: Internalize sysfs interface code
:::::: TO: William Breathitt Gray <vilhelm.gray(a)gmail.com>
:::::: CC: David Lechner <david(a)lechnology.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months
[freescale-fslc:5.9.x+fslc 4/5] drivers/misc/uboot_bootcount.c:70:50: error: initialization of 'ssize_t device struct device_attribute char {aka 'long int device struct device_attribute char from incompatible pointer type 'int device...
by kernel test robot
tree: https://github.com/Freescale/linux-fslc 5.9.x+fslc
head: a7b891b1a6c48c49b9c325f36eb718e847bf527b
commit: e9dfce66bd6574e5c926fc631f720941aa8a74ed [4/5] drivers, misc: add U-Boot bootcount driver
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/Freescale/linux-fslc/commit/e9dfce66bd6574e5c926fc631f...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc 5.9.x+fslc
git checkout e9dfce66bd6574e5c926fc631f720941aa8a74ed
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
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 include/linux/kobject.h:20,
from include/linux/energy_model.h:7,
from include/linux/device.h:16,
from include/linux/miscdevice.h:7,
from drivers/misc/uboot_bootcount.c:17:
>> drivers/misc/uboot_bootcount.c:70:50: error: initialization of 'ssize_t (*)(struct device *, struct device_attribute *, char *)' {aka 'long int (*)(struct device *, struct device_attribute *, char *)'} from incompatible pointer type 'int (*)(struct device *, struct device_attribute *, char *)' [-Werror=incompatible-pointer-types]
70 | static DEVICE_ATTR(bootcount, S_IWUSR | S_IRUGO, show_str_bootcount,
| ^~~~~~~~~~~~~~~~~~
include/linux/sysfs.h:104:10: note: in definition of macro '__ATTR'
104 | .show = _show, \
| ^~~~~
drivers/misc/uboot_bootcount.c:70:8: note: in expansion of macro 'DEVICE_ATTR'
70 | static DEVICE_ATTR(bootcount, S_IWUSR | S_IRUGO, show_str_bootcount,
| ^~~~~~~~~~~
drivers/misc/uboot_bootcount.c:70:50: note: (near initialization for 'dev_attr_bootcount.show')
70 | static DEVICE_ATTR(bootcount, S_IWUSR | S_IRUGO, show_str_bootcount,
| ^~~~~~~~~~~~~~~~~~
include/linux/sysfs.h:104:10: note: in definition of macro '__ATTR'
104 | .show = _show, \
| ^~~~~
drivers/misc/uboot_bootcount.c:70:8: note: in expansion of macro 'DEVICE_ATTR'
70 | static DEVICE_ATTR(bootcount, S_IWUSR | S_IRUGO, show_str_bootcount,
| ^~~~~~~~~~~
>> drivers/misc/uboot_bootcount.c:71:3: error: initialization of 'ssize_t (*)(struct device *, struct device_attribute *, const char *, size_t)' {aka 'long int (*)(struct device *, struct device_attribute *, const char *, long unsigned int)'} from incompatible pointer type 'int (*)(struct device *, struct device_attribute *, const char *, size_t)' {aka 'int (*)(struct device *, struct device_attribute *, const char *, long unsigned int)'} [-Werror=incompatible-pointer-types]
71 | store_str_bootcount);
| ^~~~~~~~~~~~~~~~~~~
include/linux/sysfs.h:105:11: note: in definition of macro '__ATTR'
105 | .store = _store, \
| ^~~~~~
drivers/misc/uboot_bootcount.c:70:8: note: in expansion of macro 'DEVICE_ATTR'
70 | static DEVICE_ATTR(bootcount, S_IWUSR | S_IRUGO, show_str_bootcount,
| ^~~~~~~~~~~
drivers/misc/uboot_bootcount.c:71:3: note: (near initialization for 'dev_attr_bootcount.store')
71 | store_str_bootcount);
| ^~~~~~~~~~~~~~~~~~~
include/linux/sysfs.h:105:11: note: in definition of macro '__ATTR'
105 | .store = _store, \
| ^~~~~~
drivers/misc/uboot_bootcount.c:70:8: note: in expansion of macro 'DEVICE_ATTR'
70 | static DEVICE_ATTR(bootcount, S_IWUSR | S_IRUGO, show_str_bootcount,
| ^~~~~~~~~~~
cc1: some warnings being treated as errors
vim +70 drivers/misc/uboot_bootcount.c
> 17 #include <linux/miscdevice.h>
18 #include <linux/module.h>
19 #include <linux/of.h>
20 #include <linux/of_address.h>
21 #include <linux/of_platform.h>
22
23 #define UBOOT_BOOTCOUNT_NAME "bootcount"
24
25 #define UBOOT_BOOTCOUNT_MAGIC_OFFSET 0x04 /* offset of magic number */
26 #define UBOOT_BOOTCOUNT_MAGIC 0xB001C041 /* magic number value */
27 #define UBOOT_BOOTCOUNT_MAGIC_MASK 0xFFFF0000 /* magic, when combined */
28 #define UBOOT_BOOTCOUNT_COUNT_MASK 0x0000FFFF /* value, when combined */
29
30 static void __iomem *mem;
31 /* Default to magic number being adjacent. */
32 static bool single_register = false;
33
34 /* Helper for the sysfs */
35 static int show_str_bootcount(struct device *device,
36 struct device_attribute *attr,
37 char *buf)
38 {
39 unsigned long counter;
40
41 counter = be32_to_cpu(readl(mem));
42
43 if (single_register)
44 counter &= UBOOT_BOOTCOUNT_COUNT_MASK;
45
46 return sprintf(buf, "%lu\n", counter);
47 }
48
49 static int store_str_bootcount(struct device *dev,
50 struct device_attribute *attr,
51 const char *buf,
52 size_t count)
53 {
54 int r;
55 u32 value;
56
57 r = kstrtou32(buf, 0, &value);
58 if (r < 0)
59 return -EINVAL;
60
61 if (single_register)
62 value = (UBOOT_BOOTCOUNT_MAGIC & UBOOT_BOOTCOUNT_MAGIC_MASK) |
63 (value & UBOOT_BOOTCOUNT_COUNT_MASK);
64
65 writel(cpu_to_be32(value), mem);
66
67 return count;
68 }
69
> 70 static DEVICE_ATTR(bootcount, S_IWUSR | S_IRUGO, show_str_bootcount,
> 71 store_str_bootcount);
72
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 11 months