From patchwork Mon Aug 28 10:04:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balamanikandan Gunasundar X-Patchwork-Id: 13367756 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4FE9DC71153 for ; Mon, 28 Aug 2023 10:05:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Mn91y950dLVOOf3EKTj8vgafKPlfSvQaqvnNv9XJcAI=; b=d1fXf3LbxGdg9f uzB53Hm/UuPDe/S1cUD79CKAwgIYrob5YFA8nl9/SuziGM7JdOyhWneRAOH4uTpCen0ysAGQjjaQw DyTNDdm182D+9bbGjMY26aihIlA/KZBRQxmICGDkzOY+7byzbCLMfZaMXnPj5i+NfT5NCOxrLTNFU SaOFVm6uTg8zQT409djPa/h6ceyo+e0CEl4eQC0muHFn1xIXLwYeZbf9DWBSMikHxJ7ZLDOjhTBdb h7WbJtphB3R3N2zfkO/lEX2TepYlgQ4RP8LA/8uggIuy5Pj2HBN4IJX9WR+ZpYaw+7M58gd1oj5Wt ZsWqiDrMpc+m7R3yKTyQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qaZ77-009H6A-0W; Mon, 28 Aug 2023 10:04:53 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qaZ73-009H5E-2L for linux-arm-kernel@lists.infradead.org; Mon, 28 Aug 2023 10:04:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1693217089; x=1724753089; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=k7s9F712FvA8jSYfxO5MUGK+mY28MxXzM47n2+XEP4A=; b=s1iK3wOmPhScP0AmqaE15KQIaE23Q4aoWs0Cbz3wUPRPcZLpaS2YiNdC bD+mP49FPwzZ+KUDnYBLfqGPaIl36ZEb9t2ansvxyx0Hs7kBfpPkGL0V8 WATG6G8HcRlec9ThxcPEIf09UJa51A61Tzlqc46N3HEuXEwMNDjx3ZM/c +x96IsY8juDP1IQElDa8x5dEchkR50tRVMtBigCX2rU1O2wcuW6qzfv0K VxWx/Cu+kU/jT+wxf5AWwjDBB2OTZbo1T4Vasp4i5D4rxp2QJdyHziJO/ 4gomi0c8UxWQycMH+q7DJuC3fIJ8ek1vdBy/Cr7awdfvQHJjM2bwQGynd g==; X-IronPort-AV: E=Sophos;i="6.02,207,1688454000"; d="scan'208";a="1616437" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 28 Aug 2023 03:04:45 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Mon, 28 Aug 2023 03:04:34 -0700 Received: from che-lt-i64410lx.microchip.com (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Mon, 28 Aug 2023 03:04:29 -0700 From: Balamanikandan Gunasundar To: , , , , , , , , CC: , Subject: [PATCH] mmc: atmel-mci: Remove preprocessor directive Date: Mon, 28 Aug 2023 15:34:21 +0530 Message-ID: <20230828100421.19758-1-balamanikandan.gunasundar@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230828_030449_909682_19B5184A X-CRM114-Status: GOOD ( 12.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Remove the preprocessor directive IS_ENABLED(CONFIG_MMC_ATMELMCI) while checking if the device is compatible with atmel,hsmci. Instead handle it in the if() condition. The compiler optimizes out the entire if() clause if the first expression in the if() clause is constant false. Signed-off-by: Balamanikandan Gunasundar Suggested-by: Linus Walleij Reviewed-by: Linus Walleij --- drivers/gpio/gpiolib-of.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 9694eb5afa21..9a191940d5af 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -262,16 +262,15 @@ static void of_gpio_set_polarity_by_property(const struct device_node *np, unsigned int i; bool active_high; -#if IS_ENABLED(CONFIG_MMC_ATMELMCI) /* * The Atmel HSMCI has compatible property in the parent node and * gpio property in a child node */ - if (of_device_is_compatible(np->parent, "atmel,hsmci")) { + if (IS_ENABLED(CONFIG_MMC_ATMELMCI) && + of_device_is_compatible(np->parent, "atmel,hsmci")) { np_compat = np->parent; np_propname = np; } -#endif for (i = 0; i < ARRAY_SIZE(gpios); i++) { if (of_device_is_compatible(np_compat, gpios[i].compatible) &&