From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Date: Wed, 30 Jan 2013 01:01:07 +0000 Subject: Re: [patch] backlight: s6e63m0: report ->gamma_table_count correctly Message-Id: <20130129170107.f27c1ed3.akpm@linux-foundation.org> List-Id: References: <20130124070524.GD5611@elgon.mountain> <00c601cdfaa2$c52d03c0$4f870b40$%han@samsung.com> In-Reply-To: <00c601cdfaa2$c52d03c0$4f870b40$%han@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Jingoo Han Cc: 'Dan Carpenter' , 'Inki Dae' , 'Richard Purdie' , 'Florian Tobias Schandinat' , linux-fbdev@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org On Fri, 25 Jan 2013 11:22:06 +0900 Jingoo Han wrote: > On Thursday, January 24, 2013 10:45 PM, Dan Carpenter wrote > > CC'ed Andrew Morton, Inki Dae. > > > > > gamma_table has 3 arrays which each hold MAX_GAMMA_LEVEL pointers to > > int. > > > > The current code sets ->gamma_table_count to 6 on 64bit arches and to 3 > > on 32 bit arches. It should be 3 on everything. > > Actually, I don't know it is right. > However, it is certain that this panel is currently used on 32 bit arches > such as ARM SoCs. I don't know what gamma_table_count is supposed to do. The only place it is used is in s6e63m0_sysfs_show_gamma_table(). That function doesn't actually show the table - it just prints out gamme_table_count. Why is that useful? Ho hum, the patch is clearly correct - the array stores int*'s and the sysfs file should display "3" for all architectures. However I suspect we could just remove the whole sysfs file and nobody would care... From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753030Ab3A3BBN (ORCPT ); Tue, 29 Jan 2013 20:01:13 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:52014 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751856Ab3A3BBJ (ORCPT ); Tue, 29 Jan 2013 20:01:09 -0500 Date: Tue, 29 Jan 2013 17:01:07 -0800 From: Andrew Morton To: Jingoo Han Cc: "'Dan Carpenter'" , "'Inki Dae'" , "'Richard Purdie'" , "'Florian Tobias Schandinat'" , linux-fbdev@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [patch] backlight: s6e63m0: report ->gamma_table_count correctly Message-Id: <20130129170107.f27c1ed3.akpm@linux-foundation.org> In-Reply-To: <00c601cdfaa2$c52d03c0$4f870b40$%han@samsung.com> References: <20130124070524.GD5611@elgon.mountain> <00c601cdfaa2$c52d03c0$4f870b40$%han@samsung.com> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 25 Jan 2013 11:22:06 +0900 Jingoo Han wrote: > On Thursday, January 24, 2013 10:45 PM, Dan Carpenter wrote > > CC'ed Andrew Morton, Inki Dae. > > > > > gamma_table has 3 arrays which each hold MAX_GAMMA_LEVEL pointers to > > int. > > > > The current code sets ->gamma_table_count to 6 on 64bit arches and to 3 > > on 32 bit arches. It should be 3 on everything. > > Actually, I don't know it is right. > However, it is certain that this panel is currently used on 32 bit arches > such as ARM SoCs. I don't know what gamma_table_count is supposed to do. The only place it is used is in s6e63m0_sysfs_show_gamma_table(). That function doesn't actually show the table - it just prints out gamme_table_count. Why is that useful? Ho hum, the patch is clearly correct - the array stores int*'s and the sysfs file should display "3" for all architectures. However I suspect we could just remove the whole sysfs file and nobody would care...