[ath9k-devel] [PATCH V3 2/2] debugfs: don't assume sizeof(bool) to be 4 bytes

2015-12-14 Thread Viresh Kumar
Long back 'bool' type used to be a typecast to 'int', but that changed in v2.6.19. And that is a typecast to _Bool now, which (mostly) takes just a byte. Anyway, the bool type is implementation defined, and better we don't assume its size to be 4 bytes or 1. The problem with current code is that

Re: [ath9k-devel] [PATCH V3 2/2] debugfs: don't assume sizeof(bool) to be 4 bytes

2015-12-14 Thread Charles Keepax
On Tue, Sep 15, 2015 at 02:04:59PM +0530, Viresh Kumar wrote: > Long back 'bool' type used to be a typecast to 'int', but that changed > in v2.6.19. And that is a typecast to _Bool now, which (mostly) takes > just a byte. Anyway, the bool type is implementation defined, and better > we don't

Re: [ath9k-devel] [PATCH V3 2/2] debugfs: don't assume sizeof(bool) to be 4 bytes

2015-12-14 Thread Ingo Molnar
* Steven Rostedt wrote: > But please, next time, go easy on the Cc list. Maybe just use bcc for those > not > on the list, stating that you BCC'd a lot of people to make sure this is > sane, > but didn't want to spam everyone with every reply. Not just that, such a

Re: [ath9k-devel] [PATCH V3 2/2] debugfs: don't assume sizeof(bool) to be 4 bytes

2015-12-14 Thread Borislav Petkov
On Tue, Sep 15, 2015 at 01:47:32PM -0400, Steven Rostedt wrote: > What do others think when there's a change that goes across the board > this much? BCC OK with you, as just an FYI, I'm doing this? Or should > just the lists be enough and if you don't see it, too bad? Bcc sounds good to me.

Re: [ath9k-devel] [PATCH V3 2/2] debugfs: don't assume sizeof(bool) to be 4 bytes

2015-12-14 Thread Viresh Kumar
Hi Johannes, On 15-09-15, 12:37, Johannes Berg wrote: > This email has far too many people Cc'ed on it - I don't think vger is > even accepting it for that reason. You should probably restrict it to > just a few lists when you resubmit. Hmm, I know the list is too long and yes its blocked for

Re: [ath9k-devel] [PATCH V3 2/2] debugfs: don't assume sizeof(bool) to be 4 bytes

2015-12-14 Thread Tejun Heo
Hello, On Tue, Sep 15, 2015 at 07:42:08PM +0530, Viresh Kumar wrote: > Ah, yes. Thanks for letting me know (I just testedit as well). > > But will it look sane enough to set a boolean to anything apart from > true/false or 1/0? Yes, it will always be set to 0/1 only, but still.. Let's please

Re: [ath9k-devel] [PATCH V3 2/2] debugfs: don't assume sizeof(bool) to be 4 bytes

2015-12-14 Thread Steven Rostedt
On Tue, 15 Sep 2015 10:38:32 -0700 Linus Torvalds wrote: > But that user interface issue doesn't seem to be the case here, an I > can't say that I mind the patch. It looks fairly sane. If Linus is fine with it, I'm fine with it too. But please, next time, go

Re: [ath9k-devel] [PATCH V3 2/2] debugfs: don't assume sizeof(bool) to be 4 bytes

2015-12-14 Thread Steven Rostedt
On Tue, 15 Sep 2015 16:34:47 +0530 Viresh Kumar wrote: > Hi Johannes, > > On 15-09-15, 12:37, Johannes Berg wrote: > > This email has far too many people Cc'ed on it - I don't think vger is > > even accepting it for that reason. You should probably restrict it to > >

Re: [ath9k-devel] [PATCH V3 2/2] debugfs: don't assume sizeof(bool) to be 4 bytes

2015-12-14 Thread Linus Torvalds
On Tue, Sep 15, 2015 at 6:45 AM, Steven Rostedt wrote: > > Linus, This patch changes a lot of u32s into bools in structures. > What's your take on that? So in general, I'd tend to prefer "bool" to be used primarily as a return value for functions, but I have to say, in the

Re: [ath9k-devel] [PATCH V3 2/2] debugfs: don't assume sizeof(bool) to be 4 bytes

2015-12-14 Thread Viresh Kumar
On 15-09-15, 10:04, Steven Rostedt wrote: > On Tue, 15 Sep 2015 14:04:59 +0530 > Viresh Kumar wrote: > > > diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c > > index 2614a839c60d..f11e17ad7834 100644 > > --- a/drivers/acpi/ec.c > > +++ b/drivers/acpi/ec.c > > @@

Re: [ath9k-devel] [PATCH V3 2/2] debugfs: don't assume sizeof(bool) to be 4 bytes

2015-12-14 Thread Johannes Berg
Hi, This email has far too many people Cc'ed on it - I don't think vger is even accepting it for that reason. You should probably restrict it to just a few lists when you resubmit. > The problem with current code is that it reads/writes 4 bytes for a > boolean, which will read/update 3 excess