From patchwork Mon Jun 6 09:28:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 69391 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp1387848qgf; Mon, 6 Jun 2016 02:28:07 -0700 (PDT) X-Received: by 10.98.130.143 with SMTP id w137mr24656128pfd.44.1465205287197; Mon, 06 Jun 2016 02:28:07 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fd4si9313498pab.169.2016.06.06.02.28.06; Mon, 06 Jun 2016 02:28:07 -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 S1752779AbcFFJ1k (ORCPT + 31 others); Mon, 6 Jun 2016 05:27:40 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:24831 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752695AbcFFJ1g (ORCPT ); Mon, 6 Jun 2016 05:27:36 -0400 Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id u569REiO026712; Mon, 6 Jun 2016 18:27:14 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com u569REiO026712 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1465205235; bh=iH1hsCfM72kFnYbKyYovIE0fh2Hp/ynA87R/gflL8II=; h=From:To:Cc:Subject:Date:From; b=KoHE4NWL2ou+pyIGlrTF7BmZhLpjKKOr1GazWoSfN5vEhCBj5AGrYIf2pHSPm39MD S3ZYJDddzsAltfuLT4kQXV+XA55dlZQk5ZzNyKsVWUwBcFce4U1lNXKBG2zK8ZhcX7 Oc2dlpfz1dDUixQns49iouC+DnprCnt6trn3AMJM3BdUry311VrhpvuFXTS9+HiR9D fwjXUR7VgA56nFpXIWanO68dkMnH+iBe6p2lXAIz+RFwmuCX8xBXbkXD9n2TT8vlD8 yfXR4YC6itdBNKm0wH5sjRgyBiQZQHahib3ez0htYWPgF+ZSbBw7UMskZGs5X7Lwom 52m/9I3nMmlmg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kernel@vger.kernel.org, Andrew Morton Cc: Linus Torvalds , Michal Simek , Masahiro Yamada Subject: [PATCH] kconfig.h: use already defined macros for IS_REACHABLE() define Date: Mon, 6 Jun 2016 18:28:25 +0900 Message-Id: <1465205305-31202-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 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 b33c779..e0182e1 100644 --- a/include/linux/kconfig.h +++ b/include/linux/kconfig.h @@ -41,8 +41,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) && config_enabled(MODULE))) +#define IS_REACHABLE(option) (IS_BUILTIN(option) || \ + (IS_MODULE(option) && config_enabled(MODULE))) /* * IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',