linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: abx500-core: Remove unused function abx500_dump_all_banks()
@ 2014-05-22  9:18 Lee Jones
  2014-05-22  9:18 ` [PATCH] mfd: axp20x: Remove unnecessary const qualifier from axp20x_supplies[] Lee Jones
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Lee Jones @ 2014-05-22  9:18 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel; +Cc: Lee Jones, Linus Walleij

abx500_dump_all_banks() has no callers in the kernel, so it's probably
safe to remove it.

Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/mfd/abx500-core.c | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/drivers/mfd/abx500-core.c b/drivers/mfd/abx500-core.c
index d6d0ec4..fe41899 100644
--- a/drivers/mfd/abx500-core.c
+++ b/drivers/mfd/abx500-core.c
@@ -151,26 +151,6 @@ int abx500_startup_irq_enabled(struct device *dev, unsigned int irq)
 }
 EXPORT_SYMBOL(abx500_startup_irq_enabled);
 
-int abx500_dump_all_banks(void)
-{
-	struct abx500_ops *ops;
-	struct device *dummy_child;
-	struct abx500_device_entry *dev_entry;
-
-	dummy_child = kzalloc(sizeof(struct device), GFP_KERNEL);
-	if (!dummy_child)
-		return -ENOMEM;
-	list_for_each_entry(dev_entry, &abx500_list, list) {
-		dummy_child->parent = dev_entry->dev;
-		ops = &dev_entry->ops;
-
-		if ((ops != NULL) && (ops->dump_all_banks != NULL))
-			ops->dump_all_banks(dummy_child);
-	}
-	kfree(dummy_child);
-}
-EXPORT_SYMBOL(abx500_dump_all_banks);
-
 MODULE_AUTHOR("Mattias Wallin <mattias.wallin@stericsson.com>");
 MODULE_DESCRIPTION("ABX500 core driver");
 MODULE_LICENSE("GPL");
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH] mfd: axp20x: Remove unnecessary const qualifier from axp20x_supplies[]
  2014-05-22  9:18 [PATCH] mfd: abx500-core: Remove unused function abx500_dump_all_banks() Lee Jones
@ 2014-05-22  9:18 ` Lee Jones
  2014-05-22 15:59   ` Joe Perches
  2014-05-22  9:18 ` [PATCH] mfd: max14577: Cast to architecture agnostic data type Lee Jones
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: Lee Jones @ 2014-05-22  9:18 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel; +Cc: Lee Jones

drivers/mfd/axp20x.c:159:3:
  warning: initialization discards ‘const’ qualifier from pointer target type
   .parent_supplies = axp20x_supplies,
   ^
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/mfd/axp20x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
index dee6539..5734f8c 100644
--- a/drivers/mfd/axp20x.c
+++ b/drivers/mfd/axp20x.c
@@ -140,7 +140,7 @@ static const struct regmap_irq_chip axp20x_regmap_irq_chip = {
 	.init_ack_masked	= true,
 };
 
-static const char * const axp20x_supplies[] = {
+static const char * axp20x_supplies[] = {
 	"acin",
 	"vin2",
 	"vin3",
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH] mfd: max14577: Cast to architecture agnostic data type
  2014-05-22  9:18 [PATCH] mfd: abx500-core: Remove unused function abx500_dump_all_banks() Lee Jones
  2014-05-22  9:18 ` [PATCH] mfd: axp20x: Remove unnecessary const qualifier from axp20x_supplies[] Lee Jones
@ 2014-05-22  9:18 ` Lee Jones
  2014-05-22 10:36 ` [PATCH] mfd: abx500-core: Remove unused function abx500_dump_all_banks() Jay Aurabind
  2014-05-22 11:30 ` [PATCH v2] " Lee Jones
  3 siblings, 0 replies; 11+ messages in thread
From: Lee Jones @ 2014-05-22  9:18 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel; +Cc: Lee Jones

drivers/mfd/max14577.c:334:25:
  warning: cast from pointer to integer of different size
    max14577->dev_type = (unsigned int)of_id->data;
                         ^
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/mfd/max14577.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/max14577.c b/drivers/mfd/max14577.c
index 36de88d..4a5e885 100644
--- a/drivers/mfd/max14577.c
+++ b/drivers/mfd/max14577.c
@@ -331,7 +331,8 @@ static int max14577_i2c_probe(struct i2c_client *i2c,
 
 		of_id = of_match_device(max14577_dt_match, &i2c->dev);
 		if (of_id)
-			max14577->dev_type = (unsigned int)of_id->data;
+			max14577->dev_type =
+				(enum maxim_device_type)of_id->data;
 	} else {
 		max14577->dev_type = id->driver_data;
 	}
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] mfd: abx500-core: Remove unused function abx500_dump_all_banks()
  2014-05-22  9:18 [PATCH] mfd: abx500-core: Remove unused function abx500_dump_all_banks() Lee Jones
  2014-05-22  9:18 ` [PATCH] mfd: axp20x: Remove unnecessary const qualifier from axp20x_supplies[] Lee Jones
  2014-05-22  9:18 ` [PATCH] mfd: max14577: Cast to architecture agnostic data type Lee Jones
