All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: gregkh@linuxfoundation.org, linaro-kernel@lists.linaro.org,
	Rafael Wysocki <rjw@rjwysocki.net>,
	sboyd@codeaurora.org, arnd@arndb.de,
	Mark Brown <broonie@kernel.org>,
	Akinobu Mita <akinobu.mita@gmail.com>,
	Alexander Duyck <alexander.h.duyck@redhat.com>,
	"moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER
	MANAGEM..." <alsa-devel@alsa-project.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Andy Lutomirski <luto@amacapital.net>,
	Arik Nemtsov <arik@wizery.com>,
	"open list:QUALCOMM ATHEROS ATH10K WIRELESS DRIVER"
	<ath10k@lists.infradead.org>,
	"open list:QUALCOMM ATHEROS ATH9K WIRELESS DRIVER"
	<ath9k-devel@lists.ath9k.org>,
	Avri Altman <avri.altman@intel.com>,
	"open list:B43 WIRELESS DRIVER" <b43-dev@lists.infradead.org>,
	Borislav Petkov <bp@alien8.de>,
	Brian Silverman <bsilver16384@gmail.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Charles Keepax <ckeepax@opensourc>
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	[thread overview]
Message-ID: <20150915141208.GK6350@linux> (raw)
In-Reply-To: <20150915100454.70dcc04d@gandalf.local.home>

On 15-09-15, 10:04, Steven Rostedt wrote:
> On Tue, 15 Sep 2015 14:04:59 +0530
> Viresh Kumar <viresh.kumar@linaro.org> 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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: "open list:NETWORKING DRIVERS (WIRELESS)"
	<linux-wireless@vger.kernel.org>,
	"moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER
	MANAGEM..." <alsa-devel@alsa-project.org>,
	Avri Altman <avri.altman@intel.com>,
	Stanislaw Gruszka <sgruszka@redhat.com>,
	Jiri Slaby <jirislaby@gmail.com>,
	"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Will Deacon <will.deacon@arm.com>,
	Jaroslav Kysela <perex@perex.cz>,
	"open list:MEMORY MANAGEMENT" <linux-mm@kvack.org>,
	Kalle Valo <kvalo@qca.qualcomm.com>,
	Emmanuel Grumbach <emmanuel.grumbach@intel.com>,
	Luciano Coelho <luciano.coelho@intel.com>,
	Wang Long <long.wanglong@huawei.com>,
	Richard Fitzgerald <rf@opensource.wolfsonmicro.com>,
	Ingo Molnar <mingo@kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	Davidlohr Bueso <dave@stgolabs.net>,
	Johannes Berg <johannes.berg@intel.com>,
	Joonsoo Kim <js1304@gmail.com>, Jonathan Corbet <corbet@lwn.net>,
	Joerg Roedel <joro@8bytes.org>,
	"open list:WOLFSON MICROELECTRONICS DRIVERS"
	<patches@opensource.wolfsonmicro.com>,
	Sebastian Ott <sebott@linux.vnet.ibm.com>,
	"open list:QUALCOMM ATHEROS ATH10K WIRELESS DRIVER"
	<ath10k@lists.infradead.org>,
	Intel Linux Wireless <ilw@linux.intel.com>,
	"open list:ACPI" <linux-acpi@vger.kernel.org>,
	Dmitry Monakhov <dmonakhov@openvz.org>,
	Nick Kossifidis <mickflemm@gmail.com>,
	"open list:B43 WIRELESS DRIVER" <b43-dev@lists.infradead.org>,
	Doug Thompson <dougthompson@xmission.com>,
	Gustavo Padovan <gustavo@padovan.org>,
	Sasha Levin <sasha.levin@oracle.com>,
	Tomas Winkler <tomas.winkler@intel.com>,
	sboyd@codeaurora.org, Len Brown <lenb@kernel.org>,
	linaro-kernel@lists.linaro.org,
	Hariprasad S <hariprasad@chelsio.com>,
	arnd@arndb.de, Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Vlastimil Babka <vbabka@suse.cz>, Arik Nemtsov <arik@wizery.com>,
	Marcel Holtmann <marcel@holtmann.org>,
	"James E.J. Bottomley" <JBottomley@odin.com>,
	Michal Hocko <mhocko@suse.com>,
	Akinobu Mita <akinobu.mita@gmail.com>,
	QCA ath9k Development <ath9k-devel@qca.qualcomm.com>,
	Michael Kerrisk <mtk.manpages@gmail.com>,
	Tejun Heo <tj@kernel.org>, Mark Brown <broonie@kernel.org>,
	Borislav Petkov <bp@alien8.de>, Takashi Iwai <tiwai@suse.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Charles Keepax <ckeepax@opensource.wolfsonmicro.com>,
	Mel Gorman <mgorman@suse.de>,
	"moderated list:ARM64 PORT (AARCH64 ARCHITECTURE)"
	<linux-arm-kernel@lists.infradead.org>,
	"open list:EDAC-CORE" <linux-edac@vger.kernel.org>,
	Haggai Eran <haggaie@mellanox.com>,
	Narsimhulu Musini <nmusini@cisco.com>,
	Chaya Rachel Ivgi <chaya.rachel.ivgi@intel.com>,
	"open list:CISCO SCSI HBA DRIVER" <linux-scsi@vger.kernel.org>,
	Brian Silverman <bsilver16384@gmail.com>,
	"Luis R. Rodriguez" <mcgrof@do-not-panic.com>,
	gregkh@linuxfoundation.org,
	"open list:ULTRA-WIDEBAND (UWB) SUBSYSTEM:"
	<linux-usb@vger.kernel.org>, Rafael Wysocki <rjw@rjwysocki.net>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Sesidhar Baddela <sebaddel@cisco.com>,
	Andy Lutomirski <luto@amacapital.net>,
	"open list:BLUETOOTH DRIVERS" <linux-bluetooth@vger.kernel.org>,
	"open list:AMD IOMMU (AMD-VI)" <iommu@lists.linux-foundation.org>,
	"open list:QUALCOMM ATHEROS ATH9K WIRELESS DRIVER"
	<ath9k-devel@lists.ath9k.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Joe Perches <joe@perches.com>, Eliad Peller <eliad@wizery.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Alexander Duyck <alexander.h.duyck@redhat.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	"open list:CXGB4 ETHERNET DRIVER (CXGB4)"
	<netdev@vger.kernel.org>,
	Larry Finger <Larry.Finger@lwfinger.net>
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	[thread overview]
Message-ID: <20150915141208.GK6350@linux> (raw)
In-Reply-To: <20150915100454.70dcc04d@gandalf.local.home>

