linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: m-karicheri2@ti.com
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: Tue, 25 Aug 2020 09:36:03 -0700 (PDT)	[thread overview]
Message-ID: <20200825.093603.2026695844604591106.davem@davemloft.net> (raw)
In-Reply-To: <20200824170100.21319-1-m-karicheri2@ti.com>

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.


  reply	other threads:[~2020-08-25 16:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-24 17:01 [net v3 PATCH] net: ethernet: ti: cpsw_new: fix error handling in cpsw_ndo_vlan_rx_kill_vid() Murali Karicheri
2020-08-25 16:36 ` David Miller [this message]
2020-08-27 13:00   ` Murali Karicheri

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=20200825.093603.2026695844604591106.davem@davemloft.net \
    --to=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=m-karicheri2@ti.com \
    --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;
as well as URLs for NNTP newsgroup(s).