* [PATCH] ptp: ocp: Remove redundant check in _signal_summary_show
@ 2025-03-05 9:25 Ivan Abramov
2025-03-06 10:28 ` Vadim Fedorenko
2025-03-06 23:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Ivan Abramov @ 2025-03-05 9:25 UTC (permalink / raw)
To: Richard Cochran
Cc: Ivan Abramov, Jonathan Lemon, Vadim Fedorenko, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
netdev, linux-kernel, lvc-project
In the function _signal_summary_show(), there is a NULL-check for
&bp->signal[nr], which cannot actually be NULL.
Therefore, this redundant check can be removed.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: Ivan Abramov <i.abramov@mt-integration.ru>
---
drivers/ptp/ptp_ocp.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
index b651087f426f..34c616bd0a02 100644
--- a/drivers/ptp/ptp_ocp.c
+++ b/drivers/ptp/ptp_ocp.c
@@ -3959,9 +3959,6 @@ _signal_summary_show(struct seq_file *s, struct ptp_ocp *bp, int nr)
bool on;
u32 val;
- if (!signal)
- return;
-
on = signal->running;
sprintf(label, "GEN%d", nr + 1);
seq_printf(s, "%7s: %s, period:%llu duty:%d%% phase:%llu pol:%d",
--
2.48.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ptp: ocp: Remove redundant check in _signal_summary_show
2025-03-05 9:25 [PATCH] ptp: ocp: Remove redundant check in _signal_summary_show Ivan Abramov
@ 2025-03-06 10:28 ` Vadim Fedorenko
2025-03-06 23:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Vadim Fedorenko @ 2025-03-06 10:28 UTC (permalink / raw)
To: Ivan Abramov, Richard Cochran
Cc: Jonathan Lemon, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, netdev, linux-kernel, lvc-project
On 05/03/2025 09:25, Ivan Abramov wrote:
> In the function _signal_summary_show(), there is a NULL-check for
> &bp->signal[nr], which cannot actually be NULL.
>
> Therefore, this redundant check can be removed.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Signed-off-by: Ivan Abramov <i.abramov@mt-integration.ru>
> ---
> drivers/ptp/ptp_ocp.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
> index b651087f426f..34c616bd0a02 100644
> --- a/drivers/ptp/ptp_ocp.c
> +++ b/drivers/ptp/ptp_ocp.c
> @@ -3959,9 +3959,6 @@ _signal_summary_show(struct seq_file *s, struct ptp_ocp *bp, int nr)
> bool on;
> u32 val;
>
> - if (!signal)
> - return;
> -
> on = signal->running;
> sprintf(label, "GEN%d", nr + 1);
> seq_printf(s, "%7s: %s, period:%llu duty:%d%% phase:%llu pol:%d",
Thanks,
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ptp: ocp: Remove redundant check in _signal_summary_show
2025-03-05 9:25 [PATCH] ptp: ocp: Remove redundant check in _signal_summary_show Ivan Abramov
2025-03-06 10:28 ` Vadim Fedorenko
@ 2025-03-06 23:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-03-06 23:40 UTC (permalink / raw)
To: Ivan Abramov
Cc: richardcochran, jonathan.lemon, vadim.fedorenko, andrew+netdev,
davem, edumazet, kuba, pabeni, netdev, linux-kernel, lvc-project
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 5 Mar 2025 12:25:20 +0300 you wrote:
> In the function _signal_summary_show(), there is a NULL-check for
> &bp->signal[nr], which cannot actually be NULL.
>
> Therefore, this redundant check can be removed.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> [...]
Here is the summary with links:
- ptp: ocp: Remove redundant check in _signal_summary_show
https://git.kernel.org/netdev/net-next/c/cd02ab73664d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-03-06 23:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-05 9:25 [PATCH] ptp: ocp: Remove redundant check in _signal_summary_show Ivan Abramov
2025-03-06 10:28 ` Vadim Fedorenko
2025-03-06 23:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox