Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1645494ioo; Sun, 22 May 2022 22:50:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIQDdQfRqEBI5JNMiUAWFmsOo1EQobtvV08Ag4mfwV5QAk4ZQhd8R0snUUVrr3XqQCc8ZO X-Received: by 2002:a63:f215:0:b0:3f5:da0b:27c3 with SMTP id v21-20020a63f215000000b003f5da0b27c3mr18741620pgh.199.1653285027485; Sun, 22 May 2022 22:50:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653285027; cv=none; d=google.com; s=arc-20160816; b=z6HQ6xQmYb1K/pFVOv49bkoGaVF7YThcXQhgdZPzcQ+yhnYXfPgaW4UBDIZA1gM7YK eTEzHt8eYGQrUUSk1l+dizjPbwPlXlDvKyUxKJk8mfKSEWyEy7u1MMemszwY1rVJipy/ Dei49u8O7nSLIrun60vudGdxzBq48CHFFI89Ke29Xr1GGcr0BRx8vIxf389vOKiqNBYz LZRIZWQjM7EXf6hy+v+EsuxFboGaM/vfdXj0yABngZZ6Dm+PPmYwUQkuboTJNQr3d/Vi 9kjWRYisN1Ejlw9Xrppf0PqSgiGwEMjn5iOlliHv9vfkcIuXdenTtf5oS17vF5au99qQ uoKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=4WwopnVdiZchgwgyYgiOR5oYH5rI/26dfgb7iblNhk0=; b=gUEToPBRyG9syAlxNui1wuCVY4wNpEQIpYjGrfrxh5B9dSsDrSRUmGV0Phv78m1OIL f4HPlDe0Ff8Vq6qOCC6ZuoWu/YExWCHQ6Vhu12J9dmVV+GpI8C6sMlmkdiTMN5mfTAa/ qY/2fDnmIV8OJXwI6+Q/vMAo1R77Eld4Dv4j9+WWD9qCz5pnLkQE1W5xiph+SNKwurRK sQQxSlFM47kaubcy6+lz6Kk3Frt+PmfIls7DosxsYoUhQ06SLuwaPKOEcdpY9c60ZWaq pqwOCZMJvyB2tNCq/mzmawNyVyR/VQnhB43dOOhIjzYJUMr+EEhFdXYQrEc/NPxs1lWx dUbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=IWc3nqi4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id l11-20020a17090a72cb00b001df1faf6ee8si11312118pjk.58.2022.05.22.22.50.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 May 2022 22:50:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=IWc3nqi4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 53E7428996; Sun, 22 May 2022 22:49:07 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354489AbiEUDvS (ORCPT + 99 others); Fri, 20 May 2022 23:51:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229773AbiEUDvP (ORCPT ); Fri, 20 May 2022 23:51:15 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 111D3DF41; Fri, 20 May 2022 20:51:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:References:Cc:To:From:Subject:MIME-Version:Date:Message-ID:Sender :Reply-To:Content-ID:Content-Description; bh=4WwopnVdiZchgwgyYgiOR5oYH5rI/26dfgb7iblNhk0=; b=IWc3nqi4c5ufGx+0zpQ3nEFFKl 4trofu8qu12i5wvDEhin7ta6+7OkCxakqrp4LNtnQ0yZllkPdAlxzlvR9ecDQ27MkTPKxGAuh4g/g PzvakYn065Z/qEILQAb8ou518LJAXH5S/sYVzCY//Wwl2huSamsieZlK5TzdyzXu7ymuCiFxfLkVG y60l1BrwB46WxHKYCRy9lRxvsyxMdoYBcwv0+luCZwji+kkiQmjTCCMPy6S/UghV8EwD2yEDE0oEa QJGta8hoV1OVcSH93QOjsf1PpaLPuspGOwMCVzBzimaK0R2B/gN3v9ucIP0SUldWXNDqJKqv8DTxb 9tD4g3WQ==; Received: from [2601:1c0:6280:3f0::aa0b] by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nsG8z-00ELwI-CT; Sat, 21 May 2022 03:51:09 +0000 Message-ID: <6601a387-de9a-a0d0-11b5-01e0cfa75657@infradead.org> Date: Fri, 20 May 2022 20:51:05 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: kbuild problem: ERROR: modpost: missing MODULE_LICENSE() in drivers/iio/afe/iio-rescale.o Content-Language: en-US From: Randy Dunlap To: Linux Kbuild mailing list , Masahiro Yamada , Liam Beguin Cc: "linux-kernel@vger.kernel.org" , linux-iio@vger.kernel.org, Peter Rosin , "open list:KERNEL SELFTEST FRAMEWORK" , KUnit Development References: <18500f18-9cd5-a81c-4a55-14e999ed4496@infradead.org> <3ae306e0-c6c7-ed12-cacd-62b1c26dba3c@infradead.org> <6671de03-c09c-bfaf-e06c-e45af70d4354@infradead.org> In-Reply-To: <6671de03-c09c-bfaf-e06c-e45af70d4354@infradead.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ok, one more. [also adding Liam here] On 5/20/22 20:17, Randy Dunlap wrote: > > > On 5/20/22 20:08, Randy Dunlap wrote: >> >> >> On 5/20/22 19:40, Randy Dunlap wrote: >>> Hi, >>> >>> In March I reported that a randconfig build complained: >>> >>> ERROR: modpost: missing MODULE_LICENSE() in drivers/iio/afe/iio-rescale.o >>> >>> (https://lore.kernel.org/all/16509fb6-e40c-e31b-2c80-264c44b0beb9@infradead.org/) >>> >>> I am still seeing this problem so I tried to dig into it a bit. >>> However, I don't see why get_next_modinfo() and friends don't find the >>> MODULE_LICENSE() since it is in the iio-rescale.o file. >>> >>> (BTW, I see this build error on many different $ARCH [around 15 tested] >>> and with 2 different versions of GCC.) >>> >>> Q1: Is modpost checking both vmlinux and iio-rescale.o for modinfo license >>> strings? >>> >>> It looks like it is, because it appears (?) that modpost is looking at >>> drivers/iio/test/iio-test-rescale.o (<<<<< a kunit test, which is builtin >>> in my .config) and at drivers/iio/afe/iio-rescale.o (which is built as a >>> loadable module). >>> >>> Is this confusing modpost? >>> I renamed drivers/iio/afe/iio-rescale.c to afe-rescale.c and changed its >>> Makefile entry accordingly and the MODULE_LICENSE error goes away. >> >> Oh well. This rename causes drivers/iio/test/iio-test-rescale.c to have >> build errors, so that's not a solution, just some info... > > and that was due to not updating drivers/iio/test/Makefile. > When that is done, the missing MODULE_LICENSE() is back in afe-rescale.o. > >> >>> Is this a modpost error or is kunit messing things up? >>> >>> thanks for looking. Does this look OK? It allows afe/iio-rescale.o to build XOR test/iio-rescale.o (not both of them). --- a/drivers/iio/test/Kconfig +++ b/drivers/iio/test/Kconfig @@ -6,7 +6,7 @@ # Keep in alphabetical order config IIO_RESCALE_KUNIT_TEST bool "Test IIO rescale conversion functions" - depends on KUNIT=y && !IIO_RESCALE + depends on KUNIT=y && IIO_RESCALE=n default KUNIT_ALL_TESTS help If you want to run tests on the iio-rescale code say Y here. -- ~Randy