From patchwork Sat Sep 24 05:36:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 76924 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp201733qgf; Fri, 23 Sep 2016 22:37:13 -0700 (PDT) X-Received: by 10.66.20.168 with SMTP id o8mr18832379pae.27.1474695432984; Fri, 23 Sep 2016 22:37:12 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o63si11630082pfi.291.2016.09.23.22.37.09; Fri, 23 Sep 2016 22:37:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965077AbcIXFhH (ORCPT + 27 others); Sat, 24 Sep 2016 01:37:07 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:35556 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758744AbcIXFhG (ORCPT ); Sat, 24 Sep 2016 01:37:06 -0400 Received: by mail-pa0-f48.google.com with SMTP id oz2so46294752pac.2 for ; Fri, 23 Sep 2016 22:37:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=u77sED1EkgbHENUBRgtLGg5EjalTCbfEUHY7CfIwTmY=; b=RGjnmYwHQX6yj0PPeOoNEk44KsAkk3+kces2TQUQyET3B9Q0n/lGEL16Sts+eC9AHK LnMjWqeo9ro5iHY8PnW/+pydeJdmfWYSezRKhwxmmaCJflPN2woQBIpgPKFYYO3FtOxE ug8tKRsxsKV2q0N8O0LJEiUiSsoiINPm1qOpE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=u77sED1EkgbHENUBRgtLGg5EjalTCbfEUHY7CfIwTmY=; b=WqSlnJrpWpSuAgo6aUbaCGWVaeUwYm8L+tXmniLRCX1XYNFG1tUJYPyKT76NiCmNmy dLj8c/11w1zn4sh0omv5wBK0/KaY/U2qwyjlOztX3cAANv5k7t77EBqz8lJE2BdolvLa B24bMw3ADV3gapV/EGBVlzPbBahIMoBQ4/mufomal93bWSyxp+XOLxuQ9lBfBnFfVG5O hOxYrVFw/MJH07XbkJh7lujQGlfsUrGNHujEc6KJetnvx8qIcdFqq9Yzw7fVWYtr7Ma6 uP8Wi3wQX+D/YZrHlABp5rd6//xVSyG6MfyZ+3RWHgeL3rRDa7tgXJ38N5uXqwqZYEGn 0G+w== X-Gm-Message-State: AE9vXwNcZb+bJ4tvd0oz7WA0wLeq79cIcwC/Bsu2KJNtbNVSeORDBGo8XExvqxRshzjnyLST X-Received: by 10.66.48.8 with SMTP id h8mr18835135pan.92.1474695425427; Fri, 23 Sep 2016 22:37:05 -0700 (PDT) Received: from localhost.localdomain ([45.56.152.27]) by smtp.gmail.com with ESMTPSA id m82sm15165404pfk.64.2016.09.23.22.37.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 23 Sep 2016 22:37:04 -0700 (PDT) From: Baoyou Xie To: linus.walleij@linaro.org, lee.jones@linaro.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, arnd@arndb.de, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn Subject: [PATCH 2/2] mfd: ab8500-debugfs: remove unused function Date: Sat, 24 Sep 2016 13:36:53 +0800 Message-Id: <1474695413-30460-1-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We get 1 warning when building kernel with W=1: drivers/mfd/ab8500-debugfs.c:1395:6: warning: no previous prototype for 'ab8500_dump_all_banks_to_mem' [-Wmissing-prototypes] In fact, this function is called by no one and not exported, so this patch removes it. Signed-off-by: Baoyou Xie --- drivers/mfd/ab8500-debugfs.c | 54 -------------------------------------------- 1 file changed, 54 deletions(-) -- 2.7.4 Acked-by: Linus Walleij diff --git a/drivers/mfd/ab8500-debugfs.c b/drivers/mfd/ab8500-debugfs.c index 0aecd7b..9f04a25 100644 --- a/drivers/mfd/ab8500-debugfs.c +++ b/drivers/mfd/ab8500-debugfs.c @@ -1382,60 +1382,6 @@ void ab8500_dump_all_banks(struct device *dev) } } -/* Space for 500 registers. */ -#define DUMP_MAX_REGS 700 -static struct ab8500_register_dump -{ - u8 bank; - u8 reg; - u8 value; -} ab8500_complete_register_dump[DUMP_MAX_REGS]; - -/* This shall only be called upon kernel panic! */ -void ab8500_dump_all_banks_to_mem(void) -{ - int i, r = 0; - u8 bank; - int err = 0; - - pr_info("Saving all ABB registers for crash analysis.\n"); - - for (bank = 0; bank < AB8500_NUM_BANKS; bank++) { - for (i = 0; i < debug_ranges[bank].num_ranges; i++) { - u8 reg; - - for (reg = debug_ranges[bank].range[i].first; - reg <= debug_ranges[bank].range[i].last; - reg++) { - u8 value; - - err = prcmu_abb_read(bank, reg, &value, 1); - - if (err < 0) - goto out; - - ab8500_complete_register_dump[r].bank = bank; - ab8500_complete_register_dump[r].reg = reg; - ab8500_complete_register_dump[r].value = value; - - r++; - - if (r >= DUMP_MAX_REGS) { - pr_err("%s: too many register to dump!\n", - __func__); - err = -EINVAL; - goto out; - } - } - } - } -out: - if (err >= 0) - pr_info("Saved all ABB registers.\n"); - else - pr_info("Failed to save all ABB registers.\n"); -} - static int ab8500_all_banks_open(struct inode *inode, struct file *file) { struct seq_file *s;