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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4366BC54EE9 for ; Tue, 27 Sep 2022 11:37:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231982AbiI0Lh1 (ORCPT ); Tue, 27 Sep 2022 07:37:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232002AbiI0LhV (ORCPT ); Tue, 27 Sep 2022 07:37:21 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29C6E14D30A for ; Tue, 27 Sep 2022 04:37:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 83EF0B81B83 for ; Tue, 27 Sep 2022 11:37:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3BF0EC433D6; Tue, 27 Sep 2022 11:37:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664278630; bh=3PBR6jtbh1qTflhCYVgBgGTgrWQZjL8THBuMEWqh6Ls=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=u9TwBkciHvLbhWtRjmeA9Gi9qYfDxSP8WqasYHlU6mxqB7RpbKwOIdpCu0NObXB7u VNJeLyZMUKsnu9kJUo0xkzCxkX/l3PWB/1EbU1qLbjwYmCDahHNjzyBwaAgBBiVt9V Mz0aedshjFhtf4dpFLEj2jzRso/96UNQ1LDaMYN/QGq+/YS92zDYyW3a0kN+koxuzl dJHvyKP09mcPtRFbwZduf+j0hgjEu9NbEYfueIpRidG/pwbmLKZTPNy3I055+ySzqh xATTTo0EqIlOt7eGM8o48R5Hz25WXtsZT0Q53FVRhO9Tpwh/HRIuqilCJAmASYsOQs +rwK4MujNu4/Q== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1od8tf-00Cy3R-TZ; Tue, 27 Sep 2022 12:37:08 +0100 Date: Tue, 27 Sep 2022 07:37:07 -0400 Message-ID: <86tu4t6obg.wl-maz@kernel.org> From: Marc Zyngier To: "Arnd Bergmann" Cc: "Huacai Chen" , "Thomas Gleixner" , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, "Xuefeng Li" , "Huacai Chen" , "Jiaxun Yang" Subject: Re: [PATCH] irqchip: Make irqchip_init() usable on pure ACPI systems In-Reply-To: References: <20220927045514.2762299-1-chenhuacai@loongson.cn> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: arnd@arndb.de, chenhuacai@loongson.cn, tglx@linutronix.de, loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, lixuefeng@loongson.cn, chenhuacai@gmail.com, jiaxun.yang@flygoat.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 27 Sep 2022 03:51:04 -0400, "Arnd Bergmann" wrote: > > On Tue, Sep 27, 2022, at 6:55 AM, Huacai Chen wrote: > > > @@ -28,7 +28,9 @@ extern struct of_device_id __irqchip_of_table[]; > > > > void __init irqchip_init(void) > > { > > +#ifdef CONFIG_OF_IRQ > > of_irq_init(__irqchip_of_table); > > +#endif > > acpi_probe_device_table(irqchip); > > } > > I think that #ifdef should be in the include/linux/of_irq.h > header, with an empty inline function in the #else path. Agreed. Please keep the C code free of #ifdefs if at all possible. Thanks, M. -- Without deviation from the norm, progress is not possible.