All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] watchdog: at91rm9200: Remove redundant of_match_ptr
@ 2013-09-30  4:42 Sachin Kamat
  2013-09-30  4:42 ` [PATCH 2/3] watchdog: orion: " Sachin Kamat
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Sachin Kamat @ 2013-09-30  4:42 UTC (permalink / raw)
  To: linux-watchdog; +Cc: wim, sachin.kamat

The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/watchdog/at91rm9200_wdt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/at91rm9200_wdt.c b/drivers/watchdog/at91rm9200_wdt.c
index 1c75260..aa5cb56 100644
--- a/drivers/watchdog/at91rm9200_wdt.c
+++ b/drivers/watchdog/at91rm9200_wdt.c
@@ -269,7 +269,7 @@ static struct platform_driver at91wdt_driver = {
 	.driver		= {
 		.name	= "at91_wdt",
 		.owner	= THIS_MODULE,
-		.of_match_table = of_match_ptr(at91_wdt_dt_ids),
+		.of_match_table = at91_wdt_dt_ids,
 	},
 };
 
-- 
1.7.9.5


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

* [PATCH 2/3] watchdog: orion: Remove redundant of_match_ptr
  2013-09-30  4:42 [PATCH 1/3] watchdog: at91rm9200: Remove redundant of_match_ptr Sachin Kamat
@ 2013-09-30  4:42 ` Sachin Kamat
  2013-10-02 15:15   ` [2/3] " Guenter Roeck
  2013-09-30  4:42 ` [PATCH 3/3] watchdog: sunxi: " Sachin Kamat
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 12+ messages in thread
From: Sachin Kamat @ 2013-09-30  4:42 UTC (permalink / raw)
  To: linux-watchdog; +Cc: wim, sachin.kamat

The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/watchdog/orion_wdt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c
index 4ea5fcc..34adb54 100644
--- a/drivers/watchdog/orion_wdt.c
+++ b/drivers/watchdog/orion_wdt.c
@@ -207,7 +207,7 @@ static struct platform_driver orion_wdt_driver = {
 	.driver		= {
 		.owner	= THIS_MODULE,
 		.name	= "orion_wdt",
-		.of_match_table = of_match_ptr(orion_wdt_of_match_table),
+		.of_match_table = orion_wdt_of_match_table,
 	},
 };
 
-- 
1.7.9.5


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

* [PATCH 3/3] watchdog: sunxi: Remove redundant of_match_ptr
  2013-09-30  4:42 [PATCH 1/3] watchdog: at91rm9200: Remove redundant of_match_ptr Sachin Kamat
  2013-09-30  4:42 ` [PATCH 2/3] watchdog: orion: " Sachin Kamat
@ 2013-09-30  4:42 ` Sachin Kamat
  2013-10-02 15:16   ` [3/3] " Guenter Roeck
  2013-10-01 20:48 ` [1/3] watchdog: at91rm9200: " Guenter Roeck
  2013-10-29  7:46 ` [PATCH 1/3] " Wim Van Sebroeck
  3 siblings, 1 reply; 12+ messages in thread
From: Sachin Kamat @ 2013-09-30  4:42 UTC (permalink / raw)
  To: linux-watchdog; +Cc: wim, sachin.kamat

The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/watchdog/sunxi_wdt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/sunxi_wdt.c b/drivers/watchdog/sunxi_wdt.c
index 1f94b42..cea0bc8 100644
--- a/drivers/watchdog/sunxi_wdt.c
+++ b/drivers/watchdog/sunxi_wdt.c
@@ -217,7 +217,7 @@ static struct platform_driver sunxi_wdt_driver = {
 	.driver		= {
 		.owner		= THIS_MODULE,
 		.name		= DRV_NAME,
-		.of_match_table	= of_match_ptr(sunxi_wdt_dt_ids)
+		.of_match_table	= sunxi_wdt_dt_ids,
 	},
 };
 
-- 
1.7.9.5


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

* Re: [1/3] watchdog: at91rm9200: Remove redundant of_match_ptr
  2013-09-30  4:42 [PATCH 1/3] watchdog: at91rm9200: Remove redundant of_match_ptr Sachin Kamat
  2013-09-30  4:42 ` [PATCH 2/3] watchdog: orion: " Sachin Kamat
  2013-09-30  4:42 ` [PATCH 3/3] watchdog: sunxi: " Sachin Kamat
@ 2013-10-01 20:48 ` Guenter Roeck
  2013-10-02  6:43   ` Sachin Kamat
  2013-10-29  7:46 ` [PATCH 1/3] " Wim Van Sebroeck
  3 siblings, 1 reply; 12+ messages in thread
From: Guenter Roeck @ 2013-10-01 20:48 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-watchdog, wim

