linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: Fix MACRO for commonly declared MFD cell attributes
@ 2016-02-18 18:52 Rhyland Klein
  2016-02-19  8:50 ` Lee Jones
  0 siblings, 1 reply; 11+ messages in thread
From: Rhyland Klein @ 2016-02-18 18:52 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel, Rhyland Klein, Laxman Dewangan

MFD_ARRAY_SIZE() would not accurately return 0 if the passed
parameter was NULL. Fix this so that num_resources will
accurately be 0 in the case that _res is NULL.

cc: Lee Jones <lee.jones@linaro.org>
cc: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Rhyland Klein <rklein@nvidia.com>
---
 include/linux/mfd/core.h | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h
index 1a5a87f3cd38..62136ccff1df 100644
--- a/include/linux/mfd/core.h
+++ b/include/linux/mfd/core.h
@@ -18,11 +18,11 @@
 
 #define MFD_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
 
-#define MFD_CELL_ALL(_name, _res, _pdata, _id, _compat, _match)		\
+#define MFD_CELL_ALL(_name, _nres, _res, _pdata, _id, _compat, _match)	\
 	{								\
 		.name = (_name),					\
 		.resources = (_res),					\
-		.num_resources = MFD_ARRAY_SIZE((_res)),		\
+		.num_resources = (_nres),				\
 		.platform_data = (_pdata),				\
 		.pdata_size = MFD_ARRAY_SIZE((_pdata)), 		\
 		.of_compatible = (_compat),				\
@@ -31,16 +31,19 @@
 	}
 
 #define OF_MFD_CELL(_name, _res, _pdata, _id, _compat)			\
-		MFD_CELL_ALL(_name, _res, _pdata, _id, _compat, NULL)	\
+		MFD_CELL_ALL(_name, MFD_ARRAY_SIZE((_res)), _res,	\
+			_pdata, _id, _compat, NULL)			\
 
 #define ACPI_MFD_CELL(_name, _res, _pdata, _id, _match)			\
-		MFD_CELL_ALL(_name, _res, _pdata, _id, NULL, _match)	\
+		MFD_CELL_ALL(_name, MFD_ARRAY_SIZE((_res)), _res,	\
+			_pdata, _id, NULL, _match)			\
 
 #define MFD_CELL_BASIC(_name, _res, _pdata, _id)			\
-		MFD_CELL_ALL(_name, _res, _pdata, _id, NULL, NULL)	\
+		MFD_CELL_ALL(_name, MFD_ARRAY_SIZE((_res)), _res,	\
+				_pdata, _id, NULL, NULL)		\
 
 #define MFD_CELL_NAME(_name)						\
-		MFD_CELL_ALL(_name, NULL, NULL, 0, NULL, NULL)		\
+		MFD_CELL_ALL(_name, 0, NULL, NULL, 0, NULL, NULL)	\
 
 struct irq_domain;
 struct property_set;
-- 
1.9.1

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

* Re: [PATCH] mfd: Fix MACRO for commonly declared MFD cell attributes
  2016-02-18 18:52 [PATCH] mfd: Fix MACRO for commonly declared MFD cell attributes Rhyland Klein
@ 2016-02-19  8:50 ` Lee Jones
  2016-02-19 16:28   ` Rhyland Klein
  0 siblings, 1 reply; 11+ messages in thread
From: Lee Jones @ 2016-02-19  8:50 UTC (permalink / raw)
  To: Rhyland Klein; +Cc: linux-kernel, Laxman Dewangan

On Thu, 18 Feb 2016, Rhyland Klein wrote:

> MFD_ARRAY_SIZE() would not accurately return 0 if the passed
> parameter was NULL. Fix this so that num_resources will
> accurately be 0 in the case that _res is NULL.
> 
> cc: Lee Jones <lee.jones@linaro.org>
> cc: Laxman Dewangan <ldewangan@nvidia.com>
> Signed-off-by: Rhyland Klein <rklein@nvidia.com>
> ---
>  include/linux/mfd/core.h | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h
> index 1a5a87f3cd38..62136ccff1df 100644
> --- a/include/linux/mfd/core.h
> +++ b/include/linux/mfd/core.h
> @@ -18,11 +18,11 @@
>  
>  #define MFD_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
>  
> -#define MFD_CELL_ALL(_name, _res, _pdata, _id, _compat, _match)		\
> +#define MFD_CELL_ALL(_name, _nres, _res, _pdata, _id, _compat, _match)	\
>  	{								\
>  		.name = (_name),					\
>  		.resources = (_res),					\
> -		.num_resources = MFD_ARRAY_SIZE((_res)),		\
> +		.num_resources = (_nres),				\
>  		.platform_data = (_pdata),				\
>  		.pdata_size = MFD_ARRAY_SIZE((_pdata)), 		\
>  		.of_compatible = (_compat),				\
> @@ -31,16 +31,19 @@
>  	}
>  
>  #define OF_MFD_CELL(_name, _res, _pdata, _id, _compat)			\
> -		MFD_CELL_ALL(_name, _res, _pdata, _id, _compat, NULL)	\
> +		MFD_CELL_ALL(_name, MFD_ARRAY_SIZE((_res)), _res,	\
> +			_pdata, _id, _compat, NULL)			\

I'm confused.  Why would it be any different just by changing the call
site of MFD_ARRAY_SIZE?

And what about .platform_data?

How about this change instead?

diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h
index 1a5a87f..8440f42 100644
--- a/include/linux/mfd/core.h
+++ b/include/linux/mfd/core.h
@@ -16,7 +16,7 @@
 
 #include <linux/platform_device.h>
 
-#define MFD_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
+#define MFD_ARRAY_SIZE(arr) (arr ? (sizeof(arr) / sizeof((arr)[0])) : 0)
 
 #define MFD_CELL_ALL(_name, _res, _pdata, _id, _compat, _match)                \
        {                                                               \

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH] mfd: Fix MACRO for commonly declared MFD cell attributes
  2016-02-19  8:50 ` Lee Jones