On 15-09-15, 10:04, Steven Rostedt wrote:
> On Tue, 15 Sep 2015 14:04:59 +0530
> Viresh Kumar <viresh.kumar@linaro.org> 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

WARNING: multiple messages have this Message-ID (diff)
From: Viresh Kumar <viresh.kumar@linaro.org>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [PATCH V3 2/2] debugfs: don't assume sizeof(bool) to be 4 bytes
Date: Tue, 15 Sep 2015 14:12:25 -0000	[thread overview]
Message-ID: <20150915141208.GK6350@linux> (raw)
In-Reply-To: <20150915100454.70dcc04d@gandalf.local.home>

On 15-09-15, 10:04, Steven Rostedt wrote:
> On Tue, 15 Sep 2015 14:04:59 +0530
> Viresh Kumar <viresh.kumar@linaro.org> 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

WARNING: multiple messages have this Message-ID (diff)
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: gregkh@linuxfoundation.org, linaro-kernel@lists.linaro.org,
	Rafael Wysocki <rjw@rjwysocki.net>,
	sboyd@codeaurora.org, arnd@arndb.de,
	Mark Brown <broonie@kernel.org>,
	Akinobu Mita <akinobu.mita@gmail.com>,
	Alexander Duyck <alexander.h.duyck@redhat.com>,
	"moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER
	MANAGEM..." <alsa-devel@alsa-project.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Andy Lutomirski <luto@amacapital.net>,
	Arik Nemtsov <arik@wizery.com>,
	"open list:QUALCOMM ATHEROS ATH10K WIRELESS DRIVER"
	<ath10k@lists.infradead.org>,
	"open list:QUALCOMM ATHEROS ATH9K WIRELESS DRIVER"
	<ath9k-devel@lists.ath9k.org>,
	Avri Altman <avri.altman@intel.com>,
	"open list:B43 WIRELESS DRIVER" <b43-dev@lists.infradead.org>,
	Borislav Petkov <bp@alien8.de>,
	Brian Silverman <bsilver16384@gmail.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Charles Keepax <ckeepax@opensource.wolfsonmicro.com>,
	Chaya Rachel Ivgi <chaya.rachel.ivgi@intel.com>,
	Davidlohr Bueso <dave@stgolabs.net>,
	Dmitry Monakhov <dmonakhov@openvz.org>,
	Doug Thompson <dougthompson@xmission.com>,
	Eliad Peller <eliad@wizery.com>,
	Emmanuel Grumbach <emmanuel.grumbach@intel.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Gustavo Padovan <gustavo@padovan.org>,
	Haggai Eran <haggaie@mellanox.com>,
	Hariprasad S <hariprasad@chelsio.com>,
	Ingo Molnar <mingo@kernel.org>,
	Intel Linux Wireless <ilw@linux.intel.com>,
	"open list:AMD IOMMU (AMD-VI)" <iommu@lists.linux-foundation.org>,
	"James E.J. Bottomley" <JBottomley@odin.com>,
	Jaroslav Kysela <perex@perex.cz>,
	Jiri Slaby <jirislaby@gmail.com>, Joe Perches <joe@perches.com>,
	Joerg Roedel <joro@8bytes.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	Johannes Berg <johannes.berg@intel.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Jonathan Corbet <corbet@lwn.net>, Joonsoo Kim <js1304@gmail.com>,
	Kalle Valo <kvalo@qca.qualcomm.com>,
	Larry Finger <Larry.Finger@lwfinger.net>,
	Len Brown <lenb@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>,
	"open list:ACPI" <linux-acpi@vger.kernel.org>,
	"moderated list:ARM64 PORT (AARCH64 ARCHITECTURE)"
	<linux-arm-kernel@lists.infradead.org>,
	"open list:BLUETOOTH DRIVERS" <linux-bluetooth@vger.kernel.org>,
	"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
	"open list:EDAC-CORE" <linux-edac@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:MEMORY MANAGEMENT" <linux-mm@kvack.org>,
	"open list:CISCO SCSI HBA DRIVER" <linux-scsi@vger.kernel.org>,
	"open list:ULTRA-WIDEBAND (UWB) SUBSYSTEM:"
	<linux-usb@vger.kernel.org>,
	"open list:NETWORKING DRIVERS (WIRELESS)"
	<linux-wireless@vger.kernel.org>,
	Luciano Coelho <luciano.coelho@intel.com>,
	"Luis R. Rodriguez" <mcgrof@do-not-panic.com>,
	Marcel Holtmann <marcel@holtmann.org>,
	Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Mel Gorman <mgorman@suse.de>,
	Michael Kerrisk <mtk.manpages@gmail.com>,
	Michal Hocko <mhocko@suse.com>,
	Narsimhulu Musini <nmusini@cisco.com>,
	"open list:CXGB4 ETHERNET DRIVER (CXGB4)"
	<netdev@vger.kernel.org>, Nick Kossifidis <mickflemm@gmail.com>,
	"open list:WOLFSON MICROELECTRONICS DRIVERS"
	<patches@opensource.wolfsonmicro.com>,
	Peter Zijlstra <peterz@infradead.org>,
	QCA ath9k Development <ath9k-devel@qca.qualcomm.com>,
	Richard Fitzgerald <rf@opensource.wolfsonmicro.com>,
	Sasha Levin <sasha.levin@oracle.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Sebastian Ott <sebott@linux.vnet.ibm.com>,
	Sesidhar Baddela <sebaddel@cisco.com>,
	Stanislaw Gruszka <sgruszka@redhat.com>,
	Takashi Iwai <tiwai@suse.com>, Tejun Heo <tj@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Tomas Winkler <tomas.winkler@intel.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	Wang Long <long.wanglong@huawei.com>,
	Will Deacon <will.deacon@arm.com>,
	Linus Torvalds <torvalds@linux-foundation.org>
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	[thread overview]
Message-ID: <20150915141208.GK6350@linux> (raw)
In-Reply-To: <20150915100454.70dcc04d@gandalf.local.home>