On Mon, Sep 30, 2013 at 12:42:51PM -0000, Sachin Kamat wrote:
> The data structure of_match_ptr() protects is always compiled in.
> Hence of_match_ptr() is not needed.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> 

Hi Sachin,

I understand that the driver doesn't currently support to be built as module,
so of_match_ptr() is not really necessary. But unless I am missing something,
here isn't anything wrong with it either, not does it hurt to have it in place.

So what is the benefit of this series ?

Thanks,
Guenter

> ---
> drivers/watchdog/at91rm9200_wdt.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/at91rm9200_wdt.c b/drivers/watchdog/at91rm9200_wdt.c
> index 1c75260..aa5cb56 100644
> --- a/drivers/watchdog/at91rm9200_wdt.c
> +++ b/drivers/watchdog/at91rm9200_wdt.c
> @@ -269,7 +269,7 @@ static struct platform_driver at91wdt_driver = {
>  	.driver		= {
>  		.name	= "at91_wdt",
>  		.owner	= THIS_MODULE,
> -		.of_match_table = of_match_ptr(at91_wdt_dt_ids),
> +		.of_match_table = at91_wdt_dt_ids,
>  	},
>  };
>  

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

* Re: [1/3] watchdog: at91rm9200: Remove redundant of_match_ptr
  2013-10-01 20:48 ` [1/3] watchdog: at91rm9200: " Guenter Roeck
@ 2013-10-02  6:43   ` Sachin Kamat
  2013-10-02 15:13     ` Guenter Roeck
  0 siblings, 1 reply; 12+ messages in thread
From: Sachin Kamat @ 2013-10-02  6:43 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: linux-watchdog, Wim Van Sebroeck

Hi  Guenter,

On 2 October 2013 02:18, Guenter Roeck <linux@roeck-us.net> wrote:
> On Mon, Sep 30, 2013 at 12:42:51PM -0000, Sachin Kamat wrote:
>> The data structure of_match_ptr() protects is always compiled in.
>> Hence of_match_ptr() is not needed.
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>>
>
> Hi Sachin,
>
> I understand that the driver doesn't currently support to be built as module,
> so of_match_ptr() is not really necessary. But unless I am missing something,
> here isn't anything wrong with it either, not does it hurt to have it in place.
>
> So what is the benefit of this series ?

of_match_ptr() is a macro used to avoid undefined reference error if
CONFIG_OF is used to selectively compile in or out the
data structure. It is defined as follows:

#ifdef CONFIG_OF
#define of_match_ptr(ptr) ptr
#else
#define of_match_ptr(ptr) NULL
#endif

In the case of this series, none of the drivers use CONFIG_OF macro to
compile out the data structure (i.e., the data structure is always
defined).
Hence the use of of_match_ptr() does not make any sense. Thus removing
it to make the code look simpler for readability.

Hope this clarifies.
-- 
With warm regards,
Sachin

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

* Re: [1/3] watchdog: at91rm9200: Remove redundant of_match_ptr
  2013-10-02  6:43   ` Sachin Kamat
@ 2013-10-02 15:13     ` Guenter Roeck
  2013-10-02 16:08       ` Sachin Kamat
  2013-10-28  6:27       ` Sachin Kamat
  0 siblings, 2 replies; 12+ messages in thread
From: Guenter Roeck @ 2013-10-02 15:13 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-watchdog, Wim Van Sebroeck

On Wed, Oct 02, 2013 at 12:13:04PM +0530, Sachin Kamat wrote:
> Hi  Guenter,
> 
> On 2 October 2013 02:18, Guenter Roeck <linux@roeck-us.net> wrote:
> > On Mon, Sep 30, 2013 at 12:42:51PM -0000, Sachin Kamat wrote:
> >> The data structure of_match_ptr() protects is always compiled in.
> >> Hence of_match_ptr() is not needed.
> >>
> >> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> >>
> >
> > Hi Sachin,
> >
> > I understand that the driver doesn't currently support to be built as module,
> > so of_match_ptr() is not really necessary. But unless I am missing something,
> > here isn't anything wrong with it either, not does it hurt to have it in place.
> >
> > So what is the benefit of this series ?
> 
> of_match_ptr() is a macro used to avoid undefined reference error if
> CONFIG_OF is used to selectively compile in or out the
> data structure. It is defined as follows:
> 
> #ifdef CONFIG_OF
> #define of_match_ptr(ptr) ptr
> #else
> #define of_match_ptr(ptr) NULL
> #endif
> 
> In the case of this series, none of the drivers use CONFIG_OF macro to
> compile out the data structure (i.e., the data structure is always
> defined).
> Hence the use of of_match_ptr() does not make any sense. Thus removing
> it to make the code look simpler for readability.
> 
> Hope this clarifies.

Ok, I'll accept that.

Acked-by: Guenter Roeck <linux@roeck-us.net>

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

* Re: [2/3] watchdog: orion: Remove redundant of_match_ptr
  2013-09-30  4:42 ` [PATCH 2/3] watchdog: orion: " Sachin Kamat
