All of lore.kernel.org
 help / color / mirror / Atom feed
* net/bpf/test_run.c:154:14: warning: no previous prototype for 'bpf_fentry_test7'
@ 2021-06-04  7:50 ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-06-04  7:50 UTC (permalink / raw)
  To: Yonghong Song; +Cc: kbuild-all, linux-kernel, Daniel Borkmann

[-- Attachment #1: Type: text/plain, Size: 3251 bytes --]

Hi Yonghong,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f88cd3fb9df228e5ce4e13ec3dbad671ddb2146e
commit: d923021c2ce12acb50dc7086a1bf66eed82adf6a bpf: Add tests for PTR_TO_BTF_ID vs. null comparison
date:   11 months ago
config: x86_64-rhel (attached as .config)
compiler: gcc-6 (Ubuntu 6.4.0-17ubuntu1) 6.4.0 20180424
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d923021c2ce12acb50dc7086a1bf66eed82adf6a
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout d923021c2ce12acb50dc7086a1bf66eed82adf6a
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   net/bpf/test_run.c:120:14: warning: no previous prototype for 'bpf_fentry_test1' [-Wmissing-prototypes]
    int noinline bpf_fentry_test1(int a)
                 ^~~~~~~~~~~~~~~~
   net/bpf/test_run.c:125:14: warning: no previous prototype for 'bpf_fentry_test2' [-Wmissing-prototypes]
    int noinline bpf_fentry_test2(int a, u64 b)
                 ^~~~~~~~~~~~~~~~
   net/bpf/test_run.c:130:14: warning: no previous prototype for 'bpf_fentry_test3' [-Wmissing-prototypes]
    int noinline bpf_fentry_test3(char a, int b, u64 c)
                 ^~~~~~~~~~~~~~~~
   net/bpf/test_run.c:135:14: warning: no previous prototype for 'bpf_fentry_test4' [-Wmissing-prototypes]
    int noinline bpf_fentry_test4(void *a, char b, int c, u64 d)
                 ^~~~~~~~~~~~~~~~
   net/bpf/test_run.c:140:14: warning: no previous prototype for 'bpf_fentry_test5' [-Wmissing-prototypes]
    int noinline bpf_fentry_test5(u64 a, void *b, short c, int d, u64 e)
                 ^~~~~~~~~~~~~~~~
   net/bpf/test_run.c:145:14: warning: no previous prototype for 'bpf_fentry_test6' [-Wmissing-prototypes]
    int noinline bpf_fentry_test6(u64 a, void *b, short c, int d, void *e, u64 f)
                 ^~~~~~~~~~~~~~~~
>> net/bpf/test_run.c:154:14: warning: no previous prototype for 'bpf_fentry_test7' [-Wmissing-prototypes]
    int noinline bpf_fentry_test7(struct bpf_fentry_test_t *arg)
                 ^~~~~~~~~~~~~~~~
>> net/bpf/test_run.c:159:14: warning: no previous prototype for 'bpf_fentry_test8' [-Wmissing-prototypes]
    int noinline bpf_fentry_test8(struct bpf_fentry_test_t *arg)
                 ^~~~~~~~~~~~~~~~
   net/bpf/test_run.c:164:14: warning: no previous prototype for 'bpf_modify_return_test' [-Wmissing-prototypes]
    int noinline bpf_modify_return_test(int a, int *b)
                 ^~~~~~~~~~~~~~~~~~~~~~


vim +/bpf_fentry_test7 +154 net/bpf/test_run.c

   153	
 > 154	int noinline bpf_fentry_test7(struct bpf_fentry_test_t *arg)
   155	{
   156		return (long)arg;
   157	}
   158	
 > 159	int noinline bpf_fentry_test8(struct bpf_fentry_test_t *arg)
   160	{
   161		return (long)arg->a;
   162	}
   163	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 45232 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* net/bpf/test_run.c:154:14: warning: no previous prototype for 'bpf_fentry_test7'
@ 2021-06-04  7:50 ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-06-04  7:50 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3322 bytes --]

