[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160614.222516.1192717052949905017.davem@davemloft.net>
Date: Tue, 14 Jun 2016 22:25:16 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: netanel@...apurnalabs.com
Cc: netdev@...r.kernel.org, davm@...emeloft.net,
linux-kernel@...r.kernel.org, zorik@...apurnalabs.com,
saeed@...apurnalabs.com, alex@...apurnalabs.com, msw@...zon.com,
aligouri@...zon.com, antoine.tenart@...e-electrons.com
Subject: Re: [PATCH net-next] net: ena: Add a driver for Amazon Elastic
Network Adapters (ENA)
From: Netanel Belgazal <netanel@...apurnalabs.com>
Date: Mon, 13 Jun 2016 11:46:13 +0300
> +#define ena_trc_dbg(format, arg...) \
> + pr_debug("[ENA_COM: %s] " format, __func__, ##arg)
> +#define ena_trc_info(format, arg...) \
> + pr_info("[ENA_COM: %s] " format, __func__, ##arg)
> +#define ena_trc_warn(format, arg...) \
> + pr_warn("[ENA_COM: %s] " format, __func__, ##arg)
> +#define ena_trc_err(format, arg...) \
> + pr_err("[ENA_COM: %s] " format, __func__, ##arg)
These custom tracing macros are quite inappropriate.
We have the function tracer in the kernel when that is needed. So spitting
out __func__ all over the place is not something that should be found in
drivers these days.
And one can modify pr_fmt do make pr_debug et al. have whatever prefix
one wants.
I suspect there will be several rounds of review to weed out things
like this. You can preempt a lot of that by removing as much in your
driver that the kernel has existing facilities for.
Thanks.
Powered by blists - more mailing lists