@ 2016-02-19 16:28   ` Rhyland Klein
  2016-02-26 16:35     ` Rhyland Klein
  0 siblings, 1 reply; 11+ messages in thread
From: Rhyland Klein @ 2016-02-19 16:28 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel, Laxman Dewangan

On 2/19/2016 3:50 AM, Lee Jones wrote:
> On Thu, 18 Feb 2016, Rhyland Klein wrote:
> 
>> MFD_ARRAY_SIZE() would not accurately return 0 if the passed
>> parameter was NULL. Fix this so that num_resources will
>> accurately be 0 in the case that _res is NULL.
>>
>> cc: Lee Jones <lee.jones@linaro.org>
>> cc: Laxman Dewangan <ldewangan@nvidia.com>
>> Signed-off-by: Rhyland Klein <rklein@nvidia.com>
>> ---
>>  include/linux/mfd/core.h | 15 +++++++++------
>>  1 file changed, 9 insertions(+), 6 deletions(-)
>>
>> diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h
>> index 1a5a87f3cd38..62136ccff1df 100644
>> --- a/include/linux/mfd/core.h
>> +++ b/include/linux/mfd/core.h
>> @@ -18,11 +18,11 @@
>>  
>>  #define MFD_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
>>  
>> -#define MFD_CELL_ALL(_name, _res, _pdata, _id, _compat, _match)		\
>> +#define MFD_CELL_ALL(_name, _nres, _res, _pdata, _id, _compat, _match)	\
>>  	{								\
>>  		.name = (_name),					\
>>  		.resources = (_res),					\
>> -		.num_resources = MFD_ARRAY_SIZE((_res)),		\
>> +		.num_resources = (_nres),				\
>>  		.platform_data = (_pdata),				\
>>  		.pdata_size = MFD_ARRAY_SIZE((_pdata)), 		\
>>  		.of_compatible = (_compat),				\
>> @@ -31,16 +31,19 @@
>>  	}
>>  
>>  #define OF_MFD_CELL(_name, _res, _pdata, _id, _compat)			\
>> -		MFD_CELL_ALL(_name, _res, _pdata, _id, _compat, NULL)	\
>> +		MFD_CELL_ALL(_name, MFD_ARRAY_SIZE((_res)), _res,	\
>> +			_pdata, _id, _compat, NULL)			\
> 
> I'm confused.  Why would it be any different just by changing the call
> site of MFD_ARRAY_SIZE?