Hi Yonghong,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f88cd3fb9df228e5ce4e13ec3dbad671ddb2146e
commit: d923021c2ce12acb50dc7086a1bf66eed82adf6a bpf: Add tests for PTR_TO_BTF_ID vs. null comparison
date:   11 months ago
config: x86_64-rhel (attached as .config)
compiler: gcc-6 (Ubuntu 6.4.0-17ubuntu1) 6.4.0 20180424
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d923021c2ce12acb50dc7086a1bf66eed82adf6a
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout d923021c2ce12acb50dc7086a1bf66eed82adf6a
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   net/bpf/test_run.c:120:14: warning: no previous prototype for 'bpf_fentry_test1' [-Wmissing-prototypes]
    int noinline bpf_fentry_test1(int a)
                 ^~~~~~~~~~~~~~~~
   net/bpf/test_run.c:125:14: warning: no previous prototype for 'bpf_fentry_test2' [-Wmissing-prototypes]
    int noinline bpf_fentry_test2(int a, u64 b)
                 ^~~~~~~~~~~~~~~~
   net/bpf/test_run.c:130:14: warning: no previous prototype for 'bpf_fentry_test3' [-Wmissing-prototypes]
    int noinline bpf_fentry_test3(char a, int b, u64 c)
                 ^~~~~~~~~~~~~~~~
   net/bpf/test_run.c:135:14: warning: no previous prototype for 'bpf_fentry_test4' [-Wmissing-prototypes]
    int noinline bpf_fentry_test4(void *a, char b, int c, u64 d)
                 ^~~~~~~~~~~~~~~~
   net/bpf/test_run.c:140:14: warning: no previous prototype for 'bpf_fentry_test5' [-Wmissing-prototypes]
    int noinline bpf_fentry_test5(u64 a, void *b, short c, int d, u64 e)
                 ^~~~~~~~~~~~~~~~
   net/bpf/test_run.c:145:14: warning: no previous prototype for 'bpf_fentry_test6' [-Wmissing-prototypes]
    int noinline bpf_fentry_test6(u64 a, void *b, short c, int d, void *e, u64 f)
                 ^~~~~~~~~~~~~~~~
>> net/bpf/test_run.c:154:14: warning: no previous prototype for 'bpf_fentry_test7' [-Wmissing-prototypes]
    int noinline bpf_fentry_test7(struct bpf_fentry_test_t *arg)
                 ^~~~~~~~~~~~~~~~
>> net/bpf/test_run.c:159:14: warning: no previous prototype for 'bpf_fentry_test8' [-Wmissing-prototypes]
    int noinline bpf_fentry_test8(struct bpf_fentry_test_t *arg)
                 ^~~~~~~~~~~~~~~~
   net/bpf/test_run.c:164:14: warning: no previous prototype for 'bpf_modify_return_test' [-Wmissing-prototypes]
    int noinline bpf_modify_return_test(int a, int *b)
                 ^~~~~~~~~~~~~~~~~~~~~~


vim +/bpf_fentry_test7 +154 net/bpf/test_run.c

   153	
 > 154	int noinline bpf_fentry_test7(struct bpf_fentry_test_t *arg)
   155	{
   156		return (long)arg;
   157	}
   158	
 > 159	int noinline bpf_fentry_test8(struct bpf_fentry_test_t *arg)
   160	{
   161		return (long)arg->a;
   162	}
   163	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 45232 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: net/bpf/test_run.c:154:14: warning: no previous prototype for 'bpf_fentry_test7'
  2021-06-04  7:50 ` kernel test robot
@ 2021-06-04 15:52   ` Yonghong Song
  -1 siblings, 0 replies; 6+ messages in thread
From: Yonghong Song @ 2021-06-04 15:52 UTC (permalink / raw)
  To: kernel test robot; +Cc: kbuild-all, linux-kernel, Daniel Borkmann



