* [Intel-wired-lan] [PATCH] ice: remove an unneeded NULL check
@ 2018-10-12 7:17 ` Dan Carpenter
0 siblings, 0 replies; 9+ messages in thread
From: Dan Carpenter @ 2018-10-12 7:17 UTC (permalink / raw)
To: intel-wired-lan
We added a NULL check in commit 072f0c3db9da ("ice: Fix potential null
pointer issues") but it causes static checker warnings.
drivers/net/ethernet/intel/ice/ice_switch.c:2145 ice_add_to_vsi_fltr_list()
warn: address of 'fm_entry->fltr_info' is non-NULL
We can just remove it.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c
index 33403f39f1b3..a9ef19da6e61 100644
--- a/drivers/net/ethernet/intel/ice/ice_switch.c
+++ b/drivers/net/ethernet/intel/ice/ice_switch.c
@@ -2142,7 +2142,7 @@ ice_add_to_vsi_fltr_list(struct ice_hw *hw, u16 vsi_handle,
struct ice_fltr_info *fi;
fi = &fm_entry->fltr_info;
- if (!fi || !ice_vsi_uses_fltr(fm_entry, vsi_handle))
+ if (!ice_vsi_uses_fltr(fm_entry, vsi_handle))
continue;
status = ice_add_entry_to_vsi_fltr_list(hw, vsi_handle,
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] ice: remove an unneeded NULL check
@ 2018-10-12 7:17 ` Dan Carpenter
0 siblings, 0 replies; 9+ messages in thread
From: Dan Carpenter @ 2018-10-12 7:17 UTC (permalink / raw)
To: kernel-janitors
We added a NULL check in commit 072f0c3db9da ("ice: Fix potential null
pointer issues") but it causes static checker warnings.
drivers/net/ethernet/intel/ice/ice_switch.c:2145 ice_add_to_vsi_fltr_list()
warn: address of 'fm_entry->fltr_info' is non-NULL
We can just remove it.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c
index 33403f39f1b3..a9ef19da6e61 100644
--- a/drivers/net/ethernet/intel/ice/ice_switch.c
+++ b/drivers/net/ethernet/intel/ice/ice_switch.c
@@ -2142,7 +2142,7 @@ ice_add_to_vsi_fltr_list(struct ice_hw *hw, u16 vsi_handle,
struct ice_fltr_info *fi;
fi = &fm_entry->fltr_info;
- if (!fi || !ice_vsi_uses_fltr(fm_entry, vsi_handle))
+ if (!ice_vsi_uses_fltr(fm_entry, vsi_handle))
continue;
status = ice_add_entry_to_vsi_fltr_list(hw, vsi_handle,
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Intel-wired-lan] [PATCH] ice: remove an unneeded NULL check
@ 2018-10-15 16:18 ` Allan, Bruce W
0 siblings, 0 replies; 9+ messages in thread
From: Allan, Bruce W @ 2018-10-15 16:18 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf
> Of Dan Carpenter
> Sent: Friday, October 12, 2018 12:17 AM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>; Ertman, David M
> <david.m.ertman@intel.com>
> Cc: kernel-janitors at vger.kernel.org; intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH] ice: remove an unneeded NULL check
>
> We added a NULL check in commit 072f0c3db9da ("ice: Fix potential null
> pointer issues") but it causes static checker warnings.
Which static checker and with what options?
>
> drivers/net/ethernet/intel/ice/ice_switch.c:2145 ice_add_to_vsi_fltr_list()
> warn: address of 'fm_entry->fltr_info' is non-NULL
>
> We can just remove it.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c
> b/drivers/net/ethernet/intel/ice/ice_switch.c
> index 33403f39f1b3..a9ef19da6e61 100644
> --- a/drivers/net/ethernet/intel/ice/ice_switch.c
> +++ b/drivers/net/ethernet/intel/ice/ice_switch.c
> @@ -2142,7 +2142,7 @@ ice_add_to_vsi_fltr_list(struct ice_hw *hw, u16
> vsi_handle,
> struct ice_fltr_info *fi;
>
> fi = &fm_entry->fltr_info;
> - if (!fi || !ice_vsi_uses_fltr(fm_entry, vsi_handle))
> + if (!ice_vsi_uses_fltr(fm_entry, vsi_handle))
> continue;
>
> status = ice_add_entry_to_vsi_fltr_list(hw, vsi_handle,
> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan at osuosl.org
> https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [Intel-wired-lan] [PATCH] ice: remove an unneeded NULL check
@ 2018-10-15 16:18 ` Allan, Bruce W
0 siblings, 0 replies; 9+ messages in thread
From: Allan, Bruce W @ 2018-10-15 16:18 UTC (permalink / raw)
To: kernel-janitors
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces@osuosl.org] On Behalf
> Of Dan Carpenter
> Sent: Friday, October 12, 2018 12:17 AM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>; Ertman, David M
> <david.m.ertman@intel.com>
> Cc: kernel-janitors@vger.kernel.org; intel-wired-lan@lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH] ice: remove an unneeded NULL check
>
> We added a NULL check in commit 072f0c3db9da ("ice: Fix potential null
> pointer issues") but it causes static checker warnings.
Which static checker and with what options?
>
> drivers/net/ethernet/intel/ice/ice_switch.c:2145 ice_add_to_vsi_fltr_list()
> warn: address of 'fm_entry->fltr_info' is non-NULL
>
> We can just remove it.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c
> b/drivers/net/ethernet/intel/ice/ice_switch.c
> index 33403f39f1b3..a9ef19da6e61 100644
> --- a/drivers/net/ethernet/intel/ice/ice_switch.c
> +++ b/drivers/net/ethernet/intel/ice/ice_switch.c
> @@ -2142,7 +2142,7 @@ ice_add_to_vsi_fltr_list(struct ice_hw *hw, u16
> vsi_handle,
> struct ice_fltr_info *fi;
>
> fi = &fm_entry->fltr_info;
> - if (!fi || !ice_vsi_uses_fltr(fm_entry, vsi_handle))
> + if (!ice_vsi_uses_fltr(fm_entry, vsi_handle))
> continue;
>
> status = ice_add_entry_to_vsi_fltr_list(hw, vsi_handle,
> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan@osuosl.org
> https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Intel-wired-lan] [PATCH] ice: remove an unneeded NULL check
2018-10-12 7:17 ` Dan Carpenter
(?)
(?)
@ 2018-10-15 21:17 ` Bowers, AndrewX
-1 siblings, 0 replies; 9+ messages in thread
From: Bowers, AndrewX @ 2018-10-15 21:17 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Dan Carpenter
> Sent: Friday, October 12, 2018 12:17 AM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>; Ertman, David M
> <david.m.ertman@intel.com>
> Cc: kernel-janitors at vger.kernel.org; intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH] ice: remove an unneeded NULL check
>
> We added a NULL check in commit 072f0c3db9da ("ice: Fix potential null
> pointer issues") but it causes static checker warnings.
>
> drivers/net/ethernet/intel/ice/ice_switch.c:2145 ice_add_to_vsi_fltr_list()
> warn: address of 'fm_entry->fltr_info' is non-NULL
>
> We can just remove it.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Intel-wired-lan] [PATCH] ice: remove an unneeded NULL check
2018-10-15 16:18 ` Allan, Bruce W
@ 2018-10-16 10:59 ` Dan Carpenter
-1 siblings, 0 replies; 9+ messages in thread
From: Dan Carpenter @ 2018-10-16 10:59 UTC (permalink / raw)
To: intel-wired-lan
On Mon, Oct 15, 2018 at 04:18:35PM +0000, Allan, Bruce W wrote:
> > -----Original Message-----
> > From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf
> > Of Dan Carpenter
> > Sent: Friday, October 12, 2018 12:17 AM
> > To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>; Ertman, David M
> > <david.m.ertman@intel.com>
> > Cc: kernel-janitors at vger.kernel.org; intel-wired-lan at lists.osuosl.org
> > Subject: [Intel-wired-lan] [PATCH] ice: remove an unneeded NULL check
> >
> > We added a NULL check in commit 072f0c3db9da ("ice: Fix potential null
> > pointer issues") but it causes static checker warnings.
>
> Which static checker and with what options?
>
Future versions of Smatch will complain probably. It turns out there
are many many unnecessary NULL checks and they seldome indicate a bug so
I'm waffling on this...
regards,
dan carpenter
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Intel-wired-lan] [PATCH] ice: remove an unneeded NULL check
@ 2018-10-16 10:59 ` Dan Carpenter
0 siblings, 0 replies; 9+ messages in thread
From: Dan Carpenter @ 2018-10-16 10:59 UTC (permalink / raw)
To: kernel-janitors
On Mon, Oct 15, 2018 at 04:18:35PM +0000, Allan, Bruce W wrote:
> > -----Original Message-----
> > From: Intel-wired-lan [mailto:intel-wired-lan-bounces@osuosl.org] On Behalf
> > Of Dan Carpenter
> > Sent: Friday, October 12, 2018 12:17 AM
> > To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>; Ertman, David M
> > <david.m.ertman@intel.com>
> > Cc: kernel-janitors@vger.kernel.org; intel-wired-lan@lists.osuosl.org
> > Subject: [Intel-wired-lan] [PATCH] ice: remove an unneeded NULL check
> >
> > We added a NULL check in commit 072f0c3db9da ("ice: Fix potential null
> > pointer issues") but it causes static checker warnings.
>
> Which static checker and with what options?
>
Future versions of Smatch will complain probably. It turns out there
are many many unnecessary NULL checks and they seldome indicate a bug so
I'm waffling on this...
regards,
dan carpenter
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Intel-wired-lan] [PATCH] ice: remove an unneeded NULL check
2018-10-15 16:18 ` Allan, Bruce W
@ 2018-10-17 14:04 ` David Arcari
-1 siblings, 0 replies; 9+ messages in thread
From: David Arcari @ 2018-10-17 14:04 UTC (permalink / raw)
To: intel-wired-lan
On 10/16/2018 06:59 AM, Dan Carpenter wrote:
> On Mon, Oct 15, 2018 at 04:18:35PM +0000, Allan, Bruce W wrote:
>>> -----Original Message-----
>>> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf
>>> Of Dan Carpenter
>>> Sent: Friday, October 12, 2018 12:17 AM
>>> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>; Ertman, David M
>>> <david.m.ertman@intel.com>
>>> Cc: kernel-janitors at vger.kernel.org; intel-wired-lan at lists.osuosl.org
>>> Subject: [Intel-wired-lan] [PATCH] ice: remove an unneeded NULL check
>>>
>>> We added a NULL check in commit 072f0c3db9da ("ice: Fix potential null
>>> pointer issues") but it causes static checker warnings.
>>
>> Which static checker and with what options?
>>
>
> Future versions of Smatch will complain probably. It turns out there
> are many many unnecessary NULL checks and they seldome indicate a bug so
> I'm waffling on this...
I don't see how fi could ever be NULL. It's set to the address of
fm_entry->fltr_info.
Given that, it really seems like the check should go, since it is clearly
unnecessary.
-Dave
>
> regards,
> dan carpenter
>
> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan at osuosl.org
> https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Intel-wired-lan] [PATCH] ice: remove an unneeded NULL check
@ 2018-10-17 14:04 ` David Arcari
0 siblings, 0 replies; 9+ messages in thread
From: David Arcari @ 2018-10-17 14:04 UTC (permalink / raw)
To: kernel-janitors
On 10/16/2018 06:59 AM, Dan Carpenter wrote:
> On Mon, Oct 15, 2018 at 04:18:35PM +0000, Allan, Bruce W wrote:
>>> -----Original Message-----
>>> From: Intel-wired-lan [mailto:intel-wired-lan-bounces@osuosl.org] On Behalf
>>> Of Dan Carpenter
>>> Sent: Friday, October 12, 2018 12:17 AM
>>> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>; Ertman, David M
>>> <david.m.ertman@intel.com>
>>> Cc: kernel-janitors@vger.kernel.org; intel-wired-lan@lists.osuosl.org
>>> Subject: [Intel-wired-lan] [PATCH] ice: remove an unneeded NULL check
>>>
>>> We added a NULL check in commit 072f0c3db9da ("ice: Fix potential null
>>> pointer issues") but it causes static checker warnings.
>>
>> Which static checker and with what options?
>>
>
> Future versions of Smatch will complain probably. It turns out there
> are many many unnecessary NULL checks and they seldome indicate a bug so
> I'm waffling on this...
I don't see how fi could ever be NULL. It's set to the address of
fm_entry->fltr_info.
Given that, it really seems like the check should go, since it is clearly
unnecessary.
-Dave
>
> regards,
> dan carpenter
>
> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan@osuosl.org
> https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-10-17 14:04 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-12 7:17 [Intel-wired-lan] [PATCH] ice: remove an unneeded NULL check Dan Carpenter
2018-10-12 7:17 ` Dan Carpenter
2018-10-15 16:18 ` [Intel-wired-lan] " Allan, Bruce W
2018-10-15 16:18 ` Allan, Bruce W
2018-10-16 10:59 ` Dan Carpenter
2018-10-16 10:59 ` Dan Carpenter
2018-10-17 14:04 ` David Arcari
2018-10-17 14:04 ` David Arcari
2018-10-15 21:17 ` Bowers, AndrewX
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.