linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: liujing <liujing@cmss.chinamobile.com>
Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Subject: Re: [PATCH] tty: synclink_gt: Fix incorrect formatted output
Date: Thu, 7 Nov 2024 09:44:35 +0100	[thread overview]
Message-ID: <2024110730-outfield-gigolo-e388@gregkh> (raw)
In-Reply-To: <20241107032936.2702-1-liujing@cmss.chinamobile.com>

On Thu, Nov 07, 2024 at 11:29:36AM +0800, liujing wrote:
> In the struct slgt_info structure, the type of info->tbuf_current
> is unsigned int, so the output format is %u.
> 
> Signed-off-by: liujing <liujing@cmss.chinamobile.com>
> 
> diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c
> index bd8d92ee7c53..0c51c6c28080 100644
> --- a/drivers/tty/synclink_gt.c
> +++ b/drivers/tty/synclink_gt.c
> @@ -519,7 +519,7 @@ static void trace_block(struct slgt_info *info, const char *data, int count, con
>  static void dump_tbufs(struct slgt_info *info)
>  {
>  	int i;
> -	printk("tbuf_current=%d\n", info->tbuf_current);
> +	printk("tbuf_current=%u\n", info->tbuf_current);

How was this found?  How was it tested?  Why is this code still in here
at all?  It all should be removed and if really needed, converted to use
the proper in-kernel apis for this type of thing, not a random module
parameter that does not fit in with the rest of the kernel.

thanks,

greg k-h

      reply	other threads:[~2024-11-07  8:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-07  3:29 [PATCH] tty: synclink_gt: Fix incorrect formatted output liujing
2024-11-07  8:44 ` Greg KH [this message]

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=2024110730-outfield-gigolo-e388@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=liujing@cmss.chinamobile.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).