From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 88F3242DC6; Tue, 4 Jul 2023 00:33:02 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 35DA8410DC; Tue, 4 Jul 2023 00:33:02 +0200 (CEST) Received: from mail-oa1-f41.google.com (mail-oa1-f41.google.com [209.85.160.41]) by mails.dpdk.org (Postfix) with ESMTP id 98C5D40F18 for ; Tue, 4 Jul 2023 00:33:00 +0200 (CEST) Received: by mail-oa1-f41.google.com with SMTP id 586e51a60fabf-19fa4346498so4296181fac.1 for ; Mon, 03 Jul 2023 15:33:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1688423580; x=1691015580; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=/YrfvJphIPIe/FAvtpmS6IKDUv59Lnwmn1yQGKOiAHg=; b=lj8LPQOOWHymX6NmVgqzeBizq7GRVv+kcu3bip6S/cKBXVSNtAxAB7BRE0Ag27jmn4 Qf80Z7mNaE540LT8AsWG61Nz/ycLsZb3KTvSMybvChuF4khheLL6ls90EGOqgeNs9g4G usvIoph2rc2Qp9FO05+TUMyv7J7dhvj64Uco4TW47HzaxfbW0rmTp5ypoesarzk3T7PG UQ/Lf5lD0qk1pZP54oL2noEvHSU/+ssJYyGkIz3ByvLbB4m35YrwcmgyaI9pj73FkbTL 6uy/on80FxppWv54p8pRLAmwXCCvHspDdE92t520CZ/5lReJfMymbP7UDQRYB+gHpwgM yfiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688423580; x=1691015580; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/YrfvJphIPIe/FAvtpmS6IKDUv59Lnwmn1yQGKOiAHg=; b=ErKHP42+O1YAvUnX4//GuiDEAUgCibTgDPL62VxQy7FUWezP6KWdlgocIuzs+a7HPn XDOwBbbLYeXLf3xAo9n6SzLQHre/I+Q5u/10UMCO4hYE3oyH78TpNEkmGOUr/MVAr6v6 kJ5FXQVmevdzDj0ZgKWdD5JRogsU+d0qfyRCVIciQE4UsdC2mkjYCmH+mTOZv/1wrNEw jZv1VLYYAc9JozFJFZ4EpiujgeEaA9/+oM1Yw8A8N0XUqrSlnN5lj6v9hF2Lsr9VWbFG 9NzafJ9hnGaqdsMz1PsXDV8vNj+RLRg/vA4Fv9gi6SlDPozBq7avGTGmUTEzkBwT1wAL OipA== X-Gm-Message-State: AC+VfDx/ANrpXrHo3Ek0910gkpaQBBQLsXLPytDI06IO639StDMU2TlM emHYj84CTBpwy69J40B85zxc9w== X-Google-Smtp-Source: ACHHUZ7jWK5amfU83byn2eFVKpXAo6eCAPgd94jjprH7vb7rvNQFHpv3DR5XsK3sa+6kCd6B/M+zrw== X-Received: by 2002:a05:6871:812:b0:1b0:60ff:b74a with SMTP id q18-20020a056871081200b001b060ffb74amr15339218oap.56.1688423579824; Mon, 03 Jul 2023 15:32:59 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id h23-20020a17090aea9700b0025dc5749b4csm14914274pjz.21.2023.07.03.15.32.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jul 2023 15:32:59 -0700 (PDT) Date: Mon, 3 Jul 2023 15:32:57 -0700 From: Stephen Hemminger To: "huzaifa.rahman" Cc: dev@dpdk.org Subject: Re: [PATCH] ethtool: correct format strings according to the arguments Message-ID: <20230703153257.7948bd30@hermes.local> In-Reply-To: <20220324053124.8085-1-huzaifa.rahman@emumba.com> References: <20220324053124.8085-1-huzaifa.rahman@emumba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, 24 Mar 2022 10:31:24 +0500 "huzaifa.rahman" wrote: > The corrected format strings are not consistent with the > given arguments. So they are changed accordingly. > > Signed-off-by: huzaifa.rahman > --- > examples/ethtool/ethtool-app/main.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/examples/ethtool/ethtool-app/main.c b/examples/ethtool/ethtool-app/main.c > index 1f011a9321..ea8332e49c 100644 > --- a/examples/ethtool/ethtool-app/main.c > +++ b/examples/ethtool/ethtool-app/main.c > @@ -208,7 +208,7 @@ static int worker_main(__rte_unused void *ptr_data) > &ptr_port->mac_addr); > if (ret != 0) { > rte_spinlock_unlock(&ptr_port->lock); > - printf("Failed to get MAC address (port %u): %s", > + printf("Failed to get MAC address (port %i): %s", > ptr_port->idx_port, It is a bigger change, but idx_port should be uint16_t not int. > rte_strerror(-ret)); > return ret; > @@ -284,11 +284,11 @@ int main(int argc, char **argv) > rte_exit(EXIT_FAILURE, "rte_eal_init(): Failed"); > > cnt_ports = rte_eth_dev_count_avail(); > - printf("Number of NICs: %i\n", cnt_ports); > + printf("Number of NICs: %u\n", cnt_ports); Correct > if (cnt_ports == 0) > rte_exit(EXIT_FAILURE, "No available NIC ports!\n"); > if (cnt_ports > MAX_PORTS) { > - printf("Info: Using only %i of %i ports\n", > + printf("Info: Using only %u of %i ports\n", > cnt_ports, MAX_PORTS Both can be %u > ); > cnt_ports = MAX_PORTS;