@ 2014-05-22 10:36 ` Jay Aurabind
  2014-05-22 10:51   ` Lee Jones
  2014-05-22 11:30 ` [PATCH v2] " Lee Jones
  3 siblings, 1 reply; 11+ messages in thread
From: Jay Aurabind @ 2014-05-22 10:36 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-arm-kernel, linux-kernel, Linus Walleij

On 05/22/2014 02:48 PM, Lee Jones wrote:
> abx500_dump_all_banks() has no callers in the kernel, so it's probably
> safe to remove it.
> 
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/mfd/abx500-core.c | 20 --------------------
>  1 file changed, 20 deletions(-)
> 
> diff --git a/drivers/mfd/abx500-core.c b/drivers/mfd/abx500-core.c
> index d6d0ec4..fe41899 100644
> --- a/drivers/mfd/abx500-core.c
> +++ b/drivers/mfd/abx500-core.c
> @@ -151,26 +151,6 @@ int abx500_startup_irq_enabled(struct device *dev, unsigned int irq)
>  }
>  EXPORT_SYMBOL(abx500_startup_irq_enabled);
>  
> -int abx500_dump_all_banks(void)
> -{
> -	struct abx500_ops *ops;
> -	struct device *dummy_child;
> -	struct abx500_device_entry *dev_entry;
> -
> -	dummy_child = kzalloc(sizeof(struct device), GFP_KERNEL);
> -	if (!dummy_child)
> -		return -ENOMEM;
> -	list_for_each_entry(dev_entry, &abx500_list, list) {
> -		dummy_child->parent = dev_entry->dev;
> -		ops = &dev_entry->ops;
> -
> -		if ((ops != NULL) && (ops->dump_all_banks != NULL))
> -			ops->dump_all_banks(dummy_child);
> -	}
> -	kfree(dummy_child);
> -}
> -EXPORT_SYMBOL(abx500_dump_all_banks);
> -
>  MODULE_AUTHOR("Mattias Wallin <mattias.wallin@stericsson.com>");
>  MODULE_DESCRIPTION("ABX500 core driver");
>  MODULE_LICENSE("GPL");
> 
Sorry for top posting previously, I was using gmail web interface. Looks
like you forgot to remove this function's declaration from
include/linux/mfd/abx500.h

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] mfd: abx500-core: Remove unused function abx500_dump_all_banks()
  2014-05-22 10:36 ` [PATCH] mfd: abx500-core: Remove unused function abx500_dump_all_banks() Jay Aurabind
