* [PATCH] ice: Slightly simply ice_find_free_recp_res_idx
@ 2021-11-17 21:21 ` Christophe JAILLET
0 siblings, 0 replies; 4+ messages in thread
From: Christophe JAILLET @ 2021-11-17 21:21 UTC (permalink / raw)
To: jesse.brandeburg, anthony.l.nguyen, davem, kuba
Cc: intel-wired-lan, netdev, linux-kernel, kernel-janitors,
Christophe JAILLET
The 'possible_idx' bitmap is set just after it is zeroed, so we can save
the first step.
The 'free_idx' bitmap is used only at the end of the function as the
result of a bitmap xor operation. So there is no need to explicitly
zero it before.
So, slightly simply the code and remove 2 useless 'bitmap_zero()' call
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
I don't think it will make any differences in RL. ICE_MAX_FV_WORDS is
just 48 (bits), so 1 or 2 longs
---
drivers/net/ethernet/intel/ice/ice_switch.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c
index 793f4a9fc2cd..78bfb9fd318d 100644
--- a/drivers/net/ethernet/intel/ice/ice_switch.c
+++ b/drivers/net/ethernet/intel/ice/ice_switch.c
@@ -4071,10 +4071,8 @@ ice_find_free_recp_res_idx(struct ice_hw *hw, const unsigned long *profiles,
DECLARE_BITMAP(used_idx, ICE_MAX_FV_WORDS);
u16 bit;
- bitmap_zero(possible_idx, ICE_MAX_FV_WORDS);
bitmap_zero(recipes, ICE_MAX_NUM_RECIPES);
bitmap_zero(used_idx, ICE_MAX_FV_WORDS);
- bitmap_zero(free_idx, ICE_MAX_FV_WORDS);
bitmap_set(possible_idx, 0, ICE_MAX_FV_WORDS);
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Intel-wired-lan] [PATCH] ice: Slightly simply ice_find_free_recp_res_idx
@ 2021-11-17 21:21 ` Christophe JAILLET
0 siblings, 0 replies; 4+ messages in thread
From: Christophe JAILLET @ 2021-11-17 21:21 UTC (permalink / raw)
To: intel-wired-lan
The 'possible_idx' bitmap is set just after it is zeroed, so we can save
the first step.
The 'free_idx' bitmap is used only at the end of the function as the
result of a bitmap xor operation. So there is no need to explicitly
zero it before.
So, slightly simply the code and remove 2 useless 'bitmap_zero()' call
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
I don't think it will make any differences in RL. ICE_MAX_FV_WORDS is
just 48 (bits), so 1 or 2 longs
---
drivers/net/ethernet/intel/ice/ice_switch.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c
index 793f4a9fc2cd..78bfb9fd318d 100644
--- a/drivers/net/ethernet/intel/ice/ice_switch.c
+++ b/drivers/net/ethernet/intel/ice/ice_switch.c
@@ -4071,10 +4071,8 @@ ice_find_free_recp_res_idx(struct ice_hw *hw, const unsigned long *profiles,
DECLARE_BITMAP(used_idx, ICE_MAX_FV_WORDS);
u16 bit;
- bitmap_zero(possible_idx, ICE_MAX_FV_WORDS);
bitmap_zero(recipes, ICE_MAX_NUM_RECIPES);
bitmap_zero(used_idx, ICE_MAX_FV_WORDS);
- bitmap_zero(free_idx, ICE_MAX_FV_WORDS);
bitmap_set(possible_idx, 0, ICE_MAX_FV_WORDS);
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [Intel-wired-lan] [PATCH] ice: Slightly simply ice_find_free_recp_res_idx
2021-11-17 21:21 ` [Intel-wired-lan] " Christophe JAILLET
@ 2022-01-06 4:47 ` Penigalapati, Sandeep
-1 siblings, 0 replies; 4+ messages in thread
From: Penigalapati, Sandeep @ 2022-01-06 4:47 UTC (permalink / raw)
To: Christophe JAILLET, Brandeburg, Jesse, Nguyen, Anthony L, davem, kuba
Cc: netdev, kernel-janitors, intel-wired-lan, linux-kernel
>-----Original Message-----
>From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
>Christophe JAILLET
>Sent: Thursday, November 18, 2021 2:51 AM
>To: Brandeburg, Jesse <jesse.brandeburg@intel.com>; Nguyen, Anthony L
><anthony.l.nguyen@intel.com>; davem@davemloft.net; kuba@kernel.org
>Cc: netdev@vger.kernel.org; kernel-janitors@vger.kernel.org; Christophe
>JAILLET <christophe.jaillet@wanadoo.fr>; intel-wired-lan@lists.osuosl.org;
>linux-kernel@vger.kernel.org
>Subject: [Intel-wired-lan] [PATCH] ice: Slightly simply
>ice_find_free_recp_res_idx
>
>The 'possible_idx' bitmap is set just after it is zeroed, so we can save the first
>step.
>
>The 'free_idx' bitmap is used only at the end of the function as the result of a
>bitmap xor operation. So there is no need to explicitly zero it before.
>
>So, slightly simply the code and remove 2 useless 'bitmap_zero()' call
>
>Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>---
>I don't think it will make any differences in RL. ICE_MAX_FV_WORDS is just 48
>(bits), so 1 or 2 longs
>---
> drivers/net/ethernet/intel/ice/ice_switch.c | 2 --
> 1 file changed, 2 deletions(-)
>
Tested-by: Sandeep Penigalapati <sandeep.penigalapati@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Intel-wired-lan] [PATCH] ice: Slightly simply ice_find_free_recp_res_idx
@ 2022-01-06 4:47 ` Penigalapati, Sandeep
0 siblings, 0 replies; 4+ messages in thread
From: Penigalapati, Sandeep @ 2022-01-06 4:47 UTC (permalink / raw)
To: intel-wired-lan
>-----Original Message-----
>From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
>Christophe JAILLET
>Sent: Thursday, November 18, 2021 2:51 AM
>To: Brandeburg, Jesse <jesse.brandeburg@intel.com>; Nguyen, Anthony L
><anthony.l.nguyen@intel.com>; davem at davemloft.net; kuba at kernel.org
>Cc: netdev at vger.kernel.org; kernel-janitors at vger.kernel.org; Christophe
>JAILLET <christophe.jaillet@wanadoo.fr>; intel-wired-lan at lists.osuosl.org;
>linux-kernel at vger.kernel.org
>Subject: [Intel-wired-lan] [PATCH] ice: Slightly simply
>ice_find_free_recp_res_idx
>
>The 'possible_idx' bitmap is set just after it is zeroed, so we can save the first
>step.
>
>The 'free_idx' bitmap is used only at the end of the function as the result of a
>bitmap xor operation. So there is no need to explicitly zero it before.
>
>So, slightly simply the code and remove 2 useless 'bitmap_zero()' call
>
>Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>---
>I don't think it will make any differences in RL. ICE_MAX_FV_WORDS is just 48
>(bits), so 1 or 2 longs
>---
> drivers/net/ethernet/intel/ice/ice_switch.c | 2 --
> 1 file changed, 2 deletions(-)
>
Tested-by: Sandeep Penigalapati <sandeep.penigalapati@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-01-06 4:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-17 21:21 [PATCH] ice: Slightly simply ice_find_free_recp_res_idx Christophe JAILLET
2021-11-17 21:21 ` [Intel-wired-lan] " Christophe JAILLET
2022-01-06 4:47 ` Penigalapati, Sandeep
2022-01-06 4:47 ` Penigalapati, Sandeep
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.