Message ID | c6753260caf8b20cc002b15fcbf22b759c91d760.1560156294.git.michal.simek@xilinx.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] serial: xilinx_uartps: Fix warnings in the driver | expand |
On Mon, Jun 10, 2019 at 10:44:55AM +0200, Michal Simek wrote: > From: Nava kishore Manne <nava.manne@xilinx.com> > > This patch fixes the below warning > > -->Symbolic permissions 'S_IRUGO' are not preferred. > Consider using octal permissions '0444'. > -->macros should not use a trailing semicolon. > -->line over 80 characters. > -->void function return statements are not generally useful. > -->Prefer 'unsigned int' to bare use of 'unsigned'. > > Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com> > Signed-off-by: Michal Simek <michal.simek@xilinx.com> > --- > > Happy to split it if needed. Please split. Do not do more than one "logical thing" per patch. And the subject is not correct, there are no general "warnings", these are all checkpatch warnings, not a build issue. thanks, greg k-h
On 10. 06. 19 16:44, Greg KH wrote: > On Mon, Jun 10, 2019 at 10:44:55AM +0200, Michal Simek wrote: >> From: Nava kishore Manne <nava.manne@xilinx.com> >> >> This patch fixes the below warning >> >> -->Symbolic permissions 'S_IRUGO' are not preferred. >> Consider using octal permissions '0444'. >> -->macros should not use a trailing semicolon. >> -->line over 80 characters. >> -->void function return statements are not generally useful. >> -->Prefer 'unsigned int' to bare use of 'unsigned'. >> >> Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com> >> Signed-off-by: Michal Simek <michal.simek@xilinx.com> >> --- >> >> Happy to split it if needed. > > Please split. Do not do more than one "logical thing" per patch. > > And the subject is not correct, there are no general "warnings", these > are all checkpatch warnings, not a build issue. ok. Will do. Any issue with second patch? Thanks, Michal
On Mon, Jun 10, 2019 at 05:06:57PM +0200, Michal Simek wrote: > On 10. 06. 19 16:44, Greg KH wrote: > > On Mon, Jun 10, 2019 at 10:44:55AM +0200, Michal Simek wrote: > >> From: Nava kishore Manne <nava.manne@xilinx.com> > >> > >> This patch fixes the below warning > >> > >> -->Symbolic permissions 'S_IRUGO' are not preferred. > >> Consider using octal permissions '0444'. > >> -->macros should not use a trailing semicolon. > >> -->line over 80 characters. > >> -->void function return statements are not generally useful. > >> -->Prefer 'unsigned int' to bare use of 'unsigned'. > >> > >> Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com> > >> Signed-off-by: Michal Simek <michal.simek@xilinx.com> > >> --- > >> > >> Happy to split it if needed. > > > > Please split. Do not do more than one "logical thing" per patch. > > > > And the subject is not correct, there are no general "warnings", these > > are all checkpatch warnings, not a build issue. > > ok. Will do. Any issue with second patch? It will change your user/kernel api but hey, it's your call, it looks like a nice fix to me :) thanks, greg k-h
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 605354fd60b1..6af2886f5ba7 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -35,12 +35,12 @@ /* Rx Trigger level */ static int rx_trigger_level = 56; -module_param(rx_trigger_level, uint, S_IRUGO); +module_param(rx_trigger_level, uint, 0444); MODULE_PARM_DESC(rx_trigger_level, "Rx trigger level, 1-63 bytes"); /* Rx Timeout */ static int rx_timeout = 10; -module_param(rx_timeout, uint, S_IRUGO); +module_param(rx_timeout, uint, 0444); MODULE_PARM_DESC(rx_timeout, "Rx timeout, 1-255"); /* Register offsets for the UART. */ @@ -199,7 +199,7 @@ struct cdns_platform_data { u32 quirks; }; #define to_cdns_uart(_nb) container_of(_nb, struct cdns_uart, \ - clk_rate_change_nb); + clk_rate_change_nb) /** * cdns_uart_handle_rx - Handle the received bytes along with Rx errors. @@ -312,7 +312,8 @@ static void cdns_uart_handle_tx(void *dev_id) } else { numbytes = port->fifosize; while (numbytes && !uart_circ_empty(&port->state->xmit) && - !(readl(port->membase + CDNS_UART_SR) & CDNS_UART_SR_TXFULL)) { + !(readl(port->membase + CDNS_UART_SR) & + CDNS_UART_SR_TXFULL)) { /* * Get the data from the UART circular buffer * and write it to the cdns_uart's TX_FIFO @@ -1073,8 +1074,6 @@ static void cdns_uart_poll_put_char(struct uart_port *port, unsigned char c) cpu_relax(); spin_unlock_irqrestore(&port->lock, flags); - - return; } #endif