@ 2014-05-22 10:51   ` Lee Jones
  0 siblings, 0 replies; 11+ messages in thread
From: Lee Jones @ 2014-05-22 10:51 UTC (permalink / raw)
  To: Jay Aurabind; +Cc: linux-arm-kernel, linux-kernel, Linus Walleij

> > abx500_dump_all_banks() has no callers in the kernel, so it's probably
> > safe to remove it.
> > 
> > Cc: Linus Walleij <linus.walleij@linaro.org>
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> >  drivers/mfd/abx500-core.c | 20 --------------------
> >  1 file changed, 20 deletions(-)
> > 
> > diff --git a/drivers/mfd/abx500-core.c b/drivers/mfd/abx500-core.c
> > index d6d0ec4..fe41899 100644
> > --- a/drivers/mfd/abx500-core.c
> > +++ b/drivers/mfd/abx500-core.c
> > @@ -151,26 +151,6 @@ int abx500_startup_irq_enabled(struct device *dev, unsigned int irq)
> >  }
> >  EXPORT_SYMBOL(abx500_startup_irq_enabled);
> >  
> > -int abx500_dump_all_banks(void)
> > -{
> > -	struct abx500_ops *ops;
> > -	struct device *dummy_child;
> > -	struct abx500_device_entry *dev_entry;
> > -
> > -	dummy_child = kzalloc(sizeof(struct device), GFP_KERNEL);
> > -	if (!dummy_child)
> > -		return -ENOMEM;
> > -	list_for_each_entry(dev_entry, &abx500_list, list) {
> > -		dummy_child->parent = dev_entry->dev;
> > -		ops = &dev_entry->ops;
> > -
> > -		if ((ops != NULL) && (ops->dump_all_banks != NULL))
> > -			ops->dump_all_banks(dummy_child);
> > -	}
> > -	kfree(dummy_child);
> > -}
> > -EXPORT_SYMBOL(abx500_dump_all_banks);
> > -
> >  MODULE_AUTHOR("Mattias Wallin <mattias.wallin@stericsson.com>");
> >  MODULE_DESCRIPTION("ABX500 core driver");
> >  MODULE_LICENSE("GPL");
> > 
> Sorry for top posting previously, I was using gmail web interface. Looks
> like you forgot to remove this function's declaration from
> include/linux/mfd/abx500.h

You're right, good spot.

Will fix.

-- 
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] 11+ messages in thread

* [PATCH v2] mfd: abx500-core: Remove unused function abx500_dump_all_banks()
  2014-05-22  9:18 [PATCH] mfd: abx500-core: Remove unused function abx500_dump_all_banks() Lee Jones
                   ` (2 preceding siblings ...)
  2014-05-22 10:36 ` [PATCH] mfd: abx500-core: Remove unused function abx500_dump_all_banks() Jay Aurabind
@ 2014-05-22 11:30 ` Lee Jones
  2014-05-22 22:27   ` Linus Walleij
  3 siblings, 1 reply; 11+ messages in thread
From: Lee Jones @ 2014-05-22 11:30 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel; +Cc: Linus Walleij, Jay Aurabind

abx500_dump_all_banks() has no callers in the kernel, so it's probably
safe to remove it.
    
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

diff --git a/drivers/mfd/abx500-core.c b/drivers/mfd/abx500-core.c
index d6d0ec4..fe41899 100644
--- a/drivers/mfd/abx500-core.c
+++ b/drivers/mfd/abx500-core.c
@@ -151,26 +151,6 @@ int abx500_startup_irq_enabled(struct device *dev, unsigned int irq)
 }
 EXPORT_SYMBOL(abx500_startup_irq_enabled);
 
-int abx500_dump_all_banks(void)
-{
-	struct abx500_ops *ops;
-	struct device *dummy_child;
-	struct abx500_device_entry *dev_entry;
-
-	dummy_child = kzalloc(sizeof(struct device), GFP_KERNEL);
-	if (!dummy_child)
-		return -ENOMEM;
-	list_for_each_entry(dev_entry, &abx500_list, list) {
-		dummy_child->parent = dev_entry->dev;
-		ops = &dev_entry->ops;
-
-		if ((ops != NULL) && (ops->dump_all_banks != NULL))
-			ops->dump_all_banks(dummy_child);
-	}
-	kfree(dummy_child);
-}
-EXPORT_SYMBOL(abx500_dump_all_banks);
-
 MODULE_AUTHOR("Mattias Wallin <mattias.wallin@stericsson.com>");
 MODULE_DESCRIPTION("ABX500 core driver");
 MODULE_LICENSE("GPL");
diff --git a/include/linux/mfd/abx500.h b/include/linux/mfd/abx500.h
index df2508f..552cc1d 100644
--- a/include/linux/mfd/abx500.h
+++ b/include/linux/mfd/abx500.h
@@ -330,7 +330,6 @@ int abx500_mask_and_set_register_interruptible(struct device *dev, u8 bank,
 int abx500_get_chip_id(struct device *dev);
 int abx500_event_registers_startup_state_get(struct device *dev, u8 *event);
 int abx500_startup_irq_enabled(struct device *dev, unsigned int irq);
-int abx500_dump_all_banks(void);
 
 struct abx500_ops {
 	int (*get_chip_id) (struct device *);

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] mfd: axp20x: Remove unnecessary const qualifier from axp20x_supplies[]
  2014-05-22  9:18 ` [PATCH] mfd: axp20x: Remove unnecessary const qualifier from axp20x_supplies[] Lee Jones
@ 2014-05-22 15:59   ` Joe Perches
  2014-05-22 16:08     ` Lee Jones
  0 siblings, 1 reply; 11+ messages in thread
From: Joe Perches @ 2014-05-22 15:59 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-arm-kernel, linux-kernel

