DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tomasz Duszynski <tduszynski@marvell.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Jakub Palider <jpalider@marvell.com>,
	Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
	"thomas@monjalon.net" <thomas@monjalon.net>
Subject: RE: [EXT] Re: [PATCH 2/2] raw/cnxk_gpio: add bunch of newlines
Date: Wed, 4 Oct 2023 20:42:47 +0000	[thread overview]
Message-ID: <DM4PR18MB436854E68E68C70247BE44FDD2CBA@DM4PR18MB4368.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20231003152612.6b0b3e20@hermes.local>



>-----Original Message-----
>From: Stephen Hemminger <stephen@networkplumber.org>
>Sent: Wednesday, October 4, 2023 12:26 AM
>To: Tomasz Duszynski <tduszynski@marvell.com>
>Cc: dev@dpdk.org; Jakub Palider <jpalider@marvell.com>; Jerin Jacob Kollanukkaran
><jerinj@marvell.com>; thomas@monjalon.net
>Subject: [EXT] Re: [PATCH 2/2] raw/cnxk_gpio: add bunch of newlines
>
>External Email
>
>----------------------------------------------------------------------
>On Tue, 3 Oct 2023 22:46:03 +0200
>Tomasz Duszynski <tduszynski@marvell.com> wrote:
>
>> Improve log output by adding some newlines.
>>
>> Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
>> Reviewed-by: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
>> Tested-by: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
>> ---
>>  drivers/raw/cnxk_gpio/cnxk_gpio.c | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/raw/cnxk_gpio/cnxk_gpio.c
>> b/drivers/raw/cnxk_gpio/cnxk_gpio.c
>> index dcd646397e..6c4e4f5eae 100644
>> --- a/drivers/raw/cnxk_gpio/cnxk_gpio.c
>> +++ b/drivers/raw/cnxk_gpio/cnxk_gpio.c
>> @@ -713,7 +713,7 @@ cnxk_gpio_probe(struct rte_vdev_device *dev)
>>  	cnxk_gpio_format_name(name, sizeof(name));
>>  	rawdev = rte_rawdev_pmd_allocate(name, sizeof(*gpiochip), rte_socket_id());
>>  	if (!rawdev) {
>> -		RTE_LOG(ERR, PMD, "failed to allocate %s rawdev", name);
>> +		RTE_LOG(ERR, PMD, "failed to allocate %s rawdev\n", name);
>>  		return -ENOMEM;
>>  	}
>>
>> @@ -753,7 +753,7 @@ cnxk_gpio_probe(struct rte_vdev_device *dev)
>>  	snprintf(buf, sizeof(buf), "%s/gpiochip%d/base", CNXK_GPIO_CLASS_PATH, gpiochip->num);
>>  	ret = cnxk_gpio_read_attr_int(buf, &gpiochip->base);
>>  	if (ret) {
>> -		RTE_LOG(ERR, PMD, "failed to read %s", buf);
>> +		RTE_LOG(ERR, PMD, "failed to read %s\n", buf);
>>  		goto out;
>>  	}
>>
>> @@ -761,7 +761,7 @@ cnxk_gpio_probe(struct rte_vdev_device *dev)
>>  	snprintf(buf, sizeof(buf), "%s/gpiochip%d/ngpio", CNXK_GPIO_CLASS_PATH, gpiochip->num);
>>  	ret = cnxk_gpio_read_attr_int(buf, &gpiochip->num_gpios);
>>  	if (ret) {
>> -		RTE_LOG(ERR, PMD, "failed to read %s", buf);
>> +		RTE_LOG(ERR, PMD, "failed to read %s\n", buf);
>>  		goto out;
>>  	}
>>  	gpiochip->num_queues = gpiochip->num_gpios; @@ -774,7 +774,7 @@
>> cnxk_gpio_probe(struct rte_vdev_device *dev)
>>
>>  	gpiochip->gpios = rte_calloc(NULL, gpiochip->num_gpios, sizeof(struct cnxk_gpio *), 0);
>>  	if (!gpiochip->gpios) {
>> -		RTE_LOG(ERR, PMD, "failed to allocate gpios memory");
>> +		RTE_LOG(ERR, PMD, "failed to allocate gpios memory\n");
>>  		ret = -ENOMEM;
>>  		goto out;
>>  	}
>
>
>No driver should be using the PMD logtype. It should always be using a dynamically allocated log
>type.

Even though it uses old-fashioned logging that change could still
improve output for some users out there. 

Anyway, if you don't want any extra commit noise let's abandon that and these improvements will show up in dynamic logging patch. 

  reply	other threads:[~2023-10-04 20:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-03 20:46 [PATCH 1/2] raw/cnxk_gpio: support multi-process mode Tomasz Duszynski
2023-10-03 20:46 ` [PATCH 2/2] raw/cnxk_gpio: add bunch of newlines Tomasz Duszynski
2023-10-03 22:26   ` Stephen Hemminger
2023-10-04 20:42     ` Tomasz Duszynski [this message]
2023-10-05  2:54       ` [EXT] " Stephen Hemminger
2023-10-05  7:36         ` Tomasz Duszynski
2023-10-03 22:28 ` [PATCH 1/2] raw/cnxk_gpio: support multi-process mode Stephen Hemminger
2023-10-04 20:35   ` [EXT] " Tomasz Duszynski
2023-10-05 21:09 ` [PATCH v2 " Tomasz Duszynski
2023-10-05 21:10   ` [PATCH v2 2/2] raw/cnxk_gpio: add bunch of newlines Tomasz Duszynski
2023-10-16 10:04   ` [PATCH v3 1/2] raw/cnxk_gpio: support multi-process mode Tomasz Duszynski
2023-10-16 10:04     ` [PATCH v3 2/2] raw/cnxk_gpio: add bunch of newlines Tomasz Duszynski
2023-10-18  6:51       ` Jerin Jacob

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM4PR18MB436854E68E68C70247BE44FDD2CBA@DM4PR18MB4368.namprd18.prod.outlook.com \
    --to=tduszynski@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=jpalider@marvell.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).