From patchwork Fri Feb 15 12:56:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 14892 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 1457D23E01 for ; Fri, 15 Feb 2013 12:57:37 +0000 (UTC) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by fiordland.canonical.com (Postfix) with ESMTP id AF5DCA18025 for ; Fri, 15 Feb 2013 12:57:36 +0000 (UTC) Received: by mail-ve0-f177.google.com with SMTP id m1so2957336ves.8 for ; Fri, 15 Feb 2013 04:57:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=JeEcf2fNNAjpgMBvVbbasfKQHpdGBAF/eU3Pc3yPa4Y=; b=J+20qcfAc4PrEHM5+W1c6p6WmZagoyyigJUzRwZ/XHThuywj5dtby8/btONk/8yKZn bzgZeG4IHkqY2jNta1oTYSEon+9s/E1McHWjMcGfSRB4fM3pHOlzcxh6UrjTGFRl+Sbi dwHkLfTH3JWOkeWOWeiwlAHLadYjnunlI25ztb4kWvrCvg0hEuCH6AXmusx9psG7O7pJ nyN3d9jtfo+SGavL2Wzrz11KR2t+ZphjiU+mJeLa5CPJvI5hpWDZhNyXGS+TtIh+pTUG +gu8uuFBu6+PvE1xRy+yXI2SzH+/6tj+UK0zcI6gwe/w5UeG0aO3WAj7MsLaqjSwNQDz KtnA== X-Received: by 10.220.153.143 with SMTP id k15mr2917319vcw.33.1360933056077; Fri, 15 Feb 2013 04:57:36 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.221.4.5 with SMTP id oa5csp11368vcb; Fri, 15 Feb 2013 04:57:35 -0800 (PST) X-Received: by 10.194.23.37 with SMTP id j5mr4030179wjf.28.1360933055234; Fri, 15 Feb 2013 04:57:35 -0800 (PST) Received: from mail-we0-x236.google.com ([2a00:1450:400c:c03::236]) by mx.google.com with ESMTPS id ba10si1049685wib.62.2013.02.15.04.57.34 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Feb 2013 04:57:35 -0800 (PST) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::236 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c03::236; Authentication-Results: mx.google.com; spf=neutral (google.com: 2a00:1450:400c:c03::236 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-we0-f182.google.com with SMTP id t57so2898089wey.13 for ; Fri, 15 Feb 2013 04:57:34 -0800 (PST) X-Received: by 10.194.158.100 with SMTP id wt4mr4001640wjb.37.1360933054387; Fri, 15 Feb 2013 04:57:34 -0800 (PST) Received: from localhost.localdomain (cpc34-aztw25-2-0-cust250.18-1.cable.virginmedia.com. [86.16.136.251]) by mx.google.com with ESMTPS id j4sm2852410wiz.10.2013.02.15.04.57.32 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Feb 2013 04:57:33 -0800 (PST) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, sameo@linux.intel.com Cc: arnd@arndb.de, linus.walleij@stericsson.com, Mattias Wallin , Lee Jones Subject: [PATCH 07/35] mfd: ab8500-debug: Print banks in hex Date: Fri, 15 Feb 2013 12:56:38 +0000 Message-Id: <1360933026-30325-8-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1360933026-30325-1-git-send-email-lee.jones@linaro.org> References: <1360933026-30325-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQl1UGT+dXRADmMj9FI3yULeJ0C1piCgihhrUpfADUC4f2OUIh/RTXlb3CttDSNNGEdVmXlB From: Mattias Wallin This patch changes bank prints to use hex value. Signed-off-by: Mattias Wallin Signed-off-by: Lee Jones Reviewed-by: Marcus COOPER Reviewed-by: Daniel WILLERUD Tested-by: Jonas ABERG --- drivers/mfd/ab8500-debugfs.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/mfd/ab8500-debugfs.c b/drivers/mfd/ab8500-debugfs.c index 8078a93..18ff86b 100644 --- a/drivers/mfd/ab8500-debugfs.c +++ b/drivers/mfd/ab8500-debugfs.c @@ -524,19 +524,19 @@ static int ab8500_registers_print(struct device *dev, u32 bank, } if (s) { - err = seq_printf(s, " [%u/0x%02X]: 0x%02X\n", + err = seq_printf(s, " [0x%02X/0x%02X]: 0x%02X\n", bank, reg, value); if (err < 0) { dev_err(dev, - "seq_printf overflow bank=%d reg=%d\n", + "seq_printf overflow bank=0x%02X reg=0x%02X\n", bank, reg); /* Error is not returned here since * the output is wanted in any case */ return 0; } } else { - printk(KERN_INFO" [%u/0x%02X]: 0x%02X\n", bank, - reg, value); + printk(KERN_INFO" [0x%02X/0x%02X]: 0x%02X\n", + bank, reg, value); } } } @@ -550,7 +550,7 @@ static int ab8500_print_bank_registers(struct seq_file *s, void *p) seq_printf(s, AB8500_NAME_STRING " register values:\n"); - seq_printf(s, " bank %u:\n", bank); + seq_printf(s, " bank 0x%02X:\n", bank); ab8500_registers_print(dev, bank, s); return 0; @@ -578,9 +578,9 @@ static int ab8500_print_all_banks(struct seq_file *s, void *p) seq_printf(s, AB8500_NAME_STRING " register values:\n"); for (i = 1; i < AB8500_NUM_BANKS; i++) { - err = seq_printf(s, " bank %u:\n", i); + err = seq_printf(s, " bank 0x%02X:\n", i); if (err < 0) - dev_err(dev, "seq_printf overflow, bank=%d\n", i); + dev_err(dev, "seq_printf overflow, bank=0x%02X\n", i); ab8500_registers_print(dev, i, s); } @@ -595,7 +595,7 @@ void ab8500_dump_all_banks(struct device *dev) printk(KERN_INFO"ab8500 register values:\n"); for (i = 1; i < AB8500_NUM_BANKS; i++) { - printk(KERN_INFO" bank %u:\n", i); + printk(KERN_INFO" bank 0x%02X:\n", i); ab8500_registers_print(dev, i, NULL); } } @@ -629,7 +629,7 @@ static const struct file_operations ab8500_all_banks_fops = { static int ab8500_bank_print(struct seq_file *s, void *p) { - return seq_printf(s, "%d\n", debug_bank); + return seq_printf(s, "0x%02X\n", debug_bank); } static int ab8500_bank_open(struct inode *inode, struct file *file)