From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 843A5C433EF for ; Tue, 15 Feb 2022 17:29:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242561AbiBORaH (ORCPT ); Tue, 15 Feb 2022 12:30:07 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:44028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241647AbiBORaG (ORCPT ); Tue, 15 Feb 2022 12:30:06 -0500 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3600DDB84D for ; Tue, 15 Feb 2022 09:29:55 -0800 (PST) Received: by mail-wr1-x431.google.com with SMTP id i14so33287217wrc.10 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=i2vm1J0Z3BZr8EY3BNAUK2G/JIgWTG4LUB+b5uZDlJnt1N6J6E68VNFUlcLHkNFFt+ 5lWlRoOnS+b9OGMdgTX2pEIJqHEKAEBqPL6KfjQxoUPWnRCnIKhDOsRvHmzvtrIfvCnO IBOMXpnjaklnrb1XDQaYCx5kE5AaidtztZU8cjWmXH+Yp7bBdZ91sAhsICLT7iX+9KCm wg6uzU8MZSz4bvWxUqk4qQyw+bIJo+q/D2aEZpQ6NGFtSyY8smdoI7tFEZWiiziRBB+0 SqohFU49h96LuMknwdhRIfX58NYdFocEk9RnM7yZ4+tFw2VEseoO6UasR6hqF360lBzc asKw== X-Gm-Message-State: AOAM532KK0TuTVK494ehTq8gQJBMAEiUQQqfmezQTuH7QcesyubZogwQ YNSxdqGUA4KNR4LqaxS8ZCXLoA== X-Google-Smtp-Source: ABdhPJwOSH7G6HmOK9tUgixHAXjPC1RBzQXDR1s7T2yUWuUsnh1GJ/d+msUEl3DzoTdLHmv2ZT68gw== 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: Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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