From patchwork Thu Nov 24 16:25:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9446055 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 746F06071C for ; Thu, 24 Nov 2016 16:26:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 676B826E39 for ; Thu, 24 Nov 2016 16:26:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5AF0B262F2; Thu, 24 Nov 2016 16:26:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E5BE42808F for ; Thu, 24 Nov 2016 16:26:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753383AbcKXQZ7 (ORCPT ); Thu, 24 Nov 2016 11:25:59 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:58881 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751644AbcKXQZ6 (ORCPT ); Thu, 24 Nov 2016 11:25:58 -0500 Received: from wuerfel.lan ([78.43.21.235]) by mrelayeu.kundenserver.de (mreue103 [212.227.15.145]) with ESMTPA (Nemesis) id 0Lvywf-1cobD80ikf-017osk; Thu, 24 Nov 2016 17:25:51 +0100 From: Arnd Bergmann To: Mauro Carvalho Chehab Cc: Arnd Bergmann , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] [media] b2c2: use IS_REACHABLE() instead of open-coding it Date: Thu, 24 Nov 2016 17:25:38 +0100 Message-Id: <20161124162549.3787200-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:dTQ7AkcTPQ0hzRY1sLhg287dwBSOS1A5S4k1a+nlX+sOdzahqTY 0JCNcIvLaUJeMfAG5tg9fRgUIPFBc7MAXoHSqkPQ0nx582xniVCxYE+YlWF+Y5nRJOvAWMo 5JAJ6a4NoaRDQsZRWt5fBfUhqs4FINYOh3rMnRRoW1SxNfw5aNDfv0dmVVrafmd4i7Ld6n1 7OAQLTUvPdFgJpp3yjzDQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:EJKOaiX5i30=:UyWjssM0KZUGLwHVTk3uX1 vkkHLtLpL9pGlN/7aNnBC431ixVTUEvBI+Il0tJYwY6IGozNdwAUY0ZkeHB7Ot8U2ujw/BHQw OZv1JPzG22VGn32uEcRPYo0MiyEP6ESvZA9FLFW6zRmPXX4u/pMRdgVROOUBl8fYgH/xFqcQt Ddlkyh+yBcoKkTd/wbpcaxAncugEKGsf3lpeSCrnkv1xfIwrYsvJgrkm1YaBWG0JR4Dyci/h2 qWTVbb4/JiKGCykRkVjvRdDvMeJOSwMMBeRuZtGxf1MaFdMA05PxTEsnNYK06NCztgQow2aSb FwAAzbYnGuz7XwnN8oCi7c8PkQxuIkzn0st8VEkD5Do9NnQigRPy8CXW0gSqQd5e9Kl9LG8xd QMhltagk92I5jVJJ6mGHO/nD18W5WbjIzZ8qSyFl8oEBZUkTQJrv01W/zu+m44Ti1WuvcuvKl 29oFUUB6aPBeAbmrP4l+pnWs8HCx1fpH0Gulw3JCEBytOaK+VjQT+MSh1YflGtAYUY1jRHPAj YESavYUzdtngDfidEAXwS89Q6eUgJsuooqRepJkdu4VlloGA9aI3+raj1FFUVIwMs82Tmxdba uyAQcMjegLeiQf88pqKQ07MMl/HqyTqRSLNE8jRFgaWqBA5v3ntOpo+nZjP5tVTl/afeKA5BE KAaHOE28kxrAU7rDO8JIiGs77LyE/sGxm5jSor9VAF9EWIFox1mZTjA3X/fRSpNq4ex0= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The FE_SUPPORTED() macro is basically the same as IS_REACHABLE, except that it causes a warning with gcc-7: common/b2c2/flexcop-fe-tuner.c:30:1: error: this use of "defined" may not be portable [-Werror=expansion-to-defined] common/b2c2/flexcop-fe-tuner.c:30:1: error: this use of "defined" may not be portable [-Werror=expansion-to-defined] common/b2c2/flexcop-fe-tuner.c:30:1: error: this use of "defined" may not be portable [-Werror=expansion-to-defined] Using IS_REACHABLE() to define it avoids the warning. Fixes: 3785bc170f79 ("[media] b2c2: break it into common/pci/usb directories") Signed-off-by: Arnd Bergmann --- drivers/media/common/b2c2/flexcop-fe-tuner.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/common/b2c2/flexcop-fe-tuner.c b/drivers/media/common/b2c2/flexcop-fe-tuner.c index f5956402fc69..5f10151ecec9 100644 --- a/drivers/media/common/b2c2/flexcop-fe-tuner.c +++ b/drivers/media/common/b2c2/flexcop-fe-tuner.c @@ -24,8 +24,7 @@ /* Can we use the specified front-end? Remember that if we are compiled * into the kernel we can't call code that's in modules. */ -#define FE_SUPPORTED(fe) (defined(CONFIG_DVB_##fe) || \ - (defined(CONFIG_DVB_##fe##_MODULE) && defined(MODULE))) +#define FE_SUPPORTED(fe) IS_REACHABLE(CONFIG_DVB_ ## fe) #if FE_SUPPORTED(BCM3510) || (FE_SUPPORTED(CX24120) && FE_SUPPORTED(ISL6421)) static int flexcop_fe_request_firmware(struct dvb_frontend *fe,