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 70C8743214; Fri, 27 Oct 2023 11:00:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 60025402D8; Fri, 27 Oct 2023 11:00:40 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id C37644029A for ; Fri, 27 Oct 2023 11:00:39 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id A1322205F1; Fri, 27 Oct 2023 11:00:39 +0200 (CEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH] eal/unix: lower log level for reading files X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Fri, 27 Oct 2023 11:00:37 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9EFA4@smartserver.smartshare.dk> In-Reply-To: <20231027080031.251425-1-david.marchand@redhat.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] eal/unix: lower log level for reading files Thread-Index: AdoIq6/Z/38lW80UT3aGlJ00CRhsSQAByMLA References: <20231027080031.251425-1-david.marchand@redhat.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "David Marchand" Cc: , 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 > From: David Marchand [mailto:david.marchand@redhat.com] > Sent: Friday, 27 October 2023 10.01 >=20 > The eal_parse_sysfs_value helper both returns an error code and logs = an > error level message when something goes wrong. > On the other hand, internal users of this helper either ignore this > error code (like when trying to find out some numa information from = the > Linux sysfs, or discovering some optional feature), or add their own > error > logging when reading the file actually matters. >=20 > Lower this helper log messages to debug level as it provides no useful > information to final DPDK users. Such assumptions seem risky. Please add __attribute__ ((warn_unused_result)) to this function's = header, to support the assumption. Alternatively, add a "bool may_not_exist" parameter to the function to = choose the relevant log level.