It isn't different, but for MFD_CELL_NAME, it explicitly passes 0
instead of using MFD_ARRAY_SIZE, as its the only place that doesn't
expect to have resources.

> 
> And what about .platform_data?

This crashed for me (without the change) at :

mfd_add_device():
        for (r = 0; r < cell->num_resources; r++) {
                res[r].name = cell->resources[r].name;
                res[r].flags = cell->resources[r].flags;

where dereferencing cell->resources[0] when there are no resources. I
guess the platform_data could do the same, but I didn't run into it.

> 
> How about this change instead?
> 
> diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h
> index 1a5a87f..8440f42 100644
> --- a/include/linux/mfd/core.h
> +++ b/include/linux/mfd/core.h
> @@ -16,7 +16,7 @@
>  
>  #include <linux/platform_device.h>
>  
> -#define MFD_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
> +#define MFD_ARRAY_SIZE(arr) (arr ? (sizeof(arr) / sizeof((arr)[0])) : 0)
>  
>  #define MFD_CELL_ALL(_name, _res, _pdata, _id, _compat, _match)                \
>         {                                                               \
> 
That was my first thought too. However, I see this when I try to compile
that:

In file included from drivers/mfd/max77620.c:18:0:
include/linux/mfd/core.h:19:34: warning: the address of ‘gpio_resources’
will always evaluate as ‘true’ [-Waddress]
 #define MFD_ARRAY_SIZE(arr) (arr ? (sizeof(arr) / sizeof((arr)[0])) : 0)

7 different times. This patch was the only way I seemed to be able to
WAR around compile time warnings.

-rhyland

-- 
nvpublic

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

* Re: [PATCH] mfd: Fix MACRO for commonly declared MFD cell attributes
  2016-02-19 16:28   ` Rhyland Klein
@ 2016-02-26 16:35     ` Rhyland Klein
  2016-02-29 12:38       ` Laxman Dewangan
  0 siblings, 1 reply; 11+ messages in thread
From: Rhyland Klein @ 2016-02-26 16:35 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel, Laxman Dewangan

On 2/19/2016 11:28 AM, Rhyland Klein wrote:
> On 2/19/2016 3:50 AM, Lee Jones wrote:
>> On Thu, 18 Feb 2016, Rhyland Klein wrote:
>>
>>> MFD_ARRAY_SIZE() would not accurately return 0 if the passed
>>> parameter was NULL. Fix this so that num_resources will
>>> accurately be 0 in the case that _res is NULL.
>>>
>>> cc: Lee Jones <lee.jones@linaro.org>
>>> cc: Laxman Dewangan <ldewangan@nvidia.com>
>>> Signed-off-by: Rhyland Klein <rklein@nvidia.com>
>>> ---
>>>  include/linux/mfd/core.h | 15 +++++++++------
>>>  1 file changed, 9 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h
>>> index 1a5a87f3cd38..62136ccff1df 100644
>>> --- a/include/linux/mfd/core.h
>>> +++ b/include/linux/mfd/core.h
>>> @@ -18,11 +18,11 @@
>>>  
>>>  #define MFD_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
>>>  
>>> -#define MFD_CELL_ALL(_name, _res, _pdata, _id, _compat, _match)		\
>>> +#define MFD_CELL_ALL(_name, _nres, _res, _pdata, _id, _compat, _match)	\
>>>  	{								\
>>>  		.name = (_name),					\
>>>  		.resources = (_res),					\
>>> -		.num_resources = MFD_ARRAY_SIZE((_res)),		\
>>> +		.num_resources = (_nres),				\
>>>  		.platform_data = (_pdata),				\
>>>  		.pdata_size = MFD_ARRAY_SIZE((_pdata)), 		\
>>>  		.of_compatible = (_compat),				\
>>> @@ -31,16 +31,19 @@
>>>  	}
>>>  
>>>  #define OF_MFD_CELL(_name, _res, _pdata, _id, _compat)			\
>>> -		MFD_CELL_ALL(_name, _res, _pdata, _id, _compat, NULL)	\
>>> +		MFD_CELL_ALL(_name, MFD_ARRAY_SIZE((_res)), _res,	\
>>> +			_pdata, _id, _compat, NULL)			\
>>
>> I'm confused.  Why would it be any different just by changing the call
>> site of MFD_ARRAY_SIZE?
> 
> It isn't different, but for MFD_CELL_NAME, it explicitly passes 0
> instead of using MFD_ARRAY_SIZE, as its the only place that doesn't
> expect to have resources.
> 
>>
>> And what about .platform_data?
> 
> This crashed for me (without the change) at :
> 
> mfd_add_device():
>         for (r = 0; r < cell->num_resources; r++) {
>                 res[r].name = cell->resources[r].name;
>                 res[r].flags = cell->resources[r].flags;
> 
> where dereferencing cell->resources[0] when there are no resources. I
> guess the platform_data could do the same, but I didn't run into it.
> 
>>
>> How about this change instead?
>>
>> diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h
>> index 1a5a87f..8440f42 100644
>> --- a/include/linux/mfd/core.h
>> +++ b/include/linux/mfd/core.h
>> @@ -16,7 +16,7 @@
>>  
>>  #include <linux/platform_device.h>
>>  
>> -#define MFD_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
>> +#define MFD_ARRAY_SIZE(arr) (arr ? (sizeof(arr) / sizeof((arr)[0])) : 0)
>>  
>>  #define MFD_CELL_ALL(_name, _res, _pdata, _id, _compat, _match)                \
>>         {                                                               \
>>
> That was my first thought too. However, I see this when I try to compile
> that:
> 
> In file included from drivers/mfd/max77620.c:18:0:
> include/linux/mfd/core.h:19:34: warning: the address of ‘gpio_resources’
> will always evaluate as ‘true’ [-Waddress]
>  #define MFD_ARRAY_SIZE(arr) (arr ? (sizeof(arr) / sizeof((arr)[0])) : 0)
> 
> 7 different times. This patch was the only way I seemed to be able to
> WAR around compile time warnings.
> 
> -rhyland
> 

Did you not see warnings like this when you compiled the kernel? Did you
find a different approach than what I proposed above to deal with it?
I'd like to get this in soon so that when the max77620 drivers are all
in and using it, it should be functional.

-rhyland

-- 
nvpublic

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

* Re: [PATCH] mfd: Fix MACRO for commonly declared MFD cell attributes
  2016-02-26 16:35     ` Rhyland Klein
@ 2016-02-29 12:38       ` Laxman Dewangan
  2016-03-02 13:08         ` Lee Jones
  0 siblings, 1 reply; 11+ messages in thread
From: Laxman Dewangan @ 2016-02-29 12:38 UTC (permalink / raw)
  To: Rhyland Klein, Lee Jones; +Cc: linux-kernel


On Friday 26 February 2016 10:05 PM, Rhyland Klein wrote:
> On 2/19/2016 11:28 AM, Rhyland Klein wrote:
>> On 2/19/2016 3:50 AM, Lee Jones wrote:
>>> On Thu, 18 Feb 2016, Rhyland Klein wrote:
>>>
>>>>   #define MFD_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
>>>>   
>>>> -#define MFD_CELL_ALL(_name, _res, _pdata, _id, _compat, _match)		\
>>>> +#define MFD_CELL_ALL(_name, _nres, _res, _pdata, _id, _compat, _match)	\
>>>>   	{								\
>>>>   		.name = (_name),					\
>>>>   		.resources = (_res),					\
>>>> -		.num_resources = MFD_ARRAY_SIZE((_res)),		\
>>>> +		.num_resources = (_nres),				\
>>>>   		.platform_data = (_pdata),				\
>>>>   		.pdata_size = MFD_ARRAY_SIZE((_pdata)), 		\
The pdata_size initialization is also not correct. This is not the array 
count but the size
of the platform data which is passed. Should be sizeof((_pdata))



>>   
>>   #define MFD_CELL_ALL(_name, _res, _pdata, _id, _compat, _match)                \
>>          {                                                               \
>>
>> That was my first thought too. However, I see this when I try to compile
>> that:
>>
>> In file included from drivers/mfd/max77620.c:18:0:
>> include/linux/mfd/core.h:19:34: warning: the address of ‘gpio_resources’
>> will always evaluate as ‘true’ [-Waddress]
>>   #define MFD_ARRAY_SIZE(arr) (arr ? (sizeof(arr) / sizeof((arr)[0])) : 0)
>>
>> 7 different times. This patch was the only way I seemed to be able to
>> WAR around compile time warnings.
>>
>> -rhyland
>>
> Did you not see warnings like this when you compiled the kernel? Did you
> find a different approach than what I proposed above to deal with it?
> I'd like to get this in soon so that when the max77620 drivers are all
> in and using it, it should be functional.
>
I think the following change also crash in runtime:

/***
commit e60a946f05db2cac857025da6ffb72df48d3be54
Author: Lee Jones <lee.jones@linaro.org>

     mfd: ab8500: Provide a small example using new MFD cell MACROs

***/

Should we have something MFD_CELL_RES, MFD_CELL_RES_PDATA, 
MFD_CELL_PDATA, for more common user and not to pass the NULL here.

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

* Re: [PATCH] mfd: Fix MACRO for commonly declared MFD cell attributes
  2016-02-29 12:38       ` Laxman Dewangan
@ 2016-03-02 13:08         ` Lee Jones
  2016-03-09 13:22           ` Laxman Dewangan
  0 siblings, 1 reply; 11+ messages in thread
From: Lee Jones @ 2016-03-02 13:08 UTC (permalink / raw)
  To: Laxman Dewangan; +Cc: Rhyland Klein, linux-kernel

On Mon, 29 Feb 2016, Laxman Dewangan wrote:

> 
> On Friday 26 February 2016 10:05 PM, Rhyland Klein wrote:
> >On 2/19/2016 11:28 AM, Rhyland Klein wrote:
> >>On 2/19/2016 3:50 AM, Lee Jones wrote:
> >>>On Thu, 18 Feb 2016, Rhyland Klein wrote:
> >>>
> >>>>  #define MFD_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
> >>>>-#define MFD_CELL_ALL(_name, _res, _pdata, _id, _compat, _match)		\
> >>>>+#define MFD_CELL_ALL(_name, _nres, _res, _pdata, _id, _compat, _match)	\
> >>>>  	{								\
> >>>>  		.name = (_name),					\
> >>>>  		.resources = (_res),					\
> >>>>-		.num_resources = MFD_ARRAY_SIZE((_res)),		\
> >>>>+		.num_resources = (_nres),				\
> >>>>  		.platform_data = (_pdata),				\
> >>>>  		.pdata_size = MFD_ARRAY_SIZE((_pdata)), 		\
> The pdata_size initialization is also not correct. This is not the
> array count but the size
> of the platform data which is passed. Should be sizeof((_pdata))
> 
> 
> 
> >>  #define MFD_CELL_ALL(_name, _res, _pdata, _id, _compat, _match)                \
> >>         {                                                               \
> >>
> >>That was my first thought too. However, I see this when I try to compile
> >>that:
> >>
> >>In file included from drivers/mfd/max77620.c:18:0:
> >>include/linux/mfd/core.h:19:34: warning: the address of ‘gpio_resources’
> >>will always evaluate as ‘true’ [-Waddress]
> >>  #define MFD_ARRAY_SIZE(arr) (arr ? (sizeof(arr) / sizeof((arr)[0])) : 0)
> >>
> >>7 different times. This patch was the only way I seemed to be able to
> >>WAR around compile time warnings.
> >>
> >>-rhyland
> >>
> >Did you not see warnings like this when you compiled the kernel? Did you
> >find a different approach than what I proposed above to deal with it?
> >I'd like to get this in soon so that when the max77620 drivers are all
> >in and using it, it should be functional.
> >
> I think the following change also crash in runtime:
> 
> /***
> commit e60a946f05db2cac857025da6ffb72df48d3be54
> Author: Lee Jones <lee.jones@linaro.org>
> 
>     mfd: ab8500: Provide a small example using new MFD cell MACROs
> 
> ***/
> 
> Should we have something MFD_CELL_RES, MFD_CELL_RES_PDATA,
> MFD_CELL_PDATA, for more common user and not to pass the NULL here.

I'll have a re-think about this.

-- 
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: Fix MACRO for commonly declared MFD cell attributes
  2016-03-02 13:08         ` Lee Jones
@ 2016-03-09 13:22           ` Laxman Dewangan
  2016-03-11  8:39             ` Lee Jones
  0 siblings, 1 reply; 11+ messages in thread
From: Laxman Dewangan @ 2016-03-09 13:22 UTC (permalink / raw)
  To: Lee Jones; +Cc: Rhyland Klein, linux-kernel

Hi Lee,

On Wednesday 02 March 2016 06:38 PM, Lee Jones wrote:
> On Mon, 29 Feb 2016, Laxman Dewangan wrote:
>
>> On Friday 26 February 2016 10:05 PM, Rhyland Klein wrote:
>>> Did you not see warnings like this when you compiled the kernel? Did you
>>> find a different approach than what I proposed above to deal with it?
>>> I'd like to get this in soon so that when the max77620 drivers are all
>>> in and using it, it should be functional.
>>>
>> I think the following change also crash in runtime:
>>
>> /***
>> commit e60a946f05db2cac857025da6ffb72df48d3be54
>> Author: Lee Jones <lee.jones@linaro.org>
>>
>>      mfd: ab8500: Provide a small example using new MFD cell MACROs
>>
>> ***/
>>
>> Should we have something MFD_CELL_RES, MFD_CELL_RES_PDATA,
>> MFD_CELL_PDATA, for more common user and not to pass the NULL here.
> I'll have a re-think about this.

Did you get chance to look into this? Probably, I need to send my mfd 
series once this get fixed before that series applied.

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

* Re: [PATCH] mfd: Fix MACRO for commonly declared MFD cell attributes
  2016-03-09 13:22           ` Laxman Dewangan
@ 2016-03-11  8:39             ` Lee Jones
  2016-03-11  8:57               ` Laxman Dewangan
  0 siblings, 1 reply; 11+ messages in thread
From: Lee Jones @ 2016-03-11  8:39 UTC (permalink / raw)
  To: Laxman Dewangan; +Cc: Rhyland Klein, linux-kernel

On Wed, 09 Mar 2016, Laxman Dewangan wrote:
> On Wednesday 02 March 2016 06:38 PM, Lee Jones wrote:
> >On Mon, 29 Feb 2016, Laxman Dewangan wrote:
> >
> >>On Friday 26 February 2016 10:05 PM, Rhyland Klein wrote:
> >>>Did you not see warnings like this when you compiled the kernel? Did you
> >>>find a different approach than what I proposed above to deal with it?
> >>>I'd like to get this in soon so that when the max77620 drivers are all
> >>>in and using it, it should be functional.
> >>>
> >>I think the following change also crash in runtime:
> >>
> >>/***
> >>commit e60a946f05db2cac857025da6ffb72df48d3be54
> >>Author: Lee Jones <lee.jones@linaro.org>
> >>
> >>     mfd: ab8500: Provide a small example using new MFD cell MACROs
> >>
> >>***/
> >>
> >>Should we have something MFD_CELL_RES, MFD_CELL_RES_PDATA,
> >>MFD_CELL_PDATA, for more common user and not to pass the NULL here.
> >I'll have a re-think about this.
> 
> Did you get chance to look into this? Probably, I need to send my
> mfd series once this get fixed before that series applied.

Nothing is going to happen until v4.6 now.  It's too late in the
release cycle to be making such a significant addition, and I'd like
the change to sit in -next for a good while before going in.

-- 
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: Fix MACRO for commonly declared MFD cell attributes
  2016-03-11  8:39             ` Lee Jones
@ 2016-03-11  8:57               ` Laxman Dewangan
  2016-03-16  8:42                 ` Lee Jones
  0 siblings, 1 reply; 11+ messages in thread
From: Laxman Dewangan @ 2016-03-11  8:57 UTC (permalink / raw)
  To: Lee Jones; +Cc: Rhyland Klein, linux-kernel


On Friday 11 March 2016 02:09 PM, Lee Jones wrote:
> On Wed, 09 Mar 2016, Laxman Dewangan wrote:
>> On Wednesday 02 March 2016 06:38 PM, Lee Jones wrote:
>>> On Mon, 29 Feb 2016, Laxman Dewangan wrote:
>>>
>>>> On Friday 26 February 2016 10:05 PM, Rhyland Klein wrote:
>>>>> Did you not see warnings like this when you compiled the kernel? Did you
>>>>> find a different approach than what I proposed above to deal with it?
>>>>> I'd like to get this in soon so that when the max77620 drivers are all
>>>>> in and using it, it should be functional.
>>>>>
>>>> I think the following change also crash in runtime:
>>>>
>>>> /***
>>>> commit e60a946f05db2cac857025da6ffb72df48d3be54
>>>> Author: Lee Jones <lee.jones@linaro.org>
>>>>
>>>>      mfd: ab8500: Provide a small example using new MFD cell MACROs
>>>>
>>>> ***/
>>>>
>>>> Should we have something MFD_CELL_RES, MFD_CELL_RES_PDATA,
>>>> MFD_CELL_PDATA, for more common user and not to pass the NULL here.
>>> I'll have a re-think about this.
>> Did you get chance to look into this? Probably, I need to send my
>> mfd series once this get fixed before that series applied.
> Nothing is going to happen until v4.6 now.  It's too late in the
> release cycle to be making such a significant addition, and I'd like
> the change to sit in -next for a good while before going in.
>
OK, so can I use the local initializations in my max77620 patches and 
resend?
Then later we can have cleanups for part only?

This is because if we get in next release then there is some other sub 
modules of the max77620 like clocks, watchdog, power etc which can go on 
their subsystem if common header is available.

Sorry if I am asking too much..

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

* Re: [PATCH] mfd: Fix MACRO for commonly declared MFD cell attributes
  2016-03-11  8:57               ` Laxman Dewangan
@ 2016-03-16  8:42                 ` Lee Jones
  2016-03-16  9:22                   ` Laxman Dewangan
  0 siblings, 1 reply; 11+ messages in thread
From: Lee Jones @ 2016-03-16  8:42 UTC (permalink / raw)
  To: Laxman Dewangan; +Cc: Rhyland Klein, linux-kernel

On Fri, 11 Mar 2016, Laxman Dewangan wrote:

> 
> On Friday 11 March 2016 02:09 PM, Lee Jones wrote:
> >On Wed, 09 Mar 2016, Laxman Dewangan wrote:
> >>On Wednesday 02 March 2016 06:38 PM, Lee Jones wrote:
> >>>On Mon, 29 Feb 2016, Laxman Dewangan wrote:
> >>>
> >>>>On Friday 26 February 2016 10:05 PM, Rhyland Klein wrote:
> >>>>>Did you not see warnings like this when you compiled the kernel? Did you
> >>>>>find a different approach than what I proposed above to deal with it?
> >>>>>I'd like to get this in soon so that when the max77620 drivers are all
> >>>>>in and using it, it should be functional.
> >>>>>
> >>>>I think the following change also crash in runtime:
> >>>>
> >>>>/***
> >>>>commit e60a946f05db2cac857025da6ffb72df48d3be54
> >>>>Author: Lee Jones <lee.jones@linaro.org>
> >>>>
> >>>>     mfd: ab8500: Provide a small example using new MFD cell MACROs
> >>>>
> >>>>***/
> >>>>
> >>>>Should we have something MFD_CELL_RES, MFD_CELL_RES_PDATA,
> >>>>MFD_CELL_PDATA, for more common user and not to pass the NULL here.
> >>>I'll have a re-think about this.
> >>Did you get chance to look into this? Probably, I need to send my
> >>mfd series once this get fixed before that series applied.
> >Nothing is going to happen until v4.6 now.  It's too late in the
> >release cycle to be making such a significant addition, and I'd like
> >the change to sit in -next for a good while before going in.
> >
> OK, so can I use the local initializations in my max77620 patches
> and resend?
> Then later we can have cleanups for part only?
> 
> This is because if we get in next release then there is some other
> sub modules of the max77620 like clocks, watchdog, power etc which
> can go on their subsystem if common header is available.
> 
> Sorry if I am asking too much..

For quick accptance, just submit using the normal un-MACRO'ed
structure.

-- 
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: Fix MACRO for commonly declared MFD cell attributes
  2016-03-16  8:42                 ` Lee Jones
@ 2016-03-16  9:22                   ` Laxman Dewangan
  0 siblings, 0 replies; 11+ messages in thread
From: Laxman Dewangan @ 2016-03-16  9:22 UTC (permalink / raw)
  To: Lee Jones; +Cc: Rhyland Klein, linux-kernel


On Wednesday 16 March 2016 02:12 PM, Lee Jones wrote:
> On Fri, 11 Mar 2016, Laxman Dewangan wrote:
>
>> On Friday 11 March 2016 02:09 PM, Lee Jones wrote:
>>> On Wed, 09 Mar 2016, Laxman Dewangan wrote:
>>>> On Wednesday 02 March 2016 06:38 PM, Lee Jones wrote:
>>>>> On Mon, 29 Feb 2016, Laxman Dewangan wrote:
>>>>>
>>>>>> On Friday 26 February 2016 10:05 PM, Rhyland Klein wrote:
>>>>>>> Did you not see warnings like this when you compiled the kernel? Did you
>>>>>>> find a different approach than what I proposed above to deal with it?
>>>>>>> I'd like to get this in soon so that when the max77620 drivers are all
>>>>>>> in and using it, it should be functional.
>>>>>>>
>>>>>> I think the following change also crash in runtime:
>>>>>>
>>>>>> /***
>>>>>> commit e60a946f05db2cac857025da6ffb72df48d3be54
>>>>>> Author: Lee Jones <lee.jones@linaro.org>
>>>>>>
>>>>>>      mfd: ab8500: Provide a small example using new MFD cell MACROs
>>>>>>
>>>>>> ***/
>>>>>>
>>>>>> Should we have something MFD_CELL_RES, MFD_CELL_RES_PDATA,
>>>>>> MFD_CELL_PDATA, for more common user and not to pass the NULL here.
>>>>> I'll have a re-think about this.
>>>> Did you get chance to look into this? Probably, I need to send my
>>>> mfd series once this get fixed before that series applied.
>>> Nothing is going to happen until v4.6 now.  It's too late in the
>>> release cycle to be making such a significant addition, and I'd like
>>> the change to sit in -next for a good while before going in.
>>>
>> OK, so can I use the local initializations in my max77620 patches
>> and resend?
>> Then later we can have cleanups for part only?
>>
>> This is because if we get in next release then there is some other
>> sub modules of the max77620 like clocks, watchdog, power etc which
>> can go on their subsystem if common header is available.
>>
>> Sorry if I am asking too much..
> For quick accptance, just submit using the normal un-MACRO'ed
> structure.

Thanks, I had sent V9 version of the MAX77620 which used normal 
un-MACROed version.

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

end of thread, other threads:[~2016-03-16  9:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-18 18:52 [PATCH] mfd: Fix MACRO for commonly declared MFD cell attributes Rhyland Klein
2016-02-19  8:50 ` Lee Jones
2016-02-19 16:28   ` Rhyland Klein
2016-02-26 16:35     ` Rhyland Klein
2016-02-29 12:38       ` Laxman Dewangan
2016-03-02 13:08         ` Lee Jones
2016-03-09 13:22           ` Laxman Dewangan
2016-03-11  8:39             ` Lee Jones
2016-03-11  8:57               ` Laxman Dewangan
2016-03-16  8:42                 ` Lee Jones
2016-03-16  9:22                   ` Laxman Dewangan

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).