Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2519421ybk; Mon, 18 May 2020 00:50:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNO0RKV8pQ3SRPBVMyqK3L3ZLGKIiUx2d7u/hHkdbfEiGxBOrkN3qr8tJIY85KUMNGEK0W X-Received: by 2002:a17:907:2065:: with SMTP id qp5mr13497164ejb.136.1589788209674; Mon, 18 May 2020 00:50:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589788209; cv=none; d=google.com; s=arc-20160816; b=fyitsCuheEKwNE4cDDJ1HKvEU8vhu3tmQ7L9FGzG7OgEfgZIA5HMyckpItep7ScptP u3CIUwpLxU3q8vebxdtoZX3OVSeo3k0Bh67s4q0s9a7oEDHOYrMJVxbjPCER+riSnggz CLPGC/1MOpzoICXiPiFhNBi7SF0/6Y37ZwP5lAlMQKZLcpNSY6Gk8bMyll14aXGSR1m7 FFCaBGpwzn95jspZf094Rr8N/PoVPA6VmiVrOXtZHwSYYkRNCr5HsrBIyypHjqMgrJCD 1vlUJbKdGOUkHDDXXF6SUMJuC9ffNU8/hliFowRLXbjVMF2XEgrh+kvw5yc0UHENwuvI eq5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=MK+KM3++3KNOCDuWl5zCvPa1kdJ+9JMbANm6fKjA2fI=; b=VlgEt37yu874U8ln/rCaHe7oXCVEuq4L8I3THBMyml4UwtF12c3afGEI264PVUVqhJ dkXC+sKjeoLFXt2nKplU6zRhNhbuCrZqj3QCYqEZHC9PgeQMAVzl9Izb6AT01xAuahAf 603IUz5MTsQdo4vlzHEjB6Szum2/Bg+6lYkcxCjKN8QVww2vpq3CnIzSGftjT2Trn6sm yPJgPbbwBrq0aMLQ443KaaG94OnoNfeljnpM7uI3eozSSLVhza9GUOSnE3DvhFy4X04Y 38KwFQQRGm8NFZUZGU9rsQ0bF5BXDcLK6CImPK66n8EzNOTbDNagkXAhF2sjdgdyWwsB Of3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aXNt7F9M; 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 j93si5639619edd.458.2020.05.18.00.49.46; Mon, 18 May 2020 00:50:09 -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; dkim=pass header.i=@kernel.org header.s=default header.b=aXNt7F9M; 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 S1726998AbgERHsG (ORCPT + 99 others); Mon, 18 May 2020 03:48:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:60934 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726489AbgERHsG (ORCPT ); Mon, 18 May 2020 03:48:06 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0076A20825; Mon, 18 May 2020 07:48:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589788085; bh=B8BZX1tEa8YFlmLQI8RzC6u6+knqEquuZ1Wxf4akJ5Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aXNt7F9MPKx+9varfW/wXddmdWJT70EBEbOPdVzPiqIF619UoaR6Hp3G/bIqv6IJV gawia3MBS58OU1kldkeoPy5E9vyw9yE82VP1BUq+g6IlgkYiDoer6sC1KJRiNirycA /hSZ/wxnHX1jG5DpgSPDaJXKZhXTB/yk7+OmHKs0= Date: Mon, 18 May 2020 09:48:03 +0200 From: Greg Kroah-Hartman To: Gregory CLEMENT Cc: Jiri Slaby , linux-kernel@vger.kernel.org, Thomas Petazzoni Subject: Re: [PATCH v2 1/3] tty: n_gsm: Improve debug output Message-ID: <20200518074803.GA3095136@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> <87o8qlg00b.fsf@FE-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87o8qlg00b.fsf@FE-laptop> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 18, 2020 at 09:44:52AM +0200, Gregory CLEMENT wrote: > 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. fix-ups are less work for me :)