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 A1A7A45E91; Fri, 13 Dec 2024 17:59:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3523440B8F; Fri, 13 Dec 2024 17:59:33 +0100 (CET) Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by mails.dpdk.org (Postfix) with ESMTP id 77C10409FA for ; Fri, 13 Dec 2024 17:59:31 +0100 (CET) Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-725ed193c9eso1772391b3a.1 for ; Fri, 13 Dec 2024 08:59:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1734109170; x=1734713970; darn=dpdk.org; 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=1g/Q/SY1TS0THgqbToNZEo7ROKf4rxEP/ezStxCBZFw=; b=UoHGaQZE2WuBoRm7SbCrrRcrJUym80zBKcgFgTFQMtZHL7cFM+yGdjPLObkjaoN5yH bNBxgqGcbOSZe7TDJMH3zvT3/6w3AaDtqMoetnzJBEA7w4MgqYuDmzuckLUquE/+1gzG qCybov5EnI+sZ6JO0rmQW69EuOLjOiveHdwwMfitch3MB0lIHvh2FxYI1wOSVDX4ZPrQ EnE6Mk3T3usl6XDlCeau+U53TLJxCTzTRvq9V+UanvDo8cE5sbi1EFwbhrHn1v1FDcSC Kw8baxwKQODNQcTAkbUCouWAb3iCXH9kZywEkfmZExE5EgXagniuAZn4SY2GsoPkruLR eWig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734109170; x=1734713970; 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=1g/Q/SY1TS0THgqbToNZEo7ROKf4rxEP/ezStxCBZFw=; b=hVTRjRBs6apuM43JUcMVKue9YD0tHTGjOwNnlr68NqjrzSaGB/lo2U3X+l/fYKSK3e u5XNRUfxzGExwNKd3evIJkFsQ8zSzpApF59LqTDAM9TPpFb5EMy8TiYj2BMT8npOJwEF b9ANfLIRjJNunwfudsAYnFAE5lPY4NxXUrqHr6ZE4Tk82iZIcDkGn/AyD/R+n5LYm4XD RYerQpnF0+Mg8DUxo69jK/s+EKroftONW8g0zBIidih95dU9YvRmkGsk6RGg8WdeUXS6 dbGld4qZaoIhu7/kNrcKF2vVN3BVLMJtINglVFxIoN9ZbjJm0mOz9WTtIDNWObE8PeYn o/zw== X-Gm-Message-State: AOJu0YybF9XCJc26HiFmU4Ynj8UMkA/ApJnn9JZm6Av6GzZzaAyF+Nju 9d4OsWJlCMsuXCM0Sc6s3KJcmTiDhN15nEOpbL2aNq9PzsEQdNR56OmoMJ85Kow= X-Gm-Gg: ASbGncs+KBm9I8sZ/ufwib4/WeViYHAiIAW6wzZ65GSTSdinua/CAhhn2+NtxfdJ/zc fnN0JdKuesuhDpNgo1hfXhRblnp7tNnybhjQFjaamgL06/+vEvpNUj2ij2421EM6DuESrMpRCOJ J1ZkOzA7k6cjZ/d25QL2/uu/LehuI1gIphNR/tuDlCAUMS3W/xlmeNhYF5Gvt4mwe91nfXW4P1x ttXnIdRpbppam3jMMsxYYGHp7ogUsZzrudAZJuWdyhtMpxdJd0ual4/anqdfiJKz8Sdlfsf08tQ pY2RaL89l44fnkDi+lSuf3GStQM2FDk0SA== X-Google-Smtp-Source: AGHT+IFYb6ZQXrV/6GIU6fwmFb2gfB1H0vYRAZLL19u+MpYwJF4L2KSuiiYKGugRrpg7xwUcKmXTPQ== X-Received: by 2002:a17:90b:3c04:b0:2ee:4513:f1d1 with SMTP id 98e67ed59e1d1-2f290d99046mr4384760a91.23.1734109170419; Fri, 13 Dec 2024 08:59:30 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f142d90bb0sm3421923a91.9.2024.12.13.08.59.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2024 08:59:30 -0800 (PST) Date: Fri, 13 Dec 2024 08:59:28 -0800 From: Stephen Hemminger To: Ariel Otilibili Cc: dev@dpdk.org, Thomas Monjalon , David Marchand , Cristian Dumitrescu Subject: Re: [PATCH 1/1] app/test: remove useless calls to rte_bitmap_free Message-ID: <20241213085928.0f2f2de1@hermes.local> In-Reply-To: <20241213113059.59320-2-otilibil@eurecom.fr> References: <20241213113059.59320-1-otilibil@eurecom.fr> <20241213113059.59320-2-otilibil@eurecom.fr> 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 Fri, 13 Dec 2024 12:30:00 +0100 Ariel Otilibili wrote: > * rte_bitmap_free is only useful for its return value > * and its return value is not used. > > ``` > $ < lib/eal/include/rte_bitmap.h sed -ne '/bitmap_free/,/^}/p' > > rte_bitmap_free(struct rte_bitmap *bmp) > { > /* Check input arguments */ > if (bmp == NULL) { > return -1; > } > > return 0; > } > ``` > > Reported-by: Coverity, IDs 357712 & 357737 > Signed-off-by: Ariel Otilibili > --- > app/test/test_bitmap.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/app/test/test_bitmap.c b/app/test/test_bitmap.c > index bab11812c7..a21210a215 100644 > --- a/app/test/test_bitmap.c > +++ b/app/test/test_bitmap.c > @@ -208,7 +208,6 @@ test_bitmap_all_clear(void) > if (test_bitmap_scan_operations(bmp) < 0) > return TEST_FAILED; > > - rte_bitmap_free(bmp); > rte_free(mem); > > return TEST_SUCCESS; > @@ -254,7 +253,6 @@ test_bitmap_all_set(void) > return TEST_FAILED; > } > > - rte_bitmap_free(bmp); > rte_free(mem); > > return TEST_SUCCESS; I would rather that, rte_bitmap_free() be made a real function which would shutup Coverity. And rte_bitmap_free() should just be a void function, like all the other XXX_free() variants in DPDK.