devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Srinivas KANDAGATLA
	<srinivas.kandagatla-qxv4g6HH51o@public.gmane.org>
Cc: kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org,
	ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org
Subject: Re: [PATCH 3.6.0] of: Add missing dummy functions
Date: Mon, 26 Nov 2012 10:38:43 +0000	[thread overview]
Message-ID: <20121126103843.851603E08BB@localhost> (raw)
In-Reply-To: <507F23F7.5070509-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

On Wed, 17 Oct 2012 16:32:39 -0500, Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> On 10/17/2012 05:26 AM, Srinivas KANDAGATLA wrote:
> > From: Srinivas Kandagatla <srinivas.kandagatla-qxv4g6HH51o@public.gmane.org>
> > 
> > Some functions in of.h have dummy functions and real implementations,
> > however few of them have only real implementation.
> > I think to be more consistent this patch adds below dummy functions if
> > for non CONFIG_OF's.
> > 
> 
> Fixing these up one by one has annoyed me, but I know Grant has
> generally resisted blindly creating empty functions. So I would like
> Grant's comments. I'm fine with these except the ones noted below.
> 
> > 	of_find_node_by_type
> 
> This should not be used except a few places as using device_type is
> generally only for true OF.
> 
> > 	of_device_is_available
> > 	of_find_node_with_property
> 
> Only used in 2 places.
> 
> > 	of_find_matching_node
> > 	of_find_node_by_path
> > 	of_find_node_by_phandle
> > 	of_get_parent
> > 	of_get_next_parent
> > 	of_get_next_child
> > 	of_get_next_available_child
> > 	of_get_child_by_name
> 
> Already have this one.
> 
> > 
> > Hopefully this can eliminate the need to ifdef code in the drivers.
> 
> Sometimes we want that for drivers that can be built both for OF and !OF
> and you can't optimize away all the code and data.

Right. I've been cautious here for a reason. As much as possible I want
to encourage of_* calls to be collected together in a driver, not
scattered all over the place. Often the whole block of OF-aware code in
a driver can be compiled out if it is grouped together into a function.

Also, some of these only make sense in the context of an OF-aware code
block and there is no sensible empty version.

So, I'm fine with adding the empty versions on a case-by-case basis, but
not wholesale.

g.

      parent reply	other threads:[~2012-11-26 10:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-17 10:26 [PATCH 3.6.0] of: Add missing dummy functions Srinivas KANDAGATLA
     [not found] ` <1350469563-19345-1-git-send-email-srinivas.kandagatla-qxv4g6HH51o@public.gmane.org>
2012-10-17 21:32   ` Rob Herring
     [not found]     ` <507F23F7.5070509-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-11-26 10:38       ` Grant Likely [this message]

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=20121126103843.851603E08BB@localhost \
    --to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
    --cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
    --cc=broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=srinivas.kandagatla-qxv4g6HH51o@public.gmane.org \
    /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).