Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3299475lfo; Mon, 23 May 2022 01:04:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwXwKCEvvC6jWRFxN5t3sJuGFINo0TiC6y++fNN/3Yfk2uK0U9d3aeA0/hCQ0utpvj0/2d X-Received: by 2002:a17:902:7b8f:b0:162:467:db7c with SMTP id w15-20020a1709027b8f00b001620467db7cmr10455496pll.140.1653293067769; Mon, 23 May 2022 01:04:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653293067; cv=none; d=google.com; s=arc-20160816; b=Q8bVg+n0yfoeQNgMHbp3bUHzUevNmvJMmK7A5uyFmUWO6fcd78VLW5sPU6owGzs4TA XMC96qs8ftHMmKCb4rTKNZrJ/mdPpmgWwNaxcJy076X4n5JEL604d2CpO8oCuLKeZdde ySvLgi/l8WYhG8v8UtIbO1/n7exWIHa3qNaAuLX92SmduqbYALkEkFEimptZ9gkYnPYK UCzKNvoL/PhmyE7olYRCBDt1AZziL4+phJFuIEGmPSUp+qFZihsdqTQSqSF2VMWBzaK6 bNYFChmtdWnS1hB//luBi9WqkPOZM+/kpYSfIt89In64r9nO/5taNoMHEy3gK0IhIxfA HMZA== 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=rCj+2wuo0EKtgYohW5UYvrq91l37l8Auyai5P939bcM=; b=Xbmr4kaz1ZhInWHiQhvYL0EqWhYaIh3eLnkN2KqHUPDO1qscL6PX1z2HbMc25C0BHQ CU3KiUzig+vAxkjeS0t51WYNEEQDv4HKWCj3QnF0geT3Ze8Dap2G1KT332Mv/F97zL9r Vvnq2xDSVDOOv50Vt9LO2qimO+O4QJmGXXbQRE87CMUIvIR9kIy76rmKOKyuPajNlUjo mXFf+lkclOH+fns31FFo/cos9m4krmQa2h7M6AO7sexTrbKQBB53LOZxZPupC9Xjsfkn AoIJ+f+PpGZMBRSEVg5wevzkM7ij+f1pLs0H6bQMRlqmvsO1zsKaZ2WNiPEd2fI6rLiU yIIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=eY916wTp; 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 q145-20020a632a97000000b003ab9d94aaccsi9004422pgq.328.2022.05.23.01.04.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 01:04: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=eY916wTp; 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 out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C645022BB02; Mon, 23 May 2022 00:07:53 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354402AbiEUDR3 (ORCPT + 99 others); Fri, 20 May 2022 23:17:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232435AbiEUDR1 (ORCPT ); Fri, 20 May 2022 23:17:27 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0289B15F6EB; Fri, 20 May 2022 20:17:26 -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=rCj+2wuo0EKtgYohW5UYvrq91l37l8Auyai5P939bcM=; b=eY916wTpVdbWeSyhgS6/LM/EVg wGG+DJlO2ME20eHlyKZ1rSFbo2UxJFW6ZOJkLo6JTl3S3pMkIFaZJobXGqWrMUJjRHaDNRZp1O72V fgB+i+zMtpth7F6hz9e0BDQOTfprhqTqiHnnm5maU7jXpLBifY5UNBwu61c9kqVFpeCaAy8Idzdwc 0Vm1pIhRF63+enTN5uvxg4TWItiGj9GhsEeC8HzEq/PEcTIk5gnVZLd7MrqyBHHAY5Wk4aLJuxCka UIhCprEjcqHp7MpKBnZYA4uCEbL744hKJJrQKoPIHQcOVwFeTL778qWcKUUNAU2l/9WcGZbdXrqRy TIlF1rSw==; Received: from [2601:1c0:6280:3f0::aa0b] by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nsFcI-00EKjX-IH; Sat, 21 May 2022 03:17:22 +0000 Message-ID: <6671de03-c09c-bfaf-e06c-e45af70d4354@infradead.org> Date: Fri, 20 May 2022 20:17:18 -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 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> In-Reply-To: <3ae306e0-c6c7-ed12-cacd-62b1c26dba3c@infradead.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.3 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 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. > -- ~Randy