remove check around pthread_mutex_init()
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest6 patches 2 repliesIn review
- v36 patches 4 repliesSuperseded
- v26 patches 0 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 6 patches | 0 replies | Superseded |
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | raw/ifpga: remove check around pthread_mutex_init()drivers/ drivers/ | +2 | 0 replies | |
| 2/6 | net/bnxt: remove check around pthread_mutex_init()drivers/ drivers/ drivers/ +4 more | +13 | 0 replies | |
| 3/6 | common/cnxk: remove check around pthread_mutex_init()drivers/ | +1 | 0 replies | |
| 4/6 | net/failsafe: remove check around pthread_mutex_init()drivers/ | +2 | 0 replies | |
| 5/6 | net/hinic: remove check around pthread_mutex_init()drivers/ | +1 | 0 replies | |
| 6/6 | lib/vhost: remove check around pthread_mutex_init()lib/ | +2 | 2 replies |
Reviews trailers per patch
All 6 patches have a Reviewed-by or Acked-by.
| Patch | Stephen Hemminger | Maxime Coquelin |
|---|---|---|
| Series | Series-Acked-by | |
| 1/6 | A-b | |
| 2/6 | A-b | |
| 3/6 | A-b | |
| 4/6 | A-b | |
| 5/6 | A-b | |
| 6/6 | A-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/6] remove check around pthread_mutex_init()
Hello,
This series addresses Bugzilla ID 1586; the man says
Quoted 2 lines
pthread_mutex_initalways returns 0. The other mutex functions return 0 on success and a non-zero error code on error.
Meaning, the check around around pthread_mutex_init() is needless.
```
$ git grep -Pn '=\s?pthread_mutex_init\('
drivers/common/cnxk/roc_bphy_cgx.c:197: ret = pthread_mutex_init(&roc_cgx->lock, NULL);
drivers/net/bnxt/bnxt_ethdev.c:5826: err = pthread_mutex_init(&bp->flow_lock, NULL);
drivers/net/bnxt/bnxt_ethdev.c:5832: err = pthread_mutex_init(&bp->def_cp_lock, NULL);
drivers/net/bnxt/bnxt_ethdev.c:5838: err = pthread_mutex_init(&bp->health_check_lock, NULL);
drivers/net/bnxt/bnxt_ethdev.c:5844: err = pthread_mutex_init(&bp->err_recovery_lock, NULL);
drivers/net/bnxt/bnxt_ethdev.c:6773: rc = pthread_mutex_init(&bp->rep_info->vfr_start_lock, NULL);
drivers/net/bnxt/bnxt_txq.c:201: rc = pthread_mutex_init(&txq->txq_lock, NULL);
drivers/net/bnxt/tf_ulp/bnxt_ulp.c:218: rc = pthread_mutex_init(&session->bnxt_ulp_mutex, NULL);
drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c:1475: rc = pthread_mutex_init(&bp->ulp_ctx->cfg_data->flow_db_lock, NULL);
drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c:996: rc = pthread_mutex_init(&bp->ulp_ctx->cfg_data->flow_db_lock, NULL);
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c:132: rc = pthread_mutex_init(&ulp_fc_info->fc_lock, NULL);
drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c:415: rc = pthread_mutex_init(&ha_info->ha_lock, NULL);
drivers/net/failsafe/failsafe.c:150: ret = pthread_mutex_init(&priv->hotplug_mutex, &attr);
drivers/net/hinic/base/hinic_compat.h:205: err = pthread_mutex_init(pthreadmutex, mattr);
drivers/raw/ifpga/base/opae_intel_max10.c:1489: ret = pthread_mutex_init(&dev->bmc_ops.lock, NULL);
drivers/raw/ifpga/base/opae_spi_transaction.c:510: ret = pthread_mutex_init(&spi_tran_dev->lock, NULL);
lib/vhost/socket.c:501: ret = pthread_mutex_init(&reconn_list.mutex, NULL);
lib/vhost/socket.c:924: ret = pthread_mutex_init(&vsocket->conn_mutex, NULL);
```Thank you,
Bugzilla ID: 1586
---
v4
* addressed feedback, turned returns into tail calls
* reworded the cover letter
v3 (https://inbox.dpdk.org/dev/[email protected]/)
* fix style issues
v2 (https://inbox.dpdk.org/dev/[email protected]/)
* fix build issues
v1 (https://inbox.dpdk.org/dev/[email protected]/#t)
Ariel Otilibili (6):
raw/ifpga: remove check around pthread_mutex_init() net/bnxt: remove check around pthread_mutex_init() common/cnxk: remove check around pthread_mutex_init() net/failsafe: remove check around pthread_mutex_init() net/hinic: remove check around pthread_mutex_init() lib/vhost: remove check around pthread_mutex_init()
drivers/common/cnxk/roc_bphy_cgx.c | 5 +-- drivers/net/bnxt/bnxt_ethdev.c | 40 ++++--------------- drivers/net/bnxt/bnxt_txq.c | 7 +--- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 8 +--- drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c | 6 +-- drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c | 6 +-- drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 6 +-- drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c | 6 +-- drivers/net/failsafe/failsafe.c | 8 +--- drivers/net/hinic/base/hinic_compat.h | 8 +--- drivers/raw/ifpga/base/opae_intel_max10.c | 5 +-- drivers/raw/ifpga/base/opae_spi_transaction.c | 7 +--- lib/vhost/socket.c | 14 +------ 13 files changed, 21 insertions(+), 105 deletions(-)
Signature · 1 line
2.30.2