[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4881796E12491D4BB15146FE0209CE643F5EC000@DE02WEMBXB.internal.synopsys.com>
Date: Mon, 17 Jun 2013 09:03:50 +0000
From: Alexey Brodkin <Alexey.Brodkin@...opsys.com>
To: Joe Perches <joe@...ches.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Francois Romieu <romieu@...zoreil.com>,
"Vineet Gupta" <Vineet.Gupta1@...opsys.com>,
Mischa Jonker <Mischa.Jonker@...opsys.com>,
Arnd Bergmann <arnd@...db.de>,
Grant Likely <grant.likely@...aro.org>,
Rob Herring <rob.herring@...xeda.com>,
"Paul Gortmaker" <paul.gortmaker@...driver.com>,
"David S. Miller" <davem@...emloft.net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devicetree-discuss@...ts.ozlabs.org"
<devicetree-discuss@...ts.ozlabs.org>
Subject: Re: [PATCH v4] ethernet/arc/arc_emac - Add new driver
On 06/16/2013 11:41 AM, Joe Perches wrote:
> On Sat, 2013-06-15 at 20:47 +0000, Alexey Brodkin wrote:
>> On 06/16/2013 12:37 AM, Joe Perches wrote:
>>> On Sun, 2013-06-16 at 00:20 +0400, Alexey Brodkin wrote:
> []
>>>> +static int arc_emac_rx(struct net_device *ndev, int budget)
>>> []
>>>> + /* Prepare the BD for next cycle */
>>>> + rx_buff->skb = netdev_alloc_skb_ip_align(ndev, buflen);
>>>> + if (unlikely(!rx_buff->skb)) {
>>>> + if (net_ratelimit())
>>>> + netdev_err(ndev, "cannot allocate skb\n");
>>>
>>> Unnecessary OOM message, might as well remove it.
>>> rx_dropped gives the same info.
>>
>> With all those error messages I wanted to make life easier (especially
>> for me) if errors appear. User will immediately know where problem
>> happened. Indeed "rx_dropped" (when it is used only once in driver) may
>> show where issue happened, but if later at some point "rx_dropped" will
>> be incremented in other locations then user won't understand immediately
>> where error happened.
>
> Alloc errors emit a dump_stack() already so this is redundant.
Makes sense. Will remove this comment.
-Alexey
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists