mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yao HongBo <yaohongbo@huawei.com>
To: Yonghong Song <yhs@fb.com>, <ast@kernel.org>, <daniel@iogearbox.net>
Cc: <chenzhou10@huawei.com>, <kafai@fb.com>, <songliubraving@fb.com>,
	<andriin@fb.com>, <netdev@vger.kernel.org>, <bpf@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<clang-built-linux@googlegroups.com>
Subject: Re: [PATCH -next] bpf: make btf_check_func_type_match() static
Date: Mon, 3 Feb 2020 16:16:17 +0800	[thread overview]
Message-ID: <f82e64c5-9299-b1a2-41b6-0f3630793d2b@huawei.com> (raw)
In-Reply-To: <a29bf101-81b0-68ef-356c-dfdc9c53d899@fb.com>



On 2/3/2020 2:20 PM, Yonghong Song wrote:
> 
> 
> On 2/2/20 6:02 PM, Hongbo Yao wrote:
>> Fix sparse warning:
>> kernel/bpf/btf.c:4131:5: warning: symbol 'btf_check_func_type_match' was
>> not declared. Should it be static?
> 
> Yes, static is better since the function is only used in one file.
> 
> Please use the tag "[PATCH bpf-next]" instead of "[PATCH -next]".
> Since this is to fix a sparse warning, I think it should be okay
> to target bpf-next. Please resubmit after bpf-next reopens in
> about a week.

OK.

>>
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Signed-off-by: Hongbo Yao <yaohongbo@huawei.com>
>> ---
>>   kernel/bpf/btf.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
>> index 8c9d8f266bef..83d3d92023af 100644
>> --- a/kernel/bpf/btf.c
>> +++ b/kernel/bpf/btf.c
>> @@ -4144,7 +4144,7 @@ int btf_distill_func_proto(struct bpf_verifier_log *log,
>>    * EFAULT - verifier bug
>>    * 0 - 99% match. The last 1% is validated by the verifier.
>>    */
>> -int btf_check_func_type_match(struct bpf_verifier_log *log,
>> +static int btf_check_func_type_match(struct bpf_verifier_log *log,
>>                     struct btf *btf1, const struct btf_type *t1,
>>                     struct btf *btf2, const struct btf_type *t2)
> 
> Please also align
>   struct btf *btf1, const struct btf_type *t1,
>   struct btf *btf2, const struct btf_type *t2)
> properly after you added 'static' before the function declaration.

I'll fix it, thanks.

>>   {
>>
> 
> .
> 


      reply	other threads:[~2020-02-03  8:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-03  2:02 Hongbo Yao
2020-02-03  6:20 ` Yonghong Song
2020-02-03  8:16   ` Yao HongBo [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=f82e64c5-9299-b1a2-41b6-0f3630793d2b@huawei.com \
    --to=yaohongbo@huawei.com \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=chenzhou10@huawei.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=daniel@iogearbox.net \
    --cc=kafai@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.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®