Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1766896ybh; Thu, 16 Jul 2020 23:58:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlPEqd7LLSnY3Qbyy8Bwfo/UE8gpn8DYl9jnNY3syVUFWiGw/i9DlTZda02S5zmRI1fFSP X-Received: by 2002:a17:906:69d3:: with SMTP id g19mr7594892ejs.402.1594969093883; Thu, 16 Jul 2020 23:58:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594969093; cv=none; d=google.com; s=arc-20160816; b=j34aj0HQDHwCvGEAsfUWoGs8kf+rXxcYVRv5zxFSE04VrlHj/SRfTz2yrLUuM/rVdC FS4tNYeKdDa7mqs/ldK9jxuDCX1a/EFbLwnsgM90zQv3TfYRNzN49+bogrfcRcSWWgbu qojMYz/X86VryEAlO01FkuTdjOUv8d9u1xE98bt+sI7oyzgKyVBxAZXZ0ndVSCcUPufk pleikSQdloP4jN/VRp1V8XCkb+A/PUGVDmaRdg1Fh4n92bnWIPma8z3NejGBXJF9DdV+ 0VGkaTwJEBWpoySodA4bd/MhmUcqbBt3KO3zVqLJfWRL2sLCHnD1F57tHJqCIAPAle+8 a4Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=8UI9gPp1T4gScUMErB3q1shtLzCWRrwaMXZPjE+ufzc=; b=RQWpCbf+GH/hzJ2jgNarcPPZGCKFRsY9UmkKRfpkZdlPC6KnvNKBVU9w5yJsbwErkV MRXdjhZymfltNr5bwuYD6LIkGlmFaOb59xSxxnzJlEHF7B0tt3m1bWP5BXFeufjSdzTT BdOM9gSt/EWmOv+8ctAJ2A6gUem4Bcfl1jn80iuoC9F2z8X531AQBD1bbmAZwAp4V1tx UAdKAvnztZqg9i/gAIrFQJDY1JaEFTle7j9Igt3/Dk3vniW/b8qm/Oy+6xDv/yqlv9v/ oPfZ+EgqH9vo664RNckyRimMqeAnnbxxdKEAM6sdwuGmEV4ltRrrexEIXJM2DNtjLp+R vnUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vo4d4Sj7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e17si4483390ejk.740.2020.07.16.23.57.51; Thu, 16 Jul 2020 23:58:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vo4d4Sj7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726166AbgGQG4l (ORCPT + 99 others); Fri, 17 Jul 2020 02:56:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726113AbgGQG4k (ORCPT ); Fri, 17 Jul 2020 02:56:40 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12911C061755 for ; Thu, 16 Jul 2020 23:56:40 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id b6so9813122wrs.11 for ; Thu, 16 Jul 2020 23:56:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=8UI9gPp1T4gScUMErB3q1shtLzCWRrwaMXZPjE+ufzc=; b=vo4d4Sj7NMhKOaKLsfTqK+OXYcwUwkI0j7msoO4u7kvX95IbzKpsNvj5Z0kfSh2ZHd EGiriAiVD8D6dgrED9LaU/gdaN9YtHrloQLo5B4jqKA+EUcc0P8fT4Vw2YKYU5IjnTBs F7V2wbQtmx2ihgEWg709JN7kawds3KRBsAp8O/tfCZeISb2/Ak96fFgQTvckRm1lHYK4 VIxklSYf/VxQ2eRtlEbaB2JSUe9XHBiqnK9yMkIQpNzKFHq0J+w+kwpjjmSHe8kx5JFX 5Zdcbcz5qsHc7L+CUQv5fIBLvFI+E3xOaxFyILM0GF9cLolt9blsAjbj+eD1pNURva5p 5S9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=8UI9gPp1T4gScUMErB3q1shtLzCWRrwaMXZPjE+ufzc=; b=eFC2gf5AipAVwjNDSNN0mMXYPdYI62Cw3Kxvn9NDHyKJ2YVgDcc634wkppq5bEkmcy v3tYzRp7jXctzLKEWBEC98F9zOO6vQdQpczxIOdhXlYU2tW2sR4khuNGJ5nWNVmbfV/9 zaIkE1zAZ6ze7QZOXQzpv5aC4anaiATHTyR1l5PagPuGQdWEcEzoUUcWhrc1WKpDKf+a hNmG7bCzbq4HgDpg9/MSPA1TPxi6UTA/IWH6bGZen7VQGJ/ERLwOTME9P3daq+a0kmSP cEYvtNw+w12+X+lek0P4MEHEFtL5nZWXqWU88GoBJ65kq7eUwSSY2qRokBmxtpEXPF+n VTLA== X-Gm-Message-State: AOAM530KaY5wczvW5tg4pdzYC/PM1c30nRSGw04r/dhEvrIWfC/pCf0q eUgeS+vFrexZ8f/1qj6WnpCEtaBm4TTAjQ== X-Received: by 2002:a5d:44d1:: with SMTP id z17mr8674390wrr.259.1594968998781; Thu, 16 Jul 2020 23:56:38 -0700 (PDT) Received: from dell ([2.27.167.94]) by smtp.gmail.com with ESMTPSA id t14sm818824wrv.14.2020.07.16.23.56.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jul 2020 23:56:38 -0700 (PDT) Date: Fri, 17 Jul 2020 07:56:36 +0100 From: Lee Jones To: Stephen Rothwell Cc: Linux Next Mailing List , Linux Kernel Mailing List Subject: Re: linux-next: build failure after merge of the mfd tree Message-ID: <20200717065636.GB3165313@dell> References: <20200717134154.50326d78@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200717134154.50326d78@canb.auug.org.au> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 17 Jul 2020, Stephen Rothwell wrote: > Hi all, > > After merging the mfd tree, today's linux-next build (x86_64 allmodconfig) > failed like this: > > drivers/mfd/kempld-core.c: In function 'kempld_register_cells_generic': > drivers/mfd/kempld-core.c:105:13: error: assignment of read-only location 'devs[i++]' > 105 | devs[i++] = kempld_devs[KEMPLD_I2C]; > | ^ > drivers/mfd/kempld-core.c:108:13: error: assignment of read-only location 'devs[i++]' > 108 | devs[i++] = kempld_devs[KEMPLD_WDT]; > | ^ > drivers/mfd/kempld-core.c:111:13: error: assignment of read-only location 'devs[i++]' > 111 | devs[i++] = kempld_devs[KEMPLD_GPIO]; > | ^ > drivers/mfd/kempld-core.c:114:13: error: assignment of read-only location 'devs[i++]' > 114 | devs[i++] = kempld_devs[KEMPLD_UART]; > | ^ > > Caused by commit > > 70d48975c152 ("mfd: core: Make a best effort attempt to match devices with the correct of_nodes") > > I have added the following fix patch for today (I assume that there is > a better solution): > > From: Stephen Rothwell > Date: Fri, 17 Jul 2020 13:36:22 +1000 > Subject: [PATCH] fix up for struct mfd_cell change > > Fixes: 70d48975c152 ("mfd: core: Make a best effort attempt to match devices with the correct of_nodes") Thanks for fixing this Stephen. I need to investigate why this didn't show up during my own testing. > Signed-off-by: Stephen Rothwell > --- > drivers/mfd/kempld-core.c | 28 ++++++++++------------------ > 1 file changed, 10 insertions(+), 18 deletions(-) > > diff --git a/drivers/mfd/kempld-core.c b/drivers/mfd/kempld-core.c > index f48e21d8b97c..ad68ee699cb5 100644 > --- a/drivers/mfd/kempld-core.c > +++ b/drivers/mfd/kempld-core.c > @@ -79,39 +79,31 @@ enum kempld_cells { > KEMPLD_UART, > }; > > -static const struct mfd_cell kempld_devs[] = { > - [KEMPLD_I2C] = { > - .name = "kempld-i2c", > - }, > - [KEMPLD_WDT] = { > - .name = "kempld-wdt", > - }, > - [KEMPLD_GPIO] = { > - .name = "kempld-gpio", > - }, > - [KEMPLD_UART] = { > - .name = "kempld-uart", > - }, > +static const char *kempld_devs[] = { Do you mind if I change this to 'kempld_dev_names' and still keep your SoB? > + [KEMPLD_I2C] = "kempld-i2c", > + [KEMPLD_WDT] = "kempld-wdt", > + [KEMPLD_GPIO] = "kempld-gpio", > + [KEMPLD_UART] = "kempld-uart", > }; > > #define KEMPLD_MAX_DEVS ARRAY_SIZE(kempld_devs) > > static int kempld_register_cells_generic(struct kempld_device_data *pld) > { > - struct mfd_cell devs[KEMPLD_MAX_DEVS]; > + struct mfd_cell devs[KEMPLD_MAX_DEVS] = {}; > int i = 0; > > if (pld->feature_mask & KEMPLD_FEATURE_BIT_I2C) > - devs[i++] = kempld_devs[KEMPLD_I2C]; > + devs[i++].name = kempld_devs[KEMPLD_I2C]; > > if (pld->feature_mask & KEMPLD_FEATURE_BIT_WATCHDOG) > - devs[i++] = kempld_devs[KEMPLD_WDT]; > + devs[i++].name = kempld_devs[KEMPLD_WDT]; > > if (pld->feature_mask & KEMPLD_FEATURE_BIT_GPIO) > - devs[i++] = kempld_devs[KEMPLD_GPIO]; > + devs[i++].name = kempld_devs[KEMPLD_GPIO]; > > if (pld->feature_mask & KEMPLD_FEATURE_MASK_UART) > - devs[i++] = kempld_devs[KEMPLD_UART]; > + devs[i++].name = kempld_devs[KEMPLD_UART]; > > return mfd_add_devices(pld->dev, -1, devs, i, NULL, 0, NULL); > } -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog