From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 439BBA09FF; Tue, 29 Dec 2020 21:10:11 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9DEBCC9BC; Tue, 29 Dec 2020 21:09:24 +0100 (CET) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by dpdk.org (Postfix) with ESMTP id 8607F2C1A for ; Tue, 29 Dec 2020 21:09:21 +0100 (CET) Received: by mail-pf1-f177.google.com with SMTP id c12so8501403pfo.10 for ; Tue, 29 Dec 2020 12:09:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=x1ucAhzfqyeOFzDRefK0/VouBO/zsB4AICcG2eyiNLw=; b=dGxuJDiVnGQw37qHiWcmtwhPRxJFFimTECDfoiqoXHK4Iwk63cqQ89LaHp/15S3UnZ tW/r3t259WFh4gY7buAIFqK2N/X9J6LppQHJOcSIcdYauz4hRdKDjjJ4u97IRaUb3ao7 yRaPS9+34TJOqdELZDvi/50jfbMPp8e3feM+KzKeww7vVhJV7rYtEQ2Jw0O7Tg1AeJwI t7nuwtw+9vuHbBCp38yz0pp7lz/G2AFzauVuBw+lot3BT8+TEclcLNoelbI6w/q3p1pX /T948fgdM/KLkefq28ziuudpYgBHCEymqEIpTx87JZ0iI1zLSiit1B1GlI43aT98NiDu hmVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=x1ucAhzfqyeOFzDRefK0/VouBO/zsB4AICcG2eyiNLw=; b=AbLmRM/B9K5CjyMah5rroW0IAOOhRqV0FxA5SqcUKiiY/zipsugHuCluPwBT9DMzyQ pu9mkPy2f5+ngfL4bst0dpWwinx2YVhVzgVF91joi2P6Typ9bd8gTX0Oiil9nOnYGxdD 6iHPhcS7KeejRYOrApjMtfQkwJqDYYIj2waVHNb5CbNeS+re0z/2+A3eTkzw8d660Z6P vd1u2GTLHpm+C5zft5jlJ3m8YWG7tRttmGuY3ukhBhh/XpT1wAzek6JQ0MQGJeJTVtUY EBwBOi57oqGpDToQl74fd3G79BgtTFXaMC0Q/UGK5j29kUeKf6OJc0bmTXIpOsD2IsD2 qGow== X-Gm-Message-State: AOAM533+nxFbgQ4wwBPhrUjgquDquQhHnx6AyR8jVfm/cliO18I/VVF9 vTWNX2+x/uiD9Rcr/HSWC25QcaXN1tzCrw== X-Google-Smtp-Source: ABdhPJzsgZh0DHdopWWsAyRNXqB++pSOj7Yw0r0nr11fqGTp1wAJxhTFq1WtabwDsO/8XuPOA5oDJg== X-Received: by 2002:aa7:83cd:0:b029:1a5:fb23:ad7f with SMTP id j13-20020aa783cd0000b02901a5fb23ad7fmr45930104pfn.46.1609272559358; Tue, 29 Dec 2020 12:09:19 -0800 (PST) Received: from hermes.local (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id r14sm37763237pgi.27.2020.12.29.12.09.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Dec 2020 12:09:18 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Tue, 29 Dec 2020 12:09:01 -0800 Message-Id: <20201229200901.101171-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201229200901.101171-1-stephen@networkplumber.org> References: <20201227033335.85145-1-stephen@networkplumber.org> <20201229200901.101171-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 3/3] pdump: cleanup checkpatch warnings X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Checkpatch prefers 'unsigned int' over bare 'unsigned'. Reword the error messages for brevity and clarity so they don't have to be split across multiple lines. Signed-off-by: Stephen Hemminger --- lib/librte_pdump/rte_pdump.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/librte_pdump/rte_pdump.c b/lib/librte_pdump/rte_pdump.c index 14a392ef0340..d20e944e0454 100644 --- a/lib/librte_pdump/rte_pdump.c +++ b/lib/librte_pdump/rte_pdump.c @@ -71,7 +71,7 @@ tx_cbs[RTE_MAX_ETHPORTS][RTE_MAX_QUEUES_PER_PORT]; static inline void pdump_copy(struct rte_mbuf **pkts, uint16_t nb_pkts, void *user_params) { - unsigned i; + unsigned int i; int ring_enq; uint16_t d_pkts = 0; struct rte_mbuf *dup_bufs[nb_pkts]; @@ -131,8 +131,7 @@ pdump_register_rx_callbacks(uint16_t end_q, uint16_t port, uint16_t queue, if (cbs && operation == ENABLE) { if (cbs->cb) { PDUMP_LOG(ERR, - "failed to add rx callback for port=%d " - "and queue=%d, callback already exists\n", + "rx callback for port=%d queue=%d, already exists\n", port, qid); return -EEXIST; } @@ -152,8 +151,7 @@ pdump_register_rx_callbacks(uint16_t end_q, uint16_t port, uint16_t queue, if (cbs->cb == NULL) { PDUMP_LOG(ERR, - "failed to delete non existing rx " - "callback for port=%d and queue=%d\n", + "no existing rx callback for port=%d queue=%d\n", port, qid); return -EINVAL; } @@ -186,8 +184,7 @@ pdump_register_tx_callbacks(uint16_t end_q, uint16_t port, uint16_t queue, if (cbs && operation == ENABLE) { if (cbs->cb) { PDUMP_LOG(ERR, - "failed to add tx callback for port=%d " - "and queue=%d, callback already exists\n", + "tx callback for port=%d queue=%d, already exists\n", port, qid); return -EEXIST; } @@ -207,8 +204,7 @@ pdump_register_tx_callbacks(uint16_t end_q, uint16_t port, uint16_t queue, if (cbs->cb == NULL) { PDUMP_LOG(ERR, - "failed to delete non existing tx " - "callback for port=%d and queue=%d\n", + "no existing tx callback for port=%d queue=%d\n", port, qid); return -EINVAL; } @@ -351,7 +347,9 @@ pdump_server(const struct rte_mp_msg *mp_msg, const void *peer) int rte_pdump_init(void) { - int ret = rte_mp_action_register(PDUMP_MP, pdump_server); + int ret; + + ret = rte_mp_action_register(PDUMP_MP, pdump_server); if (ret && rte_errno != ENOTSUP) return -1; return 0; @@ -374,14 +372,16 @@ pdump_validate_ring_mp(struct rte_ring *ring, struct rte_mempool *mp) return -1; } if (mp->flags & MEMPOOL_F_SP_PUT || mp->flags & MEMPOOL_F_SC_GET) { - PDUMP_LOG(ERR, "mempool with either SP or SC settings" - " is not valid for pdump, should have MP and MC settings\n"); + PDUMP_LOG(ERR, + "mempool with SP or SC set not valid for pdump," + "must have MP and MC set\n"); rte_errno = EINVAL; return -1; } if (rte_ring_is_prod_single(ring) || rte_ring_is_cons_single(ring)) { - PDUMP_LOG(ERR, "ring with either SP or SC settings" - " is not valid for pdump, should have MP and MC settings\n"); + PDUMP_LOG(ERR, + "ring with SP or SC set is not valid for pdump," + "must have MP and MC set\n"); rte_errno = EINVAL; return -1; } -- 2.29.2