From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933220AbcFQWBG (ORCPT ); Fri, 17 Jun 2016 18:01:06 -0400 Received: from bear.ext.ti.com ([198.47.19.11]:60408 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754000AbcFQWBE (ORCPT ); Fri, 17 Jun 2016 18:01:04 -0400 Subject: Re: [PATCH 3/3] power_supply: bq27xxx_battery: Group register mappings into one table To: Sebastian Reichel References: <20160531184500.10871-1-afd@ti.com> <20160531184500.10871-3-afd@ti.com> <20160610012934.GA5848@earth> CC: =?UTF-8?Q?Pali_Roh=c3=a1r?= , Dmitry Eremin-Solenikov , David Woodhouse , , From: "Andrew F. Davis" Message-ID: <57647302.1080205@ti.com> Date: Fri, 17 Jun 2016 17:00:34 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <20160610012934.GA5848@earth> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/09/2016 08:29 PM, Sebastian Reichel wrote: > Hi, > > On Tue, May 31, 2016 at 01:45:00PM -0500, Andrew F. Davis wrote: >> Currently for each device with a unique register map we have a named >> array that we then merge into a multidimensional array. Skip this >> middle step and apply the register arrays directly to the multi-array. > > I applied the first two patches, but the third (this one) does not > compile for me: > > CC [M] drivers/power/bq27xxx_battery.o > drivers/power/bq27xxx_battery.c:108:2: warning: braces around scalar initializer > [BQ27000] = { > ^ > drivers/power/bq27xxx_battery.c:108:2: note: (near initialization for ‘bq27xxx_regs[1]’) > drivers/power/bq27xxx_battery.c:109:4: error: array index in non-array initializer > [BQ27XXX_REG_CTRL] = 0x00, > ^ > drivers/power/bq27xxx_battery.c:109:4: note: (near initialization for ‘bq27xxx_regs[1]’) > drivers/power/bq27xxx_battery.c:110:4: error: array index in non-array initializer > [BQ27XXX_REG_TEMP] = 0x06, > ^ > ... > That's odd, I looks like I was attempting a jagged array in C, oops :) I'll post v2 with this fixed. Thanks, Andrew