On Tue, 2016-03-01 at 14:48 -0500, David Miller wrote:
> From: Ben Hutchings
> Date: Tue, 01 Mar 2016 17:14:06 +
>
> > On Tue, 2016-03-01 at 11:42 -0500, David Miller wrote:
> >> From: Nicolas Dichtel
> >> Date: Tue, 1 Mar 2016 16:20:41 +0100
> >>
> >> > DIV_ROUND_UP and is defined in linu
From: Ben Hutchings
Date: Tue, 01 Mar 2016 17:14:06 +
> On Tue, 2016-03-01 at 11:42 -0500, David Miller wrote:
>> From: Nicolas Dichtel
>> Date: Tue, 1 Mar 2016 16:20:41 +0100
>>
>> > DIV_ROUND_UP and is defined in linux/kernel.h only for the kernel. INT_MAX
>> > needs limits.h in userland
On Tue, 2016-03-01 at 11:42 -0500, David Miller wrote:
> From: Nicolas Dichtel
> Date: Tue, 1 Mar 2016 16:20:41 +0100
>
> > DIV_ROUND_UP and is defined in linux/kernel.h only for the kernel. INT_MAX
> > needs limits.h in userland.
>
> It is wrong to provide a definition of this in the user visi
From: Nicolas Dichtel
Date: Tue, 1 Mar 2016 16:20:41 +0100
> DIV_ROUND_UP and is defined in linux/kernel.h only for the kernel. INT_MAX
> needs limits.h in userland.
It is wrong to provide a definition of this in the user visible global
namespace.
On Tue, 2016-03-01 at 16:20 +0100, Nicolas Dichtel wrote:
> DIV_ROUND_UP and is defined in linux/kernel.h only for the kernel.
[...]
But what happens when another UAPI header wants to use DIV_ROUND_UP()?
Do we duplicate the definition there as well?
It seems cleaner to do something like:
--- a/
DIV_ROUND_UP and is defined in linux/kernel.h only for the kernel. INT_MAX
needs limits.h in userland.
When ethtool.h is included by a userland app, we got the following errors:
include/linux/ethtool.h:1218:8: error: variably modified 'queue_mask' at file
scope
__u32 queue_mask[DIV_ROUND_UP(MA