From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756286AbbAGJ0Y (ORCPT ); Wed, 7 Jan 2015 04:26:24 -0500 Received: from 7of9.schinagl.nl ([88.159.158.68]:43335 "EHLO 7of9.schinagl.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752337AbbAGJ0W (ORCPT ); Wed, 7 Jan 2015 04:26:22 -0500 Message-ID: <54ACFBBA.3020201@schinagl.nl> Date: Wed, 07 Jan 2015 10:26:18 +0100 From: Olliver Schinagl User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0 MIME-Version: 1.0 To: Arnd Bergmann , linux-arm-kernel@lists.infradead.org CC: Olliver Schinagl , Maxime Ripard , Wolfram Sang , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Paul Gortmaker , Rob Herring , dev@linux-sunxi.org, Grant Likely Subject: Re: [PATCH v1] ARM:sunxi:sid: Make use of the of_match_ptr References: <1420616468-3782-1-git-send-email-oliver+list@schinagl.nl> <12820267.9PZueKuf7O@wuerfel> In-Reply-To: <12820267.9PZueKuf7O@wuerfel> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey Arnd, On 07-01-15 10:00, Arnd Bergmann wrote: > On Wednesday 07 January 2015 08:41:08 Olliver Schinagl wrote: >> From: Olliver Schinagl >> >> I probably have forgotten to use this macro for the of_match pointer, so >> this patch adds the of_match_ptr macro. >> >> Signed-off-by: Olliver Schinagl >> --- >> drivers/misc/eeprom/sunxi_sid.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/misc/eeprom/sunxi_sid.c b/drivers/misc/eeprom/sunxi_sid.c >> index 8385177..5a330d9 100644 >> --- a/drivers/misc/eeprom/sunxi_sid.c >> +++ b/drivers/misc/eeprom/sunxi_sid.c >> @@ -25,6 +25,7 @@ >> #include >> #include >> #include >> +#include >> #include >> #include >> #include >> @@ -146,7 +147,7 @@ static struct platform_driver sunxi_sid_driver = { >> .remove = sunxi_sid_remove, >> .driver = { >> .name = DRV_NAME, >> - .of_match_table = sunxi_sid_of_match, >> + .of_match_table = of_match_ptr(sunxi_sid_of_match), >> }, >> }; >> module_platform_driver(sunxi_sid_driver); > This looks wrong: sunxi_sid_of_match is defined unconditionally, so > now you get a compiler warning if CONFIG_OF is disabled. > > The existing code is good, we only add the of_match_ptr() for drivers > that are useful without CONFIG_OF and that want to save a few bytes > in .data size. Ah, I missunderstood its use then!It looked like the of_match_ptr() got defined away otherwise. Sorry for the noise! Olliver > > Arnd