From patchwork Tue Nov 22 14:30:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101471 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp2125347qge; Tue, 22 Nov 2016 06:31:24 -0800 (PST) X-Received: by 10.84.134.131 with SMTP id 3mr208075plh.89.1479825084368; Tue, 22 Nov 2016 06:31:24 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h7si19543231pgc.24.2016.11.22.06.31.23; Tue, 22 Nov 2016 06:31:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933578AbcKVObT (ORCPT + 26 others); 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 Received: from wuerfel.lan ([78.43.21.235]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.129]) with ESMTPA (Nemesis) id 0M53xy-1cxIJf0Z5S-00zGHH; Tue, 22 Nov 2016 15:31:09 +0100 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 Precedence: bulk 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(-) -- 2.9.0 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,