[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YnQ5fh6pcPWmveE8@kroah.com>
Date: Thu, 5 May 2022 22:54:22 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Shubhrajyoti Datta <shubhrajyoti.datta@...inx.com>
Cc: linux-serial@...r.kernel.org, michal.simek@...inx.com,
jirislaby@...nel.org, git@...inx.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/7] tty: xilinx_uartps: Make the timeout unsigned
On Fri, Apr 29, 2022 at 01:44:20PM +0530, Shubhrajyoti Datta wrote:
> The timeout cannot be negative make it unsigned.
> Also the same for the trigger level.
>
> Addresses-Coverity: Event incompatible_param.
What does this mean?
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@...inx.com>
> ---
> drivers/tty/serial/xilinx_uartps.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
> index bf0415f0a194..289d70914956 100644
> --- a/drivers/tty/serial/xilinx_uartps.c
> +++ b/drivers/tty/serial/xilinx_uartps.c
> @@ -34,12 +34,12 @@
> #define TX_TIMEOUT 500000
>
> /* Rx Trigger level */
> -static int rx_trigger_level = 56;
> +static uint rx_trigger_level = 56;
> 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;
> +static uint rx_timeout = 10;
> module_param(rx_timeout, uint, 0444);
> MODULE_PARM_DESC(rx_timeout, "Rx timeout, 1-255");
As this is bounded (right?) why is this an issue?
Shouldn't it be a "byte" instead?
thanks,
greg k-h
Powered by blists - more mailing lists