mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pedro Tammela <pctammela@mojatatu.com>
To: Kunwu Chan <chentao@kylinos.cn>,
	jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com
Cc: kunwu.chan@hotmail.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: sched: Fix restricted __be16 degrades to integer
Date: Fri, 17 Nov 2023 09:06:11 -0300	[thread overview]
Message-ID: <b9a9aaef-a306-4fcf-83df-28140d9311bf@mojatatu.com> (raw)
In-Reply-To: <20231117101815.1867175-1-chentao@kylinos.cn>

On 17/11/2023 07:18, Kunwu Chan wrote:
> net/sched/cls_api.c:2010:25: warning: restricted __be16 degrades to integer
> net/sched/cls_api.c:2695:50: warning: restricted __be16 degrades to integer
> 
> Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
> ---
>   net/sched/cls_api.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
> index f73f39f61f66..4c47490eb0c1 100644
> --- a/net/sched/cls_api.c
> +++ b/net/sched/cls_api.c
> @@ -2007,7 +2007,7 @@ static int tcf_fill_node(struct net *net, struct sk_buff *skb,
>   		tcm->tcm_ifindex = TCM_IFINDEX_MAGIC_BLOCK;
>   		tcm->tcm_block_index = block->index;
>   	}
> -	tcm->tcm_info = TC_H_MAKE(tp->prio, tp->protocol);
> +	tcm->tcm_info = TC_H_MAKE(tp->prio, be16_to_cpu(tp->protocol));
>   	if (nla_put_string(skb, TCA_KIND, tp->ops->kind))
>   		goto nla_put_failure;
>   	if (nla_put_u32(skb, TCA_CHAIN, tp->chain->index))
> @@ -2692,7 +2692,7 @@ static bool tcf_chain_dump(struct tcf_chain *chain, struct Qdisc *q, u32 parent,
>   		    TC_H_MAJ(tcm->tcm_info) != tp->prio)
>   			continue;
>   		if (TC_H_MIN(tcm->tcm_info) &&
> -		    TC_H_MIN(tcm->tcm_info) != tp->protocol)
> +		    TC_H_MIN(tcm->tcm_info) != be16_to_cpu(tp->protocol))
>   			continue;
>   		if (*p_index > index_start)
>   			memset(&cb->args[1], 0,

I don't believe there's something to fix here

  reply	other threads:[~2023-11-17 12:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-17 10:18 Kunwu Chan
2023-11-17 12:06 ` Pedro Tammela [this message]
2023-11-20 10:07   ` Simon Horman

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=b9a9aaef-a306-4fcf-83df-28140d9311bf@mojatatu.com \
    --to=pctammela@mojatatu.com \
    --cc=chentao@kylinos.cn \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=kunwu.chan@hotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=xiyou.wangcong@gmail.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®