* [PATCH 2/2] mfd: ab8500-debugfs: remove unused function
@ 2016-09-24 5:36 ` Baoyou Xie
0 siblings, 0 replies; 6+ messages in thread
From: Baoyou Xie @ 2016-09-24 5:36 UTC (permalink / raw)
To: linus.walleij, lee.jones
Cc: linux-arm-kernel, linux-kernel, arnd, baoyou.xie, xie.baoyou
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 <baoyou.xie@linaro.org>
---
drivers/mfd/ab8500-debugfs.c | 54 --------------------------------------------
1 file changed, 54 deletions(-)
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;
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] mfd: ab8500-debugfs: remove unused function
@ 2016-09-24 5:36 ` Baoyou Xie
0 siblings, 0 replies; 6+ messages in thread
From: Baoyou Xie @ 2016-09-24 5:36 UTC (permalink / raw)
To: linux-arm-kernel
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 <baoyou.xie@linaro.org>
---
drivers/mfd/ab8500-debugfs.c | 54 --------------------------------------------
1 file changed, 54 deletions(-)
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;
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] mfd: ab8500-debugfs: remove unused function
2016-09-24 5:36 ` Baoyou Xie
@ 2016-10-04 12:14 ` Linus Walleij
-1 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2016-10-04 12:14 UTC (permalink / raw)
To: Baoyou Xie
Cc: Lee Jones, linux-arm-kernel, linux-kernel, Arnd Bergmann, xie.baoyou
On Sat, Sep 24, 2016 at 7:36 AM, Baoyou Xie <baoyou.xie@linaro.org> wrote:
> 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 <baoyou.xie@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] mfd: ab8500-debugfs: remove unused function
@ 2016-10-04 12:14 ` Linus Walleij
0 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2016-10-04 12:14 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Sep 24, 2016 at 7:36 AM, Baoyou Xie <baoyou.xie@linaro.org> wrote:
> 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 <baoyou.xie@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] mfd: ab8500-debugfs: remove unused function
2016-09-24 5:36 ` Baoyou Xie
@ 2016-10-04 14:39 ` Lee Jones
-1 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2016-10-04 14:39 UTC (permalink / raw)
To: Baoyou Xie
Cc: linus.walleij, linux-arm-kernel, linux-kernel, arnd, xie.baoyou
On Sat, 24 Sep 2016, Baoyou Xie wrote:
> 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 <baoyou.xie@linaro.org>
> ---
> drivers/mfd/ab8500-debugfs.c | 54 --------------------------------------------
> 1 file changed, 54 deletions(-)
This is already in -next:
e310960300e78764f59a4b044205b02a5c59381a
> 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;
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] mfd: ab8500-debugfs: remove unused function
@ 2016-10-04 14:39 ` Lee Jones
0 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2016-10-04 14:39 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, 24 Sep 2016, Baoyou Xie wrote:
> 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 <baoyou.xie@linaro.org>
> ---
> drivers/mfd/ab8500-debugfs.c | 54 --------------------------------------------
> 1 file changed, 54 deletions(-)
This is already in -next:
e310960300e78764f59a4b044205b02a5c59381a
> 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;
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-10-04 14:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-24 5:36 [PATCH 2/2] mfd: ab8500-debugfs: remove unused function Baoyou Xie
2016-09-24 5:36 ` Baoyou Xie
2016-10-04 12:14 ` Linus Walleij
2016-10-04 12:14 ` Linus Walleij
2016-10-04 14:39 ` Lee Jones
2016-10-04 14:39 ` Lee Jones
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.