* [PATCH net-2.6.25] CAN: Fix plain integer definitions in userspace header & new CAN version 20071227
@ 2007-12-27 20:14 Oliver Hartkopp
2007-12-28 0:49 ` David Miller
2007-12-28 0:50 ` David Miller
0 siblings, 2 replies; 6+ messages in thread
From: Oliver Hartkopp @ 2007-12-27 20:14 UTC (permalink / raw)
To: David Miller; +Cc: Sam Ravnborg, Urs Thuermann, netdev
[-- Attachment #1: Type: text/plain, Size: 449 bytes --]
This patch fixes the use of plain integers instead of __u32 in a struct
that is visible from kernel space and user space. As this change is user
visible this patch also updates the CAN version to 20071227.
Thanks to Sam Ravnborg for pointing out the wrong plain int usage.
It applies on the current net-2.6.25 tree.
Tnx & best regards,
Oliver
Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
---
[-- Attachment #2: plain_int.patch --]
[-- Type: text/x-diff, Size: 1136 bytes --]
diff -uprN -X net-2.6.25/Documentation/dontdiff net-2.6.25/include/linux/can/bcm.h export/net2625-2007-12-27/include/linux/can/bcm.h
--- net-2.6.25/include/linux/can/bcm.h 2007-12-15 19:33:20.000000000 +0100
+++ export/net2625-2007-12-27/include/linux/can/bcm.h 2007-12-27 20:35:54.000000000 +0100
@@ -26,12 +26,12 @@
* @frames: array of CAN frames.
*/
struct bcm_msg_head {
- int opcode;
- int flags;
- int count;
+ __u32 opcode;
+ __u32 flags;
+ __u32 count;
struct timeval ival1, ival2;
canid_t can_id;
- int nframes;
+ __u32 nframes;
struct can_frame frames[0];
};
diff -uprN -X net-2.6.25/Documentation/dontdiff net-2.6.25/include/linux/can/core.h export/net2625-2007-12-27/include/linux/can/core.h
--- net-2.6.25/include/linux/can/core.h 2007-12-15 19:33:20.000000000 +0100
+++ export/net2625-2007-12-27/include/linux/can/core.h 2007-12-27 20:35:54.000000000 +0100
@@ -19,7 +19,7 @@
#include <linux/skbuff.h>
#include <linux/netdevice.h>
-#define CAN_VERSION "20071116"
+#define CAN_VERSION "20071227"
/* increment this number each time you change some user-space interface */
#define CAN_ABI_VERSION "8"
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-2.6.25] CAN: Fix plain integer definitions in userspace header & new CAN version 20071227
2007-12-27 20:14 [PATCH net-2.6.25] CAN: Fix plain integer definitions in userspace header & new CAN version 20071227 Oliver Hartkopp
@ 2007-12-28 0:49 ` David Miller
2007-12-28 9:26 ` Oliver Hartkopp
2007-12-28 0:50 ` David Miller
1 sibling, 1 reply; 6+ messages in thread
From: David Miller @ 2007-12-28 0:49 UTC (permalink / raw)
To: oliver; +Cc: sam, urs, netdev
From: Oliver Hartkopp <oliver@hartkopp.net>
Date: Thu, 27 Dec 2007 21:14:57 +0100
> This patch fixes the use of plain integers instead of __u32 in a struct
> that is visible from kernel space and user space. As this change is user
> visible this patch also updates the CAN version to 20071227.
>
> Thanks to Sam Ravnborg for pointing out the wrong plain int usage.
>
> It applies on the current net-2.6.25 tree.
The types are exactly the same size regardless of anything.
There is no reason to make such a big fuss about this, changing the
CAN version etc.
Also, since CAN has never shown up in a released kernel, there is
nothing to be incompatible with.
Finally, once CAN is in fact in a released kernel, you can't make
incompatible changes to the userland visible structures. They are
going to be fixed in stone.
Therefore I'm going to check this in without all the version
changes.
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-2.6.25] CAN: Fix plain integer definitions in userspace header & new CAN version 20071227
2007-12-27 20:14 [PATCH net-2.6.25] CAN: Fix plain integer definitions in userspace header & new CAN version 20071227 Oliver Hartkopp
2007-12-28 0:49 ` David Miller
@ 2007-12-28 0:50 ` David Miller
2007-12-28 8:58 ` Oliver Hartkopp
1 sibling, 1 reply; 6+ messages in thread
From: David Miller @ 2007-12-28 0:50 UTC (permalink / raw)
To: oliver; +Cc: sam, urs, netdev
From: Oliver Hartkopp <oliver@hartkopp.net>
Date: Thu, 27 Dec 2007 21:14:57 +0100
> diff -uprN -X net-2.6.25/Documentation/dontdiff net-2.6.25/include/linux/can/bcm.h export/net2625-2007-12-27/include/linux/can/bcm.h
> --- net-2.6.25/include/linux/can/bcm.h 2007-12-15 19:33:20.000000000 +0100
> +++ export/net2625-2007-12-27/include/linux/can/bcm.h 2007-12-27 20:35:54.000000000 +0100
Also, please properly root your patches in the future:
davem@sunset:~/src/GIT/net-2.6.25$ git apply --check --whitespace=error-all diff
error: net2625-2007-12-27/include/linux/can/bcm.h: No such file or directory
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-2.6.25] CAN: Fix plain integer definitions in userspace header & new CAN version 20071227
2007-12-28 0:50 ` David Miller
@ 2007-12-28 8:58 ` Oliver Hartkopp
0 siblings, 0 replies; 6+ messages in thread
From: Oliver Hartkopp @ 2007-12-28 8:58 UTC (permalink / raw)
To: David Miller; +Cc: sam, urs, netdev
David Miller wrote:
> From: Oliver Hartkopp <oliver@hartkopp.net>
> Date: Thu, 27 Dec 2007 21:14:57 +0100
>
>
>> diff -uprN -X net-2.6.25/Documentation/dontdiff net-2.6.25/include/linux/can/bcm.h export/net2625-2007-12-27/include/linux/can/bcm.h
>> --- net-2.6.25/include/linux/can/bcm.h 2007-12-15 19:33:20.000000000 +0100
>> +++ export/net2625-2007-12-27/include/linux/can/bcm.h 2007-12-27 20:35:54.000000000 +0100
>>
>
> Also, please properly root your patches in the future:
>
> davem@sunset:~/src/GIT/net-2.6.25$ git apply --check --whitespace=error-all diff
> error: net2625-2007-12-27/include/linux/can/bcm.h: No such file or directory
>
>
I was just testing the patch with 'patch -p1 < ... ' but after your
error message i recognized why my patch was faulty as the paths had a
different root depth. Tnx for the hint. Such a mistake will not happen
again.
Thanks,
Oliver
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-2.6.25] CAN: Fix plain integer definitions in userspace header & new CAN version 20071227
2007-12-28 0:49 ` David Miller
@ 2007-12-28 9:26 ` Oliver Hartkopp
2007-12-28 10:10 ` Oliver Hartkopp
0 siblings, 1 reply; 6+ messages in thread
From: Oliver Hartkopp @ 2007-12-28 9:26 UTC (permalink / raw)
To: David Miller; +Cc: sam, urs, netdev
David Miller wrote:
> From: Oliver Hartkopp <oliver@hartkopp.net>
> Date: Thu, 27 Dec 2007 21:14:57 +0100
>
>
>> This patch fixes the use of plain integers instead of __u32 in a struct
>> that is visible from kernel space and user space. As this change is user
>> visible this patch also updates the CAN version to 20071227.
>>
>> Thanks to Sam Ravnborg for pointing out the wrong plain int usage.
>>
>> It applies on the current net-2.6.25 tree.
>>
>
> The types are exactly the same size regardless of anything.
>
> There is no reason to make such a big fuss about this, changing the
> CAN version etc.
>
> Also, since CAN has never shown up in a released kernel, there is
> nothing to be incompatible with.
>
The CAN stuff is also available in the 'SocketCAN' SVN for older 2.6
Kernels and i backported the latest code to Kernel 2.4 two weeks ago as
some people still use it. As a change in bcm.h is user visable i just
wanted to freeze the latest version of the header files into a
consistent CAN version for Mainline, older 2.6 and 2.4 Kernels. That was
the reason for creating version 20071227 *before* it hits a released Kernel.
Thanks
Oliver
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-2.6.25] CAN: Fix plain integer definitions in userspace header & new CAN version 20071227
2007-12-28 9:26 ` Oliver Hartkopp
@ 2007-12-28 10:10 ` Oliver Hartkopp
0 siblings, 0 replies; 6+ messages in thread
From: Oliver Hartkopp @ 2007-12-28 10:10 UTC (permalink / raw)
To: David Miller; +Cc: sam, urs, netdev
Oliver Hartkopp wrote:
> David Miller wrote:
>> The types are exactly the same size regardless of anything.
>>
>> There is no reason to make such a big fuss about this, changing the
>> CAN version etc.
>>
Btw. you are perfectly right with your remark. I'll revert the CAN
version in the SocketCAN SVN back to 20071116 which is in net-2.6.25.
Sorry for the noise.
Oliver
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-12-28 10:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-27 20:14 [PATCH net-2.6.25] CAN: Fix plain integer definitions in userspace header & new CAN version 20071227 Oliver Hartkopp
2007-12-28 0:49 ` David Miller
2007-12-28 9:26 ` Oliver Hartkopp
2007-12-28 10:10 ` Oliver Hartkopp
2007-12-28 0:50 ` David Miller
2007-12-28 8:58 ` Oliver Hartkopp
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).