netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: "Marc Kleine-Budde" <mkl@pengutronix.de>
Cc: netdev@vger.kernel.org, Oliver Hartkopp <socketcan@hartkopp.net>,
	Mark Rutland <mark.rutland@arm.com>,
	Wolfgang Grandegger <wg@grandegger.com>
Subject: Re: [PATCH V3 5/5] net: can: ifi: Add IFI CANFD IP support
Date: Wed, 20 Jan 2016 15:41:53 +0100	[thread overview]
Message-ID: <201601201541.53246.marex@denx.de> (raw)
In-Reply-To: <569F9C37.60007@pengutronix.de>

On Wednesday, January 20, 2016 at 03:39:51 PM, Marc Kleine-Budde wrote:
> On 01/20/2016 03:33 PM, Marek Vasut wrote:
> > The patch adds support for IFI CAN/FD controller [1]. This driver
> > currently supports sending and receiving both standard CAN and new
> > CAN/FD frames. Both ISO and BOSCH variant of CAN/FD is supported.
> > 
> > [1] http://www.ifi-pld.de/IP/CANFD/canfd.html
> > 
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Cc: Marc Kleine-Budde <mkl@pengutronix.de>
> > Cc: Mark Rutland <mark.rutland@arm.com>
> > Cc: Oliver Hartkopp <socketcan@hartkopp.net>
> > Cc: Wolfgang Grandegger <wg@grandegger.com>
> > ---
> > V2: - Move request_irq()/free_irq() into
> > ifi_canfd_open()/ifi_canfd_close()
> > 
> >       just like other drivers do it to prevent crash when reloading
> >       module.
> >     
> >     - Fix Woverflow complains on x86_64 and itanium, exactly the same way
> >     
> >       as in commit dec23dca5a9ca4b9eb2fb66926f567889028b904 .
> > 
> > V3: - Hopefully fix all problems with BIT(31) by adding more u32 casts.
> > 
> >     - Drop struct device from struct ifi_canfd_priv .
> > 
> > NOTE: The driver is surprisingly similar to m_can, but the register
> > 
> >       layout of the IFI core is completely different, so it's clear
> >       that those are two different IP cores.
> > 
> > ---

[...]

Hi,

> > +static irqreturn_t ifi_canfd_isr(int irq, void *dev_id)
> > +{
> > +	struct net_device *ndev = (struct net_device *)dev_id;
> > +	struct ifi_canfd_priv *priv = netdev_priv(ndev);
> > +	struct net_device_stats *stats = &ndev->stats;
> > +	const u32 rx_irq_mask = IFI_CANFD_INTERRUPT_RXFIFO_NEMPTY |
> > +				IFI_CANFD_INTERRUPT_RXFIFO_NEMPTY_PER;
> > +	const u32 tx_irq_mask = IFI_CANFD_INTERRUPT_TXFIFO_EMPTY |
> > +				IFI_CANFD_INTERRUPT_TXFIFO_REMOVE;
> > +	const u32 clr_irq_mask = (u32)(~(IFI_CANFD_INTERRUPT_SET_IRQ |
> > +					 IFI_CANFD_INTERRUPT_ERROR_WARNING));
> 
> I've squashed:
> >> -       const u32 clr_irq_mask = (u32)(~(IFI_CANFD_INTERRUPT_SET_IRQ |
> >> -                                       
> >> IFI_CANFD_INTERRUPT_ERROR_WARNING)); +       const u32 clr_irq_mask =
> >> ~(IFI_CANFD_INTERRUPT_SET_IRQ | +                                 
> >> IFI_CANFD_INTERRUPT_ERROR_WARNING);
> 
> and the driver compiles without warnings.

It doesn't , try with x86_64_defconfig, it will complain with -Woverflow
on gcc 4.9 or newer. That's what the kernel robot complained about in V1
of the patch too.

I'd be happy to be proven wrong though.

  reply	other threads:[~2016-01-20 14:41 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-11 18:47 [PATCH 1/5] net: can: Sort the Kconfig includes Marek Vasut
2016-01-11 18:48 ` [PATCH 2/5] net: can: Sort the Makefile Marek Vasut
2016-01-11 18:48 ` [PATCH 3/5] of: Add vendor prefix for I/F/I Marek Vasut
2016-01-11 18:48 ` [PATCH 4/5] net: can: ifi: Add DT bindings for ifi,canfd Marek Vasut
2016-01-11 18:48 ` [PATCH 5/5] net: can: ifi: Add IFI CANFD IP support Marek Vasut
2016-01-11 19:29   ` kbuild test robot
2016-01-11 19:33     ` Marek Vasut
2016-01-12 11:06   ` kbuild test robot
2016-01-12 23:59   ` [PATCH V2 " Marek Vasut
2016-01-20 10:39     ` Marc Kleine-Budde
2016-01-20 10:54       ` Marc Kleine-Budde
2016-01-20 12:58         ` Marek Vasut
2016-01-20 14:06           ` Marc Kleine-Budde
2016-01-20 14:25             ` Marek Vasut
2016-01-23  0:11               ` Rustad, Mark D
2016-01-20 14:33             ` [PATCH V3 " Marek Vasut
2016-01-20 14:39               ` Marc Kleine-Budde
2016-01-20 14:41                 ` Marek Vasut [this message]
2016-01-20 14:46                   ` Marc Kleine-Budde
2016-01-20 15:03                     ` Marek Vasut
2016-01-20 15:09                       ` Marc Kleine-Budde
2016-01-20 15:40                         ` Marek Vasut

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=201601201541.53246.marex@denx.de \
    --to=marex@denx.de \
    --cc=mark.rutland@arm.com \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=socketcan@hartkopp.net \
    --cc=wg@grandegger.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).