Re: svn commit: r290613 - head/sys/compat/linuxkpi/common/include/linux

2015-11-10 Thread Conrad Meyer
On Tue, Nov 10, 2015 at 7:08 AM, Ian Lepore wrote: > On Tue, 2015-11-10 at 08:44 +0100, Hans Petter Selasky wrote: >> > -sysctl_root_handler_locked(struct sysctl_oid *oid, void *arg1, >> > intptr_t arg2, >> > +sysctl_root_handler_locked(struct sysctl_oid *oid, void *arg1, >> >

Re: svn commit: r290613 - head/sys/compat/linuxkpi/common/include/linux

2015-11-10 Thread Bruce Evans
On Tue, 10 Nov 2015, Hans Petter Selasky wrote: On 11/09/15 22:17, Bruce Evans wrote: ... This shouldn't compile either. static int -sysctl_root_handler_locked(struct sysctl_oid *oid, void *arg1, intptr_t arg2, +sysctl_root_handler_locked(struct sysctl_oid *oid, void *arg1, intmax_t

Re: svn commit: r290613 - head/sys/compat/linuxkpi/common/include/linux

2015-11-10 Thread Ian Lepore
On Tue, 2015-11-10 at 08:44 +0100, Hans Petter Selasky wrote: > On 11/09/15 22:17, Bruce Evans wrote: > > On Mon, 9 Nov 2015, Conrad E. Meyer wrote: > > > > > Log: > > > linuxkpi/sysfs.h: Cast arg2 through intptr_t to avoid GCC > > > warning > > > > > > The code compiles fine under Clang, but

Re: svn commit: r290613 - head/sys/compat/linuxkpi/common/include/linux

2015-11-10 Thread Bruce Evans
On Tue, 10 Nov 2015, Conrad Meyer wrote: On Tue, Nov 10, 2015 at 7:08 AM, Ian Lepore wrote: On Tue, 2015-11-10 at 08:44 +0100, Hans Petter Selasky wrote: -sysctl_root_handler_locked(struct sysctl_oid *oid, void *arg1, intptr_t arg2, +sysctl_root_handler_locked(struct

Re: svn commit: r290613 - head/sys/compat/linuxkpi/common/include/linux

2015-11-10 Thread Justin Hibbits
On Tue, Nov 10, 2015 at 9:42 AM, Conrad Meyer wrote: > On Tue, Nov 10, 2015 at 7:08 AM, Ian Lepore wrote: >> On Tue, 2015-11-10 at 08:44 +0100, Hans Petter Selasky wrote: >>> > -sysctl_root_handler_locked(struct sysctl_oid *oid, void *arg1, >>> > intptr_t

Re: svn commit: r290613 - head/sys/compat/linuxkpi/common/include/linux

2015-11-10 Thread Andriy Gapon
On 10/11/2015 18:35, Bruce Evans wrote: > intmax_t can hold more than intptr_t, but its size and rank may be smaller. > See another reply. I think that that's the case on middle-endian architectures. -- Andriy Gapon ___ svn-src-all@freebsd.org mailing

Re: svn commit: r290613 - head/sys/compat/linuxkpi/common/include/linux

2015-11-10 Thread Bruce Evans
On Tue, 10 Nov 2015, Justin Hibbits wrote: On Tue, Nov 10, 2015 at 9:42 AM, Conrad Meyer wrote: ... Given that intptr_t exists in our implementation and is a signed integer type, I see no reason why intmax_t could possibly not represent any such value. Same argument for the

svn commit: r290613 - head/sys/compat/linuxkpi/common/include/linux

2015-11-09 Thread Conrad E. Meyer
Author: cem Date: Mon Nov 9 16:50:42 2015 New Revision: 290613 URL: https://svnweb.freebsd.org/changeset/base/290613 Log: linuxkpi/sysfs.h: Cast arg2 through intptr_t to avoid GCC warning The code compiles fine under Clang, but GCC on PPC is less permissive about integer and pointer

Re: svn commit: r290613 - head/sys/compat/linuxkpi/common/include/linux

2015-11-09 Thread Hans Petter Selasky
On 11/09/15 22:17, Bruce Evans wrote: On Mon, 9 Nov 2015, Conrad E. Meyer wrote: Log: linuxkpi/sysfs.h: Cast arg2 through intptr_t to avoid GCC warning The code compiles fine under Clang, but GCC on PPC is less permissive about integer and pointer sizes. (An intmax_t is clearly *large

Re: svn commit: r290613 - head/sys/compat/linuxkpi/common/include/linux

2015-11-09 Thread Bruce Evans
On Mon, 9 Nov 2015, Conrad E. Meyer wrote: Log: linuxkpi/sysfs.h: Cast arg2 through intptr_t to avoid GCC warning The code compiles fine under Clang, but GCC on PPC is less permissive about integer and pointer sizes. (An intmax_t is clearly *large enough* to hold a pointer value.)