mbox series

[net-next,v2,0/3] net: Update and fix return value check for vcap_get_rule()

Message ID 20230818050505.3634668-1-ruanjinjie@huawei.com (mailing list archive)
Headers show
Series net: Update and fix return value check for vcap_get_rule() | expand

Message

Jinjie Ruan Aug. 18, 2023, 5:05 a.m. UTC
As Simon Horman suggests, update vcap_get_rule() to always
return an ERR_PTR() and update the error detection conditions to
use IS_ERR(), which would be more cleaner.

So se IS_ERR() to update the return value and fix the issue
in lan966x_ptp_add_trap().

Changes in v2:
- Update vcap_get_rule() to always return an ERR_PTR().
- Update the return value fix in lan966x_ptp_add_trap().
- Update the return value check in sparx5_tc_free_rule_resources().

Ruan Jinjie (3):
  net: microchip: vcap api: Always return ERR_PTR for vcap_get_rule()
  net: lan966x: Fix return value check for vcap_get_rule()
  net: microchip: sparx5: Update return value check for vcap_get_rule()

 drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c     | 4 ++--
 drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c | 2 +-
 drivers/net/ethernet/microchip/vcap/vcap_api.c           | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

Comments

Simon Horman Aug. 19, 2023, 7:03 a.m. UTC | #1
On Fri, Aug 18, 2023 at 01:05:02PM +0800, Ruan Jinjie wrote:
> As Simon Horman suggests, update vcap_get_rule() to always
> return an ERR_PTR() and update the error detection conditions to
> use IS_ERR(), which would be more cleaner.
> 
> So se IS_ERR() to update the return value and fix the issue
> in lan966x_ptp_add_trap().
> 
> Changes in v2:
> - Update vcap_get_rule() to always return an ERR_PTR().
> - Update the return value fix in lan966x_ptp_add_trap().
> - Update the return value check in sparx5_tc_free_rule_resources().
> 
> Ruan Jinjie (3):
>   net: microchip: vcap api: Always return ERR_PTR for vcap_get_rule()
>   net: lan966x: Fix return value check for vcap_get_rule()
>   net: microchip: sparx5: Update return value check for vcap_get_rule()

Thanks.

For the series,

Reviewed-by: Simon Horman <horms@kernel.org>
patchwork-bot+netdevbpf@kernel.org Aug. 19, 2023, 6:43 p.m. UTC | #2
Hello:

This series was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Fri, 18 Aug 2023 13:05:02 +0800 you wrote:
> As Simon Horman suggests, update vcap_get_rule() to always
> return an ERR_PTR() and update the error detection conditions to
> use IS_ERR(), which would be more cleaner.
> 
> So se IS_ERR() to update the return value and fix the issue
> in lan966x_ptp_add_trap().
> 
> [...]

Here is the summary with links:
  - [net-next,v2,1/3] net: microchip: vcap api: Always return ERR_PTR for vcap_get_rule()
    https://git.kernel.org/netdev/net-next/c/093db9cda7b6
  - [net-next,v2,2/3] net: lan966x: Fix return value check for vcap_get_rule()
    https://git.kernel.org/netdev/net-next/c/ab104318f639
  - [net-next,v2,3/3] net: microchip: sparx5: Update return value check for vcap_get_rule()
    https://git.kernel.org/netdev/net-next/c/95b358e4d9c7

You are awesome, thank you!