On 6/4/21 12:50 AM, kernel test robot wrote:
> Hi Yonghong,
> 
> FYI, the error/warning still remains.
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   f88cd3fb9df228e5ce4e13ec3dbad671ddb2146e
> commit: d923021c2ce12acb50dc7086a1bf66eed82adf6a bpf: Add tests for PTR_TO_BTF_ID vs. null comparison
> date:   11 months ago
> config: x86_64-rhel (attached as .config)
> compiler: gcc-6 (Ubuntu 6.4.0-17ubuntu1) 6.4.0 20180424
> reproduce (this is a W=1 build):
>          # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d923021c2ce12acb50dc7086a1bf66eed82adf6a
>          git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>          git fetch --no-tags linus master
>          git checkout d923021c2ce12acb50dc7086a1bf66eed82adf6a
>          # save the attached .config to linux build tree
>          make W=1 ARCH=x86_64
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
>     net/bpf/test_run.c:120:14: warning: no previous prototype for 'bpf_fentry_test1' [-Wmissing-prototypes]
>      int noinline bpf_fentry_test1(int a)
>                   ^~~~~~~~~~~~~~~~
>     net/bpf/test_run.c:125:14: warning: no previous prototype for 'bpf_fentry_test2' [-Wmissing-prototypes]
>      int noinline bpf_fentry_test2(int a, u64 b)
>                   ^~~~~~~~~~~~~~~~
>     net/bpf/test_run.c:130:14: warning: no previous prototype for 'bpf_fentry_test3' [-Wmissing-prototypes]
>      int noinline bpf_fentry_test3(char a, int b, u64 c)
>                   ^~~~~~~~~~~~~~~~
>     net/bpf/test_run.c:135:14: warning: no previous prototype for 'bpf_fentry_test4' [-Wmissing-prototypes]
>      int noinline bpf_fentry_test4(void *a, char b, int c, u64 d)
>                   ^~~~~~~~~~~~~~~~
>     net/bpf/test_run.c:140:14: warning: no previous prototype for 'bpf_fentry_test5' [-Wmissing-prototypes]
>      int noinline bpf_fentry_test5(u64 a, void *b, short c, int d, u64 e)
>                   ^~~~~~~~~~~~~~~~
>     net/bpf/test_run.c:145:14: warning: no previous prototype for 'bpf_fentry_test6' [-Wmissing-prototypes]
>      int noinline bpf_fentry_test6(u64 a, void *b, short c, int d, void *e, u64 f)
>                   ^~~~~~~~~~~~~~~~
>>> net/bpf/test_run.c:154:14: warning: no previous prototype for 'bpf_fentry_test7' [-Wmissing-prototypes]
>      int noinline bpf_fentry_test7(struct bpf_fentry_test_t *arg)
>                   ^~~~~~~~~~~~~~~~
>>> net/bpf/test_run.c:159:14: warning: no previous prototype for 'bpf_fentry_test8' [-Wmissing-prototypes]
>      int noinline bpf_fentry_test8(struct bpf_fentry_test_t *arg)
>                   ^~~~~~~~~~~~~~~~
>     net/bpf/test_run.c:164:14: warning: no previous prototype for 'bpf_modify_return_test' [-Wmissing-prototypes]
>      int noinline bpf_modify_return_test(int a, int *b)
>                   ^~~~~~~~~~~~~~~~~~~~~~

I think this has been discussed earlier.

In net/bpf/test_run.c, we have,

__diag_push();
__diag_ignore(GCC, 8, "-Wmissing-prototypes",
               "Global functions as their definitions will be in vmlinux 
BTF");
int noinline bpf_fentry_test1(int a)
{
         return a + 1;
}
...

Unfortunately, the __diag_ignore macro only effective for gcc8 and later.

So for gcc6, the above warning will be emitted. Is it possible for the 
tool to check and ignore this error if the gcc version is less than 8?


> 
> vim +/bpf_fentry_test7 +154 net/bpf/test_run.c
> 
>     153	
>   > 154	int noinline bpf_fentry_test7(struct bpf_fentry_test_t *arg)
>     155	{
>     156		return (long)arg;
>     157	}
>     158	
>   > 159	int noinline bpf_fentry_test8(struct bpf_fentry_test_t *arg)
>     160	{
>     161		return (long)arg->a;
>     162	}
>     163	
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: net/bpf/test_run.c:154:14: warning: no previous prototype for 'bpf_fentry_test7'
@ 2021-06-04 15:52   ` Yonghong Song
  0 siblings, 0 replies; 6+ messages in thread
From: Yonghong Song @ 2021-06-04 15:52 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4075 bytes --]



On 6/4/21 12:50 AM, kernel test robot wrote:
> Hi Yonghong,
> 
> FYI, the error/warning still remains.
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   f88cd3fb9df228e5ce4e13ec3dbad671ddb2146e
> commit: d923021c2ce12acb50dc7086a1bf66eed82adf6a bpf: Add tests for PTR_TO_BTF_ID vs. null comparison
> date:   11 months ago
> config: x86_64-rhel (attached as .config)
> compiler: gcc-6 (Ubuntu 6.4.0-17ubuntu1) 6.4.0 20180424
> reproduce (this is a W=1 build):
>          # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d923021c2ce12acb50dc7086a1bf66eed82adf6a
>          git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>          git fetch --no-tags linus master
>          git checkout d923021c2ce12acb50dc7086a1bf66eed82adf6a
>          # save the attached .config to linux build tree
>          make W=1 ARCH=x86_64
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
>     net/bpf/test_run.c:120:14: warning: no previous prototype for 'bpf_fentry_test1' [-Wmissing-prototypes]
>      int noinline bpf_fentry_test1(int a)
>                   ^~~~~~~~~~~~~~~~
>     net/bpf/test_run.c:125:14: warning: no previous prototype for 'bpf_fentry_test2' [-Wmissing-prototypes]
>      int noinline bpf_fentry_test2(int a, u64 b)
>                   ^~~~~~~~~~~~~~~~
>     net/bpf/test_run.c:130:14: warning: no previous prototype for 'bpf_fentry_test3' [-Wmissing-prototypes]
>      int noinline bpf_fentry_test3(char a, int b, u64 c)
>                   ^~~~~~~~~~~~~~~~
>     net/bpf/test_run.c:135:14: warning: no previous prototype for 'bpf_fentry_test4' [-Wmissing-prototypes]
>      int noinline bpf_fentry_test4(void *a, char b, int c, u64 d)
>                   ^~~~~~~~~~~~~~~~
>     net/bpf/test_run.c:140:14: warning: no previous prototype for 'bpf_fentry_test5' [-Wmissing-prototypes]
>      int noinline bpf_fentry_test5(u64 a, void *b, short c, int d, u64 e)
>                   ^~~~~~~~~~~~~~~~
>     net/bpf/test_run.c:145:14: warning: no previous prototype for 'bpf_fentry_test6' [-Wmissing-prototypes]
>      int noinline bpf_fentry_test6(u64 a, void *b, short c, int d, void *e, u64 f)
>                   ^~~~~~~~~~~~~~~~
>>> net/bpf/test_run.c:154:14: warning: no previous prototype for 'bpf_fentry_test7' [-Wmissing-prototypes]
>      int noinline bpf_fentry_test7(struct bpf_fentry_test_t *arg)
>                   ^~~~~~~~~~~~~~~~
>>> net/bpf/test_run.c:159:14: warning: no previous prototype for 'bpf_fentry_test8' [-Wmissing-prototypes]
>      int noinline bpf_fentry_test8(struct bpf_fentry_test_t *arg)
>                   ^~~~~~~~~~~~~~~~
>     net/bpf/test_run.c:164:14: warning: no previous prototype for 'bpf_modify_return_test' [-Wmissing-prototypes]
>      int noinline bpf_modify_return_test(int a, int *b)
>                   ^~~~~~~~~~~~~~~~~~~~~~

I think this has been discussed earlier.

In net/bpf/test_run.c, we have,

__diag_push();
__diag_ignore(GCC, 8, "-Wmissing-prototypes",
               "Global functions as their definitions will be in vmlinux 
BTF");
int noinline bpf_fentry_test1(int a)
{
         return a + 1;
}
...

Unfortunately, the __diag_ignore macro only effective for gcc8 and later.

So for gcc6, the above warning will be emitted. Is it possible for the 
tool to check and ignore this error if the gcc version is less than 8?


> 
> vim +/bpf_fentry_test7 +154 net/bpf/test_run.c
> 
>     153	
>   > 154	int noinline bpf_fentry_test7(struct bpf_fentry_test_t *arg)
>     155	{
>     156		return (long)arg;
>     157	}
>     158	
>   > 159	int noinline bpf_fentry_test8(struct bpf_fentry_test_t *arg)
>     160	{
>     161		return (long)arg->a;
>     162	}
>     163	
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [kbuild-all] Re: net/bpf/test_run.c:154:14: warning: no previous prototype for 'bpf_fentry_test7'
  2021-06-04 15:52   ` Yonghong Song
@ 2021-06-07  5:39     ` Rong Chen
  -1 siblings, 0 replies; 6+ messages in thread
From: Rong Chen @ 2021-06-07  5:39 UTC (permalink / raw)
  To: Yonghong Song, kernel test robot
  Cc: kbuild-all, linux-kernel, Daniel Borkmann



On 6/4/21 11:52 PM, Yonghong Song wrote:
>
>
> On 6/4/21 12:50 AM, kernel test robot wrote:
>> Hi Yonghong,
>>
>> FYI, the error/warning still remains.
>>
>> tree: 
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
>> master
>> head:   f88cd3fb9df228e5ce4e13ec3dbad671ddb2146e
>> commit: d923021c2ce12acb50dc7086a1bf66eed82adf6a bpf: Add tests for 
>> PTR_TO_BTF_ID vs. null comparison
>> date:   11 months ago
>> config: x86_64-rhel (attached as .config)
>> compiler: gcc-6 (Ubuntu 6.4.0-17ubuntu1) 6.4.0 20180424
>> reproduce (this is a W=1 build):
>>          # 
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d923021c2ce12acb50dc7086a1bf66eed82adf6a
>>          git remote add linus 
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>          git fetch --no-tags linus master
>>          git checkout d923021c2ce12acb50dc7086a1bf66eed82adf6a
>>          # save the attached .config to linux build tree
>>          make W=1 ARCH=x86_64
>>
>> If you fix the issue, kindly add following tag as appropriate
>> Reported-by: kernel test robot <lkp@intel.com>
>>
>> All warnings (new ones prefixed by >>):
>>
>>     net/bpf/test_run.c:120:14: warning: no previous prototype for 
>> 'bpf_fentry_test1' [-Wmissing-prototypes]
>>      int noinline bpf_fentry_test1(int a)
>>                   ^~~~~~~~~~~~~~~~
>>     net/bpf/test_run.c:125:14: warning: no previous prototype for 
>> 'bpf_fentry_test2' [-Wmissing-prototypes]
>>      int noinline bpf_fentry_test2(int a, u64 b)
>>                   ^~~~~~~~~~~~~~~~
>>     net/bpf/test_run.c:130:14: warning: no previous prototype for 
>> 'bpf_fentry_test3' [-Wmissing-prototypes]
>>      int noinline bpf_fentry_test3(char a, int b, u64 c)
>>                   ^~~~~~~~~~~~~~~~
>>     net/bpf/test_run.c:135:14: warning: no previous prototype for 
>> 'bpf_fentry_test4' [-Wmissing-prototypes]
>>      int noinline bpf_fentry_test4(void *a, char b, int c, u64 d)
>>                   ^~~~~~~~~~~~~~~~
>>     net/bpf/test_run.c:140:14: warning: no previous prototype for 
>> 'bpf_fentry_test5' [-Wmissing-prototypes]
>>      int noinline bpf_fentry_test5(u64 a, void *b, short c, int d, 
>> u64 e)
>>                   ^~~~~~~~~~~~~~~~
>>     net/bpf/test_run.c:145:14: warning: no previous prototype for 
>> 'bpf_fentry_test6' [-Wmissing-prototypes]
>>      int noinline bpf_fentry_test6(u64 a, void *b, short c, int d, 
>> void *e, u64 f)
>>                   ^~~~~~~~~~~~~~~~
>>>> net/bpf/test_run.c:154:14: warning: no previous prototype for 
>>>> 'bpf_fentry_test7' [-Wmissing-prototypes]
>>      int noinline bpf_fentry_test7(struct bpf_fentry_test_t *arg)
>>                   ^~~~~~~~~~~~~~~~
>>>> net/bpf/test_run.c:159:14: warning: no previous prototype for 
>>>> 'bpf_fentry_test8' [-Wmissing-prototypes]
>>      int noinline bpf_fentry_test8(struct bpf_fentry_test_t *arg)
>>                   ^~~~~~~~~~~~~~~~
>>     net/bpf/test_run.c:164:14: warning: no previous prototype for 
>> 'bpf_modify_return_test' [-Wmissing-prototypes]
>>      int noinline bpf_modify_return_test(int a, int *b)
>>                   ^~~~~~~~~~~~~~~~~~~~~~
>
> I think this has been discussed earlier.
>
> In net/bpf/test_run.c, we have,
>
> __diag_push();
> __diag_ignore(GCC, 8, "-Wmissing-prototypes",
>               "Global functions as their definitions will be in 
> vmlinux BTF");
> int noinline bpf_fentry_test1(int a)
> {
>         return a + 1;
> }
> ...
>
> Unfortunately, the __diag_ignore macro only effective for gcc8 and later.
>
> So for gcc6, the above warning will be emitted. Is it possible for the 
> tool to check and ignore this error if the gcc version is less than 8?
>

Hi Yonghong,

Thanks for the advice, we'll ignore this error later.

Best Regards,
Rong Chen

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: net/bpf/test_run.c:154:14: warning: no previous prototype for 'bpf_fentry_test7'
@ 2021-06-07  5:39     ` Rong Chen
  0 siblings, 0 replies; 6+ messages in thread
From: Rong Chen @ 2021-06-07  5:39 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4180 bytes --]