On Thu, 2014-05-22 at 10:18 +0100, Lee Jones wrote:
> drivers/mfd/axp20x.c:159:3:
>   warning: initialization discards ‘const’ qualifier from pointer target type
>    .parent_supplies = axp20x_supplies,
[]
> diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
[]
> @@ -140,7 +140,7 @@ static const struct regmap_irq_chip axp20x_regmap_irq_chip = {
>  	.init_ack_masked	= true,
>  };
>  
> -static const char * const axp20x_supplies[] = {
> +static const char * axp20x_supplies[] = {
>  	"acin",
>  	"vin2",
>  	"vin3",

Perhaps you're doing this the wrong way round.
Maybe this definition should change.

include/linux/mfd/core.h:       const char              **parent_supplies;



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] mfd: axp20x: Remove unnecessary const qualifier from axp20x_supplies[]
  2014-05-22 15:59   ` Joe Perches
@ 2014-05-22 16:08     ` Lee Jones
  2014-05-22 16:45       ` Joe Perches
  0 siblings, 1 reply; 11+ messages in thread
From: Lee Jones @ 2014-05-22 16:08 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-arm-kernel, linux-kernel

> > drivers/mfd/axp20x.c:159:3:
> >   warning: initialization discards ‘const’ qualifier from pointer target type
> >    .parent_supplies = axp20x_supplies,
> []
> > diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
> []
> > @@ -140,7 +140,7 @@ static const struct regmap_irq_chip axp20x_regmap_irq_chip = {
> >  	.init_ack_masked	= true,
> >  };
> >  
> > -static const char * const axp20x_supplies[] = {
> > +static const char * axp20x_supplies[] = {
> >  	"acin",
> >  	"vin2",
> >  	"vin3",
> 
> Perhaps you're doing this the wrong way round.
> Maybe this definition should change.
> 
> include/linux/mfd/core.h:       const char              **parent_supplies;

Are you asking me, or telling me? :)

To be frank, I've never known what the double const means.  Care to
enlighten?

-- 
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] 11+ messages in thread

* Re: [PATCH] mfd: axp20x: Remove unnecessary const qualifier from axp20x_supplies[]
  2014-05-22 16:08     ` Lee Jones
@ 2014-05-22 16:45       ` Joe Perches
  2014-05-23 11:43         ` Lee Jones
  0 siblings, 1 reply; 11+ messages in thread
From: Joe Perches @ 2014-05-22 16:45 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-arm-kernel, linux-kernel

On Thu, 2014-05-22 at 17:08 +0100, Lee Jones wrote:
> To be frank, I've never known what the double const means.  Care to
> enlighten?

There's a nice table here:

http://stackoverflow.com/questions/14562845/why-does-passing-char-as-const-char-generate-a-warning



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] mfd: abx500-core: Remove unused function abx500_dump_all_banks()
  2014-05-22 11:30 ` [PATCH v2] " Lee Jones
@ 2014-05-22 22:27   ` Linus Walleij
  0 siblings, 0 replies; 11+ messages in thread
From: Linus Walleij @ 2014-05-22 22:27 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-arm-kernel, linux-kernel, Jay Aurabind

On Thu, May 22, 2014 at 1:30 PM, Lee Jones <lee.jones@linaro.org> wrote:

> abx500_dump_all_banks() has no callers in the kernel, so it's probably
> safe to remove it.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] mfd: axp20x: Remove unnecessary const qualifier from axp20x_supplies[]
  2014-05-22 16:45       ` Joe Perches
@ 2014-05-23 11:43         ` Lee Jones
  0 siblings, 0 replies; 11+ messages in thread
From: Lee Jones @ 2014-05-23 11:43 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-arm-kernel, linux-kernel

> > To be frank, I've never known what the double const means.  Care to
> > enlighten?
> 
> There's a nice table here:
> 
> http://stackoverflow.com/questions/14562845/why-does-passing-char-as-const-char-generate-a-warning

Okay, I get it. I think you're right, I'll make the change and see
what else breaks and try to fix that too.

-- 
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] 11+ messages in thread

end of thread, other threads:[~2014-05-23 11:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-22  9:18 [PATCH] mfd: abx500-core: Remove unused function abx500_dump_all_banks() Lee Jones
2014-05-22  9:18 ` [PATCH] mfd: axp20x: Remove unnecessary const qualifier from axp20x_supplies[] Lee Jones
2014-05-22 15:59   ` Joe Perches
2014-05-22 16:08     ` Lee Jones
2014-05-22 16:45       ` Joe Perches
2014-05-23 11:43         ` Lee Jones
2014-05-22  9:18 ` [PATCH] mfd: max14577: Cast to architecture agnostic data type Lee Jones
2014-05-22 10:36 ` [PATCH] mfd: abx500-core: Remove unused function abx500_dump_all_banks() Jay Aurabind
2014-05-22 10:51   ` Lee Jones
2014-05-22 11:30 ` [PATCH v2] " Lee Jones
2014-05-22 22:27   ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).