netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Claudiu Manoil <claudiu.manoil@freescale.com>
To: Fabio Estevam <festevam@gmail.com>, David Miller <davem@davemloft.net>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	<sebastian.poehn@belden.com>
Subject: Re: [Bug 79821] New: ethernet/freescale/gianfar_ethtool.c:1584: possible bad expression ?
Date: Fri, 11 Jul 2014 11:54:59 +0300	[thread overview]
Message-ID: <53BFA663.30005@freescale.com> (raw)
In-Reply-To: <CAOMZO5BDzOQU62-ibYH6sL+tzMGtjXcYFUtW1YUG9eKpoF=SPw@mail.gmail.com>

On 7/11/2014 3:37 AM, Fabio Estevam wrote:
> On Thu, Jul 10, 2014 at 9:07 PM, David Miller <davem@davemloft.net> wrote:
>> From: David Miller <davem@davemloft.net>
>> Date: Thu, 10 Jul 2014 17:06:10 -0700 (PDT)
>>
>>> From: Stephen Hemminger <stephen@networkplumber.org>
>>> Date: Thu, 10 Jul 2014 05:51:00 -0700
>>>
>>>> [linux-3.16-rc4/drivers/net/ethernet/freescale/gianfar_ethtool.c:1584]: (style)
>>>> Same expression on both sides of '|'.
>>>>
>>>>      for (; i < MAX_FILER_IDX - 1 && (tab->fe[i].ctrl | tab->fe[i].ctrl);
>>>
>>> Probably this is meant to be:
>>>
>>> diff --git a/drivers/net/ethernet/freescale/gianfar_ethtool.c b/drivers/net/ethernet/freescale/gianfar_ethtool.c
>>> index 76d7070..f697118 100644
>>> --- a/drivers/net/ethernet/freescale/gianfar_ethtool.c
>>> +++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c
>>> @@ -1581,7 +1581,7 @@ static int gfar_write_filer_table(struct gfar_private *priv,
>>>                return -EBUSY;
>>>
>>>        /* Fill regular entries */
>>> -     for (; i < MAX_FILER_IDX - 1 && (tab->fe[i].ctrl | tab->fe[i].ctrl);
>>> +     for (; i < MAX_FILER_IDX - 1 && (tab->fe[i].ctrl | tab->fe[i].prop);
>>>             i++)
>>>                gfar_write_filer(priv, i, tab->fe[i].ctrl, tab->fe[i].prop);
>>>        /* Fill the rest with fall-troughs */
>>>
>>> But only a Gianfar expert can say for sure.
>>>
>>> Sebastian, this is your code, please help us out.
>>
>> Ok, we have a problem, Sebastian's email bounces.
>>
>> Anyone else who knows this chip can help us out?  We don't have a listed
>> maintainer for Gianfar in MAINTAINERS :-/
>
> Adding Claudiu on Cc in case he could help.
>

Hi,

Thanks for the notification, Fabio.
I'm checking the hardware manual, and looks like 0 is a valid value for 
the ctrl field, while the prop can be non-zero.  So very likely the fix 
above is correct.  Not sure why no run-time issues were reported for 
this, either a 0 crtl value is unlikely or the Rx classification feature
implemented in gianfar ethtool is hardly used.
I'll get back with a patch soon, unless someone else beats me to it.

Thanks,
Claudiu

      reply	other threads:[~2014-07-11  8:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-10 12:51 Fw: [Bug 79821] New: ethernet/freescale/gianfar_ethtool.c:1584: possible bad expression ? Stephen Hemminger
2014-07-11  0:06 ` David Miller
2014-07-11  0:07   ` David Miller
2014-07-11  0:37     ` Fabio Estevam
2014-07-11  8:54       ` Claudiu Manoil [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=53BFA663.30005@freescale.com \
    --to=claudiu.manoil@freescale.com \
    --cc=davem@davemloft.net \
    --cc=festevam@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=sebastian.poehn@belden.com \
    --cc=stephen@networkplumber.org \
    /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).