Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp4372337ybg; Mon, 8 Jun 2020 06:21:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtCaFo/IN+r2Ota1/zr+o6bkmtUGzgc8ettYDctUZ0p5F/WqVE1okPG+BOdMG+oAThZqTe X-Received: by 2002:aa7:d6c1:: with SMTP id x1mr17516283edr.154.1591622473843; Mon, 08 Jun 2020 06:21:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591622473; cv=none; d=google.com; s=arc-20160816; b=T0TXuTI+wbq+lY8Mqd8QCDMqX1H4uII9mYqdXgnM9Dpiv4XpiVs8Z2fZZ4RyQKLAbs tA0Bn4urLWq3jL5aXmS2orJ8FhCtHkw3i+Kk+c17PSn71jZErGRZKi9AwDTbL2xvx0MH 5samtiwa3MiJCr0uS4GtlrFeVSob/u45m0hXlnf+hnt/5MwAgV5+/RTaOcz/hav1Z1sm yMWkAW1DCkl87lR8+z5YlzH22Fs2E2s6+pNGU9/PZdXc/9wTwbsegEITkNnvYn1mC3TG RI2urDmkqJhCdjZUv2Qu5rjDhQeLp2lFQqj6pnNhBv3wka3kvdw/Ar0d717hEqNebb/7 MgjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=eWdFLLvcIuZyboL1/SgUsT0DsDMgSGooZFYX+NqhUms=; b=PRKz9tOPLfWHmW0Q0kJ63Tk+Jk/eJyQQ2+LJkiNcJol0xrXLSb4V7sA+hlxYU3HX0c E10cIahV/tZXbwHF8ydT3Pzky9nTb1VcpVGaX2UsqdEmVGBHB7EPga+gnxFrRc3A+vM9 Dw2rTFd7shYhfayayTQBB3re5iasRyQDlalTDvjq2UzRD+Az5Sdnj43E7afqFGW5SozH DVXXEd+G3VxMi6y5h51GlOxiCscLx8qSnSsqjrWr5vZzTbdoUPejuAtnSWhurgFsDlwZ xhlIS612hdaKIGMC6e9f1Ap4YUqzXHEONhhcoN5lZiICczVAAeJ8Yyp2/PhPiwWTHBxH NYUQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d16si8696429edx.546.2020.06.08.06.20.50; Mon, 08 Jun 2020 06:21:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729145AbgFHNSz (ORCPT + 99 others); Mon, 8 Jun 2020 09:18:55 -0400 Received: from mga09.intel.com ([134.134.136.24]:13756 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728938AbgFHNSz (ORCPT ); Mon, 8 Jun 2020 09:18:55 -0400 IronPort-SDR: QuIEVe3jP3QwaDP6Mwyrv8DcJALxwt8VvnbdvlTP2AW1eACa+QjYkS0WZXve5bSh9MPn1fELd1 En5Vk+qZdXgA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2020 06:18:54 -0700 IronPort-SDR: 7clb7IzBaVpT99eAC8o442QCzH0KAHncz2sY0WF5Tpu9+lg+gzLCTk8oXg8MDuQzrHoWVkg7Ri FWFu632oKRIA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,487,1583222400"; d="scan'208";a="446731287" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga005.jf.intel.com with ESMTP; 08 Jun 2020 06:18:51 -0700 Received: from andy by smile with local (Exim 4.93) (envelope-from ) id 1jiHfy-00Bgfu-GJ; Mon, 08 Jun 2020 16:18:54 +0300 Date: Mon, 8 Jun 2020 16:18:54 +0300 From: Andy Shevchenko To: Syed Nayyar Waris Cc: kbuild test robot , Linus Walleij , Andrew Morton , kbuild-all@lists.01.org, William Breathitt Gray , Linux Kernel Mailing List Subject: Re: [PATCH v7 2/4] lib/test_bitmap.c: Add for_each_set_clump test cases Message-ID: <20200608131854.GR2428291@smile.fi.intel.com> References: <042eddd4b87f0db3588a79d829afe6b23fa8365c.1590017578.git.syednwaris@gmail.com> <202005310310.EOelU2v3%lkp@intel.com> <20200605122428.GD2428291@smile.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 07, 2020 at 04:45:19AM +0530, Syed Nayyar Waris wrote: > On Fri, Jun 5, 2020 at 5:54 PM Andy Shevchenko > wrote: > > > > On Fri, Jun 05, 2020 at 02:12:54AM +0530, Syed Nayyar Waris wrote: > > > On Sun, May 31, 2020 at 12:50 AM kbuild test robot wrote: > > > > > > >> WARNING: modpost: lib/test_bitmap.o(.data+0xe80): Section mismatch in reference from the variable clump_test_data to the variable .init.rodata:clump_exp1 > > > > The variable clump_test_data references > > > > the variable __initconst clump_exp1 > > > > If the reference is valid then annotate the > > > > variable with or __refdata (see linux/init.h) or name the variable: > > > > > > > > -- > > > > >> WARNING: modpost: lib/test_bitmap.o(.data+0xec8): Section mismatch in reference from the variable clump_test_data to the variable .init.rodata:clump_exp2 > > > > The variable clump_test_data references > > > > the variable __initconst clump_exp2 > > > > If the reference is valid then annotate the > > > > variable with or __refdata (see linux/init.h) or name the variable: > > > > > > > > -- > > > > >> WARNING: modpost: lib/test_bitmap.o(.data+0xf10): Section mismatch in reference from the variable clump_test_data to the variable .init.rodata:clump_exp3 > > > > The variable clump_test_data references > > > > the variable __initconst clump_exp3 > > > > If the reference is valid then annotate the > > > > variable with or __refdata (see linux/init.h) or name the variable: > > > > > > > > -- > > > > >> WARNING: modpost: lib/test_bitmap.o(.data+0xf58): Section mismatch in reference from the variable clump_test_data to the variable .init.rodata:clump_exp4 > > > > The variable clump_test_data references > > > > the variable __initconst clump_exp4 > > > > If the reference is valid then annotate the > > > > variable with or __refdata (see linux/init.h) or name the variable: > > > > > I am unable to reproduce the compilation warning. > > > > You have to enable section mismatch checker. > > > > > I ran the command: > > > make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' lib/ > > > > > > But the compilation warning didn't show up. Can anyone please point to me > > > what I am doing wrong here? How shall I reproduce the warning? Thanks ! > > > > You put some data into init section of the object, while you are trying to > > access it from non-init one. It's easy-to-fix issue. > > > > -- > > With Best Regards, > > Andy Shevchenko > > Thanks! I have made code changes for the above warning. Actually I am > still unable to reproduce the compilation warning. But I believe the > following code fix will fix the compilation warning: > > In file lib/test_bitmap.c > > @@ -692,7 +692,7 @@ struct clump_test_data_params { > unsigned long const *exp; > }; > > -struct clump_test_data_params clump_test_data[] = > +static struct clump_test_data_params clump_test_data[] __initdata = > { {{0}, 2, 0, 64, 8, clump_exp1}, > {{0}, 8, 2, 240, 24, clump_exp2}, > {{0}, 8, 10, 240, 30, clump_exp3}, > > > > Let me know if I should submit a new patchset (v8) for > 'for_each_set_clump' including above code fix. > > Just to share how I attempted to reproduce the warning (but unsuccessful): > > Step 1: Use the config file in attachment. Download, extract, rename > file to .config at the root of the tree. > Step 2: '$ make lib/' > No warning reproduced after above step 2. > Step 3: '$ make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix > -D__CHECK_ENDIAN__' lib/' > After step 3 I got error in build: > scripts/kconfig/conf --syncconfig Kconfig > CHECK scripts/mod/empty.c > No such file: asan-globals=1 > scripts/Makefile.build:266: recipe for target 'scripts/mod/empty.o' failed > make[1]: *** [scripts/mod/empty.o] Error 1 > Makefile:1147: recipe for target 'prepare0' failed > make: *** [prepare0] Error 2 > > The command in above step 3 was mentioned in the bot mail. You need to take their configuration as well. -- With Best Regards, Andy Shevchenko