Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp714406rwd; Tue, 16 May 2023 06:58:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7CNrEztfOILx7I16cSwRZJ2V2mhkRzjZbY9CT8zdYMHoyCCqa8HIHYSb2sxgDBB+9rRdaP X-Received: by 2002:a05:6a00:b55:b0:648:c1be:496 with SMTP id p21-20020a056a000b5500b00648c1be0496mr31491099pfo.22.1684245534971; Tue, 16 May 2023 06:58:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684245534; cv=none; d=google.com; s=arc-20160816; b=EETmHju+lLqb0ApmOMG0KsLF4bT5YBl6+Y7smJE/XGMBGeSlnvi2wi+yQ91Nw2u9b5 mSpB1jA+aeR6H9qJ46PD9rgZROLEjKmudGlAUIXfKsnZaipaAtGZXW99qxWT7RatvCxu oXdQoNycC3BQkzFGF5tsFBTnaaZpt8iLXyXuJT4jLUsZDJA+RT2p0i5vEtg4EqB6cl9M XyzafE5RZAgBywD9vmTMb3qyCRCCqEEGwYXE14EB0P+OfZpQHCYTrkeg3JTXjwPXW0S2 6iQtYZK+AOEQ//waxWpP/xIHBQIyPgBd98NM38INbfGomQfBDs8RYTlCjVJ66utX5vCN uAeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=grBS+q7iyYNtpmlJiltCB+JthNyOMWFlJwW3Epp/Sos=; b=Rfswc9ElXFkKS1py2s0/nVSh48WBDReiLH3k3/VKIXBanp2yxYd94wxuEX2hR+NJeK 87IC4Kkm4KXlj9z8TkWMUVhL6fjgTKY155scXpjyt/OuqsyK8Z7UnYFs7C23Np5kKGYR t02Qwn5N5sBDNDUIlLNZs74ywD19Lny9yRZULxPrRqlKJnrrgqWKf4+UuCoy/g9MYsRQ QJ0fbzAKk89ug9gtDnGZUP/zFZA5b3XWzI+wB8I07pXjh8Z4Rh1YrYiiqlra8jrcJ0jo zHMQGSAJK47V4MOY5rO976hlP9jmLdSjArqdELwK/iFdhTf8MGChKzi7aNzKbm6z4V+B LMpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20221208.gappssmtp.com header.s=20221208 header.b="HBRr7sH/"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p20-20020a639514000000b00502e7406695si17333076pgd.316.2023.05.16.06.58.40; Tue, 16 May 2023 06:58:54 -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=@baylibre-com.20221208.gappssmtp.com header.s=20221208 header.b="HBRr7sH/"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233777AbjEPNtY (ORCPT + 99 others); Tue, 16 May 2023 09:49:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233771AbjEPNtX (ORCPT ); Tue, 16 May 2023 09:49:23 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85C055265 for ; Tue, 16 May 2023 06:49:19 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-96aadfb19d7so922391066b.2 for ; Tue, 16 May 2023 06:49:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1684244958; x=1686836958; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=grBS+q7iyYNtpmlJiltCB+JthNyOMWFlJwW3Epp/Sos=; b=HBRr7sH/6xzY5vpJcD68tLzE31I6o8a+NcxY2HFi4YFpzplHIJ7/PzJkngKJSuccRP 00wk/txTUCEKzf/9Xte3uU8wqxDOk1J4BWxlrVWd0mEUB9Bk8C5q2Gt+mkUAeuqYpvxu /IjHj3a79JIRqSxIkcHZ2MO+RP/aqcA3GCEJYmTXAK8DqjMIwiFf7M1Ne/xzR9AWf7B5 lkYxLJ3wjWcVVbooSh6oiB40iD0UpzXbRSP8awT1N4CcFOMPqDmG01hTv4MedoquYXMR r/D52eamKXZX7uxA1aNn8L2BZfWxMH70Zck3SY9Du40o3urawndmy1WWAV3E/2OiEahq T7jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684244958; x=1686836958; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=grBS+q7iyYNtpmlJiltCB+JthNyOMWFlJwW3Epp/Sos=; b=BQBZT+exCyzxlE6dLG3gAJjZKHewaFxEiW39peb1f5B2c0doF2m/ViqXZr9mVtnAmM mfKJew+wlgn63Zftq8dyUBCaEutc49837czwlcSs/hpnr3vLQLUYhAzlIw046hZAHCou 3yKaO2ZGfNr5BYp0b0qeoKeBUA6R/FdB2kvoYRxOOYDWXLBTEyZg2KVw58A01WCVtmCz UXkIF24Hm9USOM9KvxfLxleohkeTv5zQ1qBwr0DK08fOjvofDWHxz1XSZwZ7c9ELFU4j Mckr2mr/lnwvWK7r5WhGkEsklyXEp7FfuENkD3tn6UUa57G6zo5/t6ivb1sxybZHYtnc TTiQ== X-Gm-Message-State: AC+VfDyNIP6xmNTVcB3G9GTLlFiJfY+5CsMfJlEG5mq6PylgXaOl20i0 GWpDgxl2svI6keTwTjX3vv0/KQ== X-Received: by 2002:a17:907:97c9:b0:96a:1348:7a27 with SMTP id js9-20020a17090797c900b0096a13487a27mr25712036ejc.12.1684244957919; Tue, 16 May 2023 06:49:17 -0700 (PDT) Received: from [10.2.5.18] (abordeaux-655-1-129-86.w90-5.abo.wanadoo.fr. [90.5.10.86]) by smtp.gmail.com with ESMTPSA id lh2-20020a170906f8c200b00965b7bf6aa5sm10942387ejb.52.2023.05.16.06.49.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 May 2023 06:49:17 -0700 (PDT) Message-ID: <9a52e227-4f36-3766-7a1e-b2cc37a3657a@baylibre.com> Date: Tue, 16 May 2023 15:49:16 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v2 1/2] gpio: tps65219: add GPIO support for TPS65219 PMIC Content-Language: en-US To: Bartosz Golaszewski Cc: Linus Walleij , Tony Lindgren , Lee Jones , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org, Jonathan Cormier References: <20230511-tps65219-add-gpio-support-v2-0-60feb64d649a@baylibre.com> <20230511-tps65219-add-gpio-support-v2-1-60feb64d649a@baylibre.com> From: jerome Neanne In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,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 15/05/2023 17:36, Bartosz Golaszewski wrote: >> +static const struct gpio_chip tps65219_gpio_chip = { >> + .label = "tps65219-gpio", >> + .owner = THIS_MODULE, >> + .get_direction = tps65219_gpio_get_direction, >> + .direction_input = tps65219_gpio_direction_input, >> + .direction_output = tps65219_gpio_direction_output, >> + .get = tps65219_gpio_get, >> + .set = tps65219_gpio_set, >> + .base = -1, >> + .ngpio = 3, >> + .can_sleep = true, >> +}; >> + >> +static int tps65219_gpio_probe(struct platform_device *pdev) >> +{ >> + struct tps65219 *tps = dev_get_drvdata(pdev->dev.parent); >> + struct tps65219_gpio *gpio; >> + >> + gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL); >> + if (!gpio) >> + return -ENOMEM; >> + >> + gpio->tps = tps; >> + gpio->gpio_chip = tps65219_gpio_chip; > > Aren't you getting any warnings here about dropping the 'const' from > the global structure? I tried a build with W=1 to check for warning I might have missed but can't catch any here. It's done in the exact same way in many other upstream drivers. Anyway I can remove the const here if you think that could create trouble at some point. Just let me know your recommendation. Regards, Jerome