From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8D95C433DF for ; Mon, 18 May 2020 07:38:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C551920715 for ; Mon, 18 May 2020 07:38:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589787512; bh=y0GkUKU5r7lGD9yRHVFJviUMzEKMAbqxRbSrU/nSEHo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=NCTUb26SDUlK0MeniK6O9ztdN7FcOMJPe/jYfeUEG3PEtDTqfJih/H63MOZRWXwun sRTrVkpUpmUG8+bRnlsBe/XhgiCsZzILYFIV9L36l/Em9eQD8lssFqVSP0q2+dKAX8 tjzoam7PUnL5VenEe00KktdzYb4fVv50ymsRoGrU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726998AbgERHic (ORCPT ); Mon, 18 May 2020 03:38:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:58784 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726489AbgERHib (ORCPT ); Mon, 18 May 2020 03:38:31 -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 DD51A207F5; Mon, 18 May 2020 07:38:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589787511; bh=y0GkUKU5r7lGD9yRHVFJviUMzEKMAbqxRbSrU/nSEHo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=p+aG48dwSqg2HtDhF+oWwgSRz5uEQipMEaqgdwq5UgtW5MOh1bNaMocJI0g5Kdx2N 49cR+FLxEd9j5trV+mLCufssiIoM22dAtnRdYUfKyo5TS/C5ZhxA+umfLpIBq5dhKV 2ikN0SwjMcvC2WiQ1hfa7+eqi+2rY+mTImu/yTJM= Date: Mon, 18 May 2020 09:38:29 +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: <20200518073829.GA3055513@kroah.com> References: <20200512115323.1447922-1-gregory.clement@bootlin.com> <20200512115323.1447922-2-gregory.clement@bootlin.com> <87tv0dg0ii.fsf@FE-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87tv0dg0ii.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: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? thanks, greg k-h