From patchwork Tue Jun 14 05:58:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 69966 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp1882243qgf; Mon, 13 Jun 2016 22:59:02 -0700 (PDT) X-Received: by 10.98.50.135 with SMTP id y129mr1806572pfy.62.1465883940167; Mon, 13 Jun 2016 22:59:00 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cu4si14471805pad.192.2016.06.13.22.58.59; Mon, 13 Jun 2016 22:59:00 -0700 (PDT) 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; dkim=pass header.i=@nifty.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 S1751382AbcFNF6t (ORCPT + 30 others); Tue, 14 Jun 2016 01:58:49 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:17386 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751226AbcFNF6r (ORCPT ); Tue, 14 Jun 2016 01:58:47 -0400 Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id u5E5vrma023811; Tue, 14 Jun 2016 14:57:56 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com u5E5vrma023811 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1465883877; bh=nJDUF5imF4/osJ39gpFiXQ4jokef3fCj4VFwiBQ/4ag=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lnUevZgjSrkfwTNgzOD9x20/Uo8ssMmuGm2b2MB+8bHj8dHL0dRL63gHgNsaYldQI OlJN1HNubLImUmAjYTJsauI5dOf7b4ydulQvefejYxM/d0TX0Xdzen3DnPpJkhjo/q +jRMKN+Y3RWfrxJdQaGOAjQ+lc4i0bkQns2jdpJwTce2dZ4OBozle+tRK/8wLbzUhh Hw9h6Lp2Z7q/EJqYS9HFzCqUOdEjkehYEF5SsO29T3grJ3pFUaL27ph7oUf/WqGBrq lp4eXv160ByNBlSRv+621Wuk/G/edNrsH29Hb77MS8iLYaJkz+ikUnNEghc0MPY9nd THqbnkOcDGwpw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kernel@vger.kernel.org, Andrew Morton Cc: Rusty Russell , Michal Simek , Linus Torvalds , Arnd Bergmann , Michal Marek , Nicolas Pitre , Masahiro Yamada Subject: [PATCH 3/5] kconfig.h: use already defined macros for IS_REACHABLE() define Date: Tue, 14 Jun 2016 14:58:56 +0900 Message-Id: <1465883938-25194-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465883938-25194-1-git-send-email-yamada.masahiro@socionext.com> References: <1465883938-25194-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For the same reason as commit 02d699f1f464 ("include/linux/kconfig.h: ese macros which are already defined"), it is better to use macros IS_BUILTIN() and IS_MODULE() for defining IS_REACHABLE(). Signed-off-by: Masahiro Yamada --- include/linux/kconfig.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.9.1 diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h index a94b5bf..722c7d2 100644 --- a/include/linux/kconfig.h +++ b/include/linux/kconfig.h @@ -42,8 +42,8 @@ * This is similar to IS_ENABLED(), but returns false when invoked from * built-in code when CONFIG_FOO is set to 'm'. */ -#define IS_REACHABLE(option) (config_enabled(option) || \ - (config_enabled(option##_MODULE) && __is_defined(MODULE))) +#define IS_REACHABLE(option) (IS_BUILTIN(option) || \ + (IS_MODULE(option) && __is_defined(MODULE))) /* * IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',