public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gregory CLEMENT <gregory.clement@bootlin.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>,
	linux-kernel@vger.kernel.org,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH v2 1/3] tty: n_gsm: Improve debug output
Date: Mon, 18 May 2020 09:44:52 +0200	[thread overview]
Message-ID: <87o8qlg00b.fsf@FE-laptop> (raw)
In-Reply-To: <20200518073829.GA3055513@kroah.com>

Hello Greg,

> On Mon, May 18, 2020 at 09:33:57AM +0200, Gregory CLEMENT wrote:
>> Hello Jiri,
>> 
>> > On 12. 05. 20, 13:53, Gregory CLEMENT wrote:
>> >> Use appropriate print helpers for debug messages.
>> >> 
>> >> Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
>> >> ---
>> >>  drivers/tty/n_gsm.c | 14 ++------------
>> >>  1 file changed, 2 insertions(+), 12 deletions(-)
>> >> 
>> >> diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
>> >> index d77ed82a4840..67c8f8173023 100644
>> >> --- a/drivers/tty/n_gsm.c
>> >> +++ b/drivers/tty/n_gsm.c
>> >> @@ -504,18 +504,8 @@ static void gsm_print_packet(const char *hdr, int addr, int cr,
>> >>  	else
>> >>  		pr_cont("(F)");
>> >>  
>> >> -	if (dlen) {
>> >> -		int ct = 0;
>> >> -		while (dlen--) {
>> >> -			if (ct % 8 == 0) {
>> >> -				pr_cont("\n");
>> >> -				pr_debug("    ");
>> >> -			}
>> >> -			pr_cont("%02X ", *data++);
>> >> -			ct++;
>> >> -		}
>> >> -	}
>> >> -	pr_cont("\n");
>> >> +	if (dlen)
>> >
>> > This test is superfluous. print_hex_dump_* won't write anything when
>> > zero length is passed to it.
>> 
>> As I will send a v3 due to the issue found on the last patch, I am also
>> going to fix this.
>
> Ugh, as I already applied this series, should I just revert them all, or
> are you going to send fix-ups on top of what I have applied instead?

I was about to send a new series, but I can just send fix-ups. It's up
to you.

Gregory

>
> thanks,
>
> greg k-h

-- 
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com

  reply	other threads:[~2020-05-18  7:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12 11:53 [PATCH v2 0/3] TTY improve n_gsm support Gregory CLEMENT
2020-05-12 11:53 ` [PATCH v2 1/3] tty: n_gsm: Improve debug output Gregory CLEMENT
2020-05-18  6:40   ` Jiri Slaby
2020-05-18  7:33     ` Gregory CLEMENT
2020-05-18  7:38       ` Greg Kroah-Hartman
2020-05-18  7:44         ` Gregory CLEMENT [this message]
2020-05-18  7:48           ` Greg Kroah-Hartman
2020-05-18 17:50             ` [PATCH] tty: n_gsm: gsm_print_packet: use scnprintf to avoid pr_cont Joe Perches
2020-05-12 11:53 ` [PATCH v2 2/3] tty: n_gsm: Fix SOF skipping Gregory CLEMENT
2020-05-12 11:53 ` [PATCH v2 3/3] tty: n_gsm: Fix waking up upper tty layer when room available Gregory CLEMENT
2020-05-18  6:44   ` Jiri Slaby
2020-05-18  7:42     ` Gregory CLEMENT
  -- strict thread matches above, loose matches on Subject: below --
2020-05-18  8:45 [PATCH 0/2] TTY fix-ups for "TTY improve n_gsm support" series Gregory CLEMENT
2020-05-18  8:45 ` [PATCH v2 1/3] tty: n_gsm: Improve debug output Gregory CLEMENT

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=87o8qlg00b.fsf@FE-laptop \
    --to=gregory.clement@bootlin.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thomas.petazzoni@bootlin.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