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 1CFBFA055A for ; Thu, 27 Feb 2020 11:58:05 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EDF4D1BFC8; Thu, 27 Feb 2020 11:58:04 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id E99F01BFC8 for ; Thu, 27 Feb 2020 11:58:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582801083; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5cRA0KALxxcdulIsz3TPwydCX7Svl9hIaXudWfs0QBI=; b=hG8mFAKOxdAiMCR/isSmDnP0ypDKSF7AsciL9X6QlCHJyvl1wnqIvAFymSpBIQM2kyFBos emaUlL5M4gpfUbgBQd4MrumlGUbz4tDKrDhqGIMWjcozCGdw2GaMw6OsS1s3Zomzqt+V1s H5lac8zcce2O1SOO8jqCZ8ptKuVVfqA= Received: from mail-vs1-f72.google.com (mail-vs1-f72.google.com [209.85.217.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-359-aCPi-3klPZ2xZ_gA83JXJQ-1; Thu, 27 Feb 2020 05:57:59 -0500 X-MC-Unique: aCPi-3klPZ2xZ_gA83JXJQ-1 Received: by mail-vs1-f72.google.com with SMTP id x76so356265vsc.11 for ; Thu, 27 Feb 2020 02:57:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=5cRA0KALxxcdulIsz3TPwydCX7Svl9hIaXudWfs0QBI=; b=fDyBautrakdwm9wvlQtuSdq9wZhH8+ywrFbV0ibyEWXMgS3kHClJ3KzcEhGfFkxiiq 47G9b1adyvMhUCh0o9fyXk5tUtWfwpgdwSu4mVZx6DLjO3BVwZ7ssRR5eku1gX2XJ1k4 +wJ3yZ+LDon/zXnMzdxI8/ka6M3NBa9wdqUPCwZmViIyw9sJalnHEYQv7tmo6JBBhq5i f9CRlBrhBIz+zwWpZJIt12rrdxzo7abD+z8BoaLfciM231eQEXSRDXwpVh+LBKsWrWrs Qv2FYaXRdutBMEBK5JwW2rHhetJskqNjTh/dbm46SIR9fMSwS814To130QhDadWEwGIn NAjw== X-Gm-Message-State: APjAAAUSi7B15gdBDIUUrWrpNkrwJ9U6+Ph8wfpXWEHQ0/uGfsT5DeLw nseGvPvbLOcohq7LeFl0b73sTTwsaQo3k9zUgjAqiDLOaWiSLcX38Ccjcsi6ok3KVXcny1cx1di Hj1oT7hUGmkbZmEujudZWpmQ= X-Received: by 2002:ab0:488b:: with SMTP id x11mr2116818uac.86.1582801079167; Thu, 27 Feb 2020 02:57:59 -0800 (PST) X-Google-Smtp-Source: APXvYqxqqRD1rFCqniEDpHkhscwyh/Y2NwNr7kgnbCSflSswX4n0rNc/ZUb/8EOSnmxjWAkzNULwM/FH2o2FwzgNtVw= X-Received: by 2002:ab0:488b:: with SMTP id x11mr2116810uac.86.1582801078828; Thu, 27 Feb 2020 02:57:58 -0800 (PST) MIME-Version: 1.0 References: <20200227082506.25349-1-skori@marvell.com> In-Reply-To: <20200227082506.25349-1-skori@marvell.com> From: David Marchand Date: Thu, 27 Feb 2020 11:57:46 +0100 Message-ID: To: Sunil Kumar Kori Cc: Olivier Matz , Thomas Monjalon , dev , dpdk stable X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-stable] [PATCH] eal: fix log message print for regex X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Thu, Feb 27, 2020 at 9:25 AM Sunil Kumar Kori wrote: > > If user passes log-level eal parameter to enable log level based on regex > then in case of error message is being printed for pattern match instead = of > regex. Following is the warning message thrown: > > Compiling C object 'lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common= _options.c.o'. > In function =E2=80=98eal_parse_log_level=E2=80=99, > inlined from =E2=80=98eal_parse_common_option=E2=80=99 at ../lib/librt= e_eal/common/eal_common_options.c:1418:7: > ../lib/librte_eal/common/eal_common_options.c:1053:4: warning: =E2=80=98%= s=E2=80=99 directive argument is null [-Wformat-overflow=3D] > 1053 | fprintf(stderr, "cannot set log level %s,%d\n", > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 1054 | pattern, priority); > | ~~~~~~~~~~~~~~~~~~ > Good catch. Just to understand, how did you catch it? Extra cflags? specific compiler? > Fixes: 7f0bb634a140 ("log: add ability to match log type with globbing") Missing Cc: stable. > > Signed-off-by: Sunil Kumar Kori > --- > lib/librte_eal/common/eal_common_options.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/= common/eal_common_options.c > index 75974dd5b..525e51e7d 100644 > --- a/lib/librte_eal/common/eal_common_options.c > +++ b/lib/librte_eal/common/eal_common_options.c > @@ -1046,7 +1046,7 @@ eal_parse_log_level(const char *arg) > if (regex) { > if (rte_log_set_level_regexp(regex, priority) < 0) { > fprintf(stderr, "cannot set log level %s,%d\n", > - pattern, priority); > + regex, priority); > goto fail; > } > if (rte_log_save_regexp(regex, priority) < 0) > -- > 2.17.1 > Acked-by: David Marchand -- David Marchand