Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2811395pxj; Sun, 23 May 2021 11:37:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtFm3xtgGYmOFlmX0A+YqbLrphKNm/muKOP+v3Y1Xh+bbvhCLQYKhAAczx1uu+jLYmyxNw X-Received: by 2002:a05:6e02:4ac:: with SMTP id e12mr11278980ils.21.1621795053750; Sun, 23 May 2021 11:37:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621795053; cv=none; d=google.com; s=arc-20160816; b=E6FMr+Hlw1Hjj/yLWHNxgjR03rGUKuieFnR00E8ewjLzyWilBPnZEjysHvhLg6dcPg 49S7L3yeiyxD4GdZpNXoyRVwSv98y6/B9qKMDdeZt0j200DsZjsBTeDtrZxIxLnhBbc0 OycX6evZ6frWehiUeGYyPrzQxzWOUysvvEn7YTatLwAhjduizZm6Hmkr6wxvs4MZKya/ cKKgCADJm19Kb2CDJZczCeP6os7WjK/dCrvaAcnPt2BAGzN/Uw7rgmzFgjHJKTB2R/BD qIxu4iqWKmQvqyTVyaWL+iWh3mQtX3/VaUxAG4L9OzLjFwqpgBImY+CHbZKdZOLgm+Iz qk+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=03XYmR5CIbTeND39uiNb/fz/ALEdrry0SrBAAirnu9o=; b=CE5tcJAkFvAV2PQhkhx00XKBEi1J3lGrmrQIrIJHSz0vBfsnY1QFp5Mc+MbJK/5zxn D+UnrCCWTK4Vdwl/QDwVn2E5MX+9u1tDquEDXvaHoff7Sn3JbxFVjtfXifn1izStxhNz kVKDF5S6/3J4eIv64W2qcfJoptZuLBOJPN2Lb19DzvXf5DDvDen7/3uWOawlNiM8s5Ul rgj7nqFLutWZdx/WBHiFNsD/VFQLK9+1xkXVB0Ievy6f28YsRrYL5PaSmUcAsgQYlkhq ulwgVTpvyE9nJE5S4iOwqFg414sDSltN36YSZxXnTGwLviTye9ePRdENogRi/XBk7rSC JN/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=mNTE0RFj; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m12si11852804jav.104.2021.05.23.11.37.19; Sun, 23 May 2021 11:37:33 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=mNTE0RFj; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231883AbhEWSiB (ORCPT + 99 others); Sun, 23 May 2021 14:38:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231829AbhEWSiA (ORCPT ); Sun, 23 May 2021 14:38:00 -0400 Received: from mail-yb1-xb2b.google.com (mail-yb1-xb2b.google.com [IPv6:2607:f8b0:4864:20::b2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11E90C061574 for ; Sun, 23 May 2021 11:36:34 -0700 (PDT) Received: by mail-yb1-xb2b.google.com with SMTP id r7so12837456ybs.10 for ; Sun, 23 May 2021 11:36:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=03XYmR5CIbTeND39uiNb/fz/ALEdrry0SrBAAirnu9o=; b=mNTE0RFjqqmZCZFp4yf2PcAQKkogc085XMLdio/Z5rdaFwsG9/f70jSnAsEmdYp9UX Mbmfh2w2Vklydh4m3frt4mDuu6kdw9A2dD5jY1MUvvsSc6aoX3lOWJ6149ZkVPSyYtsd f+5kryFaHDTjPA4Mmm1coLG0pYe8FueRms2nwA0J+IYzeSb9v6cXjkOMHrkpGJMTrzGh BYTX+uC13PXiOE8OXr2Ydt4S2UloPKkhZFysHwqC0qUAhabcOf1ABHDChbdVpT41qHOH YVNpB/m8ZtUnartSI8XftXT311jqh/+GeUzzKgVrsxpWklqEEhXIjqoaiMAf+R4yq9D1 OMhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=03XYmR5CIbTeND39uiNb/fz/ALEdrry0SrBAAirnu9o=; b=pby2bUC4pjgpIbGdtdXjdmiWgfKPH37pZ8BnCg/1FlOUuM4/QTsd5y5NVVLW3dSBSn b5vUoKP8Zn+Gy2yyY6xw36o/Zat8WQBlLHCX3f328YcxFqmBy8Ysu4A4DtHb81vfHhYa VSLskC5sa1EenGgHa39nwV3H4w5L8dwk8w98J27eKVmIqONUxAXoWe9Z0FPcamZUNBQy D3/W8QS5Qd+NChHTTgQgepDXSmR/Qe6VYhNGPFikVl6A20FD4Q4hPD882OZHOXzYIkaL lpuE/4XgZ05W+JSdH2CZpaa9XhMsAEWT0JJNiOgLny64t6fI9eaiivh0rOsBMuD93H0w 8pUg== X-Gm-Message-State: AOAM530OmOuumUMfGUfCIWaSuU35rVx8BBxavsj71/jS+EQo3S9XTAuw WjLtFh5TA2HzN17SBCdCLm8w3ZjmPPwEtDm6kK46NA== X-Received: by 2002:a25:8804:: with SMTP id c4mr30091433ybl.469.1621794993362; Sun, 23 May 2021 11:36:33 -0700 (PDT) MIME-Version: 1.0 References: <20210515075905.12150-1-aardelean@deviqon.com> <20210515075905.12150-2-aardelean@deviqon.com> In-Reply-To: <20210515075905.12150-2-aardelean@deviqon.com> From: Bartosz Golaszewski Date: Sun, 23 May 2021 20:36:22 +0200 Message-ID: Subject: Re: [PATCH 2/2] gpio: gpio-tegra186: remove platform_set_drvdata() + cleanup probe To: Alexandru Ardelean Cc: linux-gpio , LKML , Linus Walleij , Jonathan Hunter , Thierry Reding Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 15, 2021 at 9:59 AM Alexandru Ardelean wrote: > > The platform_set_drvdata() call is only useful if we need to retrieve back > the private information. > Since the driver doesn't do that, it's not useful to have it. > > If this is removed, we can also just do a direct return on > devm_gpiochip_add_data(). We don't need to print that this call failed as > there are other ways to log/see this during probe. > > Signed-off-by: Alexandru Ardelean > --- > drivers/gpio/gpio-tegra186.c | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) > > diff --git a/drivers/gpio/gpio-tegra186.c b/drivers/gpio/gpio-tegra186.c > index 10d3597e9ac2..f54ae9d4254a 100644 > --- a/drivers/gpio/gpio-tegra186.c > +++ b/drivers/gpio/gpio-tegra186.c > @@ -741,13 +741,7 @@ static int tegra186_gpio_probe(struct platform_device *pdev) > offset += port->pins; > } > > - platform_set_drvdata(pdev, gpio); > - > - err = devm_gpiochip_add_data(&pdev->dev, &gpio->gpio, gpio); > - if (err < 0) > - return err; > - > - return 0; > + return devm_gpiochip_add_data(&pdev->dev, &gpio->gpio, gpio); > } > > #define TEGRA186_MAIN_GPIO_PORT(_name, _bank, _port, _pins) \ > -- > 2.31.1 > Normally I'd wait for Thierry's Ack but this cleanup is pretty straightforward so I applied both patches. Bart