From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756195AbdDFTcv (ORCPT ); Thu, 6 Apr 2017 15:32:51 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:34482 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756127AbdDFTcf (ORCPT ); Thu, 6 Apr 2017 15:32:35 -0400 From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, Florian Fainelli , Rob Herring , Frank Rowand , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE) Subject: [PATCH] of: Make of_match_node() an inline stub for CONFIG_OF=n Date: Thu, 6 Apr 2017 12:32:24 -0700 Message-Id: <20170406193224.10046-1-f.fainelli@gmail.com> X-Mailer: git-send-email 2.9.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make of_match_node() an inline function when CONFIG_OF=n which allows the compiler to eliminate warnings about unused variables. Suggested-by: Andrew Lunn Signed-off-by: Florian Fainelli --- 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