From patchwork Fri Sep 5 15:07:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 386390 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-ob0-x237.google.com (mail-ob0-x237.google.com [IPv6:2607:f8b0:4003:c01::237]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B902C1400F0 for ; Sat, 6 Sep 2014 01:08:02 +1000 (EST) Received: by mail-ob0-f183.google.com with SMTP id wp4sf2472491obc.0 for ; Fri, 05 Sep 2014 08:08:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=mime-version:from:to:cc:subject:date:message-id:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type; bh=GPbfZ/voX8gSme0NGJK1mbgfw+CumexT3GDJfcEAJFA=; b=jOv8Yc4WUzliLG4b81eTrVFP8zTKyQkN0e5PFPu1TFaHK6oNRrhT15RWZl/u2vN3Oz LKnrVDxYhRYg+VCC1MAwZGe8WB9cbPml8Poj1LN7+A46RXoUErjnZPIUWlhlcsjv/i3P SQeTGn3bx6EwOqdnU/zhC80gOCgsA906k0g6HW7s/RNO2Qt7Tso3FcRnBAS0eyWw7gXW 7IBTmtJmLz9eleItvdu2UMhiY4BsPy6CYU+uZ8PMRsJgMKSj7lhr6yyZxMOXA7jN6SF3 ijndFblU6GC2NS40LWQmd4Kkkn/R/3bPAZr2HCARv55oXYjEYIIZ9ddCVc1koFCpMCeJ HfmA== X-Received: by 10.182.126.37 with SMTP id mv5mr8055obb.33.1409929680232; Fri, 05 Sep 2014 08:08:00 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.182.45.138 with SMTP id n10ls361424obm.56.gmail; Fri, 05 Sep 2014 08:07:59 -0700 (PDT) X-Received: by 10.182.125.68 with SMTP id mo4mr5960667obb.49.1409929679500; Fri, 05 Sep 2014 08:07:59 -0700 (PDT) Received: from mga11.intel.com (mga11.intel.com. [192.55.52.93]) by gmr-mx.google.com with ESMTP id l9si336164pdn.0.2014.09.05.08.07.57 for ; Fri, 05 Sep 2014 08:07:57 -0700 (PDT) Received-SPF: none (google.com: andriy.shevchenko@linux.intel.com does not designate permitted sender hosts) client-ip=192.55.52.93; Received: from azsmga001.ch.intel.com ([10.2.17.19]) by fmsmga102.fm.intel.com with ESMTP; 05 Sep 2014 08:07:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,473,1406617200"; d="scan'208";a="475469780" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.168]) by azsmga001.ch.intel.com with ESMTP; 05 Sep 2014 08:07:50 -0700 Received: from andy by smile with local (Exim 4.84) (envelope-from ) id 1XPv77-0001Jz-Og; Fri, 05 Sep 2014 18:07:49 +0300 From: Andy Shevchenko To: Alessandro Zummo , rtc-linux@googlegroups.com Cc: Andy Shevchenko Subject: [rtc-linux] [PATCH] rtc: rtc-rs5c372: use %*ph to dump small buffers Date: Fri, 5 Sep 2014 18:07:49 +0300 Message-Id: <1409929669-5041-1-git-send-email-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.1.0 X-Original-Sender: andriy.shevchenko@linux.intel.com X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: andriy.shevchenko@linux.intel.com does not designate permitted sender hosts) smtp.mail=andriy.shevchenko@linux.intel.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Instead of pushing each byte let's reduce stack usage by using %*ph specifier. Signed-off-by: Andy Shevchenko --- drivers/rtc/rtc-rs5c372.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/rtc/rtc-rs5c372.c b/drivers/rtc/rtc-rs5c372.c index ccf54f0..28871cd 100644 --- a/drivers/rtc/rtc-rs5c372.c +++ b/drivers/rtc/rtc-rs5c372.c @@ -142,12 +142,11 @@ static int rs5c_get_regs(struct rs5c372 *rs5c) } dev_dbg(&client->dev, - "%02x %02x %02x (%02x) %02x %02x %02x (%02x), " - "%02x %02x %02x, %02x %02x %02x; %02x %02x\n", - rs5c->regs[0], rs5c->regs[1], rs5c->regs[2], rs5c->regs[3], - rs5c->regs[4], rs5c->regs[5], rs5c->regs[6], rs5c->regs[7], - rs5c->regs[8], rs5c->regs[9], rs5c->regs[10], rs5c->regs[11], - rs5c->regs[12], rs5c->regs[13], rs5c->regs[14], rs5c->regs[15]); + "%3ph (%02x) %3ph (%02x), %3ph, %3ph; %02x %02x\n", + rs5c->regs + 0, rs5c->regs[3], + rs5c->regs + 4, rs5c->regs[7], + rs5c->regs + 8, rs5c->regs + 11, + rs5c->regs[14], rs5c->regs[15]); return 0; }