netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* pull request: linux-can-next 2012-03-08
@ 2012-03-08  9:50 Marc Kleine-Budde
  2012-03-08  9:50 ` [PATCH] can: peak_usb: PCAN-USB specific part: fix little endian usage Marc Kleine-Budde
  2012-03-08 21:20 ` pull request: linux-can-next 2012-03-08 David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Marc Kleine-Budde @ 2012-03-08  9:50 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-can, kernel

Hello David,

this patch is against net-next. It's a bugfix for the PCAN-USB driver
on big endian system.

Regards, Marc

---

The following changes since commit ae5d33723e325392c48bc0ff481d9ec8d646a0ed:

  powerpc/44x: Add more changes for APM821XX EMAC driver (2012-03-06 17:07:42 -0500)

are available in the git repository at:
  git@gitorious.org:linux-can/linux-can-next.git master

Stephane Grosjean (1):
      can: peak_usb: PCAN-USB specific part: fix little endian usage

 drivers/net/can/usb/peak_usb/pcan_usb.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] can: peak_usb: PCAN-USB specific part: fix little endian usage
  2012-03-08  9:50 pull request: linux-can-next 2012-03-08 Marc Kleine-Budde
@ 2012-03-08  9:50 ` Marc Kleine-Budde
  2012-03-08 21:20 ` pull request: linux-can-next 2012-03-08 David Miller
  1 sibling, 0 replies; 5+ messages in thread
From: Marc Kleine-Budde @ 2012-03-08  9:50 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-can, kernel, Stephane Grosjean, Marc Kleine-Budde

From: Stephane Grosjean <s.grosjean@peak-system.com>

That patch fixes some bad usage of two little-endian variables, which lead to
some warning/error when building the peak_usb driver.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/usb/peak_usb/pcan_usb.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/can/usb/peak_usb/pcan_usb.c b/drivers/net/can/usb/peak_usb/pcan_usb.c
index 8a7982e..86f26a1 100644
--- a/drivers/net/can/usb/peak_usb/pcan_usb.c
+++ b/drivers/net/can/usb/peak_usb/pcan_usb.c
@@ -741,16 +741,14 @@ static int pcan_usb_encode_msg(struct peak_usb_device *dev, struct sk_buff *skb,
 
 	/* can id */
 	if (cf->can_id & CAN_EFF_FLAG) {
-		__le32 tmp32 = cpu_to_le32(cf->can_id & CAN_ERR_MASK);
+		__le32 tmp32 = cpu_to_le32((cf->can_id & CAN_ERR_MASK) << 3);
 
-		tmp32 <<= 3;
 		*pc |= PCAN_USB_STATUSLEN_EXT_ID;
 		memcpy(++pc, &tmp32, 4);
 		pc += 4;
 	} else {
-		__le16 tmp16 = cpu_to_le32(cf->can_id & CAN_ERR_MASK);
+		__le16 tmp16 = cpu_to_le16((cf->can_id & CAN_ERR_MASK) << 5);
 
-		tmp16 <<= 5;
 		memcpy(++pc, &tmp16, 2);
 		pc += 2;
 	}
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: pull request: linux-can-next 2012-03-08
  2012-03-08  9:50 pull request: linux-can-next 2012-03-08 Marc Kleine-Budde
  2012-03-08  9:50 ` [PATCH] can: peak_usb: PCAN-USB specific part: fix little endian usage Marc Kleine-Budde
@ 2012-03-08 21:20 ` David Miller
  2012-03-15 13:32   ` Marc Kleine-Budde
  1 sibling, 1 reply; 5+ messages in thread
From: David Miller @ 2012-03-08 21:20 UTC (permalink / raw)
  To: mkl; +Cc: netdev, linux-can, kernel

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Thu,  8 Mar 2012 10:50:29 +0100

> The following changes since commit ae5d33723e325392c48bc0ff481d9ec8d646a0ed:
> 
>   powerpc/44x: Add more changes for APM821XX EMAC driver (2012-03-06 17:07:42 -0500)
> 
> are available in the git repository at:
>   git@gitorious.org:linux-can/linux-can-next.git master

[davem@dokdo net-next]$ git pull git@gitorious.org:linux-can/linux-can-next.git master
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: pull request: linux-can-next 2012-03-08
  2012-03-08 21:20 ` pull request: linux-can-next 2012-03-08 David Miller
@ 2012-03-15 13:32   ` Marc Kleine-Budde
  2012-03-15 21:35     ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Marc Kleine-Budde @ 2012-03-15 13:32 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-can, kernel

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

On 03/08/2012 10:20 PM, David Miller wrote:
> [davem@dokdo net-next]$ git pull git@gitorious.org:linux-can/linux-can-next.git master
> Permission denied (publickey).
> fatal: The remote end hung up unexpectedly

Doh! - Now with the correct URL.

The following changes since commit cdf485be3a63d1f34293740fb726088c6840ceea:

  ixgbe: dcb: use DCB config values for FCoE traffic class on open (2012-03-14 00:49:10 -0700)

are available in the git repository at:
  git://gitorious.org/linux-can/linux-can-next.git master

Stephane Grosjean (1):
      can: peak_usb: PCAN-USB specific part: fix little endian usage

 drivers/net/can/usb/peak_usb/pcan_usb.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

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: 262 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: pull request: linux-can-next 2012-03-08
  2012-03-15 13:32   ` Marc Kleine-Budde
@ 2012-03-15 21:35     ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2012-03-15 21:35 UTC (permalink / raw)
  To: mkl; +Cc: netdev, linux-can, kernel

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Thu, 15 Mar 2012 14:32:47 +0100

> On 03/08/2012 10:20 PM, David Miller wrote:
>> [davem@dokdo net-next]$ git pull git@gitorious.org:linux-can/linux-can-next.git master
>> Permission denied (publickey).
>> fatal: The remote end hung up unexpectedly
> 
> Doh! - Now with the correct URL.
> 
> The following changes since commit cdf485be3a63d1f34293740fb726088c6840ceea:
> 
>   ixgbe: dcb: use DCB config values for FCoE traffic class on open (2012-03-14 00:49:10 -0700)
> 
> are available in the git repository at:
>   git://gitorious.org/linux-can/linux-can-next.git master

Pulled, thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-03-15 21:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-08  9:50 pull request: linux-can-next 2012-03-08 Marc Kleine-Budde
2012-03-08  9:50 ` [PATCH] can: peak_usb: PCAN-USB specific part: fix little endian usage Marc Kleine-Budde
2012-03-08 21:20 ` pull request: linux-can-next 2012-03-08 David Miller
2012-03-15 13:32   ` Marc Kleine-Budde
2012-03-15 21:35     ` David Miller

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).