netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Marek Vasut <marex@denx.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 V2 5/5] net: can: ifi: Add IFI CANFD IP support
Date: Wed, 20 Jan 2016 15:06:02 +0100	[thread overview]
Message-ID: <569F944A.4090201@pengutronix.de> (raw)
In-Reply-To: <201601201358.04790.marex@denx.de>

[-- Attachment #1: Type: text/plain, Size: 1862 bytes --]

On 01/20/2016 01:58 PM, Marek Vasut wrote:
> On Wednesday, January 20, 2016 at 11:54:21 AM, Marc Kleine-Budde wrote:
>> On 01/20/2016 11:39 AM, Marc Kleine-Budde wrote:
>>>> +/* IFI CANFD private data structure */
>>>> +struct ifi_canfd_priv {
>>>> +	struct can_priv		can;	/* must be the first member */
>>>> +	struct napi_struct	napi;
>>>> +	struct net_device	*ndev;
>>>> +	struct device		*device;
>>>
>>> Nitpick: This variable is write only, correct? I can fix this while
>>> applying the patch.
>>>
>>>> +	void __iomem		*base;
>>>> +};
>>>
>>> Otherweise looks good.
> 
> It's write-only, yeah. What would you propose to change here ?

Remove it completely. :D

>> Until compiling:
>>> drivers/net/can/ifi_canfd/ifi_canfd.c:486:40: warning: cast truncates
>>> bits from constant value (ffffffff7ffffffd becomes 7ffffffd)
>>> drivers/net/can/ifi_canfd/ifi_canfd.c:640:9: warning: cast truncates
>>> bits from constant value (ffffffff7fffffff becomes 7fffffff)
>>> drivers/net/can/ifi_canfd/ifi_canfd.c:676:9: warning: cast truncates
>>> bits from constant value (ffffffff7fffffff becomes 7fffffff)
>>
>> target is ARMv5 with gcc version 4.9.2, compiled with C=2 using sparse
>> v0.5.0.
> 
> It's again the BIT() macro :-/ Do you have any idea how to fix this please ?
> Doing something like u32 foo = ~BIT(31); triggers this splat and I am running
> out of ideas how to fix that.

-#define IFI_CANFD_INTERRUPT_SET_IRQ            BIT(31)
+#define IFI_CANFD_INTERRUPT_SET_IRQ            ((u32)BIT(31))

...or change the bit to "30" :D

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

  reply	other threads:[~2016-01-20 14:06 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 [this message]
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
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=569F944A.4090201@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=marex@denx.de \
    --cc=mark.rutland@arm.com \
    --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).