On 15-09-15, 10:04, Steven Rostedt wrote:
> On Tue, 15 Sep 2015 14:04:59 +0530
> Viresh Kumar <viresh.kumar@linaro.org> 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

WARNING: multiple messages have this Message-ID (diff)
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: gregkh@linuxfoundation.org, linaro-kernel@lists.linaro.org,
	Rafael Wysocki <rjw@rjwysocki.net>,
	sboyd@codeaurora.org, arnd@arndb.de,
	Mark Brown <broonie@kernel.org>,
	Akinobu Mita <akinobu.mita@gmail.com>,
	Alexander Duyck <alexander.h.duyck@redhat.com>,
	"moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER
	MANAGEM..." <alsa-devel@alsa-project.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Andy Lutomirski <luto@amacapital.net>,
	Arik Nemtsov <arik@wizery.com>,
	"open list:QUALCOMM ATHEROS ATH10K WIRELESS DRIVER"
	<ath10k@lists.infradead.org>,
	"open list:QUALCOMM ATHEROS ATH9K WIRELESS DRIVER"
	<ath9k-devel@lists.ath9k.org>,
	Avri Altman <avri.altman@intel.com>,
	"open list:B43 WIRELESS DRIVER" <b43-dev@lists.infradead.org>,
	Borislav Petkov <bp@alien8.de>,
	Brian Silverman <bsilver16384@gmail.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Charles Keepax <ckeepax@opensource.wolfsonmicro.com>,
	Chaya Rachel Ivgi <chaya.rachel.ivgi@intel.com>,
	Davidlohr Bueso <dave@stgolabs.net>,
	Dmitry Monakhov <dmonakhov@openvz.org>,
	Doug Thompson <dougthompson@xmission.com>,
	Eliad Peller <eliad@wizery.com>,
	Emmanuel Grumbach <emmanuel.grumbach@intel.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Gustavo Padovan <gustavo@padovan.org>,
	Haggai Eran <haggaie@mellanox.com>,
	Hariprasad S <hariprasad@chelsio.com>,
	Ingo Molnar <mingo@kernel.org>,
	Intel Linux Wireless <ilw@linux.intel.com>,
	"open list:AMD IOMMU (AMD-VI)" <iommu@lists.linux-foundation.org>,
	"James E.J. Bottomley" <JBottomley@odin.com>,
	Jaroslav Kysela <perex@perex.cz>,
	Jiri Slaby <jirislaby@gmail.com>, Joe Perches <joe@perches.com>,
	Joerg Roedel <joro@8bytes.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	Johannes Berg <johannes.berg@intel.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Jonathan Corbet <corbet@lwn.net>, Joonsoo Kim <js1304@gmail.com>,
	Kalle Valo <kvalo@qca.qualcomm.com>,
	Larry Finger <Larry.Finger@lwfinger.net>,
	Len Brown <lenb@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>,
	"open list:ACPI" <linux-acpi@vger.kernel.org>,
	"moderated list:ARM64 PORT (AARCH64 ARCHITECTURE)"
	<linux-arm-kernel@lists.infradead.org>,
	"open list:BLUETOOTH DRIVERS" <linux-bluetooth@vger.kernel.org>,
	"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
	"open list:EDAC-CORE" <linux-edac@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:MEMORY MANAGEMENT" <linux-mm@kvack.org>,
	"open list:CISCO SCSI HBA DRIVER" <linux-scsi@vger.kernel.org>,
	"open list:ULTRA-WIDEBAND (UWB) SUBSYSTEM:"
	<linux-usb@vger.kernel.org>,
	"open list:NETWORKING DRIVERS (WIRELESS)"
	<linux-wireless@vger.kernel.org>,
	Luciano Coelho <luciano.coelho@intel.com>,
	"Luis R. Rodriguez" <mcgrof@do-not-panic.com>,
	Marcel Holtmann <marcel@holtmann.org>,
	Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Mel Gorman <mgorman@suse.de>,
	Michael Kerrisk <mtk.manpages@gmail.com>,
	Michal Hocko <mhocko@suse.com>,
	Narsimhulu Musini <nmusini@cisco.com>,
	"open list:CXGB4 ETHERNET DRIVER (CXGB4)"
	<netdev@vger.kernel.org>, Nick Kossifidis <mickflemm@gmail.com>,
	"open list:WOLFSON MICROELECTRONICS DRIVERS"
	<patches@opensource.wolfsonmicro.com>,
	Peter Zijlstra <peterz@infradead.org>,
	QCA ath9k Development <ath9k-devel@qca.qualcomm.com>,
	Richard Fitzgerald <rf@opensource.wolfsonmicro.com>,
	Sasha Levin <sasha.levin@oracle.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Sebastian Ott <sebott@linux.vnet.ibm.com>,
	Sesidhar Baddela <sebaddel@cisco.com>,
	Stanislaw Gruszka <sgruszka@redhat.com>,
	Takashi Iwai <tiwai@suse.com>, Tejun Heo <tj@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Tomas Winkler <tomas.winkler@intel.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	Wang Long <long.wanglong@huawei.com>,
	Will Deacon <will.deacon@arm.com>,
	Linus Torvalds <torvalds@linux-foundation.org>
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	[thread overview]
Message-ID: <20150915141208.GK6350@linux> (raw)
In-Reply-To: <20150915100454.70dcc04d@gandalf.local.home>

On 15-09-15, 10:04, Steven Rostedt wrote:
> On Tue, 15 Sep 2015 14:04:59 +0530
> Viresh Kumar <viresh.kumar@linaro.org> 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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: gregkh@linuxfoundation.org, linaro-kernel@lists.linaro.org,
	Rafael Wysocki <rjw@rjwysocki.net>,
	sboyd@codeaurora.org, arnd@arndb.de,
	Mark Brown <broonie@kernel.org>,
	Akinobu Mita <akinobu.mita@gmail.com>,
	Alexander Duyck <alexander.h.duyck@redhat.com>,
	"moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER
	MANAGEM..." <alsa-devel@alsa-project.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Andy Lutomirski <luto@amacapital.net>,
	Arik Nemtsov <arik@wizery.com>,
	"open list:QUALCOMM ATHEROS ATH10K WIRELESS DRIVER"
	<ath10k@lists.infradead.org>,
	"open list:QUALCOMM ATHEROS ATH9K WIRELESS DRIVER"
	<ath9k-devel@lists.ath9k.org>,
	Avri Altman <avri.altman@intel.com>,
	"open list:B43 WIRELESS DRIVER" <b43-dev@lists.infradead.org>,
	Borislav Petkov <bp@alien8.de>,
	Brian Silverman <bsilver16384@gmail.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Charles Keepax <ckeepax@opensourc
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	[thread overview]
Message-ID: <20150915141208.GK6350@linux> (raw)
In-Reply-To: <20150915100454.70dcc04d@gandalf.local.home>

