:::::: :::::: Manual check reason: "low confidence static check warning: drivers/tty/serial/apbuart.c:123:8: sparse: sparse: Trying to use reserved word 'for' as identifier" ::::::
BCC: [email protected] CC: [email protected] In-Reply-To: <[email protected]> References: <[email protected]> TO: Jiri Slaby <[email protected]> Hi Jiri, I love your patch! Perhaps something to improve: [auto build test WARNING on tty/tty-testing] [also build test WARNING on usb/usb-testing shawnguo/for-next linus/master v6.0-rc3 next-20220901] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Jiri-Slaby/tty-TX-helpers/20220901-190806 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing :::::: branch date: 20 hours ago :::::: commit date: 20 hours ago config: sparc-randconfig-s043-20220901 (https://download.01.org/0day-ci/archive/20220902/[email protected]/config) compiler: sparc-linux-gcc (GCC) 12.1.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.4-39-gce1a6720-dirty # https://github.com/intel-lab-lkp/linux/commit/f6f99189d77ea45bc72efe7393bb91f4eb46a2fb git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Jiri-Slaby/tty-TX-helpers/20220901-190806 git checkout f6f99189d77ea45bc72efe7393bb91f4eb46a2fb # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc SHELL=/bin/bash drivers/tty/serial/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot <[email protected]> sparse warnings: (new ones prefixed by >>) drivers/tty/serial/apbuart.c:123:8: sparse: sparse: Expected ) in function declarator drivers/tty/serial/apbuart.c:123:8: sparse: sparse: got __VA_OPT__ drivers/tty/serial/apbuart.c:123:8: sparse: sparse: Expected ) in function declarator drivers/tty/serial/apbuart.c:123:8: sparse: sparse: got ; >> drivers/tty/serial/apbuart.c:123:8: sparse: sparse: Trying to use reserved >> word 'for' as identifier drivers/tty/serial/apbuart.c:123:8: sparse: sparse: Expected ; at end of declaration drivers/tty/serial/apbuart.c:123:8: sparse: sparse: got && drivers/tty/serial/apbuart.c:123:8: sparse: sparse: Expected ) in nested declarator drivers/tty/serial/apbuart.c:123:8: sparse: sparse: got -- drivers/tty/serial/apbuart.c:123:8: sparse: sparse: Expected ) in function declarator drivers/tty/serial/apbuart.c:123:8: sparse: sparse: got , drivers/tty/serial/apbuart.c:123:8: sparse: sparse: Expected ; at end of declaration drivers/tty/serial/apbuart.c:123:8: sparse: sparse: got -> >> drivers/tty/serial/apbuart.c:123:8: sparse: sparse: Trying to use reserved >> word 'continue' as identifier drivers/tty/serial/apbuart.c:123:8: sparse: sparse: Expected ; at the end of type declaration drivers/tty/serial/apbuart.c:123:8: sparse: sparse: got } drivers/tty/serial/apbuart.c:123:8: sparse: sparse: Expected ) in function declarator drivers/tty/serial/apbuart.c:123:8: sparse: sparse: got , drivers/tty/serial/apbuart.c:123:8: sparse: sparse: Expected ; at end of declaration drivers/tty/serial/apbuart.c:123:8: sparse: sparse: got -> drivers/tty/serial/apbuart.c:123:8: sparse: sparse: Expected ; at the end of type declaration drivers/tty/serial/apbuart.c:123:8: sparse: sparse: got } drivers/tty/serial/apbuart.c:123:8: sparse: sparse: Expected ) in function declarator drivers/tty/serial/apbuart.c:123:8: sparse: sparse: got < >> drivers/tty/serial/apbuart.c:123:8: sparse: sparse: Trying to use reserved >> word 'if' as identifier drivers/tty/serial/apbuart.c:123:8: sparse: sparse: Expected ) in function declarator drivers/tty/serial/apbuart.c:123:8: sparse: sparse: got == >> drivers/tty/serial/apbuart.c:123:8: sparse: sparse: Trying to use reserved >> word 'if' as identifier drivers/tty/serial/apbuart.c:123:8: sparse: sparse: Expected ; at the end of type declaration drivers/tty/serial/apbuart.c:123:8: sparse: sparse: got } drivers/tty/serial/apbuart.c:123:8: sparse: sparse: Expected ; at the end of type declaration drivers/tty/serial/apbuart.c:123:8: sparse: sparse: got } >> drivers/tty/serial/apbuart.c:130:28: sparse: sparse: too many arguments for >> function apbuart_do_tx_chars drivers/tty/serial/apbuart.c:123:8: sparse: sparse: symbol '__raw_writel' redeclared with different type (incompatible argument 1 (different base types)): >> drivers/tty/serial/apbuart.c:123:8: sparse: int static [signed] >> [toplevel] __raw_writel( ... ) drivers/tty/serial/apbuart.c: note: in included file (through arch/sparc/include/asm/io_32.h, arch/sparc/include/asm/io.h, include/linux/scatterlist.h, ...): include/asm-generic/io.h:164:20: sparse: note: previously declared as: >> include/asm-generic/io.h:164:20: sparse: void static inline [gnu_inline] >> [toplevel] __raw_writel( ... ) drivers/tty/serial/apbuart.c:123:8: sparse: sparse: undefined identifier 'xmit' drivers/tty/serial/apbuart.c:123:8: sparse: sparse: undefined identifier 'xmit' drivers/tty/serial/apbuart.c:123:8: sparse: sparse: symbol 'ch' redeclared with different type (different type sizes): >> drivers/tty/serial/apbuart.c:123:8: sparse: int [addressable] [toplevel] >> ch drivers/tty/serial/apbuart.c:123:8: sparse: note: previously declared as: >> drivers/tty/serial/apbuart.c:123:8: sparse: unsigned char [addressable] >> [toplevel] [usertype] ch drivers/tty/serial/apbuart.c:123:8: sparse: sparse: symbol '__raw_writel' redeclared with different type (incompatible argument 1 (different base types)): >> drivers/tty/serial/apbuart.c:123:8: sparse: int static [signed] >> [toplevel] __raw_writel( ... ) include/asm-generic/io.h:164:20: sparse: note: previously declared as: >> include/asm-generic/io.h:164:20: sparse: void static inline [gnu_inline] >> [toplevel] __raw_writel( ... ) >> drivers/tty/serial/apbuart.c:123:8: sparse: sparse: cannot dereference this >> type >> drivers/tty/serial/apbuart.c:123:8: sparse: sparse: cannot dereference this >> type drivers/tty/serial/apbuart.c:123:8: sparse: sparse: symbol 'pending' redeclared with different type (different signedness): >> drivers/tty/serial/apbuart.c:123:8: sparse: int [addressable] [toplevel] >> pending drivers/tty/serial/apbuart.c:123:8: sparse: note: previously declared as: >> drivers/tty/serial/apbuart.c:123:8: sparse: unsigned int [addressable] >> [toplevel] pending >> drivers/tty/serial/apbuart.c:185:9: sparse: sparse: too many arguments for >> function __raw_writel drivers/tty/serial/apbuart.c:198:9: sparse: sparse: too many arguments for function __raw_writel drivers/tty/serial/apbuart.c:253:9: sparse: sparse: too many arguments for function __raw_writel drivers/tty/serial/apbuart.c:254:9: sparse: sparse: too many arguments for function __raw_writel drivers/tty/serial/apbuart.c:338:9: sparse: sparse: too many arguments for function __raw_writel drivers/tty/serial/apbuart.c:348:9: sparse: sparse: too many arguments for function __raw_writel drivers/tty/serial/apbuart.c:351:9: sparse: sparse: too many arguments for function __raw_writel drivers/tty/serial/apbuart.c:362:17: sparse: sparse: too many arguments for function __raw_writel drivers/tty/serial/apbuart.c:368:9: sparse: sparse: too many arguments for function __raw_writel vim +/for +123 drivers/tty/serial/apbuart.c d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 122 f6f99189d77ea4 drivers/tty/serial/apbuart.c Jiri Slaby 2022-09-01 @123 static DEFINE_UART_PORT_TX_HELPER_LIMITED(apbuart_do_tx_chars, port, ch, f6f99189d77ea4 drivers/tty/serial/apbuart.c Jiri Slaby 2022-09-01 124 true, f6f99189d77ea4 drivers/tty/serial/apbuart.c Jiri Slaby 2022-09-01 125 UART_PUT_CHAR(port, ch), f6f99189d77ea4 drivers/tty/serial/apbuart.c Jiri Slaby 2022-09-01 126 ({})); f6f99189d77ea4 drivers/tty/serial/apbuart.c Jiri Slaby 2022-09-01 127 d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 128 static void apbuart_tx_chars(struct uart_port *port) d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 129 { f6f99189d77ea4 drivers/tty/serial/apbuart.c Jiri Slaby 2022-09-01 @130 apbuart_do_tx_chars(port, port->fifosize >> 1); d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 131 } d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 132 d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 133 static irqreturn_t apbuart_int(int irq, void *dev_id) d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 134 { d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 135 struct uart_port *port = dev_id; d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 136 unsigned int status; d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 137 d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 138 spin_lock(&port->lock); d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 139 d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 140 status = UART_GET_STATUS(port); d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 141 if (status & UART_STATUS_DR) d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 142 apbuart_rx_chars(port); d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 143 if (status & UART_STATUS_THE) d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 144 apbuart_tx_chars(port); d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 145 d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 146 spin_unlock(&port->lock); d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 147 d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 148 return IRQ_HANDLED; d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 149 } d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 150 d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 151 static unsigned int apbuart_tx_empty(struct uart_port *port) d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 152 { d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 153 unsigned int status = UART_GET_STATUS(port); d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 154 return status & UART_STATUS_THE ? TIOCSER_TEMT : 0; d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 155 } d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 156 d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 157 static unsigned int apbuart_get_mctrl(struct uart_port *port) d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 158 { d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 159 /* The GRLIB APBUART handles flow control in hardware */ d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 160 return TIOCM_CAR | TIOCM_DSR | TIOCM_CTS; d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 161 } d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 162 d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 163 static void apbuart_set_mctrl(struct uart_port *port, unsigned int mctrl) d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 164 { d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 165 /* The GRLIB APBUART handles flow control in hardware */ d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 166 } d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 167 d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 168 static void apbuart_break_ctl(struct uart_port *port, int break_state) d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 169 { d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 170 /* We don't support sending break */ d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 171 } d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 172 d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 173 static int apbuart_startup(struct uart_port *port) d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 174 { d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 175 int retval; d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 176 unsigned int cr; d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 177 d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 178 /* Allocate the IRQ */ d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 179 retval = request_irq(port->irq, apbuart_int, 0, "apbuart", port); d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 180 if (retval) d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 181 return retval; d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 182 d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 183 /* Finally, enable interrupts */ d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 184 cr = UART_GET_CTRL(port); d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 @185 UART_PUT_CTRL(port, d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 186 cr | UART_CTRL_RE | UART_CTRL_TE | d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 187 UART_CTRL_RI | UART_CTRL_TI); d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 188 d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 189 return 0; d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 190 } d4ac42a582e46d drivers/serial/apbuart.c Kristoffer Glembo 2009-11-04 191 -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
