From patchwork Mon Dec 28 20:02:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 352898 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=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT 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 2F823C433DB for ; Mon, 28 Dec 2020 23:14:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 07039222F9 for ; Mon, 28 Dec 2020 23:14:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730581AbgL1Wzu (ORCPT ); Mon, 28 Dec 2020 17:55:50 -0500 Received: from mga05.intel.com ([192.55.52.43]:7113 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729361AbgL1UDx (ORCPT ); Mon, 28 Dec 2020 15:03:53 -0500 IronPort-SDR: mbyKSObUvD2cZxXtsnfQbPQpQoas7vHTem83PpyamkezLT3NddOjVxThndanQyESLoVF15xjLt ju6qWtAUq+bg== X-IronPort-AV: E=McAfee;i="6000,8403,9848"; a="261169971" X-IronPort-AV: E=Sophos;i="5.78,456,1599548400"; d="scan'208";a="261169971" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2020 12:02:07 -0800 IronPort-SDR: nfUHiCb070WzvU8nzZevkzJVy6YgeSU/87xHyXxck+g3DMW5/OTWyXGOPh1j63YVNq5K2NXmkr iVW+iXw7aWYQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,456,1599548400"; d="scan'208";a="418917991" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga001.jf.intel.com with ESMTP; 28 Dec 2020 12:02:05 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 56AFDDE; Mon, 28 Dec 2020 22:02:04 +0200 (EET) From: Andy Shevchenko To: Felipe Balbi , linux-usb@vger.kernel.org, Greg Kroah-Hartman Cc: Andy Shevchenko Subject: [PATCH v1] usb: gadget: u_serial: use %*ph to print small buffer Date: Mon, 28 Dec 2020 22:02:03 +0200 Message-Id: <20201228200203.58525-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Use %*ph format to print small buffer as hex string. Signed-off-by: Andy Shevchenko --- drivers/usb/gadget/function/u_serial.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/gadget/function/u_serial.c b/drivers/usb/gadget/function/u_serial.c index 2caccbb6e014..768f883f486c 100644 --- a/drivers/usb/gadget/function/u_serial.c +++ b/drivers/usb/gadget/function/u_serial.c @@ -258,9 +258,7 @@ __acquires(&port->port_lock) list_del(&req->list); req->zero = kfifo_is_empty(&port->port_write_buf); - pr_vdebug("ttyGS%d: tx len=%d, 0x%02x 0x%02x 0x%02x ...\n", - port->port_num, len, *((u8 *)req->buf), - *((u8 *)req->buf+1), *((u8 *)req->buf+2)); + pr_vdebug("ttyGS%d: tx len=%d, %3ph ...\n", port->port_num, len, req->buf); /* Drop lock while we call out of driver; completions * could be issued while we do so. Disconnection may