linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Vamshi Gajjela <vamshigajjela@google.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	ilpo.jarvinen@linux.intel.com, linux-serial@vger.kernel.org,
	linux-kernel@vger.kernel.org, manugautam@google.com,
	Subhash Jadavani <sjadavani@google.com>,
	Channa Kadabi <kadabi@google.com>
Subject: Re: [PATCH v5 1/2] serial: core: Update uart_poll_timeout() function to return unsigned long
Date: Mon, 30 Oct 2023 11:25:37 +0200 (EET)	[thread overview]
Message-ID: <2ed2249-d4ce-410-17d1-b78be4a3a643@linux.intel.com> (raw)
In-Reply-To: <20231030073542.251281-2-vamshigajjela@google.com>

[-- Attachment #1: Type: text/plain, Size: 1495 bytes --]

On Mon, 30 Oct 2023, Vamshi Gajjela wrote:

> The function uart_fifo_timeout() returns an unsigned long value, which
> is the number of jiffies. Therefore, change the variable timeout in the
> function uart_poll_timeout() from int to unsigned long.
> Change the return type of the function uart_poll_timeout() from int to
> unsigned long to be consistent with the type of timeout values.
> 
> Signed-off-by: Vamshi Gajjela <vamshigajjela@google.com>
> ---
> v5:
> - no change. Consistent version for series
> v4:
> - author name in capitals to lowercase
> v3:
> - updated description
> v2:
> - unsigned long instead of unsigned int
> - added () after function name in short log
> - updated description
> 
>  include/linux/serial_core.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
> index bb6f073bc159..6916a1d7e477 100644
> --- a/include/linux/serial_core.h
> +++ b/include/linux/serial_core.h
> @@ -773,9 +773,9 @@ static inline unsigned long uart_fifo_timeout(struct uart_port *port)
>  }
>  
>  /* Base timer interval for polling */
> -static inline int uart_poll_timeout(struct uart_port *port)
> +static inline unsigned long uart_poll_timeout(struct uart_port *port)
>  {
> -	int timeout = uart_fifo_timeout(port);
> +	unsigned long timeout = uart_fifo_timeout(port);
>  
>  	return timeout > 6 ? (timeout / 2 - 2) : 1;
>  }
> 

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

-- 
 i.

  reply	other threads:[~2023-10-30  9:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-30  7:35 [PATCH v5 0/2] serial core type consistency and clean up Vamshi Gajjela
2023-10-30  7:35 ` [PATCH v5 1/2] serial: core: Update uart_poll_timeout() function to return unsigned long Vamshi Gajjela
2023-10-30  9:25   ` Ilpo Järvinen [this message]
2023-10-30  7:35 ` [PATCH v5 2/2] serial: core: Clean up uart_update_timeout() function Vamshi Gajjela
2023-10-30  9:33   ` Ilpo Järvinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2ed2249-d4ce-410-17d1-b78be4a3a643@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=kadabi@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=manugautam@google.com \
    --cc=sjadavani@google.com \
    --cc=vamshigajjela@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).