Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9702250rwd; Wed, 21 Jun 2023 10:39:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6qo30z8ei2DlML8kC95ZJJszabsG2vAlwxNphQiDI6vEKzsM1o60kOpqXEwWMRmXVFkQz+ X-Received: by 2002:a05:6a00:32cd:b0:668:7235:e760 with SMTP id cl13-20020a056a0032cd00b006687235e760mr14171266pfb.2.1687369140826; Wed, 21 Jun 2023 10:39:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687369140; cv=none; d=google.com; s=arc-20160816; b=kzylYg/tLkrsxveHQ9pltLp+HwMBxx5LxME3ulqOa8F4DenjWvfGli1Vd/xxwmjnzT pdfa04BDe7obJsffdgBkdeEGWBsXwERuYj9S3AUvkJ41zpcLaIIqNbi39oqmW/yH5sZv 8prX5QVUxCq5NAv9cxBQLlPWvUiyAPaAlNFEayB62vHHKvpydmryp3ABR9dDMZpxAKdX bO4ZFsYGIbl25mibErC9c0agLDpCKouyLrRs1UTTbfH/8Q7BGQOgNGXniY/PIvya8umK hYPHZKIOnBDaCcV/cBRZRNoIAMbRNBS5dlYp7yiHxnh6EFiA4yIWzG5nMilokBIoLNwr +M/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=r0gZurvMX0TsCPQVcY6I0FibYm/UJCRWOurLtYIUR3I=; b=fDaWT/pGMrtkoYYtWfOVxpYtNkUmJLkjK80bVEsVIq91/dp3qCAaUG1/GsGTEvy2Sb VhYVakA9FDBZvucg04+yPodKsS7lfxDHkeswlCDPBaoh088aNjn+cQWOvEv2BF2G+562 TSFVcQUNGWZ1ItvmcC4zdKAEpGVstW3NZj9jxK6cH6Q0HMKFXtFf9/IlBQNtFkiAIX2+ iWEPqO7nSa7GsiXXOZ6UIbdgO9hXJlIjcfjxxN6GhIQNTIvtkpayEzEPoVO9MzaFAAkb TlPFY0cx4PP4ubghNwVluTA4UpML7EJ/mTPRbYeWNmNFO+r05I638LoXRAIDpjbdEDit 2e4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IlgxkyNg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g4-20020aa79dc4000000b006687ee37224si569981pfq.0.2023.06.21.10.38.49; Wed, 21 Jun 2023 10:39:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IlgxkyNg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230260AbjFURKq (ORCPT + 99 others); Wed, 21 Jun 2023 13:10:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229514AbjFURKp (ORCPT ); Wed, 21 Jun 2023 13:10:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3094129 for ; Wed, 21 Jun 2023 10:10:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7F5B161626 for ; Wed, 21 Jun 2023 17:10:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3DB25C433C0; Wed, 21 Jun 2023 17:10:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687367443; bh=qbttSnX61aRCfPZ9doviFJYcYAqStHfzS0R2tONpN9A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IlgxkyNgnp1V16aJEA+rLpAZS3Uq3r34cV6+czilUjkKDSBf9KQWcYXtYj6fT+2Qh L9EKe7trA6o/xYdTnGW/IyHpGgmMDOM+5ki54BbJQMCIzfukpV27yEu+p6sWxFFQAK f39c7wuBRI2yLN8i/ZYL5Galo2DfcrQLLhxyFYibzLZF6O/GWHseHrZL3c15wWTHnJ XqFGQVbxapHDpzn2PzVEVT3bIUA2LC8OAaSJVp4we/JpN9azytQWYOSoROHrGd9dFa STBbpHGB5LE6j5dd8hJ1UwylsgigizvDav9ylQ28RKN938rqzl8adCusle2jtQe2zy ctVUa+ybHvaoQ== Date: Wed, 21 Jun 2023 18:10:40 +0100 From: Lee Jones To: Andy Shevchenko Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 1/1] mfd: ipaq-micro: Use %*ph for printing hexdump of a small buffer Message-ID: <20230621171040.GK10378@google.com> References: <20230612212007.3621-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230612212007.3621-1-andriy.shevchenko@linux.intel.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 13 Jun 2023, Andy Shevchenko wrote: > The kernel already has a helper to print a hexdump of a small > buffer via pointer extension. Use that instead of open coded > variant. That's not all you're doing is it? Nice try. 2 patches please. > In long term it helps to kill pr_cont() or at least narrow down > its use. > > Signed-off-by: Andy Shevchenko > --- > drivers/mfd/ipaq-micro.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/mfd/ipaq-micro.c b/drivers/mfd/ipaq-micro.c > index 6d3968458e81..57fb7874fc91 100644 > --- a/drivers/mfd/ipaq-micro.c > +++ b/drivers/mfd/ipaq-micro.c > @@ -131,10 +131,8 @@ static void micro_rx_msg(struct ipaq_micro *micro, u8 id, int len, u8 *data) > break; > default: > dev_err(micro->dev, > - "unknown msg %d [%d] ", id, len); > - for (i = 0; i < len; ++i) > - pr_cont("0x%02x ", data[i]); > - pr_cont("\n"); > + "unknown msg %d [%d] %*ph\n", id, len, len, data); > + break; > } > spin_unlock(µ->lock); > } > -- > 2.40.0.1.gaa8946217a0b > -- Lee Jones [李琼斯]