@ 2013-10-02 15:15   ` Guenter Roeck
  0 siblings, 0 replies; 12+ messages in thread
From: Guenter Roeck @ 2013-10-02 15:15 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-watchdog, wim

On Mon, Sep 30, 2013 at 12:42:52PM -0000, Sachin Kamat wrote:
> The data structure of_match_ptr() protects is always compiled in.
> Hence of_match_ptr() is not needed.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> 
Acked-by: Guenter Roeck <linux@roeck-us.net>

> ---
> drivers/watchdog/orion_wdt.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c
> index 4ea5fcc..34adb54 100644
> --- a/drivers/watchdog/orion_wdt.c
> +++ b/drivers/watchdog/orion_wdt.c
> @@ -207,7 +207,7 @@ static struct platform_driver orion_wdt_driver = {
>  	.driver		= {
>  		.owner	= THIS_MODULE,
>  		.name	= "orion_wdt",
> -		.of_match_table = of_match_ptr(orion_wdt_of_match_table),
> +		.of_match_table = orion_wdt_of_match_table,
>  	},
>  };
>  

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

* Re: [3/3] watchdog: sunxi: Remove redundant of_match_ptr
  2013-09-30  4:42 ` [PATCH 3/3] watchdog: sunxi: " Sachin Kamat
@ 2013-10-02 15:16   ` Guenter Roeck
  0 siblings, 0 replies; 12+ messages in thread
From: Guenter Roeck @ 2013-10-02 15:16 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-watchdog, wim

On Mon, Sep 30, 2013 at 12:42:53PM -0000, Sachin Kamat wrote:
> The data structure of_match_ptr() protects is always compiled in.
> Hence of_match_ptr() is not needed.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> 
Acked-by: Guenter Roeck <linux@roeck-us.net>

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

* Re: [1/3] watchdog: at91rm9200: Remove redundant of_match_ptr
  2013-10-02 15:13     ` Guenter Roeck
@ 2013-10-02 16:08       ` Sachin Kamat
  2013-10-28  6:27       ` Sachin Kamat
  1 sibling, 0 replies; 12+ messages in thread
From: Sachin Kamat @ 2013-10-02 16:08 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: linux-watchdog, Wim Van Sebroeck

On 2 October 2013 20:43, Guenter Roeck <linux@roeck-us.net> wrote:
> On Wed, Oct 02, 2013 at 12:13:04PM +0530, Sachin Kamat wrote:
>> Hi  Guenter,
>>
>> On 2 October 2013 02:18, Guenter Roeck <linux@roeck-us.net> wrote:
>> > On Mon, Sep 30, 2013 at 12:42:51PM -0000, Sachin Kamat wrote:
>> >> The data structure of_match_ptr() protects is always compiled in.
>> >> Hence of_match_ptr() is not needed.
>> >>
>> >> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>> >>
>> >
>> > Hi Sachin,
>> >
>> > I understand that the driver doesn't currently support to be built as module,
>> > so of_match_ptr() is not really necessary. But unless I am missing something,
>> > here isn't anything wrong with it either, not does it hurt to have it in place.
>> >
>> > So what is the benefit of this series ?
>>
>> of_match_ptr() is a macro used to avoid undefined reference error if
>> CONFIG_OF is used to selectively compile in or out the
>> data structure. It is defined as follows:
>>
>> #ifdef CONFIG_OF
>> #define of_match_ptr(ptr) ptr
>> #else
>> #define of_match_ptr(ptr) NULL
>> #endif
>>
>> In the case of this series, none of the drivers use CONFIG_OF macro to
>> compile out the data structure (i.e., the data structure is always
>> defined).
>> Hence the use of of_match_ptr() does not make any sense. Thus removing
>> it to make the code look simpler for readability.
>>
>> Hope this clarifies.
>
> Ok, I'll accept that.
>
> Acked-by: Guenter Roeck <linux@roeck-us.net>

 Thanks Guenter.

-- 
With warm regards,
Sachin

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

* Re: [1/3] watchdog: at91rm9200: Remove redundant of_match_ptr
  2013-10-02 15:13     ` Guenter Roeck
  2013-10-02 16:08       ` Sachin Kamat
@ 2013-10-28  6:27       ` Sachin Kamat
  1 sibling, 0 replies; 12+ messages in thread
From: Sachin Kamat @ 2013-10-28  6:27 UTC (permalink / raw)
  To: linux-watchdog; +Cc: Wim Van Sebroeck

On 2 October 2013 20:43, Guenter Roeck <linux@roeck-us.net> wrote:
> On Wed, Oct 02, 2013 at 12:13:04PM +0530, Sachin Kamat wrote:
>> Hi  Guenter,
>>
>> On 2 October 2013 02:18, Guenter Roeck <linux@roeck-us.net> wrote:
>> > On Mon, Sep 30, 2013 at 12:42:51PM -0000, Sachin Kamat wrote:
>> >> The data structure of_match_ptr() protects is always compiled in.
>> >> Hence of_match_ptr() is not needed.
>> >>
>> >> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>> >>
>> >
>> > Hi Sachin,
>> >
>> > I understand that the driver doesn't currently support to be built as module,
>> > so of_match_ptr() is not really necessary. But unless I am missing something,
>> > here isn't anything wrong with it either, not does it hurt to have it in place.
>> >
>> > So what is the benefit of this series ?
>>
>> of_match_ptr() is a macro used to avoid undefined reference error if
>> CONFIG_OF is used to selectively compile in or out the
>> data structure. It is defined as follows:
>>
>> #ifdef CONFIG_OF
>> #define of_match_ptr(ptr) ptr
>> #else
>> #define of_match_ptr(ptr) NULL
>> #endif
>>
>> In the case of this series, none of the drivers use CONFIG_OF macro to
>> compile out the data structure (i.e., the data structure is always
>> defined).
>> Hence the use of of_match_ptr() does not make any sense. Thus removing
>> it to make the code look simpler for readability.
>>
>> Hope this clarifies.
>
> Ok, I'll accept that.
>
> Acked-by: Guenter Roeck <linux@roeck-us.net>

Ping on this series, Wim.

-- 
With warm regards,
Sachin

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

* Re: [PATCH 1/3] watchdog: at91rm9200: Remove redundant of_match_ptr
  2013-09-30  4:42 [PATCH 1/3] watchdog: at91rm9200: Remove redundant of_match_ptr Sachin Kamat
                   ` (2 preceding siblings ...)
  2013-10-01 20:48 ` [1/3] watchdog: at91rm9200: " Guenter Roeck
@ 2013-10-29  7:46 ` Wim Van Sebroeck
  2013-10-29  9:38   ` Sachin Kamat
  3 siblings, 1 reply; 12+ messages in thread
From: Wim Van Sebroeck @ 2013-10-29  7:46 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-watchdog

Hi Sachin,

> The data structure of_match_ptr() protects is always compiled in.
> Hence of_match_ptr() is not needed.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>

Your 3 patches concerning of_match_ptr have been added as a single patch
to linux-watchdog-next. I also adapted the commit message with your the
description you gave later on to Guenter.

Kind regards,
Wim.


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

* Re: [PATCH 1/3] watchdog: at91rm9200: Remove redundant of_match_ptr
  2013-10-29  7:46 ` [PATCH 1/3] " Wim Van Sebroeck
@ 2013-10-29  9:38   ` Sachin Kamat
  0 siblings, 0 replies; 12+ messages in thread
From: Sachin Kamat @ 2013-10-29  9:38 UTC (permalink / raw)
  To: Wim Van Sebroeck; +Cc: linux-watchdog

On 29 October 2013 13:16, Wim Van Sebroeck <wim@iguana.be> wrote:
> Hi Sachin,
>
>> The data structure of_match_ptr() protects is always compiled in.
>> Hence of_match_ptr() is not needed.
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>
> Your 3 patches concerning of_match_ptr have been added as a single patch
> to linux-watchdog-next. I also adapted the commit message with your the
> description you gave later on to Guenter.

Thanks Wim.

-- 
With warm regards,
Sachin

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

end of thread, other threads:[~2013-10-29  9:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-30  4:42 [PATCH 1/3] watchdog: at91rm9200: Remove redundant of_match_ptr Sachin Kamat
2013-09-30  4:42 ` [PATCH 2/3] watchdog: orion: " Sachin Kamat
2013-10-02 15:15   ` [2/3] " Guenter Roeck
2013-09-30  4:42 ` [PATCH 3/3] watchdog: sunxi: " Sachin Kamat
2013-10-02 15:16   ` [3/3] " Guenter Roeck
2013-10-01 20:48 ` [1/3] watchdog: at91rm9200: " Guenter Roeck
2013-10-02  6:43   ` Sachin Kamat
2013-10-02 15:13     ` Guenter Roeck
2013-10-02 16:08       ` Sachin Kamat
2013-10-28  6:27       ` Sachin Kamat
2013-10-29  7:46 ` [PATCH 1/3] " Wim Van Sebroeck
2013-10-29  9:38   ` Sachin Kamat

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.