mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Murali Karicheri <m-karicheri2@ti.com>
To: David Miller <davem@davemloft.net>
Cc: <kuba@kernel.org>, <grygorii.strashko@ti.com>, <nsekhar@ti.com>,
	<linux-omap@vger.kernel.org>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [net v3 PATCH] net: ethernet: ti: cpsw_new: fix error handling in cpsw_ndo_vlan_rx_kill_vid()
Date: Thu, 27 Aug 2020 09:00:48 -0400	[thread overview]
Message-ID: <5be2b575-238c-247f-db9a-95680984e26d@ti.com> (raw)
In-Reply-To: <20200825.093603.2026695844604591106.davem@davemloft.net>

Hi Dave,

On 8/25/20 12:36 PM, David Miller wrote:
> From: Murali Karicheri <m-karicheri2@ti.com>
> Date: Mon, 24 Aug 2020 13:01:00 -0400
> 
>> +	ret = cpsw_ale_del_vlan(cpsw->ale, vid, 0);
>> +	if (ret)
>> +		dev_err(priv->dev, "%s: failed %d: ret %d\n",
>> +			__func__, __LINE__, ret);
>> +	ret = cpsw_ale_del_ucast(cpsw->ale, priv->mac_addr,
>> +				 HOST_PORT_NUM, ALE_VLAN, vid);
>> +	if (ret)
>> +		dev_err(priv->dev, "%s: failed %d: ret %d\n",
>> +			__func__, __LINE__, ret);
>> +	ret = cpsw_ale_del_mcast(cpsw->ale, priv->ndev->broadcast,
>> +				 0, ALE_VLAN, vid);
>> +	if (ret)
>> +		dev_err(priv->dev, "%s: failed %d: ret %d\n",
>> +			__func__, __LINE__, ret);
>>   	cpsw_ale_flush_multicast(cpsw->ale, ALE_PORT_HOST, vid);
> 
> These error messages are extremely unhelpful.  You're calling three
> different functions, yet emitting basically the same __func__ for
> each of those cases.  No user can send you a useful bug report
> immediately if they just have func and line.
> 
> Please get rid of the "__func__" and "__line__" stuff completely, it's
> never advisable to ever use that in my opinion.  Instead, describe
> which delete operation failed, optionally with the error return.
> 
OK. I had considered your suggestion, but thought having a line number
would be handy for a developer. Function name would be better. Will
re-send with changes as you have suggested.

-- 
Murali Karicheri
Texas Instruments

      reply	other threads:[~2020-08-27 13:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-24 17:01 Murali Karicheri
2020-08-25 16:36 ` David Miller
2020-08-27 13:00   ` Murali Karicheri [this message]

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=5be2b575-238c-247f-db9a-95680984e26d@ti.com \
    --to=m-karicheri2@ti.com \
    --cc=davem@davemloft.net \
    --cc=grygorii.strashko@ti.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nsekhar@ti.com \
    /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

all inboxes | Powered by JetHome®