Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp26256132rwd; Mon, 3 Jul 2023 07:23:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlGjLauccwpNn+IOj4HAZfNaVPAVXG58UdWPJn26pgAk7hvV89LR3YiKkxnvqBW/ScmoDhYI X-Received: by 2002:a17:902:f546:b0:1b6:6f12:502e with SMTP id h6-20020a170902f54600b001b66f12502emr13106187plf.49.1688394208740; Mon, 03 Jul 2023 07:23:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688394208; cv=none; d=google.com; s=arc-20160816; b=CeXHxXfhgSMO6o7Wla3/Gl+mOAHPZ0KtQ9ohS1q8PeQzY7JmybgpW9Ehi3vfWvraPc MaZ6fcTxIjEu6rZpj3GCT/QY1+HCiCoL8HV6LeaAX0R1SKhogT1qui4k57wSwWJD7sJw rOyXYRLrLiFhAObX0G7+d+K5WaTzILrJrO3z0gbl+17zlyfB+mwe/mmtPM5OldD8WRfk gfIA2h4HESW1PedLl5RjYBi2xmrOVfVeMdyuYbzz//tMeOBj646n46870OthaukgS8uF J9AEiorfu/QGwqlt5HcIiIUhp+EAawT5M8M7a4XsP2hNi8DWOe/Bd0Ggr/4KBu6bmx7D YGTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=dLl4/iIYFE99g+UI4J5yq7Sy2WMDWQl7ZmG/2UCTmTQ=; fh=RXyKyeyQzAcusT2OQA6dG83yFiRRvmf5xAXRiao8ycY=; b=mCsaRtTwYekejPDXvUJfk23hdzHaHvKGcXEHz8Ofr6kW6kavnHcuL4Y2w2FdMpyIyA esFxcDoujWeIhxvLDnteZ0LeUssI7eT/H7RSd89gFPQSzsA5hwnuI++FLwfSvtYH+7cZ 4aqAEZ3OTkJwcrDZFdDgUm+toTbwWyvMvz4gLJL1mCihVa1Tk/F06WDOV3twZxCSqcLu 6CKisdNe3xxz9eOdiTAmpSwJ1GkG3UF7yRzDhy3omguqM56x+ZzNuf8vF+r6BwvJsqjG 5uwjWIiNbuelCByefj3s1xV5yVvWQhVDCOQ5qF30LBY3GlCT1CT0GbKgfw3RiDiHTrQv Of7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fSYHgugs; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k1-20020a170902c40100b001b84c7d4716si10548493plk.32.2023.07.03.07.23.13; Mon, 03 Jul 2023 07:23:28 -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=@intel.com header.s=Intel header.b=fSYHgugs; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229960AbjGCOKE (ORCPT + 99 others); Mon, 3 Jul 2023 10:10:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230359AbjGCOKD (ORCPT ); Mon, 3 Jul 2023 10:10:03 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FDF9106 for ; Mon, 3 Jul 2023 07:09:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688393389; x=1719929389; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=YOrJBVE9SyEgwY+WN9IMaBLHIF3QU0EF4DUsRLc6TyA=; b=fSYHgugssxD7NNYlOmSprYF1J4yt3MZuNyjEaFR2jCXOvzQsmMmml51q 0EkxYio74QqDb30ibOgIhMO/zGIZbC5zWzH+bBJ/bpVacS/haqgxCF5qC b13hA5o576+Av0aBO6t3V7ZJH2OtRuev+RQzp1yeyUPzAHCW2HD5fjX/D s5cK2Dq67M6usyL845zdolfCrNyQH6nwp9V7wsiMCzo7Yi3nNrEtE5gCF ZA/0pUKv9W9IY3l6Dwh+vVnz+Zk0bt/N4IbdmXmjUHnZVQDmABdlhIYjx kGa4s6/sYdh1jCqV5lcJXRmUQgGFdyjWfqAv8XWufGTMlEIG2GmSd19+U w==; X-IronPort-AV: E=McAfee;i="6600,9927,10760"; a="366375376" X-IronPort-AV: E=Sophos;i="6.01,178,1684825200"; d="scan'208";a="366375376" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jul 2023 07:09:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10760"; a="695822929" X-IronPort-AV: E=Sophos;i="6.01,178,1684825200"; d="scan'208";a="695822929" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga006.jf.intel.com with ESMTP; 03 Jul 2023 07:09:21 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id B2C49170; Mon, 3 Jul 2023 17:09:24 +0300 (EEST) From: Andy Shevchenko To: linux-kernel@vger.kernel.org Cc: Lee Jones , Andy Shevchenko Subject: [PATCH v2 1/2] mfd: ipaq-micro: Use %*ph for printing hexdump of a small buffer Date: Mon, 3 Jul 2023 17:09:22 +0300 Message-Id: <20230703140923.2840-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,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 The kernel already has a helper to print a hexdump of a small buffer via pointer extension. Use that instead of open coded variant. In long term it helps to kill pr_cont() or at least narrow down its use. Signed-off-by: Andy Shevchenko --- v2: split another change to a separate patch (Lee) drivers/mfd/ipaq-micro.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/mfd/ipaq-micro.c b/drivers/mfd/ipaq-micro.c index 6d3968458e81..cddfd2e808f2 100644 --- a/drivers/mfd/ipaq-micro.c +++ b/drivers/mfd/ipaq-micro.c @@ -131,10 +131,7 @@ 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); } spin_unlock(µ->lock); } -- 2.40.0.1.gaa8946217a0b