From mboxrd@z Thu Jan 1 00:00:00 1970 From: Viresh Kumar Subject: Re: [PATCH V2] debugfs: don't assume sizeof(bool) to be 4 bytes Date: Mon, 14 Sep 2015 21:17:08 +0530 Message-ID: <20150914154708.GF32551@linux> References: <81516fb9c662cc338b5af5b63fbbcde5374e0893.1442202447.git.viresh.kumar@linaro.org> <1708603.aKpYchk1pa@wuerfel> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1708603.aKpYchk1pa@wuerfel> Sender: owner-linux-mm@kvack.org To: Arnd Bergmann Cc: linaro-kernel@lists.linaro.org, gregkh@linuxfoundation.org, "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 , Mark Brown , Jaroslav Kysela , "open list:MEMORY MANAGEMENT" , Kalle Valo , Emmanuel Grumbach , Wang Long , Richard Fitzgerald , Ingo Molnar , Johan Hedberg , Davidlohr Bueso List-Id: alsa-devel@alsa-project.org On 14-09-15, 17:39, Arnd Bergmann wrote: > On Monday 14 September 2015 09:21:54 Viresh Kumar wrote: > > diff --git a/drivers/acpi/ec_sys.c b/drivers/acpi/ec_sys.c > > index b4c216bab22b..bea8e425a8de 100644 > > --- a/drivers/acpi/ec_sys.c > > +++ b/drivers/acpi/ec_sys.c > > @@ -128,7 +128,7 @@ static int acpi_ec_add_debugfs(struct acpi_ec *ec, unsigned int ec_device_count) > > if (!debugfs_create_x32("gpe", 0444, dev_dir, (u32 *)&first_ec->gpe)) > > goto error; > > if (!debugfs_create_bool("use_global_lock", 0444, dev_dir, > > - (u32 *)&first_ec->global_lock)) > > + &first_ec->global_lock)) > > goto error; > > > > if (write_support) > > This one might need a separate patch that can be backported to stable, as > the original code is already broken on big-endian 64-bit machines: > global_lock is 'unsigned long'. Hmmm, so you suggest a single patch that will do s/unsigned long/u32 and that will be followed with this patch (almost) as is. Right? Also, regarding the stable thing, we will surely not be able to backport it straight away. But we should get it backported for sure. @Greg: What all kernel versions you want this to be backported for? -- 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-f41.google.com ([209.85.220.41]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZbVyo-0005jv-QZ for ath10k@lists.infradead.org; Mon, 14 Sep 2015 15:47:43 +0000 Received: by pacfv12 with SMTP id fv12so150350494pac.2 for ; Mon, 14 Sep 2015 08:47:22 -0700 (PDT) Date: Mon, 14 Sep 2015 21:17:08 +0530 From: Viresh Kumar Subject: Re: [PATCH V2] debugfs: don't assume sizeof(bool) to be 4 bytes Message-ID: <20150914154708.GF32551@linux> References: <81516fb9c662cc338b5af5b63fbbcde5374e0893.1442202447.git.viresh.kumar@linaro.org> <1708603.aKpYchk1pa@wuerfel> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1708603.aKpYchk1pa@wuerfel> 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: Arnd Bergmann Cc: "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 , Jaroslav Kysela , "open list:MEMORY MANAGEMENT" , Kalle Valo , Emmanuel Grumbach , Luciano Coelho , Richard Fitzgerald , Ingo Molnar , Hariprasad S , Thomas Gleixner , Davidlohr Bueso , Eliad Peller , 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 , Doug Thompson , Gustavo Padovan , Sasha Levin , Tomas Winkler , sboyd@codeaurora.org, "open list:B43 WIRELESS DRIVER" , linaro-kernel@lists.linaro.org, Johan Hedberg , Johannes Berg , Mauro Carvalho Chehab , Arik Nemtsov , Marcel Holtmann , David Rientjes , Michal Hocko , Akinobu Mita , Andrew Morton , Joe Perches , Mark Brown , Borislav Petkov , Oleg Nesterov , Florian Fainelli , Charles Keepax , Mel Gorman , Vlastimil Babka , "open list:EDAC-CORE" , "moderated list:ARM64 PORT AARCH64 ARCHITECTURE" , Haggai Eran , "James E.J. Bottomley" , Alexander Duyck , Chaya Rachel Ivgi , "open list:CISCO SCSI HBA DRIVER" , Brian Silverman , "Luis R. Rodriguez" , gregkh@linuxfoundation.org, "open list:ULTRA-WIDEBAND UWB SUBSYSTEM:" , "open list:NETWORKING DRIVERS WIRELESS" , Takashi Iwai , Sesidhar Baddela , open list , Johannes Weiner , "open list:BLUETOOTH DRIVERS" , "open list:AMD IOMMU AMD-VI" , "open list:QUALCOMM ATHEROS ATH9K WIRELESS DRIVER" , Rafael Wysocki , Narsimhulu Musini , Wang Long , Tejun Heo , Michael Kerrisk , QCA ath9k Development , Len Brown , Liam Girdwood , "open list:CXGB4 ETHERNET DRIVER CXGB4" , Larry Finger On 14-09-15, 17:39, Arnd Bergmann wrote: > On Monday 14 September 2015 09:21:54 Viresh Kumar wrote: > > diff --git a/drivers/acpi/ec_sys.c b/drivers/acpi/ec_sys.c > > index b4c216bab22b..bea8e425a8de 100644 > > --- a/drivers/acpi/ec_sys.c > > +++ b/drivers/acpi/ec_sys.c > > @@ -128,7 +128,7 @@ static int acpi_ec_add_debugfs(struct acpi_ec *ec, unsigned int ec_device_count) > > if (!debugfs_create_x32("gpe", 0444, dev_dir, (u32 *)&first_ec->gpe)) > > goto error; > > if (!debugfs_create_bool("use_global_lock", 0444, dev_dir, > > - (u32 *)&first_ec->global_lock)) > > + &first_ec->global_lock)) > > goto error; > > > > if (write_support) > > This one might need a separate patch that can be backported to stable, as > the original code is already broken on big-endian 64-bit machines: > global_lock is 'unsigned long'. Hmmm, so you suggest a single patch that will do s/unsigned long/u32 and that will be followed with this patch (almost) as is. Right? Also, regarding the stable thing, we will surely not be able to backport it straight away. But we should get it backported for sure. @Greg: What all kernel versions you want this to be backported for? -- 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: Mon, 14 Sep 2015 15:47:35 -0000 Subject: [ath9k-devel] [PATCH V2] debugfs: don't assume sizeof(bool) to be 4 bytes In-Reply-To: <1708603.aKpYchk1pa@wuerfel> References: <81516fb9c662cc338b5af5b63fbbcde5374e0893.1442202447.git.viresh.kumar@linaro.org> <1708603.aKpYchk1pa@wuerfel> Message-ID: <20150914154708.GF32551@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 14-09-15, 17:39, Arnd Bergmann wrote: > On Monday 14 September 2015 09:21:54 Viresh Kumar wrote: > > diff --git a/drivers/acpi/ec_sys.c b/drivers/acpi/ec_sys.c > > index b4c216bab22b..bea8e425a8de 100644 > > --- a/drivers/acpi/ec_sys.c > > +++ b/drivers/acpi/ec_sys.c > > @@ -128,7 +128,7 @@ static int acpi_ec_add_debugfs(struct acpi_ec *ec, unsigned int ec_device_count) > > if (!debugfs_create_x32("gpe", 0444, dev_dir, (u32 *)&first_ec->gpe)) > > goto error; > > if (!debugfs_create_bool("use_global_lock", 0444, dev_dir, > > - (u32 *)&first_ec->global_lock)) > > + &first_ec->global_lock)) > > goto error; > > > > if (write_support) > > This one might need a separate patch that can be backported to stable, as > the original code is already broken on big-endian 64-bit machines: > global_lock is 'unsigned long'. Hmmm, so you suggest a single patch that will do s/unsigned long/u32 and that will be followed with this patch (almost) as is. Right? Also, regarding the stable thing, we will surely not be able to backport it straight away. But we should get it backported for sure. @Greg: What all kernel versions you want this to be backported for? -- viresh From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 14 Sep 2015 21:17:08 +0530 From: Viresh Kumar To: Arnd Bergmann Cc: linaro-kernel@lists.linaro.org, gregkh@linuxfoundation.org, "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 , Mark Brown , Jaroslav Kysela , "open list:MEMORY MANAGEMENT" , Kalle Valo , Emmanuel Grumbach , Wang Long , Richard Fitzgerald , Ingo Molnar , Johan Hedberg , Davidlohr Bueso , 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" , "open list:QUALCOMM ATHEROS ATH9K WIRELESS DRIVER" , Nick Kossifidis , "open list:B43 WIRELESS DRIVER" , Luciano Coelho , Doug Thompson , Gustavo Padovan , Sasha Levin , Tomas Winkler , Sebastian Andrzej Siewior , sboyd@codeaurora.org, Len Brown , Takashi Iwai , Hariprasad S , Johannes Berg , Mauro Carvalho Chehab , Vlastimil Babka , Arik Nemtsov , Marcel Holtmann , David Rientjes , Michal Hocko , Akinobu Mita , QCA ath9k Development , Michael Kerrisk , Tejun Heo , Florian Fainelli , Borislav Petkov , Oleg Nesterov , Charles Keepax , Mel Gorman , "moderated list:ARM64 PORT AARCH64 ARCHITECTURE" , "open list:EDAC-CORE" , Haggai Eran , "James E.J. Bottomley" , Chaya Rachel Ivgi , "open list:CISCO SCSI HBA DRIVER" , Brian Silverman , "Luis R. Rodriguez" , "open list:CXGB4 ETHERNET DRIVER CXGB4" , "open list:ULTRA-WIDEBAND UWB SUBSYSTEM:" , Rafael Wysocki , Liam Girdwood , Sesidhar Baddela , open list , "open list:BLUETOOTH DRIVERS" , "open list:AMD IOMMU AMD-VI" , Dmitry Monakhov , Thomas Gleixner , Narsimhulu Musini , Johannes Weiner , Joe Perches , Eliad Peller , Andrew Morton , Alexander Duyck , Larry Finger Subject: Re: [PATCH V2] debugfs: don't assume sizeof(bool) to be 4 bytes Message-ID: <20150914154708.GF32551@linux> References: <81516fb9c662cc338b5af5b63fbbcde5374e0893.1442202447.git.viresh.kumar@linaro.org> <1708603.aKpYchk1pa@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <1708603.aKpYchk1pa@wuerfel> List-ID: On 14-09-15, 17:39, Arnd Bergmann wrote: > On Monday 14 September 2015 09:21:54 Viresh Kumar wrote: > > diff --git a/drivers/acpi/ec_sys.c b/drivers/acpi/ec_sys.c > > index b4c216bab22b..bea8e425a8de 100644 > > --- a/drivers/acpi/ec_sys.c > > +++ b/drivers/acpi/ec_sys.c > > @@ -128,7 +128,7 @@ static int acpi_ec_add_debugfs(struct acpi_ec *ec, unsigned int ec_device_count) > > if (!debugfs_create_x32("gpe", 0444, dev_dir, (u32 *)&first_ec->gpe)) > > goto error; > > if (!debugfs_create_bool("use_global_lock", 0444, dev_dir, > > - (u32 *)&first_ec->global_lock)) > > + &first_ec->global_lock)) > > goto error; > > > > if (write_support) > > This one might need a separate patch that can be backported to stable, as > the original code is already broken on big-endian 64-bit machines: > global_lock is 'unsigned long'. Hmmm, so you suggest a single patch that will do s/unsigned long/u32 and that will be followed with this patch (almost) as is. Right? Also, regarding the stable thing, we will surely not be able to backport it straight away. But we should get it backported for sure. @Greg: What all kernel versions you want this to be backported for? -- viresh From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f173.google.com (mail-io0-f173.google.com [209.85.223.173]) by kanga.kvack.org (Postfix) with ESMTP id 069A06B0256 for ; Mon, 14 Sep 2015 11:47:23 -0400 (EDT) Received: by iofb144 with SMTP id b144so171098919iof.1 for ; Mon, 14 Sep 2015 08:47:22 -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 m5si8629477igx.20.2015.09.14.08.47.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Sep 2015 08:47:22 -0700 (PDT) Received: by padhy16 with SMTP id hy16so147368366pad.1 for ; Mon, 14 Sep 2015 08:47:22 -0700 (PDT) Date: Mon, 14 Sep 2015 21:17:08 +0530 From: Viresh Kumar Subject: Re: [PATCH V2] debugfs: don't assume sizeof(bool) to be 4 bytes Message-ID: <20150914154708.GF32551@linux> References: <81516fb9c662cc338b5af5b63fbbcde5374e0893.1442202447.git.viresh.kumar@linaro.org> <1708603.aKpYchk1pa@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1708603.aKpYchk1pa@wuerfel> Sender: owner-linux-mm@kvack.org List-ID: To: Arnd Bergmann Cc: linaro-kernel@lists.linaro.org, gregkh@linuxfoundation.org, "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 , Mark Brown , Jaroslav Kysela , "open list:MEMORY MANAGEMENT" , Kalle Valo , Emmanuel Grumbach , Wang Long , Richard Fitzgerald , Ingo Molnar , Johan Hedberg , Davidlohr Bueso , 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" , "open list:QUALCOMM ATHEROS ATH9K WIRELESS DRIVER" , Nick Kossifidis , "open list:B43 WIRELESS DRIVER" , Luciano Coelho , Doug Thompson , Gustavo Padovan , Sasha Levin , Tomas Winkler , Sebastian Andrzej Siewior , sboyd@codeaurora.org, Len Brown , Takashi Iwai , Hariprasad S , Johannes Berg , Mauro Carvalho Chehab , Vlastimil Babka , Arik Nemtsov , Marcel Holtmann , David Rientjes , Michal Hocko , Akinobu Mita , QCA ath9k Development , Michael Kerrisk , Tejun Heo , Florian Fainelli , Borislav Petkov , Oleg Nesterov , Charles Keepax , Mel Gorman , "moderated list:ARM64 PORT AARCH64 ARCHITECTURE" , "open list:EDAC-CORE" , Haggai Eran , "James E.J. Bottomley" , Chaya Rachel Ivgi , "open list:CISCO SCSI HBA DRIVER" , Brian Silverman , "Luis R. Rodriguez" , "open list:CXGB4 ETHERNET DRIVER CXGB4" , "open list:ULTRA-WIDEBAND UWB SUBSYSTEM:" , Rafael Wysocki , Liam Girdwood , Sesidhar Baddela , open list , "open list:BLUETOOTH DRIVERS" , "open list:AMD IOMMU AMD-VI" , Dmitry Monakhov , Thomas Gleixner , Narsimhulu Musini , Johannes Weiner , Joe Perches , Eliad Peller , Andrew Morton , Alexander Duyck , Larry Finger On 14-09-15, 17:39, Arnd Bergmann wrote: > On Monday 14 September 2015 09:21:54 Viresh Kumar wrote: > > diff --git a/drivers/acpi/ec_sys.c b/drivers/acpi/ec_sys.c > > index b4c216bab22b..bea8e425a8de 100644 > > --- a/drivers/acpi/ec_sys.c > > +++ b/drivers/acpi/ec_sys.c > > @@ -128,7 +128,7 @@ static int acpi_ec_add_debugfs(struct acpi_ec *ec, unsigned int ec_device_count) > > if (!debugfs_create_x32("gpe", 0444, dev_dir, (u32 *)&first_ec->gpe)) > > goto error; > > if (!debugfs_create_bool("use_global_lock", 0444, dev_dir, > > - (u32 *)&first_ec->global_lock)) > > + &first_ec->global_lock)) > > goto error; > > > > if (write_support) > > This one might need a separate patch that can be backported to stable, as > the original code is already broken on big-endian 64-bit machines: > global_lock is 'unsigned long'. Hmmm, so you suggest a single patch that will do s/unsigned long/u32 and that will be followed with this patch (almost) as is. Right? Also, regarding the stable thing, we will surely not be able to backport it straight away. But we should get it backported for sure. @Greg: What all kernel versions you want this to be backported for? -- 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 V2] debugfs: don't assume sizeof(bool) to be 4 bytes Date: Mon, 14 Sep 2015 21:17:08 +0530 Message-ID: <20150914154708.GF32551@linux> References: <81516fb9c662cc338b5af5b63fbbcde5374e0893.1442202447.git.viresh.kumar@linaro.org> <1708603.aKpYchk1pa@wuerfel> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linaro-kernel@lists.linaro.org, gregkh@linuxfoundation.org, "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 , Mark Brown , Jaroslav Kysela , "open list:MEMORY MANAGEMENT" , Kalle Valo , Emmanuel Grumbach , Wang Long , Richard Fitzgerald , Ingo Molnar , Johan Hedberg , Davidlohr Bueso Return-path: Content-Disposition: inline In-Reply-To: <1708603.aKpYchk1pa@wuerfel> Sender: owner-linux-mm@kvack.org List-Id: netdev.vger.kernel.org On 14-09-15, 17:39, Arnd Bergmann wrote: > On Monday 14 September 2015 09:21:54 Viresh Kumar wrote: > > diff --git a/drivers/acpi/ec_sys.c b/drivers/acpi/ec_sys.c > > index b4c216bab22b..bea8e425a8de 100644 > > --- a/drivers/acpi/ec_sys.c > > +++ b/drivers/acpi/ec_sys.c > > @@ -128,7 +128,7 @@ static int acpi_ec_add_debugfs(struct acpi_ec *ec, unsigned int ec_device_count) > > if (!debugfs_create_x32("gpe", 0444, dev_dir, (u32 *)&first_ec->gpe)) > > goto error; > > if (!debugfs_create_bool("use_global_lock", 0444, dev_dir, > > - (u32 *)&first_ec->global_lock)) > > + &first_ec->global_lock)) > > goto error; > > > > if (write_support) > > This one might need a separate patch that can be backported to stable, as > the original code is already broken on big-endian 64-bit machines: > global_lock is 'unsigned long'. Hmmm, so you suggest a single patch that will do s/unsigned long/u32 and that will be followed with this patch (almost) as is. Right? Also, regarding the stable thing, we will surely not be able to backport it straight away. But we should get it backported for sure. @Greg: What all kernel versions you want this to be backported for? -- 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