Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2805355rwd; Mon, 22 May 2023 04:47:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6475Ru5gMt/nd/onOYeBFj0jRmWwimfzZ0yLsnzNaAcJEpa+mtVFaqvfds8unOA3zX+G8T X-Received: by 2002:a05:6a20:3d04:b0:101:ab2:eaa8 with SMTP id y4-20020a056a203d0400b001010ab2eaa8mr12164054pzi.18.1684756037531; Mon, 22 May 2023 04:47:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684756037; cv=none; d=google.com; s=arc-20160816; b=yxwiRlMyPxgm4+Zci0kKiqCnvoiRiOwulH37ocYRqm75aGGeyAMQWdaysVcq5dCo+R BxFRDrH0GSuZ62CN6sWjeSC0YTyWRKcDdaSylT8pT1XRJbzL8jJ2D7+V5Ce8OHEGkL7M DsnaJlYyXkpNZ0Jkpx3iP138YQrDsdjrBEZlkdRg0Evr+sYavkGD29w4AbFPc9UzPslK nF4pVwh8S1NXDKLdZZ/J/q7TEHxg6frGmLt4oRQzficxB9hXsfY9QdSUYI3SRmFrBcO2 r1Trjz4lCWWkb6WVk+yftfFfVVbqFm9I/wZUfrslHJVXxNVexhugTXQzljW4U83cAHLA 9B8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=i83fQte0kPi44BubtTWNEheRMfnxb2j5LDfuJQhOHp0=; b=j9wjOTzf2cDyb7OEl4nkGZ2k8OyndRV/IkNrPzzmX4EI1ule5+ufr8bCWulIS1KXQn h1LoTfANO3Ozw1y8KXoFKTnd0nnsOPqdoEPZg0BXoqeNZfbAmAeB7xktrbyN+9/ajR3X umow/FqGeHalVicEn0zjjVL81Eu2CGjOddQOJOg5pliACluD7ogYW3gQWPGndt8h5m0y oYNpXeA1oo4x/3Rj4aGvF1Zo3dKE4VvU4YX+++GK6dG5e4G8LrfS42EBU8vLtythe+1X qY7S0t8N0z//CSTIRSlKslbJJR6APmqbXcl3mkucjQKFs+D7ZxOdgrNObq4Dqk9YjuQS dwEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=qFdG49JI; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x70-20020a638649000000b0051410c79705si255837pgd.867.2023.05.22.04.47.03; Mon, 22 May 2023 04:47:17 -0700 (PDT) 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=@gmail.com header.s=20221208 header.b=qFdG49JI; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233369AbjEVLYE (ORCPT + 99 others); Mon, 22 May 2023 07:24:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233350AbjEVLXu (ORCPT ); Mon, 22 May 2023 07:23:50 -0400 Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0783F30DF; Mon, 22 May 2023 04:20:18 -0700 (PDT) Received: by mail-qv1-xf2e.google.com with SMTP id 6a1803df08f44-62384e391e3so22973476d6.3; Mon, 22 May 2023 04:20:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684754367; x=1687346367; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=i83fQte0kPi44BubtTWNEheRMfnxb2j5LDfuJQhOHp0=; b=qFdG49JI+6ZhvL/SM76DpZsKLsV0sl7pKc094y4HAIa5y9qJ8WIgvNjXo0hmYv3rfp 6Z/VrjHO0f3hoRQgOucTA2PJozbwA822zdQLN0L6IFRwEGiNB3PlzzNnFX0Kub5LuKtp GQUCUHHlVeC7SwzZ4c754QxfHPioOq+B4q2l1MK22iNOgQ5994l0NDnG67H9ZLcbKjSr zPqCyQh+bbXkL/kpI9s9yGuHt0inSXtgpASxYHSgPlDB3FtRRg3cU0l/gs/yEwK74mvc 8IQsGLN1mNO/nQs884wWbCKTqmEFx0+1MnDnAQlMVee+NF4/8eShKR3FEtuxUkTGw/l9 t+Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684754367; x=1687346367; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=i83fQte0kPi44BubtTWNEheRMfnxb2j5LDfuJQhOHp0=; b=fXLuFPQI5Q53WITxtl/lxEJBTbdqWdjNn29gat70etwpmm0LNKw3TfpywdfhggMQV3 aphXfsU/QwguGyXE/jaQ4c2q5Nol4SnsYbnwrGvcdgDBM1iYvxU1WHQmocJhEWv48nev Z5JXulussqxe56XDrxNM/bnDNqZZoXoy6MFBCU16EcCbHIqY+pqobu2N3yvGHS8UBqkn Hhu7ZzZB9/8jY3YkasKGl9vT4DeOPNMsgMcEmeISIbXQS75Mtodw2CDuGa5oxAgdBjgN QcKzCjmmh0v5cv4c+bDNNmVkQb/kCGDHX/jrZ8hTh/p9+5XS8Tua05A026/FmZYD9tZa Gf9w== X-Gm-Message-State: AC+VfDxB1Ls3DwAdo+RTTK1AK9a4EygQhg3ACfAjISpMCmdXZFTgbcwR iC+6QFFsouZbkbelDUK1DpShNEtVFlWDMeTVGYI= X-Received: by 2002:a05:6214:c62:b0:5ef:7e33:c6c9 with SMTP id t2-20020a0562140c6200b005ef7e33c6c9mr18954386qvj.38.1684754366919; Mon, 22 May 2023 04:19:26 -0700 (PDT) MIME-Version: 1.0 References: <20230511-tps65219-add-gpio-support-v2-0-60feb64d649a@baylibre.com> <20230511-tps65219-add-gpio-support-v2-1-60feb64d649a@baylibre.com> <9fa1a6e8-368a-3e22-aa84-8cad09f72a32@baylibre.com> In-Reply-To: <9fa1a6e8-368a-3e22-aa84-8cad09f72a32@baylibre.com> From: Andy Shevchenko Date: Mon, 22 May 2023 14:18:50 +0300 Message-ID: Subject: Re: [PATCH v2 1/2] gpio: tps65219: add GPIO support for TPS65219 PMIC To: jerome Neanne Cc: Bartosz Golaszewski , Linus Walleij , Tony Lindgren , Lee Jones , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org, Jonathan Cormier Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Mon, May 22, 2023 at 10:47=E2=80=AFAM jerome Neanne wrote: > On 20/05/2023 11:44, andy.shevchenko@gmail.com wrote: > > Mon, May 15, 2023 at 05:36:46PM +0200, Bartosz Golaszewski kirjoitti: > >> On Thu, May 11, 2023 at 4:09=E2=80=AFPM Jerome Neanne wrote: ... > >>> + gpio->gpio_chip =3D tps65219_gpio_chip; > >> > >> Aren't you getting any warnings here about dropping the 'const' from > >> the global structure? > > > > But this is a copy of the contents and not the simple pointer. I commented on Bart's question. > In many other places where this is done, the struct is declared like: > > static const struct gpio_chip template_chip =3D { > > After internal review, I changed this to: > > static const struct gpio_chip tps65219_gpio_chip =3D { > > This is because I didn't want to have this "template" that sounds to me > like "dummy". Maybe I misunderstood and this "template" was used on > purpose because this const struct is just copied once to initialize > tps65219_gpio->gpio_chip during probe. > > Introducing tps65219_gpio_chip name is maybe confusing with > tps65219_gpio struct. > > I think the const should not be a problem here but the naming I used > might be misleading. If you have a suggestion of what is a good practice > to make this piece of code clearer. I'll follow your suggestion (use > template? more_explicit name like ???). It's up to Bart. --=20 With Best Regards, Andy Shevchenko