On 15-09-15, 10:04, Steven Rostedt wrote:
> On Tue, 15 Sep 2015 14:04:59 +0530
> Viresh Kumar <viresh.kumar@linaro.org> 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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2015-09-15 14:12 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-15  8:34 [PATCH V3 1/2] ACPI / EC: Fix broken big-endian 64bit platforms using 'global_lock' Viresh Kumar
2015-09-15  8:34 ` Viresh Kumar
     [not found] ` <9b705747a138c96c26faee5218f7b47403195b28.1442305897.git.viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-09-15  8:34   ` [PATCH V3 2/2] debugfs: don't assume sizeof(bool) to be 4 bytes Viresh Kumar
2015-09-15  8:35     ` [ath9k-devel] " Viresh Kumar
2015-09-15  8:34     ` Viresh Kumar
2015-09-15  8:34     ` Viresh Kumar
2015-09-15  8:34     ` Viresh Kumar
2015-09-15  8:34     ` Viresh Kumar
2015-09-15  9:13     ` Charles Keepax
2015-09-15  9:56       ` [ath9k-devel] " Charles Keepax
2015-09-15  9:13       ` Charles Keepax
2015-09-15  9:13       ` Charles Keepax
2015-09-15  9:13       ` Charles Keepax
     [not found]     ` <27d37898b4be6b9b9f31b90135f8206ca079a868.1442305897.git.viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-09-15 10:37       ` Johannes Berg
2015-09-15 11:17         ` [ath9k-devel] " Johannes Berg
2015-09-15 10:37         ` Johannes Berg
2015-09-15 10:37         ` Johannes Berg
2015-09-15 10:37         ` Johannes Berg
2015-09-15 10:37         ` Johannes Berg
     [not found]         ` <1442313464.1914.21.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2015-09-15 11:04           ` Viresh Kumar
2015-09-15 11:05             ` [ath9k-devel] " Viresh Kumar
2015-09-15 11:04             ` Viresh Kumar
2015-09-15 11:04             ` Viresh Kumar
2015-09-15 11:04             ` Viresh Kumar
2015-09-15 11:04             ` Viresh Kumar
2015-09-15 13:45             ` Steven Rostedt
2015-09-15 13:52               ` [ath9k-devel] " Steven Rostedt
2015-09-15 13:45               ` Steven Rostedt
2015-09-15 13:45               ` Steven Rostedt
2015-09-15 13:45               ` Steven Rostedt
2015-09-15 13:45               ` Steven Rostedt
2015-09-15 14:04               ` Viresh Kumar
2015-09-15 14:04                 ` [ath9k-devel] " Viresh Kumar
2015-09-15 14:04                 ` Viresh Kumar
2015-09-15 14:04                 ` Viresh Kumar
2015-09-15 14:04                 ` Viresh Kumar
2015-09-15 14:04                 ` Viresh Kumar
     [not found]               ` <20150915094509.46cca84d-f9ZlEuEWxVcJvu8Pb33WZ0EMvNT87kid@public.gmane.org>
