Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp167174pxb; Tue, 15 Feb 2022 10:32:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqiFKQYdVZt/JjXCUeAtlNXnM93VHNQWhLWMnk3lT9NSxR5qkQdVT3jm0D2Anl1OsQKoK+ X-Received: by 2002:aa7:95a5:: with SMTP id a5mr257651pfk.12.1644949940266; Tue, 15 Feb 2022 10:32:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644949940; cv=none; d=google.com; s=arc-20160816; b=fPzW91NpDJ5MZnlXIX3jUUsehcrObjtKax0aUdeeKPuJliTHgbOG4ZmpEMOcdM0NRT t0zgCe2wEEirTgFll9OtLsflqgAbJh9PIiqfXyPA7Rssz7Fr0+AOuGNI5GuOIcx15ln1 NKJ36Ext8G7pQ6ICrU1JjgrDc8BuhHBesxpXE/yRpq0+MwqG5jz3vt40nAjRWrDn4vBg NF8d32hgpG30N06dy0HmTOdL6pzpOzvN159exe7vGxC3xqPYyRnHWI5ZZ0Jjr53VKXC6 AKGkNL41sP5mTobX13ZCsaCs8awcCOYhcrcce4/r27ugCFJHhn6KwgClbGMdO6EtkxAv dggw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ICO1ml37Huyez+etV+dT6D2+k0fK+dVgQX5aKLEtpWE=; b=h83fOgMwS2kDTmY5UtJOuP1noMxibpgb2m5uH6SkZroZgJ1JZphdjYNL6XNCCY53uq F4rNvMqMuIaHhuGUQDu41mkehUehc7r+qZKsJ6xE8ciJsY68p5dms5//ZxXJ0ohb400i LPFcoFjMqzufzfQ0oC879ryULnFQvctoAFRWNY5axKQ4CnmGTeFOEECyIIPwoQspqYdv iucBUDuvTEowYuTGTmff1+e92R18d7D9eHHS/sMw++UNP+/RJSDI2PChmV/lo5UR3XB9 CUQVKyqPyLv++AysWfNAZJMnPEzeDwERjfKbPSSJUblySVqdhJTJA4gJG5ny7s5+VYQ+ iXXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=im6LJNHw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e128si3258649pgc.594.2022.02.15.10.32.04; Tue, 15 Feb 2022 10:32:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=im6LJNHw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S241647AbiBORaH (ORCPT + 99 others); Tue, 15 Feb 2022 12:30:07 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:44030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242540AbiBORaG (ORCPT ); Tue, 15 Feb 2022 12:30:06 -0500 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36712DB853 for ; Tue, 15 Feb 2022 09:29:55 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id v12so33386911wrv.2 for ; Tue, 15 Feb 2022 09:29:55 -0800 (PST) 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=ICO1ml37Huyez+etV+dT6D2+k0fK+dVgQX5aKLEtpWE=; b=im6LJNHwlFAY9cu/QQdYtskumJ2IlnWWzqdt5Z9BVaTZVNb6jEK7vusRjOzoETzlLy D8CRih2welvIHDPxp+CBf1zRAWFB46gczAOOyzgQoBImzsy1sUBHpK17HTxUymgTgY+4 k3OV3VwgNG34VgF+pPMAWCJ+0t3V1u9KfifiwaoSxom9ARUIvx/a2Mq54gahxgbpXCkM xHHr1UsBoR0xMqLrL39HDlu+dvBcZQuK+Q0jSfIhSP2cacCDhNapx7cvb+CrUi3VYD7F 5w1bEqTDFVkfjQnDy6CGZEuG8TFGtZSsdrSsfrYE/OPXw2taYRSitUXrncwpTOU/rkyj yUHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=ICO1ml37Huyez+etV+dT6D2+k0fK+dVgQX5aKLEtpWE=; b=occL3oQ8Vv2osyaSBaLycSz/8IyIkuEAoCDuxsp49/QAG/JeVsQxF3OLoC1OaMYTRZ jZm7CXcrfvXrVEr1f8PFD6YlZVtnjOaH30NIYaXrTxQ3H5fBIlAP6diL1lF5Y4RE1r8D KjkNM1k4QUBA77tcXu2q907lc0JydI0uGBd4XzSv9l+Kscx9y4uMIcfsGnlKKsXBNPsB tTwrnW7KhCpaayQ9tqu/CCVtvh2bbBX/hZRg3wRz7pmnt8MAf8Dm7vgcDyuBOHMGI9kM L9GehOl5MS8itMgr/M9/SALZZFzGGBw8jWGXViQ/TbZkGVREqnM/gQle1WAzAiUilRb7 2/vA== X-Gm-Message-State: AOAM530M3fgvpqCNIUX6m09o+soNLLxwBCV+KwFtDcUm8bVmtrLtXJLm /NxQE2YQpXJYrsFESmeStAtrag== X-Received: by 2002:adf:e5cb:: with SMTP id a11mr17283wrn.255.1644946193787; Tue, 15 Feb 2022 09:29:53 -0800 (PST) Received: from google.com (cpc155339-bagu17-2-0-cust87.1-3.cable.virginm.net. [86.27.177.88]) by smtp.gmail.com with ESMTPSA id f8sm13204075wmq.19.2022.02.15.09.29.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 09:29:53 -0800 (PST) Date: Tue, 15 Feb 2022 17:29:51 +0000 From: Lee Jones To: Andy Shevchenko Cc: Wolfram Sang , Jean Delvare , Heiner Kallweit , Hans de Goede , Linus Walleij , Tan Jui Nee , Kate Hsuan , Jonathan Yong , linux-kernel@vger.kernel.org, linux-edac@vger.kernel.org, linux-i2c@vger.kernel.org, linux-gpio@vger.kernel.org, platform-driver-x86@vger.kernel.org, Borislav Petkov , Mauro Carvalho Chehab , Tony Luck , James Morse , Robert Richter , Jean Delvare , Peter Tyser , Mika Westerberg , Andy Shevchenko , Mark Gross , Henning Schild Subject: Re: [PATCH v4 5/8] mfd: lpc_ich: Add support for pinctrl in non-ACPI system Message-ID: References: <20220131151346.45792-1-andriy.shevchenko@linux.intel.com> <20220131151346.45792-6-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 15 Feb 2022, Andy Shevchenko wrote: > On Tue, Feb 15, 2022 at 04:54:00PM +0000, Lee Jones wrote: > > On Mon, 31 Jan 2022, Andy Shevchenko wrote: > > Thank you for the review, my answers below. > > ... > > > > +static struct resource apl_gpio_resources[APL_GPIO_NR_DEVICES][2] = { > > > + [APL_GPIO_NORTH] = { > > > + DEFINE_RES_MEM(APL_GPIO_NORTH_OFFSET, 0x1000), > > > > Are these 0x1000's being over-written in lpc_ich_init_pinctrl()? > > > > If so, why pre-initialise? > > You mean to pre-initialize the offsets, but leave the length to be added > in the function? It can be done, but it feels inconsistent, since we would > have offsets and lengths in different places for the same thingy. That said, > I prefer current way for the sake of consistency. Don't you over-write this entry entirely? for (i = 0; i < ARRAY_SIZE(apl_gpio_devices); i++) { struct resource *mem = &apl_gpio_resources[i][0]; /* Fill MEM resource */ mem->start += base.start; mem->end += base.start; mem->flags = base.flags; } Oh wait, you're just adding the base value to the offsets. In which case that comment is also confusing! -- Lee Jones [李琼斯] Principal Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog