From: "Chen, Rong A" <rong.a.chen@intel.com>
To: Qi Zheng <zhengqi.arch@bytedance.com>,
kernel test robot <lkp@intel.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: Re: [kbuild-all] Re: mm/khugepaged.c:2046:56: warning: 'struct khugepaged_mm_slot' declared inside parameter list will not be visible outside of this definition or declaration
Date: Mon, 5 Sep 2022 10:02:05 +0800 [thread overview]
Message-ID: <8c7a3be0-ee06-98e0-5825-a2f5cbfb029f@intel.com> (raw)
In-Reply-To: <52d6d592-efb6-036b-5390-635913c598f3@bytedance.com>
On 9/2/2022 11:37 PM, Qi Zheng wrote:
>
>
> On 2022/9/2 22:23, kernel test robot wrote:
>> tree:
>> https://github.com/intel-lab-lkp/linux/commits/UPDATE-20220901-154717/Qi-Zheng/add-common-struct-mm_slot-and-use-it-in-THP-and-KSM/20220831-112149
>>
>> head: 32b787e37af17f7fe75f9b9c9bb22bf044722229
>> commit: 7ad02cf1645071c2bf1ed6ae0e48907aa0a3119e mm: thp: fix build
>> error with CONFIG_SHMEM disabled
>> date: 30 hours ago
>> config: sparc-randconfig-r023-20220901
>> (https://download.01.org/0day-ci/archive/20220902/202209022248.TEjW4Cld-lkp@intel.com/config)
>>
>> compiler: sparc64-linux-gcc (GCC) 12.1.0
>> reproduce (this is a W=1 build):
>> wget
>> https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross
>> -O ~/bin/make.cross
>> chmod +x ~/bin/make.cross
>> #
>> https://github.com/intel-lab-lkp/linux/commit/7ad02cf1645071c2bf1ed6ae0e48907aa0a3119e
>>
>> git remote add linux-review
>> https://github.com/intel-lab-lkp/linux
>> git fetch --no-tags linux-review
>> UPDATE-20220901-154717/Qi-Zheng/add-common-struct-mm_slot-and-use-it-in-THP-and-KSM/20220831-112149
>>
>> git checkout 7ad02cf1645071c2bf1ed6ae0e48907aa0a3119e
>> # save the config file
>> mkdir build_dir && cp config build_dir/.config
>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0
>> make.cross W=1 O=build_dir ARCH=sparc SHELL=/bin/bash
>>
>> If you fix the issue, kindly add following tag where applicable
>> Reported-by: kernel test robot <lkp@intel.com>
>>
>> All warnings (new ones prefixed by >>):
>>
>>>> mm/khugepaged.c:2046:56: warning: 'struct khugepaged_mm_slot'
>>>> declared inside parameter list will not be visible outside of this
>>>> definition or declaration
>> 2046 | static void khugepaged_collapse_pte_mapped_thps(struct
>> khugepaged_mm_slot *mm_slot)
>> |
>> ^~~~~~~~~~~~~~~~~~
>> mm/khugepaged.c: In function 'khugepaged_scan_mm_slot':
>> mm/khugepaged.c:2076:45: error: passing argument 1 of
>> 'khugepaged_collapse_pte_mapped_thps' from incompatible pointer type
>> [-Werror=incompatible-pointer-types]
>> 2076 | khugepaged_collapse_pte_mapped_thps(mm_slot);
>> | ^~~~~~~
>> | |
>> | struct mm_slot *
>
> It looks like the robot tested "mm: thp: fix build error with
> CONFIG_SHMEM disabled" alone without "[PATCH v2 2/7] mm: thp: convert to
> use common struct mm_slot". So this is a false positive.
Hi Qi,
Thanks for the explanation, you are right, the robot was considered this
patch as a replacement of "[PATCH v2 2/7] mm: thp: convert to use common
struct mm_slot".
Best Regards,
Rong Chen
>
>> mm/khugepaged.c:2046:76: note: expected 'struct khugepaged_mm_slot
>> *' but argument is of type 'struct mm_slot *'
>> 2046 | static void khugepaged_collapse_pte_mapped_thps(struct
>> khugepaged_mm_slot *mm_slot)
>> |
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
>> cc1: some warnings being treated as errors
>>
>>
>> vim +2046 mm/khugepaged.c
>>
>> 2045
>>> 2046 static void khugepaged_collapse_pte_mapped_thps(struct
>>> khugepaged_mm_slot *mm_slot)
>> 2047 {
>> 2048 }
>> 2049 #endif
>> 2050
>>
>
prev parent reply other threads:[~2022-09-05 2:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-02 14:23 kernel test robot
2022-09-02 15:37 ` Qi Zheng
2022-09-05 2:02 ` Chen, Rong A [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8c7a3be0-ee06-98e0-5825-a2f5cbfb029f@intel.com \
--to=rong.a.chen@intel.com \
--cc=akpm@linux-foundation.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=zhengqi.arch@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®