]> Pileus Git - ~andy/linux/commitdiff
Merge tag 'linux-can-fixes-for-3.14-20140129' of git://gitorious.org/linux-can/linux-can
authorDavid S. Miller <davem@davemloft.net>
Fri, 31 Jan 2014 00:48:17 +0000 (16:48 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 31 Jan 2014 00:48:17 +0000 (16:48 -0800)
linux-can-fixes-for-3.14-20140129

Marc Kleine-Budde says:

====================
Arnd Bergmann provides a fix for the flexcan driver, enabling compilation on
all combinations of big and little endian on ARM and PowerPc. A patch by Ira W.
Snyder fixes uninitialized variable warnings in the janz-ican3 driver.
Rostislav Lisovy contributes a patch to propagate the SO_PRIORITY of raw
sockets to skbs.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/can/Kconfig
drivers/net/can/flexcan.c
drivers/net/can/janz-ican3.c
net/can/raw.c

index d447b881bbde1af6d25f6102b0f3efc639893d70..9e7d95dae2c7038478d6efadddba81e2778f47a9 100644 (file)
@@ -104,7 +104,7 @@ config CAN_JANZ_ICAN3
 
 config CAN_FLEXCAN
        tristate "Support for Freescale FLEXCAN based chips"
-       depends on (ARM && CPU_LITTLE_ENDIAN) || PPC
+       depends on ARM || PPC
        ---help---
          Say Y here if you want to support for Freescale FlexCAN.
 
index aaed97bee4711d1cb2e8b1eb514fc3e343ad21e0..320bef2dba427f266511330bc11b1a4097368520 100644 (file)
@@ -235,9 +235,12 @@ static const struct can_bittiming_const flexcan_bittiming_const = {
 };
 
 /*
- * Abstract off the read/write for arm versus ppc.
+ * Abstract off the read/write for arm versus ppc. This
+ * assumes that PPC uses big-endian registers and everything
+ * else uses little-endian registers, independent of CPU
+ * endianess.
  */
-#if defined(__BIG_ENDIAN)
+#if defined(CONFIG_PPC)
 static inline u32 flexcan_read(void __iomem *addr)
 {
        return in_be32(addr);
index 2124c67906875607e5657ab006c9f301cdc6d760..71594e5676fdc31fc422a542cb1786013a0f4ea4 100644 (file)
@@ -1312,7 +1312,7 @@ static int ican3_napi(struct napi_struct *napi, int budget)
 
        /* process all communication messages */
        while (true) {
-               struct ican3_msg msg;
+               struct ican3_msg uninitialized_var(msg);
                ret = ican3_recv_msg(mod, &msg);
                if (ret)
                        break;
index 07d72d852324f23a8fffdc71798e89602b861977..8be757cca2ec444171982cb8c33ef58ab27310be 100644 (file)
@@ -715,6 +715,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct socket *sock,
 
        skb->dev = dev;
        skb->sk  = sk;
+       skb->priority = sk->sk_priority;
 
        err = can_send(skb, ro->loopback);