devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: andrew@lunn.ch, vivien.didelot@savoirfairelinux.com,
	Florian Fainelli <f.fainelli@gmail.com>,
	Lee Jones <lee.jones@linaro.org>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Rob Herring <robh+dt@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>,
	"open list:NETWORKING DRIVERS" <netdev@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE"
	<devicetree@vger.kernel.org>
Subject: [PATCH v2 3/3] of: Make of_match_node() an inline stub for CONFIG_OF=n
Date: Tue, 11 Apr 2017 21:41:56 -0700	[thread overview]
Message-ID: <20170412044156.17351-4-f.fainelli@gmail.com> (raw)
In-Reply-To: <20170412044156.17351-1-f.fainelli@gmail.com>

Make of_match_node() an inline function when CONFIG_OF=n which allows the
compiler to eliminate warnings about unused variables.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 include/linux/of.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/linux/of.h b/include/linux/of.h
index 21e6323de0f3..2803a85e81ec 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -839,7 +839,11 @@ static inline void of_property_clear_flag(struct property *p, unsigned long flag
 }
 
 #define of_match_ptr(_ptr)	NULL
-#define of_match_node(_matches, _node)	NULL
+static inline const struct of_device_id *of_match_node(
+	const struct of_device_id *matches, const struct device_node *node)
+{
+	return NULL;
+}
 #endif /* CONFIG_OF */
 
 /* Default string compare functions, Allow arch asm/prom.h to override */
-- 
2.9.3

  parent reply	other threads:[~2017-04-12  4:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-12  4:41 [PATCH v2 0/3] of: Make of_match_node() an inline stub for CONFIG_OF=n Florian Fainelli
2017-04-12  4:41 ` [PATCH v2 1/3] mfd: max8998: Remove CONFIG_OF around max8998_dt_match Florian Fainelli
     [not found]   ` <20170412044156.17351-2-f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-04-12  7:59     ` Lee Jones
2017-04-12  4:41 ` [PATCH v2 2/3] net: macb: Remove CONFIG_OF around DT match table Florian Fainelli
2017-04-12 20:51   ` Rob Herring
2017-04-12  4:41 ` Florian Fainelli [this message]
     [not found]   ` <20170412044156.17351-4-f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-04-12 18:58     ` [PATCH v2 3/3] of: Make of_match_node() an inline stub for CONFIG_OF=n kbuild test robot
     [not found] ` <20170412044156.17351-1-f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-04-12 14:22   ` [PATCH v2 0/3] " David Miller
2017-04-13  3:46   ` Frank Rowand

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=20170412044156.17351-4-f.fainelli@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=robh+dt@kernel.org \
    --cc=vivien.didelot@savoirfairelinux.com \
    /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).