virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
  • * Re: [PATCH -next] vdpa/mlx5: fix check wrong pointer in mlx5_vdpa_add_mac_vlan_rules()
           [not found] <20230104074418.1737510-1-yangyingliang@huawei.com>
           [not found] ` <DM8PR12MB5400CDBCE2E0150F50E2224FABF59@DM8PR12MB5400.namprd12.prod.outlook.com>
    @ 2023-01-09  9:10 ` Jason Wang
      1 sibling, 0 replies; 3+ messages in thread
    From: Jason Wang @ 2023-01-09  9:10 UTC (permalink / raw)
      To: Yang Yingliang; +Cc: elic, mst, virtualization
    
    On Wed, Jan 4, 2023 at 3:42 PM Yang Yingliang <yangyingliang@huawei.com> wrote:
    >
    > The local variable 'rule' is not used anymore, fix return value
    > check after calling mlx5_add_flow_rules().
    >
    > Fixes: 8b14d56c6128 ("vdpa/mlx5: Add RX counters to debugfs")
    > Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
    
    Acked-by: Jason Wang <jasowang@redhat.com>
    
    Thanks
    
    > ---
    >  drivers/vdpa/mlx5/net/mlx5_vnet.c | 9 ++++-----
    >  1 file changed, 4 insertions(+), 5 deletions(-)
    >
    > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
    > index 6632651b1e54..75f800685677 100644
    > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
    > +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
    > @@ -1454,7 +1454,6 @@ static int mlx5_vdpa_add_mac_vlan_rules(struct mlx5_vdpa_net *ndev, u8 *mac,
    >  {
    >         struct mlx5_flow_destination dests[NUM_DESTS] = {};
    >         struct mlx5_flow_act flow_act = {};
    > -       struct mlx5_flow_handle *rule;
    >         struct mlx5_flow_spec *spec;
    >         void *headers_c;
    >         void *headers_v;
    > @@ -1494,8 +1493,8 @@ static int mlx5_vdpa_add_mac_vlan_rules(struct mlx5_vdpa_net *ndev, u8 *mac,
    >         dests[1].counter_id = mlx5_fc_id(node->ucast_counter.counter);
    >  #endif
    >         node->ucast_rule = mlx5_add_flow_rules(ndev->rxft, spec, &flow_act, dests, NUM_DESTS);
    > -       if (IS_ERR(rule)) {
    > -               err = PTR_ERR(rule);
    > +       if (IS_ERR(node->ucast_rule)) {
    > +               err = PTR_ERR(node->ucast_rule);
    >                 goto err_ucast;
    >         }
    >
    > @@ -1508,8 +1507,8 @@ static int mlx5_vdpa_add_mac_vlan_rules(struct mlx5_vdpa_net *ndev, u8 *mac,
    >         dmac_c[0] = 1;
    >         dmac_v[0] = 1;
    >         node->mcast_rule = mlx5_add_flow_rules(ndev->rxft, spec, &flow_act, dests, NUM_DESTS);
    > -       if (IS_ERR(rule)) {
    > -               err = PTR_ERR(rule);
    > +       if (IS_ERR(node->mcast_rule)) {
    > +               err = PTR_ERR(node->mcast_rule);
    >                 goto err_mcast;
    >         }
    >         kvfree(spec);
    > --
    > 2.25.1
    >
    
    _______________________________________________
    Virtualization mailing list
    Virtualization@lists.linux-foundation.org
    https://lists.linuxfoundation.org/mailman/listinfo/virtualization
    
    ^ permalink raw reply	[flat|nested] 3+ messages in thread

  • end of thread, other threads:[~2023-01-27 10:43 UTC | newest]
    
    Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
    -- links below jump to the message on this page --
         [not found] <20230104074418.1737510-1-yangyingliang@huawei.com>
         [not found] ` <DM8PR12MB5400CDBCE2E0150F50E2224FABF59@DM8PR12MB5400.namprd12.prod.outlook.com>
         [not found]   ` <DM8PR12MB540012D1421616399D0903CCABF59@DM8PR12MB5400.namprd12.prod.outlook.com>
    2023-01-04 13:58     ` [PATCH -next] vdpa/mlx5: fix check wrong pointer in mlx5_vdpa_add_mac_vlan_rules() Michael S. Tsirkin
         [not found]       ` <DM8PR12MB540017B7D9940F73F6C060FCABF59@DM8PR12MB5400.namprd12.prod.outlook.com>
    2023-01-27 10:43         ` Michael S. Tsirkin
    2023-01-09  9:10 ` Jason Wang
    

    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 NNTP newsgroup(s).