From patchwork Thu Apr 8 20:58:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 12192489 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=-12.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable 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 6EE18C433ED for ; Thu, 8 Apr 2021 20:59:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2E4EC61182 for ; Thu, 8 Apr 2021 20:59:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232459AbhDHVAJ (ORCPT ); Thu, 8 Apr 2021 17:00:09 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:46605 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232416AbhDHVAI (ORCPT ); Thu, 8 Apr 2021 17:00:08 -0400 Received: from localhost.localdomain (133-32-232-101.west.xps.vectant.ne.jp [133.32.232.101]) (authenticated) by conuserg-09.nifty.com with ESMTP id 138Kx46x002644; Fri, 9 Apr 2021 05:59:04 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com 138Kx46x002644 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1617915545; bh=CMNsK6z9omY3K2WcWrv+g7O+FAyKXeHXo7JaGbnAshQ=; h=From:To:Cc:Subject:Date:From; b=mCAELu1K9iNcHwzxPpkt2QeYzsGvXO3xtV9FO7Le8ftDrt50ftucQPKlGRH7qugRy Ya3grKSZw2YFqHeSRjzjleVybuCxC+F+LDqxW2ODDfZDizTzeFFEkS6xgklZ8DNySf sgjxmlZOGgylBtk14MT/msL3h5+0RgNqd1KhWiFHvZojROpII/2xzBmIKYk5FrMILE JH+ze/FBtu+Utc1Sh1V3UapkGiwD83/r25JpRXNpVeB6q8+2OIyrktRiLXSQ5RNZ6Y WT1cfD2EQCAGNfK7s+unVooFzVx+HATnyUBAB+3r8X2pMEEL5HCT32AGFF6izs7hFa M6AzFOhU0pc5Q== X-Nifty-SrcIP: [133.32.232.101] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-gpio@vger.kernel.org, Arnd Bergmann , Paul Cercueil , Masahiro Yamada , Len Brown , Linus Walleij , Pavel Machek , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 0/2] linux/kconfig.h: move IF_ENABLED() out of Date: Fri, 9 Apr 2021 05:58:56 +0900 Message-Id: <20210408205858.51751-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org I insist on having only minimal set of macros that are needed to evaluate CONFIG options. Everytime somebody added an alien to , I needed to kick it out. I did not notice 1b399bb04837183cecdc1b32ef1cfc7fcfa75d32 because I was not addressed by [1]. [1]: https://lore.kernel.org/lkml/?q=kconfig.h%3A+Add+IF_ENABLED%28%29+macro I like Paul's idea, but if I had noticed the patch in time, I would have tried my best to persuade to implement it outside of (Paul's initial patch was adding it to a new header instead of ) Before it is widely used, I want to fix it. In 2/2, I converted pm.h to allow driver cleanups. Masahiro Yamada (2): linux/kconfig.h: replace IF_ENABLED() with PTR_IF() in pm: allow drivers to drop #ifdef and __maybe_unused from pm callbacks drivers/pinctrl/pinctrl-ingenic.c | 20 ++++----- include/linux/kconfig.h | 6 --- include/linux/kernel.h | 2 + include/linux/pm.h | 67 +++++++++++-------------------- 4 files changed, 36 insertions(+), 59 deletions(-)