Thread (2 messages) flat view 2 messages, 2 authors, 2021-04-22

Re: [PATCH net] bnxt_en: fix ternary sign extension bug in bnxt_show_temp()

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-04-22 22:00:12
Also in: kernel-janitors

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Thu, 22 Apr 2021 12:10:28 +0300 you wrote:
The problem is that bnxt_show_temp() returns long but "rc" is an int
and "len" is a u32.  With ternary operations the type promotion is quite
tricky.  The negative "rc" is first promoted to u32 and then to long so
it ends up being a high positive value instead of a a negative as we
intended.

Fix this by removing the ternary.

[...]
Here is the summary with links:
  - [net] bnxt_en: fix ternary sign extension bug in bnxt_show_temp()
    https://git.kernel.org/netdev/net/c/27537929f30d

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help