From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933577AbcKVObT (ORCPT ); Tue, 22 Nov 2016 09:31:19 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:61994 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933135AbcKVObQ (ORCPT ); Tue, 22 Nov 2016 09:31:16 -0500 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: Arnd Bergmann , Alexandre Belloni , "David S. Miller" , Marcin Wojtas , Vladimir Zapolskiy , linux-kernel@vger.kernel.org Subject: [PATCH] misc: sram: remove useless #ifdef Date: Tue, 22 Nov 2016 15:30:54 +0100 Message-Id: <20161122143103.1835294-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:1Vn+oAeUZUCj4c58pGaPHWE8g71ppDf9am6McHyjdWFfoiLOmTV zy2QVG+Bf1yakftiEd55SzhjxZvfHZM6vouvxaglPoy5lSxTIhlx2fhbYbEEZWyz4UHh9Zn GX7EIz/3bQY0TXRyYMmN2d7LmI4H7WxmcD2hyFKGnbqm2V+wWa5CTzToh8v70gNkPyYqKN4 IxyO7WSS8J3Vt30BTLnFg== X-UI-Out-Filterresults: notjunk:1;V01:K0:4ESq+p1zkdc=:dCeWdiJBBdZHeB+ij+rS3t Pmw0/TUn2eXSk8YiMvKVq8KcqcCD6GVZ0hUD01TvAw84OE94LOo+MORJnLsCiYb3Z6SKVhbHr pEoOfNyIKFIiOI+lol8yYTLil/W2Vay1MO+2xyKp7pQMu0mmvz7o7ErrDcmH01Hi2IhWJd7XK fsxOCq6VzhAcxTn4A+Q4BeXV/LVveWbrIVFPpwLAB47AlOzovUtXHpJLLlEvlhikH/rLLFbN8 1RK0w4jA+E+bmQ7V6Yoieui3VmhnL3xmnJdZ6H2o63jga60Q7e/SuCrjoUMIX1pmHaIcHWHdW 31OlJ/Js29f1Xxek/8DvyBAbw1dEyc8EhehIQfPSyto5yRCR9T/aBfoHB/FisTL6S/DUXQDCk o5PHCwad/wSh6TGPeuYagrTkXZc5wJ49312TiUhBDXKIVAK9nDC0KDTZjutiJ4WQL34reSiAg 34r7Wa5SdXXPpn6Wl4bsTQ2PyXZqslFLPqHSfkhA0oawlOEbyJHcJwZSjb4MKMigbQPSUcJUU ooRwz+G1tRuhElMAs7hYRQFRUsAR6giZjrRxCG8Nf/SsVLhyhbX1441xkKv0J/8zwtznJQmG0 bH75LUhP/is3LpeOMCoAVOh4jlSEPUR+h8JMAgmMb7+rrc3x7lZVkqub37tbK9le6ZuYd0OjM QUKw9YqJbXdJmSI7ChQqoazK5XgbLG+hkxzK+7aP+i/mA4XQmTFiDspF99W3tDzh9alc= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A recent patch added a new function that is now unused whenever CONFIG_OF is disabled: drivers/misc/sram.c:342:12: error: 'atmel_securam_wait' defined but not used [-Werror=unused-function] There is actually no reason for the #ifdef, because the driver currently cannot be used in a meaningful way without CONFIG_OF, and there is no compile-time dependency. Removing that #ifdef and the respective of_match_ptr() avoids the warning and simplifies the driver slightly. Fixes: 2ae2e28852f2 ("misc: sram: add Atmel securam support") Signed-off-by: Arnd Bergmann --- drivers/misc/sram.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index b0d4dd9b0586..b33ab8ce47ab 100644 --- a/drivers/misc/sram.c +++ b/drivers/misc/sram.c @@ -353,13 +353,11 @@ static int atmel_securam_wait(void) 10000, 500000); } -#ifdef CONFIG_OF static const struct of_device_id sram_dt_ids[] = { { .compatible = "mmio-sram" }, { .compatible = "atmel,sama5d2-securam", .data = atmel_securam_wait }, {} }; -#endif static int sram_probe(struct platform_device *pdev) { @@ -443,7 +441,7 @@ static int sram_remove(struct platform_device *pdev) static struct platform_driver sram_driver = { .driver = { .name = "sram", - .of_match_table = of_match_ptr(sram_dt_ids), + .of_match_table = sram_dt_ids, }, .probe = sram_probe, .remove = sram_remove, -- 2.9.0