diff options
author | Dirk van der Merwe <dirk.vandermerwe@netronome.com> | 2017-11-04 16:48:56 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-05 23:23:26 +0900 |
commit | 51ccc37d9d3392884024b272089fd3e864d3cf3c (patch) | |
tree | 29f8cd8f754a90f95e70f6c8899f1be330c4e3b0 /drivers/net/ethernet/netronome/nfp/nfp_app.c | |
parent | 7717c319d8c025aba426f10f41a9d7f9ea8af192 (diff) | |
download | talos-op-linux-51ccc37d9d3392884024b272089fd3e864d3cf3c.tar.gz talos-op-linux-51ccc37d9d3392884024b272089fd3e864d3cf3c.zip |
nfp: refactor nfp_app_reprs_set
The criteria that reprs cannot be replaced with another new set of reprs
has been removed. This check is not needed since the only use case that
could exercise this at the moment, would be to modify the number of
SRIOV VFs without first disabling them. This case is explicitly
disallowed in any case and subsequent patches in this series
need to be able to replace the running set of reprs.
All cases where the return code used to be checked for the
nfp_app_reprs_set function have been removed.
As stated above, it is not possible for the current code to encounter a
case where reprs exist and need to be replaced.
Signed-off-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/nfp_app.c')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfp_app.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_app.c b/drivers/net/ethernet/netronome/nfp/nfp_app.c index 3644d74fe304..955a9f44d244 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_app.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_app.c @@ -106,14 +106,8 @@ nfp_app_reprs_set(struct nfp_app *app, enum nfp_repr_type type, old = rcu_dereference_protected(app->reprs[type], lockdep_is_held(&app->pf->lock)); - if (reprs && old) { - old = ERR_PTR(-EBUSY); - goto exit_unlock; - } - rcu_assign_pointer(app->reprs[type], reprs); -exit_unlock: return old; } |