* [PATCH] can: softing: remove redundant NULL check
@ 2024-02-11 15:05 Daniil Dulov
2024-02-16 17:27 ` Simon Horman
0 siblings, 1 reply; 6+ messages in thread
From: Daniil Dulov @ 2024-02-11 15:05 UTC (permalink / raw
To: Wolfgang Grandegger
Cc: Daniil Dulov, Marc Kleine-Budde, David S. Miller, Jakub Kicinski,
Kurt Van Dijck, linux-can, netdev, linux-kernel, lvc-project
In this case dev cannot be NULL, so remove redundant check.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 03fd3cf5a179 ("can: add driver for Softing card")
Signed-off-by: Daniil Dulov <d.dulov@aladdin.ru>
---
drivers/net/can/softing/softing_fw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/softing/softing_fw.c b/drivers/net/can/softing/softing_fw.c
index bad69a4abec1..5a3f9e4b0b62 100644
--- a/drivers/net/can/softing/softing_fw.c
+++ b/drivers/net/can/softing/softing_fw.c
@@ -436,7 +436,7 @@ int softing_startstop(struct net_device *dev, int up)
return ret;
bus_bitmask_start = 0;
- if (dev && up)
+ if (up)
/* prepare to start this bus as well */
bus_bitmask_start |= (1 << priv->index);
/* bring netdevs down */
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] can: softing: remove redundant NULL check
2024-02-11 15:05 [PATCH] can: softing: remove redundant NULL check Daniil Dulov
@ 2024-02-16 17:27 ` Simon Horman
2024-02-16 19:47 ` Oliver Hartkopp
0 siblings, 1 reply; 6+ messages in thread
From: Simon Horman @ 2024-02-16 17:27 UTC (permalink / raw
To: Daniil Dulov
Cc: Wolfgang Grandegger, Marc Kleine-Budde, David S. Miller,
Jakub Kicinski, Kurt Van Dijck, linux-can, netdev, linux-kernel,
lvc-project
On Sun, Feb 11, 2024 at 07:05:35AM -0800, Daniil Dulov wrote:
> In this case dev cannot be NULL, so remove redundant check.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: 03fd3cf5a179 ("can: add driver for Softing card")
> Signed-off-by: Daniil Dulov <d.dulov@aladdin.ru>
Hi Daniil,
I am not sure that dev cannot be NULL.
But I do see that the code assumes it is not, and would crash if it is.
So I think that, functionally, your statement is correct.
priv = netdev_priv(dev);
card = priv->card;
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] can: softing: remove redundant NULL check
2024-02-16 17:27 ` Simon Horman
@ 2024-02-16 19:47 ` Oliver Hartkopp
2024-02-19 17:00 ` Simon Horman
0 siblings, 1 reply; 6+ messages in thread
From: Oliver Hartkopp @ 2024-02-16 19:47 UTC (permalink / raw
To: Simon Horman, Daniil Dulov
Cc: Wolfgang Grandegger, Marc Kleine-Budde, David S. Miller,
Jakub Kicinski, Kurt Van Dijck, linux-can, netdev, linux-kernel,
lvc-project
Hi Simon,
I have a general question on the "Fixes:" tag in this patch:
On 16.02.24 18:27, Simon Horman wrote:
> On Sun, Feb 11, 2024 at 07:05:35AM -0800, Daniil Dulov wrote:
>> In this case dev cannot be NULL, so remove redundant check.
>>
>> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>>
>> Fixes: 03fd3cf5a179 ("can: add driver for Softing card")
IMHO this is simply an improvement which is done by all patches applied
to the kernel but it does not really "fix" anything from a functional
standpoint.
Shouldn't we either invent a new tag or better leave it out to not
confuse the stable maintainers?
Best regards,
Oliver
>> Signed-off-by: Daniil Dulov <d.dulov@aladdin.ru>
>
> Hi Daniil,
>
> I am not sure that dev cannot be NULL.
> But I do see that the code assumes it is not, and would crash if it is.
> So I think that, functionally, your statement is correct.
>
> priv = netdev_priv(dev);
> card = priv->card;
>
> Reviewed-by: Simon Horman <horms@kernel.org>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] can: softing: remove redundant NULL check
2024-02-16 19:47 ` Oliver Hartkopp
@ 2024-02-19 17:00 ` Simon Horman
2024-02-19 20:37 ` Oliver Hartkopp
0 siblings, 1 reply; 6+ messages in thread
From: Simon Horman @ 2024-02-19 17:00 UTC (permalink / raw
To: Oliver Hartkopp
Cc: Daniil Dulov, Wolfgang Grandegger, Marc Kleine-Budde,
David S. Miller, Jakub Kicinski, Kurt Van Dijck, linux-can,
netdev, linux-kernel, lvc-project
On Fri, Feb 16, 2024 at 08:47:43PM +0100, Oliver Hartkopp wrote:
> Hi Simon,
>
> I have a general question on the "Fixes:" tag in this patch:
>
> On 16.02.24 18:27, Simon Horman wrote:
> > On Sun, Feb 11, 2024 at 07:05:35AM -0800, Daniil Dulov wrote:
> > > In this case dev cannot be NULL, so remove redundant check.
> > >
> > > Found by Linux Verification Center (linuxtesting.org) with SVACE.
> > >
> > > Fixes: 03fd3cf5a179 ("can: add driver for Softing card")
>
> IMHO this is simply an improvement which is done by all patches applied to
> the kernel but it does not really "fix" anything from a functional
> standpoint.
>
> Shouldn't we either invent a new tag or better leave it out to not confuse
> the stable maintainers?
Hi Oliver,
sorry for missing that in my review.
Yes, I agree that this is probably not a fix, for which my
rule of thumb is something that addresses a user-visible problem.
So I agree it should not have a fixes tag.
I would suggest that we can just change the text to something that
has no tag. Something like:
...
Introduced by 03fd3cf5a179 ("can: add driver for Softing card")
Signed-of-by: ...
>
> Best regards,
> Oliver
>
> > > Signed-off-by: Daniil Dulov <d.dulov@aladdin.ru>
> >
> > Hi Daniil,
> >
> > I am not sure that dev cannot be NULL.
> > But I do see that the code assumes it is not, and would crash if it is.
> > So I think that, functionally, your statement is correct.
> >
> > priv = netdev_priv(dev);
> > card = priv->card;
> >
> > Reviewed-by: Simon Horman <horms@kernel.org>
> >
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] can: softing: remove redundant NULL check
2024-02-19 17:00 ` Simon Horman
@ 2024-02-19 20:37 ` Oliver Hartkopp
2024-02-20 13:40 ` Simon Horman
0 siblings, 1 reply; 6+ messages in thread
From: Oliver Hartkopp @ 2024-02-19 20:37 UTC (permalink / raw
To: Simon Horman
Cc: Daniil Dulov, Wolfgang Grandegger, Marc Kleine-Budde,
David S. Miller, Jakub Kicinski, Kurt Van Dijck, linux-can,
netdev, linux-kernel, lvc-project
Hi Simon,
On 2024-02-19 18:00, Simon Horman wrote:
> On Fri, Feb 16, 2024 at 08:47:43PM +0100, Oliver Hartkopp wrote:
>> Hi Simon,
>>
>> I have a general question on the "Fixes:" tag in this patch:
>>
>> On 16.02.24 18:27, Simon Horman wrote:
>>> On Sun, Feb 11, 2024 at 07:05:35AM -0800, Daniil Dulov wrote:
>>>> In this case dev cannot be NULL, so remove redundant check.
>>>>
>>>> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>>>>
>>>> Fixes: 03fd3cf5a179 ("can: add driver for Softing card")
>>
>> IMHO this is simply an improvement which is done by all patches applied to
>> the kernel but it does not really "fix" anything from a functional
>> standpoint.
>>
>> Shouldn't we either invent a new tag or better leave it out to not confuse
>> the stable maintainers?
>
> Hi Oliver,
>
> sorry for missing that in my review.
>
> Yes, I agree that this is probably not a fix, for which my
> rule of thumb is something that addresses a user-visible problem.
> So I agree it should not have a fixes tag.
>
> I would suggest that we can just change the text to something that
> has no tag. Something like:
>
> ...
>
> Introduced by 03fd3cf5a179 ("can: add driver for Softing card")
>
Yes, but the "Introduced-by:" tag would be an optional tag for people
that like blaming others, right?
IMHO we should think about completely removing the "Fixes:" tag, when it
has no user-visible effect that might be a candidate for stable kernels.
It is common improvement work. And it has been so for years.
Best regards,
Oliver
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] can: softing: remove redundant NULL check
2024-02-19 20:37 ` Oliver Hartkopp
@ 2024-02-20 13:40 ` Simon Horman
0 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2024-02-20 13:40 UTC (permalink / raw
To: Oliver Hartkopp
Cc: Daniil Dulov, Wolfgang Grandegger, Marc Kleine-Budde,
David S. Miller, Jakub Kicinski, Kurt Van Dijck, linux-can,
netdev, linux-kernel, lvc-project
On Mon, Feb 19, 2024 at 09:37:46PM +0100, Oliver Hartkopp wrote:
> Hi Simon,
>
> On 2024-02-19 18:00, Simon Horman wrote:
> > On Fri, Feb 16, 2024 at 08:47:43PM +0100, Oliver Hartkopp wrote:
> > > Hi Simon,
> > >
> > > I have a general question on the "Fixes:" tag in this patch:
> > >
> > > On 16.02.24 18:27, Simon Horman wrote:
> > > > On Sun, Feb 11, 2024 at 07:05:35AM -0800, Daniil Dulov wrote:
> > > > > In this case dev cannot be NULL, so remove redundant check.
> > > > >
> > > > > Found by Linux Verification Center (linuxtesting.org) with SVACE.
> > > > >
> > > > > Fixes: 03fd3cf5a179 ("can: add driver for Softing card")
> > >
> > > IMHO this is simply an improvement which is done by all patches applied to
> > > the kernel but it does not really "fix" anything from a functional
> > > standpoint.
> > >
> > > Shouldn't we either invent a new tag or better leave it out to not confuse
> > > the stable maintainers?
> >
> > Hi Oliver,
> >
> > sorry for missing that in my review.
> >
> > Yes, I agree that this is probably not a fix, for which my
> > rule of thumb is something that addresses a user-visible problem.
> > So I agree it should not have a fixes tag.
> >
> > I would suggest that we can just change the text to something that
> > has no tag. Something like:
> >
> > ...
> >
> > Introduced by 03fd3cf5a179 ("can: add driver for Softing card")
> >
>
> Yes, but the "Introduced-by:" tag would be an optional tag for people that
> like blaming others, right?
Yes, That does seem useful to me.
> IMHO we should think about completely removing the "Fixes:" tag, when it has
> no user-visible effect that might be a candidate for stable kernels. It is
> common improvement work. And it has been so for years.
Likewise, that does sound like a good idea to me.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-02-20 13:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-11 15:05 [PATCH] can: softing: remove redundant NULL check Daniil Dulov
2024-02-16 17:27 ` Simon Horman
2024-02-16 19:47 ` Oliver Hartkopp
2024-02-19 17:00 ` Simon Horman
2024-02-19 20:37 ` Oliver Hartkopp
2024-02-20 13:40 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).