linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sachin Kamat <sachin.kamat@linaro.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: linux-watchdog@vger.kernel.org, Wim Van Sebroeck <wim@iguana.be>
Subject: Re: [1/3] watchdog: at91rm9200: Remove redundant of_match_ptr
Date: Wed, 2 Oct 2013 21:38:14 +0530	[thread overview]
Message-ID: <CAK9yfHwdOOoZb1bubxB7n2zdDiMS60MKv_MwR=UT7N6Cj3bJuw@mail.gmail.com> (raw)
In-Reply-To: <20131002151347.GA14121@roeck-us.net>

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

  reply	other threads:[~2013-10-02 16:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK9yfHwdOOoZb1bubxB7n2zdDiMS60MKv_MwR=UT7N6Cj3bJuw@mail.gmail.com' \
    --to=sachin.kamat@linaro.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=wim@iguana.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).