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>,
linux-serial <linux-serial@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
manugautam@google.com, Subhash Jadavani <sjadavani@google.com>,
Channa Kadabi <kadabi@google.com>
Subject: Re: [PATCH 2/3] serial: core: Make local variable size to u64
Date: Mon, 16 Oct 2023 14:39:23 +0300 (EEST) [thread overview]
Message-ID: <b0ec67b1-24a2-d67d-d7c1-9c3fdafdb570@linux.intel.com> (raw)
In-Reply-To: <20231014104942.856152-3-vamshigajjela@google.com>
On Sat, 14 Oct 2023, Vamshi Gajjela wrote:
> From: VAMSHI GAJJELA <vamshigajjela@google.com>
>
> The variable size has been changed from u32 to u64 to accommodate a
> larger range of values without the need for explicit typecasting.
Don't use too broad/generic terminology in shortlog (on [PATCH] line in
subject) or changelog but explicitly mention the variable names please.
> Signed-off-by: VAMSHI GAJJELA <vamshigajjela@google.com>
> ---
> drivers/tty/serial/serial_core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
> index 7bdc21d5e13b..fb4696d17a8b 100644
> --- a/drivers/tty/serial/serial_core.c
> +++ b/drivers/tty/serial/serial_core.c
> @@ -410,10 +410,10 @@ void
> uart_update_timeout(struct uart_port *port, unsigned int cflag,
> unsigned int baud)
> {
> - unsigned int size = tty_get_frame_size(cflag);
> + u64 size = tty_get_frame_size(cflag);
> u64 frame_time;
>
> - frame_time = (u64)size * NSEC_PER_SEC;
> + frame_time = size * NSEC_PER_SEC;
> port->frame_time = DIV64_U64_ROUND_UP(frame_time, baud);
> }
> EXPORT_SYMBOL(uart_update_timeout);
This is actually a good cleanup all by itself unrelated to the other
change but you need to adapt the changelog to reflect why this is helpful
instead wording it based on the other change.
--
i.
next prev parent reply other threads:[~2023-10-16 11:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-14 10:49 [PATCH 0/3] serial core type consistency and overflow checks Vamshi Gajjela
2023-10-14 10:49 ` [PATCH 2/3] serial: core: Make local variable size to u64 Vamshi Gajjela
2023-10-16 11:39 ` Ilpo Järvinen [this message]
2023-10-18 14:16 ` VAMSHI GAJJELA
2023-10-14 10:49 ` [PATCH 3/3] serial: core: Update uart_poll_timeout function to return unsigned int Vamshi Gajjela
2023-10-16 11:44 ` Ilpo Järvinen
[not found] ` <20231014104942.856152-2-vamshigajjela@google.com>
2023-10-16 10:33 ` [PATCH 1/3] serial: core: Potential overflow of frame_time Ilpo Järvinen
2023-10-18 13:45 ` VAMSHI GAJJELA
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=b0ec67b1-24a2-d67d-d7c1-9c3fdafdb570@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).