All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH net-next] ice: fix error return code in ice_vsi_cfg_def()
@ 2023-02-17  9:36 ` Yang Yingliang
  0 siblings, 0 replies; 6+ messages in thread
From: Yang Yingliang @ 2023-02-17  9:36 UTC (permalink / raw)
  To: netdev, intel-wired-lan
  Cc: yangyingliang, jesse.brandeburg, edumazet, anthony.l.nguyen, kuba,
	pabeni, liwei391, davem

Set the error code when ice_vsi_alloc_stat_arrays()
or ice_vsi_get_qs() fails in ice_vsi_cfg_def().

Fixes: 6624e780a577 ("ice: split ice_vsi_setup into smaller functions")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/net/ethernet/intel/ice/ice_lib.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index 37fe639712e6..766edff0d638 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -2692,12 +2692,14 @@ ice_vsi_cfg_def(struct ice_vsi *vsi, struct ice_vsi_cfg_params *params)
 		return ret;
 
 	/* allocate memory for Tx/Rx ring stat pointers */
-	if (ice_vsi_alloc_stat_arrays(vsi))
+	ret = ice_vsi_alloc_stat_arrays(vsi);
+	if (ret)
 		goto unroll_vsi_alloc;
 
 	ice_alloc_fd_res(vsi);
 
-	if (ice_vsi_get_qs(vsi)) {
+	ret = ice_vsi_get_qs(vsi);
+	if (ret) {
 		dev_err(dev, "Failed to allocate queues. vsi->idx = %d\n",
 			vsi->idx);
 		goto unroll_vsi_alloc_stat;
-- 
2.25.1

_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH net-next] ice: fix error return code in ice_vsi_cfg_def()
@ 2023-02-17  9:36 ` Yang Yingliang
  0 siblings, 0 replies; 6+ messages in thread
From: Yang Yingliang @ 2023-02-17  9:36 UTC (permalink / raw)
  To: netdev, intel-wired-lan
  Cc: jesse.brandeburg, anthony.l.nguyen, davem, edumazet, kuba, pabeni,
	jacob.e.keller, michal.swiatkowski, yangyingliang, liwei391

Set the error code when ice_vsi_alloc_stat_arrays()
or ice_vsi_get_qs() fails in ice_vsi_cfg_def().

Fixes: 6624e780a577 ("ice: split ice_vsi_setup into smaller functions")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/net/ethernet/intel/ice/ice_lib.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index 37fe639712e6..766edff0d638 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -2692,12 +2692,14 @@ ice_vsi_cfg_def(struct ice_vsi *vsi, struct ice_vsi_cfg_params *params)
 		return ret;
 
 	/* allocate memory for Tx/Rx ring stat pointers */
-	if (ice_vsi_alloc_stat_arrays(vsi))
+	ret = ice_vsi_alloc_stat_arrays(vsi);
+	if (ret)
 		goto unroll_vsi_alloc;
 
 	ice_alloc_fd_res(vsi);
 