2015-09-15 17:38                 ` Linus Torvalds
2015-09-15 17:47                   ` [ath9k-devel] " Linus Torvalds
2015-09-15 17:38                   ` Linus Torvalds
2015-09-15 17:38                   ` Linus Torvalds
2015-09-15 17:38                   ` Linus Torvalds
2015-09-15 17:38                   ` Linus Torvalds
2015-09-15 17:47                   ` Steven Rostedt
2015-09-15 17:47                     ` [ath9k-devel] " Steven Rostedt
2015-09-15 17:47                     ` Steven Rostedt
2015-09-15 17:47                     ` Steven Rostedt
2015-09-15 17:47                     ` Steven Rostedt
2015-09-16  7:24                     ` Borislav Petkov
2015-09-16  7:32                       ` [ath9k-devel] " Borislav Petkov
2015-09-16  7:24                       ` Borislav Petkov
2015-09-16  7:24                       ` Borislav Petkov
2015-09-16  7:24                       ` Borislav Petkov
2015-09-16  8:02                     ` Ingo Molnar
2015-09-16  8:10                       ` [ath9k-devel] " Ingo Molnar
2015-09-16  8:02                       ` Ingo Molnar
2015-09-16  8:02                       ` Ingo Molnar
2015-09-16  8:02                       ` Ingo Molnar
2015-09-15 14:04     ` Steven Rostedt
2015-09-15 14:05       ` [ath9k-devel] " Steven Rostedt
2015-09-15 14:04       ` Steven Rostedt
2015-09-15 14:04       ` Steven Rostedt
2015-09-15 14:04       ` Steven Rostedt
2015-09-15 14:04       ` Steven Rostedt
2015-09-15 14:12       ` Viresh Kumar [this message]
2015-09-15 14:12         ` [ath9k-devel] " Viresh Kumar
2015-09-15 14:12         ` Viresh Kumar
2015-09-15 14:12         ` Viresh Kumar
2015-09-15 14:12         ` Viresh Kumar
2015-09-15 14:12         ` Viresh Kumar
2015-09-15 14:29         ` Tejun Heo
2015-09-15 14:35           ` [ath9k-devel] " Tejun Heo
2015-09-15 14:29           ` Tejun Heo
2015-09-15 14:29           ` Tejun Heo
2015-09-15 14:29           ` Tejun Heo
2015-09-15 14:29           ` Tejun Heo
2015-09-16  1:57 ` [PATCH V3 1/2] ACPI / EC: Fix broken big-endian 64bit platforms using 'global_lock' Rafael J. Wysocki
2015-09-16  2:06   ` Rafael J. Wysocki
2015-09-16  1:59     ` Viresh Kumar
2015-09-23  7:52   ` Zheng, Lv
2015-09-23  7:52     ` Zheng, Lv
2015-09-24 23:37     ` Viresh Kumar
2015-09-23  9:15 ` Sudeep Holla
2015-09-23  9:39   ` Arnd Bergmann
2015-09-23  9:57     ` Sudeep Holla
2015-09-23 10:29       ` Arnd Bergmann
2015-09-25  0:17 ` Rafael J. Wysocki
2015-09-25  0:03   ` Viresh Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150915141208.GK6350@linux \
    --to=viresh.kumar@linaro.org \
    --cc=akinobu.mita@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.h.duyck@redhat.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=arik@wizery.com \
    --cc=arnd@arndb.de \
    --cc=ath10k@lists.infradead.org \
    --cc=ath9k-devel@lists.ath9k.org \
    --cc=avri.altman@intel.com \
    --cc=b43-dev@lists.infradead.org \
    --cc=bp@alien8.de \
    --cc=broonie@kernel.org \
    --cc=bsilver16384@gmail.com \
    --cc=catalin.marinas@arm.com \
    --cc=ckeepax@opensourc \
    --cc=gregkh@linuxfoundation.org \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=luto@amacapital.net \
    --cc=rjw@rjwysocki.net \
    --cc=rostedt@goodmis.org \
    --cc=sboyd@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.