Linux CAN drivers development
 help / color / mirror / Atom feed
From: Gerhard Bertelsmann <info@gerhard-bertelsmann.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-can@vger.kernel.org, linux-can-owner@vger.kernel.org
Subject: re: can: Allwinner A10/A20 CAN Controller support - Kernel module
Date: Wed, 23 Sep 2015 09:51:28 +0200	[thread overview]
Message-ID: <34a8301812e4b25545b9c0f13d1cd80f@mail.rdts.de> (raw)
In-Reply-To: <20150923071944.GA28834@mwanda>

Hi Dan,

Am 2015-09-23 09:19, schrieb Dan Carpenter:
> Hello Gerhard Bertelsmann,
> 
> The patch 0738eff14d81: "can: Allwinner A10/A20 CAN Controller
> support - Kernel module" from Sep 16, 2015, leads to the following
> static checker warning:
> 
> 	drivers/net/can/sun4i_can.c:604 sun4i_can_err()
> 	warn: mask and shift to zero
> 
> drivers/net/can/sun4i_can.c
>    596          if (isrc & SUN4I_INT_ARB_LOST) {
>    597                  /* arbitration lost interrupt */
>    598                  netdev_dbg(dev, "arbitration lost 
> interrupt\n");
>    599                  alc = readl(priv->base + SUN4I_REG_STA_ADDR);
>    600                  priv->can.can_stats.arbitration_lost++;
>    601                  stats->tx_errors++;
>    602                  if (likely(skb)) {
>    603                          cf->can_id |= CAN_ERR_LOSTARB;
>    604                          cf->data[0] = (alc & 0x1f) >> 8;
>                                               ^^^^^^^^^^^^^^^^^^
> This is zero.  No idea what was intended.

indeed, that's wrong - mask should be 0x1f00.
I will send an update. Thanks for your hint.

> 
>    605                  }
>    606          }
> 
> regards,
> dan carpenter

Regards,

Gerd

      reply	other threads:[~2015-09-23  7:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-23  7:19 can: Allwinner A10/A20 CAN Controller support - Kernel module Dan Carpenter
2015-09-23  7:51 ` Gerhard Bertelsmann [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=34a8301812e4b25545b9c0f13d1cd80f@mail.rdts.de \
    --to=info@gerhard-bertelsmann.de \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-can-owner@vger.kernel.org \
    --cc=linux-can@vger.kernel.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