Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2518048ybk; Mon, 18 May 2020 00:47:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmCrOKrSFZjndMIAjeuqUFVvsrykjO+EiXvGpR/rw5kSvSaLFF1t21iURN3oKOwoUlfvgL X-Received: by 2002:a17:906:dd8:: with SMTP id p24mr14262450eji.93.1589788024540; Mon, 18 May 2020 00:47:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589788024; cv=none; d=google.com; s=arc-20160816; b=BUQCYF3OKmrzZpKczf07rFb7qPmkvg8oTZm2T6iipY1cRDtyLZkCsqbUUz+JTKXQ7j 2TsMPF4t/9iUkuAU0LpH2bUu3Jc0o6d2VT0yPKyT4pqoEN5Jcbc3Bm8qk+u5oC1zBzHs ZUqacPIYFLRfvDXXRQsXWd5DQlsds5So+NRRqBczWqI2tLe4B9D+vBIPsx3jXpCNRslM Tmhsk1ldUBD95BdsBCKtQApkqFUBFNN5/yUw5JS+7SFq6DhGt+d3zPv9Iz1C+m75ostA wUyA5iVXt2d501H5hqt8swE8g/tMfXoJlvWOjsOB70fvy4yEVvjCmJdGjVkakbauj06x sGFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=3KbiOlikO8bigpxK8gb4U413fCXIjyI2vq8hJ/pXKvg=; b=swY0XAocKRnhL53VyKdly2Rq1IJZSLG13+g+S+3TjRproOs/Q6YUIg2GQ9cYJWb2QZ DGDIyTt/UBjZq0hdhzBlxtbvpllE97F1bPVk0rVzPQj/ciwN3l1QfJYlbAE93ahVGxNB 5qGmohHfoTIEH70XvpgezwY36Lzw37BumzQ7CNi0vzynOi3LljfiTC/Q0ioR0fSWv5vu RX4aHXn55A7wuLaXCmfv+PFv4tfdNhiiXnDRFr7r4HV0ZT605Q5Oh7M6QdySIJ/v4wAH yQ8LW6GBBWADV1t/EzrpsdigAFinqf6seTn+AMketBWlZPBhhSdMBCfZ7yykvrMxRwHt YpJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r26si1590863edi.376.2020.05.18.00.46.40; Mon, 18 May 2020 00:47:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727033AbgERHoz (ORCPT + 99 others); Mon, 18 May 2020 03:44:55 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:42801 "EHLO relay10.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726489AbgERHoz (ORCPT ); Mon, 18 May 2020 03:44:55 -0400 Received: from localhost (91-175-115-186.subs.proxad.net [91.175.115.186]) (Authenticated sender: gregory.clement@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 51F19240012; Mon, 18 May 2020 07:44:53 +0000 (UTC) From: Gregory CLEMENT To: Greg Kroah-Hartman Cc: Jiri Slaby , linux-kernel@vger.kernel.org, Thomas Petazzoni Subject: Re: [PATCH v2 1/3] tty: n_gsm: Improve debug output In-Reply-To: <20200518073829.GA3055513@kroah.com> References: <20200512115323.1447922-1-gregory.clement@bootlin.com> <20200512115323.1447922-2-gregory.clement@bootlin.com> <87tv0dg0ii.fsf@FE-laptop> <20200518073829.GA3055513@kroah.com> Date: Mon, 18 May 2020 09:44:52 +0200 Message-ID: <87o8qlg00b.fsf@FE-laptop> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> >> --- >> >> 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