From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4CA7C433E6 for ; Mon, 11 Jan 2021 08:46:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7FC5022AAA for ; Mon, 11 Jan 2021 08:46:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727970AbhAKIqS convert rfc822-to-8bit (ORCPT ); Mon, 11 Jan 2021 03:46:18 -0500 Received: from aposti.net ([89.234.176.197]:60172 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727240AbhAKIqS (ORCPT ); Mon, 11 Jan 2021 03:46:18 -0500 Date: Mon, 11 Jan 2021 08:45:23 +0000 From: Paul Cercueil Subject: Re: [PATCH v2 1/2] kconfig.h: Add IF_ENABLED() macro To: Linus Walleij , Arnd Bergmann Cc: od@zcrc.me, GPIO SUBSYSTEM , linux-kernel@vger.kernel.org, Zhou Yanjie Message-Id: In-Reply-To: References: <20201213235447.138271-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Le lun. 14 déc. 2020 à 10:05, Linus Walleij a écrit : > On Mon, Dec 14, 2020 at 12:54 AM Paul Cercueil > wrote: > >> IF_ENABLED(CONFIG_FOO, ptr) evaluates to (ptr) if CONFIG_FOO is set >> to 'y' >> or 'm', NULL otherwise. The (ptr) argument must be a pointer. >> >> The IF_ENABLED() macro can be very useful to help GCC drop dead >> code. > > I can apply this with the other patch to the pinctrl subsystem if > Arnd or > someone else who is good at KConfig provides an ACK. Arnd? Any feedback? Cheers, -Paul