From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-f67.google.com (mail-ua1-f67.google.com [209.85.222.67]) by dpdk.org (Postfix) with ESMTP id 1C4D04F90 for ; Thu, 2 May 2019 14:20:56 +0200 (CEST) Received: by mail-ua1-f67.google.com with SMTP id u34so631625uau.7 for ; Thu, 02 May 2019 05:20:56 -0700 (PDT) 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; bh=9h2FlVYgK4kQMA3cYrEav5xAP8qQqZ+/0NEOvSqeXQc=; b=mVdhUETksJBHHZDM+I6BiaUpL3AwpoC8XBoiW106OBOTt4gPhtK7Pa7uC9uauqIOx5 H3S/1waOmwtAS20Op3NeoBpTIKYxFMP9oTsgsesIivwdvHtB6SxNPRqXjzBerJL/wWDP WtjtrijYTnVU5M0MCMjMOO3zpzTb1AlrPcQcsw6BCPFIjCkYfwYY3iY2UCxLYAL1vW+g tL750E//wMOpL+fNr/Wrb8YppUpLWYxeB1OsdIkml6AcuCZF/fbZwqZTIpji+hpzJdda G+F8WYLkC+UmvxnjHFlBwc+Yc/uVIL7BpNzNKMJAKGo3HYURujTzxA3QIGinA4LlsdkG NYbQ== X-Gm-Message-State: APjAAAWBHJSiKyk+5Tr7sXbwXnWvI9UxmQAvAHPkksonrR+GD9YAjji3 Bf6/gOUQxGQK2hobgRhvOMEyuyZowQZzEFCkL96xsg== X-Google-Smtp-Source: APXvYqzSefe6GUyhSCbv5Q2ePtv8tXaMouj+6HaF8Ua3zMh1y7gDgdj51XHGmWPjHIC+BDUZRjC8oIrxNOSW3iT8J3Q= X-Received: by 2002:ab0:413:: with SMTP id 19mr1545040uav.87.1556799655438; Thu, 02 May 2019 05:20:55 -0700 (PDT) MIME-Version: 1.0 References: <20190501195014.2938-1-bruce.richardson@intel.com> <20190501195014.2938-3-bruce.richardson@intel.com> In-Reply-To: <20190501195014.2938-3-bruce.richardson@intel.com> From: David Marchand Date: Thu, 2 May 2019 14:20:44 +0200 Message-ID: To: Bruce Richardson Cc: dev , shreyansh.jain@nxp.com Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH 2/4] bus/fslmc: fix printf of null pointer X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 May 2019 12:20:56 -0000 On Wed, May 1, 2019 at 9:50 PM Bruce Richardson wrote: > Printing a null pointer with %s is flagged as a warning by GCC 9, and > should not be done. Replace the %s with the word "null" itself. > > Fixes: 828d51d8fc3e ("bus/fslmc: refactor scan and probe functions") > Cc: shreyansh.jain@nxp.com > > Signed-off-by: Bruce Richardson > --- > drivers/bus/fslmc/fslmc_bus.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c > index eaa39a209..f6e66d22c 100644 > --- a/drivers/bus/fslmc/fslmc_bus.c > +++ b/drivers/bus/fslmc/fslmc_bus.c > @@ -197,7 +197,7 @@ scan_one_fslmc_device(char *dev_name) > > t_ptr = strtok(NULL, "."); > if (!t_ptr) { > - DPAA2_BUS_ERR("Incorrect device string observed (%s)", > t_ptr); > + DPAA2_BUS_ERR("Incorrect device string observed (null)"); > I'd rather print dev_name here, since t_ptr == NULL means that dev_name format is incorrect. -- David Marchand From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id B9D4CA0AC5 for ; Thu, 2 May 2019 14:20:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7B40C5589; Thu, 2 May 2019 14:20:57 +0200 (CEST) Received: from mail-ua1-f67.google.com (mail-ua1-f67.google.com [209.85.222.67]) by dpdk.org (Postfix) with ESMTP id 1C4D04F90 for ; Thu, 2 May 2019 14:20:56 +0200 (CEST) Received: by mail-ua1-f67.google.com with SMTP id u34so631625uau.7 for ; Thu, 02 May 2019 05:20:56 -0700 (PDT) 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; bh=9h2FlVYgK4kQMA3cYrEav5xAP8qQqZ+/0NEOvSqeXQc=; b=mVdhUETksJBHHZDM+I6BiaUpL3AwpoC8XBoiW106OBOTt4gPhtK7Pa7uC9uauqIOx5 H3S/1waOmwtAS20Op3NeoBpTIKYxFMP9oTsgsesIivwdvHtB6SxNPRqXjzBerJL/wWDP WtjtrijYTnVU5M0MCMjMOO3zpzTb1AlrPcQcsw6BCPFIjCkYfwYY3iY2UCxLYAL1vW+g tL750E//wMOpL+fNr/Wrb8YppUpLWYxeB1OsdIkml6AcuCZF/fbZwqZTIpji+hpzJdda G+F8WYLkC+UmvxnjHFlBwc+Yc/uVIL7BpNzNKMJAKGo3HYURujTzxA3QIGinA4LlsdkG NYbQ== X-Gm-Message-State: APjAAAWBHJSiKyk+5Tr7sXbwXnWvI9UxmQAvAHPkksonrR+GD9YAjji3 Bf6/gOUQxGQK2hobgRhvOMEyuyZowQZzEFCkL96xsg== X-Google-Smtp-Source: APXvYqzSefe6GUyhSCbv5Q2ePtv8tXaMouj+6HaF8Ua3zMh1y7gDgdj51XHGmWPjHIC+BDUZRjC8oIrxNOSW3iT8J3Q= X-Received: by 2002:ab0:413:: with SMTP id 19mr1545040uav.87.1556799655438; Thu, 02 May 2019 05:20:55 -0700 (PDT) MIME-Version: 1.0 References: <20190501195014.2938-1-bruce.richardson@intel.com> <20190501195014.2938-3-bruce.richardson@intel.com> In-Reply-To: <20190501195014.2938-3-bruce.richardson@intel.com> From: David Marchand Date: Thu, 2 May 2019 14:20:44 +0200 Message-ID: To: Bruce Richardson Cc: dev , shreyansh.jain@nxp.com Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH 2/4] bus/fslmc: fix printf of null pointer X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Message-ID: <20190502122044.JNgI2-GF41ejvqiCgCYAccUOWsrEm8x8SwytV0ZXpN4@z> On Wed, May 1, 2019 at 9:50 PM Bruce Richardson wrote: > Printing a null pointer with %s is flagged as a warning by GCC 9, and > should not be done. Replace the %s with the word "null" itself. > > Fixes: 828d51d8fc3e ("bus/fslmc: refactor scan and probe functions") > Cc: shreyansh.jain@nxp.com > > Signed-off-by: Bruce Richardson > --- > drivers/bus/fslmc/fslmc_bus.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c > index eaa39a209..f6e66d22c 100644 > --- a/drivers/bus/fslmc/fslmc_bus.c > +++ b/drivers/bus/fslmc/fslmc_bus.c > @@ -197,7 +197,7 @@ scan_one_fslmc_device(char *dev_name) > > t_ptr = strtok(NULL, "."); > if (!t_ptr) { > - DPAA2_BUS_ERR("Incorrect device string observed (%s)", > t_ptr); > + DPAA2_BUS_ERR("Incorrect device string observed (null)"); > I'd rather print dev_name here, since t_ptr == NULL means that dev_name format is incorrect. -- David Marchand