-	if (ice_vsi_get_qs(vsi)) {
+	ret = ice_vsi_get_qs(vsi);
+	if (ret) {
 		dev_err(dev, "Failed to allocate queues. vsi->idx = %d\n",
 			vsi->idx);
 		goto unroll_vsi_alloc_stat;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Intel-wired-lan] [PATCH net-next] ice: fix error return code in ice_vsi_cfg_def()
  2023-02-17  9:36 ` Yang Yingliang
@ 2023-02-17 12:07   ` Larysa Zaremba
  -1 siblings, 0 replies; 6+ messages in thread
From: Larysa Zaremba @ 2023-02-17 12:07 UTC (permalink / raw)
  To: Yang Yingliang
  Cc: netdev, jesse.brandeburg, edumazet, anthony.l.nguyen, kuba,
	intel-wired-lan, pabeni, liwei391, davem

On Fri, Feb 17, 2023 at 05:36:25PM +0800, Yang Yingliang wrote:
> Set the error code when ice_vsi_alloc_stat_arrays()
> or ice_vsi_get_qs() fails in ice_vsi_cfg_def().
> 
> Fixes: 6624e780a577 ("ice: split ice_vsi_setup into smaller functions")

Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com>

> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_lib.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
> index 37fe639712e6..766edff0d638 100644
> --- a/drivers/net/ethernet/intel/ice/ice_lib.c
> +++ b/drivers/net/ethernet/intel/ice/ice_lib.c
> @@ -2692,12 +2692,14 @@ ice_vsi_cfg_def(struct ice_vsi *vsi, struct ice_vsi_cfg_params *params)
>  		return ret;
>  
>  	/* allocate memory for Tx/Rx ring stat pointers */
> -	if (ice_vsi_alloc_stat_arrays(vsi))
> +	ret = ice_vsi_alloc_stat_arrays(vsi);
> +	if (ret)
>  		goto unroll_vsi_alloc;
>  
>  	ice_alloc_fd_res(vsi);
>  
> -	if (ice_vsi_get_qs(vsi)) {
> +	ret = ice_vsi_get_qs(vsi);
> +	if (ret) {
>  		dev_err(dev, "Failed to allocate queues. vsi->idx = %d\n",
>  			vsi->idx);
>  		goto unroll_vsi_alloc_stat;
> -- 
> 2.25.1
> 
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] ice: fix error return code in ice_vsi_cfg_def()
@ 2023-02-17 12:07   ` Larysa Zaremba
  0 siblings, 0 replies; 6+ messages in thread
From: Larysa Zaremba @ 2023-02-17 12:07 UTC (permalink / raw)
  To: Yang Yingliang
  Cc: netdev, intel-wired-lan, jesse.brandeburg, anthony.l.nguyen,
	davem, edumazet, kuba, pabeni, jacob.e.keller, michal.swiatkowski,
	liwei391

On Fri, Feb 17, 2023 at 05:36:25PM +0800, Yang Yingliang wrote:
> Set the error code when ice_vsi_alloc_stat_arrays()
> or ice_vsi_get_qs() fails in ice_vsi_cfg_def().
> 
> Fixes: 6624e780a577 ("ice: split ice_vsi_setup into smaller functions")

Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com>

> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_lib.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
> index 37fe639712e6..766edff0d638 100644
> --- a/drivers/net/ethernet/intel/ice/ice_lib.c
> +++ b/drivers/net/ethernet/intel/ice/ice_lib.c
> @@ -2692,12 +2692,14 @@ ice_vsi_cfg_def(struct ice_vsi *vsi, struct ice_vsi_cfg_params *params)
>  		return ret;
>  
>  	/* allocate memory for Tx/Rx ring stat pointers */
> -	if (ice_vsi_alloc_stat_arrays(vsi))
> +	ret = ice_vsi_alloc_stat_arrays(vsi);
> +	if (ret)
>  		goto unroll_vsi_alloc;
>  
>  	ice_alloc_fd_res(vsi);
>  
> -	if (ice_vsi_get_qs(vsi)) {
> +	ret = ice_vsi_get_qs(vsi);
> +	if (ret) {
>  		dev_err(dev, "Failed to allocate queues. vsi->idx = %d\n",
>  			vsi->idx);
>  		goto unroll_vsi_alloc_stat;
> -- 
> 2.25.1
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Intel-wired-lan] [PATCH net-next] ice: fix error return code in ice_vsi_cfg_def()
  2023-02-17  9:36 ` Yang Yingliang
@ 2023-02-17 16:54   ` Tony Nguyen
  -1 siblings, 0 replies; 6+ messages in thread
From: Tony Nguyen @ 2023-02-17 16:54 UTC (permalink / raw)
  To: Yang Yingliang, netdev, intel-wired-lan
  Cc: jesse.brandeburg, edumazet, kuba, pabeni, liwei391, davem

On 2/17/2023 1:36 AM, Yang Yingliang wrote:
> Set the error code when ice_vsi_alloc_stat_arrays()
> or ice_vsi_get_qs() fails in ice_vsi_cfg_def().
> 
> Fixes: 6624e780a577 ("ice: split ice_vsi_setup into smaller functions")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>

Thanks for the patch Yingliang, however, there's already a patch with 
this change and more.

https://lore.kernel.org/intel-wired-lan/20230213112733.12570-1-michal.swiatkowski@linux.intel.com/

Thanks,
Tony
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] ice: fix error return code in ice_vsi_cfg_def()
@ 2023-02-17 16:54   ` Tony Nguyen
  0 siblings, 0 replies; 6+ messages in thread
From: Tony Nguyen @ 2023-02-17 16:54 UTC (permalink / raw)
  To: Yang Yingliang, netdev, intel-wired-lan
  Cc: jesse.brandeburg, davem, edumazet, kuba, pabeni, jacob.e.keller,
	michal.swiatkowski, liwei391

On 2/17/2023 1:36 AM, Yang Yingliang wrote:
> Set the error code when ice_vsi_alloc_stat_arrays()
> or ice_vsi_get_qs() fails in ice_vsi_cfg_def().
> 
> Fixes: 6624e780a577 ("ice: split ice_vsi_setup into smaller functions")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>

Thanks for the patch Yingliang, however, there's already a patch with 
this change and more.

https://lore.kernel.org/intel-wired-lan/20230213112733.12570-1-michal.swiatkowski@linux.intel.com/

Thanks,
Tony

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-02-17 16:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-17  9:36 [Intel-wired-lan] [PATCH net-next] ice: fix error return code in ice_vsi_cfg_def() Yang Yingliang
2023-02-17  9:36 ` Yang Yingliang
2023-02-17 12:07 ` [Intel-wired-lan] " Larysa Zaremba
2023-02-17 12:07   ` Larysa Zaremba
2023-02-17 16:54 ` [Intel-wired-lan] " Tony Nguyen
2023-02-17 16:54   ` Tony Nguyen

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.