Message ID | 20210215133143.2425016-1-olteanv@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 1f778d500df3c0032a8ee1cd868ba60bd501b26b |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] net: mscc: ocelot: avoid type promotion when calling ocelot_ifh_set_dest | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | success | CCed 10 of 10 maintainers |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 24 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
netdev/stable | success | Stable not CCed |
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Mon, 15 Feb 2021 15:31:43 +0200 you wrote: > From: Vladimir Oltean <vladimir.oltean@nxp.com> > > Smatch is confused by the fact that a 32-bit BIT(port) macro is passed > as argument to the ocelot_ifh_set_dest function and warns: > > ocelot_xmit() warn: should '(((1))) << (dp->index)' be a 64 bit type? > seville_xmit() warn: should '(((1))) << (dp->index)' be a 64 bit type? > > [...] Here is the summary with links: - [net-next] net: mscc: ocelot: avoid type promotion when calling ocelot_ifh_set_dest https://git.kernel.org/netdev/net-next/c/1f778d500df3 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c index 8d97c731e953..5d13087c85d6 100644 --- a/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c @@ -803,7 +803,7 @@ void ocelot_port_inject_frame(struct ocelot *ocelot, int port, int grp, QS_INJ_CTRL_SOF, QS_INJ_CTRL, grp); ocelot_ifh_set_bypass(ifh, 1); - ocelot_ifh_set_dest(ifh, BIT(port)); + ocelot_ifh_set_dest(ifh, BIT_ULL(port)); ocelot_ifh_set_tag_type(ifh, IFH_TAG_TYPE_C); ocelot_ifh_set_vid(ifh, skb_vlan_tag_get(skb)); ocelot_ifh_set_rew_op(ifh, rew_op); diff --git a/net/dsa/tag_ocelot.c b/net/dsa/tag_ocelot.c index a7dd61c8e005..f9df9cac81c5 100644 --- a/net/dsa/tag_ocelot.c +++ b/net/dsa/tag_ocelot.c @@ -56,7 +56,7 @@ static struct sk_buff *ocelot_xmit(struct sk_buff *skb, void *injection; ocelot_xmit_common(skb, netdev, cpu_to_be32(0x8880000a), &injection); - ocelot_ifh_set_dest(injection, BIT(dp->index)); + ocelot_ifh_set_dest(injection, BIT_ULL(dp->index)); return skb; } @@ -68,7 +68,7 @@ static struct sk_buff *seville_xmit(struct sk_buff *skb, void *injection; ocelot_xmit_common(skb, netdev, cpu_to_be32(0x88800005), &injection); - seville_ifh_set_dest(injection, BIT(dp->index)); + seville_ifh_set_dest(injection, BIT_ULL(dp->index)); return skb; }