Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1647772ioo; Sun, 22 May 2022 22:56:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHgSklhLshJqDnUPI4PZAIJCW0qq5ORJDWIdXQ4L88sqHWufOsTXyg8oEmDAuJuHWUpxCm X-Received: by 2002:a05:6a00:b53:b0:518:8f91:db08 with SMTP id p19-20020a056a000b5300b005188f91db08mr7587075pfo.22.1653285411940; Sun, 22 May 2022 22:56:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653285411; cv=none; d=google.com; s=arc-20160816; b=AQ63KIhCbFlipltJwrYTMjkNy1naW9crwUBeZHYEGBTwpXjES98dOOrTnkrtKuf6Y8 bDdjNMC7duDjmI0JaFz5psxGm4ACSQ7O1Htvcht5w0qwafxlAlr7yFKl3Hr0h8w/9Ppz z1PcweftrUw01RWclZPQSd/Mupp3tB5BhtrsjTC2PsLQ7tOzLn9o2b7KIyfoMoscM4Eu QipBLwUnjyZDoWDDqbkqX1AGuHLwA6H31WDQ3Cmvu7lFo/ieGmOiuAf/IOe84n438ix3 8C/5tI92PUvI5Ar6ApVL2cd2d/GoNvFYmpSYlxxW6tCE2avz1ztKPXflhEkQmY6++8Fy Cyaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=l0jnxTYMQ+einh42QUtyR5KEJNXZYp44NPYbbHl4Gxs=; b=zpKkqZygMikzssSE4OkfVQ90zLP3Xa4bpxByb71SOqMiyQTulLKe0s/DKF7W9WmoAT Hs+kxlCIUIwk2FHrq+LFJ4MFlIkrwxO9qb4DRgK/v3u71Nq5ON1U+GqiG78us+k2wvg3 SEr5FGGlGoA+Uv2ONfNsdVCiYzKqaGozIUG1VUrtM4WEtyNElSr9BQrgqNPwZCH4vu8V dQMx6pgkXtzy0NHMstiwgBLh16Ir7+GKh7UxGVEFjXef64QvrPwB7LOwyLgLSoFdqbpP ZqK122p3KLj8v0B5FM53okfNaFbtwb7kyl9jl15UX7piwGRbfHVxQIpSNj/UcDaGTznC QeDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=sd5Skt6f; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id e11-20020a17090ab38b00b001cb7ed1747fsi12100845pjr.171.2022.05.22.22.56.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 May 2022 22:56:51 -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=@nifty.com header.s=dec2015msa header.b=sd5Skt6f; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 640AD29CA2; Sun, 22 May 2022 22:52:46 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239893AbiEUENy (ORCPT + 99 others); Sat, 21 May 2022 00:13:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233175AbiEUENu (ORCPT ); Sat, 21 May 2022 00:13:50 -0400 Received: from conssluserg-03.nifty.com (conssluserg-03.nifty.com [210.131.2.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 818F3AF1C5; Fri, 20 May 2022 21:13:49 -0700 (PDT) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (authenticated) by conssluserg-03.nifty.com with ESMTP id 24L4DK2q027193; Sat, 21 May 2022 13:13:20 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com 24L4DK2q027193 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1653106400; bh=l0jnxTYMQ+einh42QUtyR5KEJNXZYp44NPYbbHl4Gxs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=sd5Skt6f3VurMXt5yhrtPI6uLY0krE0xiOnSxvKESWZeBs6mXJKK7XkPbgQPNHtsQ w/zexhv88CfDWesdsGdN4Cfc+YwIGsfTr9e8JjjyTvsnnzFNeu4xbGz2ZWhSWfgTTx O5jWTWbb9J81OTusmiZT9gqcOGNsZ/pN0AIAxdwBi9iQ4xbzismIfdzIjYIu7CANk3 v2jjLaIKUk0occAC1tI27flxadhMJq8JFWlAeBLbE9si0sPsNDmcAEc/dMFCZNPKGb eQuMzPXBMU8olS1sodK/CoZIj3bOD8Fs7b//KLVh5oR5pgJyrpR/M7Q7xl+4f6kmPR EulfIbEV+I+Uw== X-Nifty-SrcIP: [209.85.210.176] Received: by mail-pf1-f176.google.com with SMTP id bo5so9241216pfb.4; Fri, 20 May 2022 21:13:20 -0700 (PDT) X-Gm-Message-State: AOAM5325KldPcz5pYtzw2U4yaxYjLdoUwRz3bA+6E/fX3ih2qcAABDyL 19I2ncyTEx/iG0x76tD46PutcnTapX/5N8LpELg= X-Received: by 2002:a05:6a00:a02:b0:4fd:f9dd:5494 with SMTP id p2-20020a056a000a0200b004fdf9dd5494mr13624800pfh.68.1653106399660; Fri, 20 May 2022 21:13:19 -0700 (PDT) MIME-Version: 1.0 References: <18500f18-9cd5-a81c-4a55-14e999ed4496@infradead.org> In-Reply-To: <18500f18-9cd5-a81c-4a55-14e999ed4496@infradead.org> From: Masahiro Yamada Date: Sat, 21 May 2022 13:12:42 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: kbuild problem: ERROR: modpost: missing MODULE_LICENSE() in drivers/iio/afe/iio-rescale.o To: Randy Dunlap Cc: Linux Kbuild mailing list , "linux-kernel@vger.kernel.org" , linux-iio@vger.kernel.org, Peter Rosin , "open list:KERNEL SELFTEST FRAMEWORK" , KUnit Development Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no 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 Sat, May 21, 2022 at 11:40 AM 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? MODULE_LICENSE() is no-op for vmlinux. modpost checks this only for modules. > > 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. > > Is this a modpost error or is kunit messing things up? > > thanks for looking. > -- > ~Randy -- Best Regards Masahiro Yamada