From patchwork Tue Feb 13 17:52:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Cardace X-Patchwork-Id: 873082 X-Patchwork-Delegate: boris.brezillon@free-electrons.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="DVUDe/lA"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="OnPwXx6c"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zgqrv2LCSz9rxj for ; Wed, 14 Feb 2018 04:53:19 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=ndcHG77pq0FeACXONjhjGhqmQrzonI5K+sVwvEmXsX0=; b=DVU De/lAtYae7rNkdyU1FBCyAsesZv8iLeYeSWvL+Y6oB8F5ozGzyIYjj78pNyWXLCps5WZYd3IEkPkQ a5VobREQ+hy1aA8YOygq32IcsbbTTwsKKuALxBU8/7JTPfqT54wWB9d4hOjBi00NmlbmDOYUaNG0/ 2rcK4L9bQ1qvASP7ZUvEkiMXm8EJwwJ4IIF27+9sX797iVfscyJQQANZKLbHe7iWMusc2Qzy32JwX c6wWrFvsHwZJX3T1mEhyfNJt9X6WIfMeYSLB0nWUAfQqJQe2VZSdSnigaeOJ6y9no2xM7NeyH2pfh 7r9Lucf4hQH7XvqvCpYe4BaDef0TP9w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1elelW-0002SL-UA; Tue, 13 Feb 2018 17:53:14 +0000 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1elelT-0002On-Rb for linux-mtd@lists.infradead.org; Tue, 13 Feb 2018 17:53:13 +0000 Received: by mail-pg0-x241.google.com with SMTP id g12so378063pgs.0 for ; Tue, 13 Feb 2018 09:53:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=edCaKDcALRWaWCzh2O7XL86M9+YuDM5DS2TWSfbrBIs=; b=OnPwXx6cgWmrG3FvYpef1iwy4Naw6zTbiiCrrTmXVdSZWZnFJVI9CqS8GtOfMizd2Q C393cEaj9iC2Hy9oebaHV+krTqnZSyf1sTKM9n/gGVTwkKZej8z+Y0B8DHxEK59zd+PL fivgyyXnXebOM1o7L6wzzrCloSiMlhEKEJV0eTePbrr5+s1i7D+1sB1x1I+bP2+FfN4C mK8ovJdOBQs70UbXYWVcdUjuopk6nb54hcl4KbJJSQjONG/KsMmFse311JSXsCnVech8 ZYqUPLFFydKduJBGBZPq1E6sml87DXlCseWu0F1XNCAnw1x6gjVs1JJ2P4kqwTXjXaht YujQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=edCaKDcALRWaWCzh2O7XL86M9+YuDM5DS2TWSfbrBIs=; b=HQSN65jcyywNVnrTkv9saIboGpIKMeA1LF/sPvbYSRFHqEGFEFB0Fy2Hq2Yv7I2InS tEYRGl3Kb/7olMe7WTBAfs+aA1ci1mcTo4KNjrX20ZGmnWsxR/M7aVhg1HJUtWbJMBeC s8Siq6pa8lmp0c34z9t7LNHBWp0NqZHORY0iPUKB5D657U5W/3V3CUCN6KnQWzTBMIX4 pyI7DVVcv4oLAeL+BwUmGUjxXoqrpDpmWWZabIcghHJjQ1Cj5dDeYvrWzmIWudaG1+pr fF9IL+XJAMPuPv/t2cGbXi65s8Ks5yxYYrdTiB8v+PsC18aKLOBJ2ghfHqGBBxqxVIuj eJUw== X-Gm-Message-State: APf1xPAmFagK9OGf1ydAtYEsgac7wD9JoYBQmYxdK+rwNW2kr2kR7CPK yjLFeouYoCtgW6WKFUaSX4s= X-Google-Smtp-Source: AH8x226CncCZ4xiZhk2kIlU9Zq2aDxdksyg0CQqlhyLv/E3MUHJUFwWdQDAb2joSa6XcUFymjZ7QpQ== X-Received: by 10.101.82.130 with SMTP id y2mr1625260pgp.68.1518544381053; Tue, 13 Feb 2018 09:53:01 -0800 (PST) Received: from acardace-dev.corp.roku ([81.145.207.254]) by smtp.gmail.com with ESMTPSA id b68sm22038941pfg.18.2018.02.13.09.52.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Feb 2018 09:53:00 -0800 (PST) From: Antonio Cardace To: boris.brezillon@free-electrons.com Subject: [PATCH] mtd: nftl: use %*ph to print small buffer Date: Tue, 13 Feb 2018 17:52:45 +0000 Message-Id: <20180213175245.17703-1-anto.cardace@gmail.com> X-Mailer: git-send-email 2.15.1.354.g95ec6b1b3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180213_095311_908973_797A7903 X-CRM114-Status: UNSURE ( 9.30 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:400e:c05:0:0:0:241 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (anto.cardace[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Antonio Cardace , andriy.shevchenko@linux.intel.com, linux-mtd@lists.infradead.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Use %*ph format to print small buffer as hex string. Suggested-by: Andy Shevchenko Signed-off-by: Antonio Cardace --- What about this one? drivers/mtd/nftlmount.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/nftlmount.c b/drivers/mtd/nftlmount.c index 184c8fbfe465..a8bdc1455b50 100644 --- a/drivers/mtd/nftlmount.c +++ b/drivers/mtd/nftlmount.c @@ -122,8 +122,7 @@ static int find_boot_record(struct NFTLrecord *nftl) if (memcmp(buf, "ANAND", 6)) { printk(KERN_NOTICE "ANAND header found at 0x%x in mtd%d, but went away on reread!\n", block * nftl->EraseSize, nftl->mbd.mtd->index); - printk(KERN_NOTICE "New data are: %02x %02x %02x %02x %02x %02x\n", - buf[0], buf[1], buf[2], buf[3], buf[4], buf[5]); + printk(KERN_NOTICE "New data are: %6ph\n", buf); continue; } #endif