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 AB7DAC6FD1D for ; Tue, 21 Mar 2023 08:28:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231236AbjCUI2o (ORCPT ); Tue, 21 Mar 2023 04:28:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231168AbjCUI2Q (ORCPT ); Tue, 21 Mar 2023 04:28:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 056F64491; Tue, 21 Mar 2023 01:28:14 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 83DEA619BF; Tue, 21 Mar 2023 08:28:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8EFEC4339B; Tue, 21 Mar 2023 08:28:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679387293; bh=CoOWB5m6DsId/z5WaBKhpXg+WFwSZORzhnSfYgGrajA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=UsFCZnK+ldzABZuMk/PN22yEaiZnVYBIpPksijS5ZNIwZTCSgANuleuujci9lwHVZ M9Z0s8E0BmhEriEKc3YRxpebCE6GKKYoF6qr6pqQsCmhP18H52RR+/ot8tyuPRqJHu ns3IW9fRX79g7/efzc5I4gm2+5VZwRM5snanwdJfhrBELF7LWxPCPmf6CzHQ74gvX9 nDfp2qZipUmdlhXmUfaH8RRzwAGoTndQ095sWbScw3iGZ9b5fXaLlAERd9KCorQtA+ 8mmViO4IslkvVQk7HR6njLKik+EpXHOeY33A3a1L5ugBk3jNuCPM5zaj+YX/OmK2O4 7HOOxwTWsfd7Q== Received: by mail-ot1-f50.google.com with SMTP id v17-20020a9d6051000000b0069a413e9cf6so8104360otj.3; Tue, 21 Mar 2023 01:28:13 -0700 (PDT) X-Gm-Message-State: AO0yUKVzFOfsU+hYegOU9U3MNy/czqQNB2K9AUxXHCwhlIz47+cRdvea WkcKjKgK4X3C/Kgikyq3WVgFYZakTupb838+8OE= X-Google-Smtp-Source: AK7set+xIFO1Ffs+pzsdRPHCvC6QdwrEOO/QPrSR2a/x52pa4JNUXT0IFNcgFvNQr9vzH8MBNGJJET7uyOeQUO+RE5Q= X-Received: by 2002:a05:6830:3299:b0:688:d1a8:389e with SMTP id m25-20020a056830329900b00688d1a8389emr500571ott.1.1679387293218; Tue, 21 Mar 2023 01:28:13 -0700 (PDT) MIME-Version: 1.0 References: <20230224150811.80316-1-nick.alcock@oracle.com> <20230224150811.80316-10-nick.alcock@oracle.com> <86y1onw02k.wl-maz@kernel.org> <86wn47vue1.wl-maz@kernel.org> In-Reply-To: From: Masahiro Yamada Date: Tue, 21 Mar 2023 17:27:36 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 09/27] irqchip: remove MODULE_LICENSE in non-modules To: Luis Chamberlain Cc: Marc Zyngier , Christoph Hellwig , Nick Alcock , linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org, Hitomi Hasegawa , Thomas Gleixner , Philipp Zabel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 25, 2023 at 4:59=E2=80=AFAM Luis Chamberlain wrote: > > On Fri, Feb 24, 2023 at 05:35:34PM +0000, Marc Zyngier wrote: > > On Fri, 24 Feb 2023 17:21:40 +0000, > > Luis Chamberlain wrote: > > > > > > On Fri, Feb 24, 2023 at 03:32:51PM +0000, Marc Zyngier wrote: > > > > On Fri, 24 Feb 2023 15:07:53 +0000, > > > > Nick Alcock wrote: > > > > > > > > > > Since commit 8b41fc4454e ("kbuild: create modules.builtin without > > > > > Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declaratio= ns > > > > > are used to identify modules. As a consequence, uses of the macro > > > > > in non-modules will cause modprobe to misidentify their containin= g > > > > > object file as a module when it is not (false positives), and mod= probe > > > > > might succeed rather than failing with a suitable error message. > > > > > > > > > > So remove it in the files in this commit, none of which can be bu= ilt as > > > > > modules. > > > > > > > > > > Signed-off-by: Nick Alcock > > > > > Suggested-by: Luis Chamberlain > > > > > Cc: Luis Chamberlain > > > > > Cc: linux-modules@vger.kernel.org > > > > > Cc: linux-kernel@vger.kernel.org > > > > > Cc: Hitomi Hasegawa > > > > > Cc: Thomas Gleixner > > > > > Cc: Marc Zyngier > > > > > Cc: Philipp Zabel > > > > > --- > > > > > drivers/irqchip/irq-renesas-rzg2l.c | 1 - > > > > > 1 file changed, 1 deletion(-) > > > > > > > > > > diff --git a/drivers/irqchip/irq-renesas-rzg2l.c b/drivers/irqchi= p/irq-renesas-rzg2l.c > > > > > index 25fd8ee66565..4bbfa2b0a4df 100644 > > > > > --- a/drivers/irqchip/irq-renesas-rzg2l.c > > > > > +++ b/drivers/irqchip/irq-renesas-rzg2l.c > > > > > @@ -390,4 +390,3 @@ IRQCHIP_MATCH("renesas,rzg2l-irqc", rzg2l_irq= c_init) > > > > > IRQCHIP_PLATFORM_DRIVER_END(rzg2l_irqc) > > > > > MODULE_AUTHOR("Lad Prabhakar "); > > > > > MODULE_DESCRIPTION("Renesas RZ/G2L IRQC Driver"); > > > > > -MODULE_LICENSE("GPL"); > > > > > > > > I'm probably missing some context here, but I find it odd to drop > > > > something that is a important piece of information because of what > > > > looks like a tooling regression. > > > > > > > > It also means that once a random driver gets enabled as a module, i= t > > > > won't load because it is now missing a MODULE_LICENSE() annotation. > > > > > > > > It feels like MODULE_LICENSE should instead degrade to an empty > > > > statement when MODULE isn't defined. Why isn't this approach the > > > > correct one? > > > > > > > > I expect the cover letter would have some pretty good information o= n > > > > this, but lore.kernel.org doesn't seem to have it at the time I wri= te > > > > this ("Message-ID <20230224150811.80316-1-nick.alcock@oracle.com> n= ot > > > > found"). > > > > > > The right thing is to not even have this and have the module license > > > inferred from the SPDX tag. But for now we want to remove the tag fro= m > > > things we know for sure are not modules. > > > > I understand that you want to remove it. I don't get why this is the > > right solution. Can you please assume that, in this particular > > instance, I am a complete idiot and spell it out for me? > > > > Why isn't that a problem for modules that are compiled-in? > > Modules that are compiled in should succeed with a modprobe call as its > already loaded. The construct we're looking for is a way to detect > things which are built-in but *could* be modules. The annotation today > is done at build time for something built-in using a file path using > modinfo. Why is it important to make "modprobe irq-renesas-rza1" fail? With CONFIG_RENESAS_RZA1_IRQC=3Dy, "modprobe irq-renesas-rza1" exits with 0. I do not think it is a big deal since irq-renesas-rza1 is available as built-in. --=20 Best Regards Masahiro Yamada