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 1A3AFA0C41; Fri, 29 Oct 2021 20:48:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 98A3B40DDB; Fri, 29 Oct 2021 20:48:54 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 10AC040688 for ; Fri, 29 Oct 2021 20:48:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635533330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=l3Z4DAiF0n2x+36exBRCcYwsbni80awrbInHNsfcVgc=; b=XqX2zx+UonlE+0jD/sBAQC5K+/kXNgXtnYzrJRoRD3cowBAEQ11joY1dTuwGy7l6sOO5sc w2HMeywusbD6J1K9RQ9FSRNdYoKhiiqWFhxWPVm7J0OyuDzlOHPMRqGP27SIFHoik3zaAR vUn5y5omDK6FbyX+MzFjSe7iY62uifY= Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-205-fQCU71MwM-eD9epvaPlzaw-1; Fri, 29 Oct 2021 14:48:48 -0400 X-MC-Unique: fQCU71MwM-eD9epvaPlzaw-1 Received: by mail-lj1-f198.google.com with SMTP id s5-20020a2e98c5000000b002112895b3f6so3511988ljj.21 for ; Fri, 29 Oct 2021 11:48:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=l3Z4DAiF0n2x+36exBRCcYwsbni80awrbInHNsfcVgc=; b=lY7QLqjXFnXllkgSBTVb+0Ex1x23yEInObPZdXjDOQdtzKnue2Eb0HFZVKjM7YExZf ZJDZOffBKtcpOlwhik5d7cQZWiHhZIWq+VkjU4uhrfFmIN/NV7uU+IIgASiObCWZg61C 45R6tHwe4TFSO7+InITtvRVR5mre8x1/BdOy2BaJR+sW3QeUWtxZUwWxLgMH9XhR01ZP L1QbNWT33xGvXNbLgbdA/Slln7Iw8KuA3j0myD3Rn75g7b+RX078JMmZ6S21Eaeh2f3W XvjUeL/MucVejt+wEmlaHqrP2IjL4NGta1bP6S1BkOPKsbiKCiwh6cvGcgZGYMEBNH9y 38Sg== X-Gm-Message-State: AOAM531RWhBru1imKbS6yOKSI6gQC2p4P7/XjoHs6ruXMxdi4BVVzaMC u+Q+W3UrOxgWsWcp0K91el5c5p04LhM5vPiTTC4G7z05ZZbsLdEky4az5Ri1QogFOmvFRnldBym ofMBFvx/AwGXckPE9kN4= X-Received: by 2002:a2e:901:: with SMTP id 1mr13544335ljj.333.1635533326729; Fri, 29 Oct 2021 11:48:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdolDR8RA7fClhdWvfJVm1ti1gWxTQh0M0cCiKUF+jMXVORzW3CDdcHGXhsbCF0AE1F/UPI+tFhQi5B6mlUCk= X-Received: by 2002:a2e:901:: with SMTP id 1mr13544322ljj.333.1635533326509; Fri, 29 Oct 2021 11:48:46 -0700 (PDT) MIME-Version: 1.0 References: <20211029171410.330128-1-james.r.harris@intel.com> In-Reply-To: <20211029171410.330128-1-james.r.harris@intel.com> From: David Marchand Date: Fri, 29 Oct 2021 20:48:35 +0200 Message-ID: To: Jim Harris Cc: dev Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] eal: fix unused-but-set-variable error 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 Sender: "dev" On Fri, Oct 29, 2021 at 7:17 PM Jim Harris wrote: > > clang-13 rightfully complains that the total_mem > variable in eal_parse_socket_arg is set but not > used, since the final accumulated total_mem > result isn't used anywhere. So just remove the > total_mem variable. > It was left behind by change: Fixes: 0a703f0f36c1 ("eal/linux: fix parsing zero socket memory and limits") > Signed-off-by: Jim Harris > --- > lib/eal/linux/eal.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c > index 81fdebc6a0..60b4924838 100644 > --- a/lib/eal/linux/eal.c > +++ b/lib/eal/linux/eal.c > @@ -562,7 +562,6 @@ eal_parse_socket_arg(char *strval, volatile uint64_t *socket_arg) > char * arg[RTE_MAX_NUMA_NODES]; > char *end; > int arg_num, i, len; > - uint64_t total_mem = 0; > > len = strnlen(strval, SOCKET_MEM_STRLEN); > if (len == SOCKET_MEM_STRLEN) { > @@ -594,7 +593,6 @@ eal_parse_socket_arg(char *strval, volatile uint64_t *socket_arg) > (arg[i][0] == '\0') || (end == NULL) || (*end != '\0')) > return -1; > val <<= 20; > - total_mem += val; > socket_arg[i] = val; > } > Reviewed-by: David Marchand -- David Marchand