On 6/4/21 11:52 PM, Yonghong Song wrote:
>
>
> On 6/4/21 12:50 AM, kernel test robot wrote:
>> Hi Yonghong,
>>
>> FYI, the error/warning still remains.
>>
>> tree: 
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
>> master
>> head:   f88cd3fb9df228e5ce4e13ec3dbad671ddb2146e
>> commit: d923021c2ce12acb50dc7086a1bf66eed82adf6a bpf: Add tests for 
>> PTR_TO_BTF_ID vs. null comparison
>> date:   11 months ago
>> config: x86_64-rhel (attached as .config)
>> compiler: gcc-6 (Ubuntu 6.4.0-17ubuntu1) 6.4.0 20180424
>> reproduce (this is a W=1 build):
>>          # 
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d923021c2ce12acb50dc7086a1bf66eed82adf6a
>>          git remote add linus 
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>          git fetch --no-tags linus master
>>          git checkout d923021c2ce12acb50dc7086a1bf66eed82adf6a
>>          # save the attached .config to linux build tree
>>          make W=1 ARCH=x86_64
>>
>> If you fix the issue, kindly add following tag as appropriate
>> Reported-by: kernel test robot <lkp@intel.com>
>>
>> All warnings (new ones prefixed by >>):
>>
>>     net/bpf/test_run.c:120:14: warning: no previous prototype for 
>> 'bpf_fentry_test1' [-Wmissing-prototypes]
>>      int noinline bpf_fentry_test1(int a)
>>                   ^~~~~~~~~~~~~~~~
>>     net/bpf/test_run.c:125:14: warning: no previous prototype for 
>> 'bpf_fentry_test2' [-Wmissing-prototypes]
>>      int noinline bpf_fentry_test2(int a, u64 b)
>>                   ^~~~~~~~~~~~~~~~
>>     net/bpf/test_run.c:130:14: warning: no previous prototype for 
>> 'bpf_fentry_test3' [-Wmissing-prototypes]
>>      int noinline bpf_fentry_test3(char a, int b, u64 c)
>>                   ^~~~~~~~~~~~~~~~
>>     net/bpf/test_run.c:135:14: warning: no previous prototype for 
>> 'bpf_fentry_test4' [-Wmissing-prototypes]
>>      int noinline bpf_fentry_test4(void *a, char b, int c, u64 d)
>>                   ^~~~~~~~~~~~~~~~
>>     net/bpf/test_run.c:140:14: warning: no previous prototype for 
>> 'bpf_fentry_test5' [-Wmissing-prototypes]
>>      int noinline bpf_fentry_test5(u64 a, void *b, short c, int d, 
>> u64 e)
>>                   ^~~~~~~~~~~~~~~~
>>     net/bpf/test_run.c:145:14: warning: no previous prototype for 
>> 'bpf_fentry_test6' [-Wmissing-prototypes]
>>      int noinline bpf_fentry_test6(u64 a, void *b, short c, int d, 
>> void *e, u64 f)
>>                   ^~~~~~~~~~~~~~~~
>>>> net/bpf/test_run.c:154:14: warning: no previous prototype for 
>>>> 'bpf_fentry_test7' [-Wmissing-prototypes]
>>      int noinline bpf_fentry_test7(struct bpf_fentry_test_t *arg)
>>                   ^~~~~~~~~~~~~~~~
>>>> net/bpf/test_run.c:159:14: warning: no previous prototype for 
>>>> 'bpf_fentry_test8' [-Wmissing-prototypes]
>>      int noinline bpf_fentry_test8(struct bpf_fentry_test_t *arg)
>>                   ^~~~~~~~~~~~~~~~
>>     net/bpf/test_run.c:164:14: warning: no previous prototype for 
>> 'bpf_modify_return_test' [-Wmissing-prototypes]
>>      int noinline bpf_modify_return_test(int a, int *b)
>>                   ^~~~~~~~~~~~~~~~~~~~~~
>
> I think this has been discussed earlier.
>
> In net/bpf/test_run.c, we have,
>
> __diag_push();
> __diag_ignore(GCC, 8, "-Wmissing-prototypes",
>               "Global functions as their definitions will be in 
> vmlinux BTF");
> int noinline bpf_fentry_test1(int a)
> {
>         return a + 1;
> }
> ...
>
> Unfortunately, the __diag_ignore macro only effective for gcc8 and later.
>
> So for gcc6, the above warning will be emitted. Is it possible for the 
> tool to check and ignore this error if the gcc version is less than 8?
>

Hi Yonghong,

Thanks for the advice, we'll ignore this error later.

Best Regards,
Rong Chen

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-06-07  5:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04  7:50 net/bpf/test_run.c:154:14: warning: no previous prototype for 'bpf_fentry_test7' kernel test robot
2021-06-04  7:50 ` kernel test robot
2021-06-04 15:52 ` Yonghong Song
2021-06-04 15:52   ` Yonghong Song
2021-06-07  5:39   ` [kbuild-all] " Rong Chen
2021-06-07  5:39     ` Rong Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.