From mboxrd@z Thu Jan 1 00:00:00 1970 From: Viresh Kumar Subject: Re: [PATCH V3 2/2] debugfs: don't assume sizeof(bool) to be 4 bytes Date: Tue, 15 Sep 2015 19:42:08 +0530 Message-ID: <20150915141208.GK6350@linux> References: <9b705747a138c96c26faee5218f7b47403195b28.1442305897.git.viresh.kumar@linaro.org> <27d37898b4be6b9b9f31b90135f8206ca079a868.1442305897.git.viresh.kumar@linaro.org> <20150915100454.70dcc04d@gandalf.local.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20150915100454.70dcc04d@gandalf.local.home> Sender: owner-linux-mm@kvack.org To: Steven Rostedt Cc: gregkh@linuxfoundation.org, linaro-kernel@lists.linaro.org, Rafael Wysocki , sboyd@codeaurora.org, arnd@arndb.de, Mark Brown , Akinobu Mita , Alexander Duyck , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Andrew Morton , Andy Lutomirski , Arik Nemtsov , "open list:QUALCOMM ATHEROS ATH10K WIRELESS DRIVER" , "open list:QUALCOMM ATHEROS ATH9K WIRELESS DRIVER" , Avri Altman , "open list:B43 WIRELESS DRIVER" , Borislav Petkov , Brian Silverman , Catalin Marinas , Charles Keepax List-Id: alsa-devel@alsa-project.org 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 > > @@ -1237,7 +1237,7 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval) > > /* Use the global lock for all EC transactions? */ > > tmp = 0; > > acpi_evaluate_integer(handle, "_GLK", NULL, &tmp); > > - ec->global_lock = tmp; > > + ec->global_lock = !!tmp; > > BTW, the above is equivalent if global_lock is of type bool. 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.. -- viresh -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pa0-f50.google.com ([209.85.220.50]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZbqyI-0007CB-UK for ath10k@lists.infradead.org; Tue, 15 Sep 2015 14:12:35 +0000 Received: by pacex6 with SMTP id ex6so178426995pac.0 for ; Tue, 15 Sep 2015 07:12:14 -0700 (PDT) Date: Tue, 15 Sep 2015 19:42:08 +0530 From: Viresh Kumar Subject: Re: [PATCH V3 2/2] debugfs: don't assume sizeof(bool) to be 4 bytes Message-ID: <20150915141208.GK6350@linux> References: <9b705747a138c96c26faee5218f7b47403195b28.1442305897.git.viresh.kumar@linaro.org> <27d37898b4be6b9b9f31b90135f8206ca079a868.1442305897.git.viresh.kumar@linaro.org> <20150915100454.70dcc04d@gandalf.local.home> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150915100454.70dcc04d@gandalf.local.home> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ath10k" Errors-To: ath10k-bounces+kvalo=adurom.com@lists.infradead.org To: Steven Rostedt Cc: "open list:NETWORKING DRIVERS (WIRELESS)" , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Avri Altman , Stanislaw Gruszka , Jiri Slaby , "open list:DOCUMENTATION" , Peter Zijlstra , Catalin Marinas , Sebastian Andrzej Siewior , Will Deacon , Jaroslav Kysela , "open list:MEMORY MANAGEMENT" , Kalle Valo , Emmanuel Grumbach , Luciano Coelho , Wang Long , Richard Fitzgerald , Ingo Molnar , open list , Johan Hedberg , Davidlohr Bueso , Johannes Berg , Joonsoo Kim , Jonathan Corbet , Joerg Roedel , "open list:WOLFSON MICROELECTRONICS DRIVERS" , Sebastian Ott , "open list:QUALCOMM ATHEROS ATH10K WIRELESS DRIVER" , Intel Linux Wireless , "open list:ACPI" , Dmitry Monakhov , Nick Kossifidis , "open list:B43 WIRELESS DRIVER" , Doug Thompson , Gustavo Padovan , Sasha Levin , Tomas Winkler , sboyd@codeaurora.org, Len Brown , linaro-kernel@lists.linaro.org, Hariprasad S , arnd@arndb.de, Mauro Carvalho Chehab , Vlastimil Babka , Arik Nemtsov , Marcel Holtmann , "James E.J. Bottomley" , Michal Hocko , Akinobu Mita , QCA ath9k Development , Michael Kerrisk , Tejun Heo , Mark Brown , Borislav Petkov , Takashi Iwai , Florian Fainelli , Charles Keepax , Mel Gorman , "moderated list:ARM64 PORT (AARCH64 ARCHITECTURE)" , "open list:EDAC-CORE" , Haggai Eran , Narsimhulu Musini , Chaya Rachel Ivgi , "open list:CISCO SCSI HBA DRIVER" , Brian Silverman , "Luis R. Rodriguez" , gregkh@linuxfoundation.org, "open list:ULTRA-WIDEBAND (UWB) SUBSYSTEM:" , Rafael Wysocki , Liam Girdwood , Sesidhar Baddela , Andy Lutomirski , "open list:BLUETOOTH DRIVERS" , "open list:AMD IOMMU (AMD-VI)" , "open list:QUALCOMM ATHEROS ATH9K WIRELESS DRIVER" , Thomas Gleixner , Johannes Weiner , Joe Perches , Eliad Peller , Andrew Morton , Alexander Duyck , Linus Torvalds , "open list:CXGB4 ETHERNET DRIVER (CXGB4)" , Larry Finger 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 > > @@ -1237,7 +1237,7 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval) > > /* Use the global lock for all EC transactions? */ > > tmp = 0; > > acpi_evaluate_integer(handle, "_GLK", NULL, &tmp); > > - ec->global_lock = tmp; > > + ec->global_lock = !!tmp; > > BTW, the above is equivalent if global_lock is of type bool. 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.. -- viresh _______________________________________________ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k From mboxrd@z Thu Jan 1 00:00:00 1970 From: Viresh Kumar Date: Tue, 15 Sep 2015 14:12:25 -0000 Subject: [ath9k-devel] [PATCH V3 2/2] debugfs: don't assume sizeof(bool) to be 4 bytes In-Reply-To: <20150915100454.70dcc04d@gandalf.local.home> References: <9b705747a138c96c26faee5218f7b47403195b28.1442305897.git.viresh.kumar@linaro.org> <27d37898b4be6b9b9f31b90135f8206ca079a868.1442305897.git.viresh.kumar@linaro.org> <20150915100454.70dcc04d@gandalf.local.home> Message-ID: <20150915141208.GK6350@linux> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org 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 > > @@ -1237,7 +1237,7 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval) > > /* Use the global lock for all EC transactions? */ > > tmp = 0; > > acpi_evaluate_integer(handle, "_GLK", NULL, &tmp); > > - ec->global_lock = tmp; > > + ec->global_lock = !!tmp; > > BTW, the above is equivalent if global_lock is of type bool. 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.. -- viresh From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 15 Sep 2015 19:42:08 +0530 From: Viresh Kumar To: Steven Rostedt Cc: gregkh@linuxfoundation.org, linaro-kernel@lists.linaro.org, Rafael Wysocki , sboyd@codeaurora.org, arnd@arndb.de, Mark Brown , Akinobu Mita , Alexander Duyck , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Andrew Morton , Andy Lutomirski , Arik Nemtsov , "open list:QUALCOMM ATHEROS ATH10K WIRELESS DRIVER" , "open list:QUALCOMM ATHEROS ATH9K WIRELESS DRIVER" , Avri Altman , "open list:B43 WIRELESS DRIVER" , Borislav Petkov , Brian Silverman , Catalin Marinas , Charles Keepax , Chaya Rachel Ivgi , Davidlohr Bueso , Dmitry Monakhov , Doug Thompson , Eliad Peller , Emmanuel Grumbach , Florian Fainelli , Gustavo Padovan , Haggai Eran , Hariprasad S , Ingo Molnar , Intel Linux Wireless , "open list:AMD IOMMU (AMD-VI)" , "James E.J. Bottomley" , Jaroslav Kysela , Jiri Slaby , Joe Perches , Joerg Roedel , Johan Hedberg , Johannes Berg , Johannes Weiner , Jonathan Corbet , Joonsoo Kim , Kalle Valo , Larry Finger , Len Brown , Liam Girdwood , "open list:ACPI" , "moderated list:ARM64 PORT (AARCH64 ARCHITECTURE)" , "open list:BLUETOOTH DRIVERS" , "open list:DOCUMENTATION" , "open list:EDAC-CORE" , open list , "open list:MEMORY MANAGEMENT" , "open list:CISCO SCSI HBA DRIVER" , "open list:ULTRA-WIDEBAND (UWB) SUBSYSTEM:" , "open list:NETWORKING DRIVERS (WIRELESS)" , Luciano Coelho , "Luis R. Rodriguez" , Marcel Holtmann , Mauro Carvalho Chehab , Mel Gorman , Michael Kerrisk , Michal Hocko , Narsimhulu Musini , "open list:CXGB4 ETHERNET DRIVER (CXGB4)" , Nick Kossifidis , "open list:WOLFSON MICROELECTRONICS DRIVERS" , Peter Zijlstra , QCA ath9k Development , Richard Fitzgerald , Sasha Levin , Sebastian Andrzej Siewior , Sebastian Ott , Sesidhar Baddela , Stanislaw Gruszka , Takashi Iwai , Tejun Heo , Thomas Gleixner , Tomas Winkler , Vlastimil Babka , Wang Long , Will Deacon , Linus Torvalds Subject: Re: [PATCH V3 2/2] debugfs: don't assume sizeof(bool) to be 4 bytes Message-ID: <20150915141208.GK6350@linux> References: <9b705747a138c96c26faee5218f7b47403195b28.1442305897.git.viresh.kumar@linaro.org> <27d37898b4be6b9b9f31b90135f8206ca079a868.1442305897.git.viresh.kumar@linaro.org> <20150915100454.70dcc04d@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20150915100454.70dcc04d@gandalf.local.home> List-ID: 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 > > @@ -1237,7 +1237,7 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval) > > /* Use the global lock for all EC transactions? */ > > tmp = 0; > > acpi_evaluate_integer(handle, "_GLK", NULL, &tmp); > > - ec->global_lock = tmp; > > + ec->global_lock = !!tmp; > > BTW, the above is equivalent if global_lock is of type bool. 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.. -- viresh From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f174.google.com (mail-ob0-f174.google.com [209.85.214.174]) by kanga.kvack.org (Postfix) with ESMTP id AE8F96B0254 for ; Tue, 15 Sep 2015 10:12:15 -0400 (EDT) Received: by obbzf10 with SMTP id zf10so80110590obb.2 for ; Tue, 15 Sep 2015 07:12:15 -0700 (PDT) Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com. [209.85.220.48]) by mx.google.com with ESMTPS id y3si9831074oiy.124.2015.09.15.07.12.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Sep 2015 07:12:14 -0700 (PDT) Received: by padhy16 with SMTP id hy16so177998852pad.1 for ; Tue, 15 Sep 2015 07:12:14 -0700 (PDT) Date: Tue, 15 Sep 2015 19:42:08 +0530 From: Viresh Kumar Subject: Re: [PATCH V3 2/2] debugfs: don't assume sizeof(bool) to be 4 bytes Message-ID: <20150915141208.GK6350@linux> References: <9b705747a138c96c26faee5218f7b47403195b28.1442305897.git.viresh.kumar@linaro.org> <27d37898b4be6b9b9f31b90135f8206ca079a868.1442305897.git.viresh.kumar@linaro.org> <20150915100454.70dcc04d@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150915100454.70dcc04d@gandalf.local.home> Sender: owner-linux-mm@kvack.org List-ID: To: Steven Rostedt Cc: gregkh@linuxfoundation.org, linaro-kernel@lists.linaro.org, Rafael Wysocki , sboyd@codeaurora.org, arnd@arndb.de, Mark Brown , Akinobu Mita , Alexander Duyck , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Andrew Morton , Andy Lutomirski , Arik Nemtsov , "open list:QUALCOMM ATHEROS ATH10K WIRELESS DRIVER" , "open list:QUALCOMM ATHEROS ATH9K WIRELESS DRIVER" , Avri Altman , "open list:B43 WIRELESS DRIVER" , Borislav Petkov , Brian Silverman , Catalin Marinas , Charles Keepax , Chaya Rachel Ivgi , Davidlohr Bueso , Dmitry Monakhov , Doug Thompson , Eliad Peller , Emmanuel Grumbach , Florian Fainelli , Gustavo Padovan , Haggai Eran , Hariprasad S , Ingo Molnar , Intel Linux Wireless , "open list:AMD IOMMU (AMD-VI)" , "James E.J. Bottomley" , Jaroslav Kysela , Jiri Slaby , Joe Perches , Joerg Roedel , Johan Hedberg , Johannes Berg , Johannes Weiner , Jonathan Corbet , Joonsoo Kim , Kalle Valo , Larry Finger , Len Brown , Liam Girdwood , "open list:ACPI" , "moderated list:ARM64 PORT (AARCH64 ARCHITECTURE)" , "open list:BLUETOOTH DRIVERS" , "open list:DOCUMENTATION" , "open list:EDAC-CORE" , open list , "open list:MEMORY MANAGEMENT" , "open list:CISCO SCSI HBA DRIVER" , "open list:ULTRA-WIDEBAND (UWB) SUBSYSTEM:" , "open list:NETWORKING DRIVERS (WIRELESS)" , Luciano Coelho , "Luis R. Rodriguez" , Marcel Holtmann , Mauro Carvalho Chehab , Mel Gorman , Michael Kerrisk , Michal Hocko , Narsimhulu Musini , "open list:CXGB4 ETHERNET DRIVER (CXGB4)" , Nick Kossifidis , "open list:WOLFSON MICROELECTRONICS DRIVERS" , Peter Zijlstra , QCA ath9k Development , Richard Fitzgerald , Sasha Levin , Sebastian Andrzej Siewior , Sebastian Ott , Sesidhar Baddela , Stanislaw Gruszka , Takashi Iwai , Tejun Heo , Thomas Gleixner , Tomas Winkler , Vlastimil Babka , Wang Long , Will Deacon , Linus Torvalds 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 > > @@ -1237,7 +1237,7 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval) > > /* Use the global lock for all EC transactions? */ > > tmp = 0; > > acpi_evaluate_integer(handle, "_GLK", NULL, &tmp); > > - ec->global_lock = tmp; > > + ec->global_lock = !!tmp; > > BTW, the above is equivalent if global_lock is of type bool. 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.. -- viresh -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Viresh Kumar Subject: Re: [PATCH V3 2/2] debugfs: don't assume sizeof(bool) to be 4 bytes Date: Tue, 15 Sep 2015 19:42:08 +0530 Message-ID: <20150915141208.GK6350@linux> References: <9b705747a138c96c26faee5218f7b47403195b28.1442305897.git.viresh.kumar@linaro.org> <27d37898b4be6b9b9f31b90135f8206ca079a868.1442305897.git.viresh.kumar@linaro.org> <20150915100454.70dcc04d@gandalf.local.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: gregkh@linuxfoundation.org, linaro-kernel@lists.linaro.org, Rafael Wysocki , sboyd@codeaurora.org, arnd@arndb.de, Mark Brown , Akinobu Mita , Alexander Duyck , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Andrew Morton , Andy Lutomirski , Arik Nemtsov , "open list:QUALCOMM ATHEROS ATH10K WIRELESS DRIVER" , "open list:QUALCOMM ATHEROS ATH9K WIRELESS DRIVER" , Avri Altman , "open list:B43 WIRELESS DRIVER" , Borislav Petkov , Brian Silverman , Catalin Marinas , Charles Keepax Return-path: Content-Disposition: inline In-Reply-To: <20150915100454.70dcc04d@gandalf.local.home> Sender: owner-linux-mm@kvack.org List-Id: netdev.vger.kernel.org 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 > > @@ -1237,7 +1237,7 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval) > > /* Use the global lock for all EC transactions? */ > > tmp = 0; > > acpi_evaluate_integer(handle, "_GLK", NULL, &tmp); > > - ec->global_lock = tmp; > > + ec->global_lock = !!tmp; > > BTW, the above is equivalent if global_lock is of type bool. 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.. -- viresh -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org