Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3674443pxj; Mon, 24 May 2021 12:04:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfKMLVepE9E+fjiivQJ9UJX72zKgpD5RrLopuynsvusMRpyvcfvz0c5vK3b66jkPXHoMG8 X-Received: by 2002:aa7:c9cb:: with SMTP id i11mr27554541edt.331.1621883048056; Mon, 24 May 2021 12:04:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621883048; cv=none; d=google.com; s=arc-20160816; b=rBkcxiB9yTSC4H8rkpAiDun7RxL4PXAEpUL+TlNVuJwm33NjOaH0LZ5qIxhdp5ze5R SVsMvtME8dFRm0OK7wli2HgqX50m+StpKjl5CWvzXuwKLUeZMJBNTx1nNSiMHvEr2uL2 ICm3Obdysj3L/M5J50H/XI4J6RmGKKYk4goh7JqRMIiwCLVGnbkmd0jujzjqyyEKu0BG Tmd0AcaNJ84hBR3jJ7X3jqFbjKcTYJUZ37x4+8EWgwAUG4hX6VWSXTcb7ybfXoKmgq3u FA7h0Bk/DmxPpJzqeoHwMB6TRl19ax0RzIj08B36AVKs+r4QVgmvhRfOaZFx5hIx+rzl HidQ== 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=d2qRtcBPi7fkJde21gR/Y6WPC5DkPL6SAS4CSueAMYY=; b=VnqbjbPHSCCh1htjAVZcHw8/A0ewAR7AkP9z+DRWxUHsXC/9waEbgoooUa8QPCw81h odJxr1AZvDpopNqKTMdJQ+L4m4JFtJyl0/adFwS/nkrvW3SnRddwI3Ns+GnF+bA+5kEg QCmKvKejIvWgHMO73HbMiSYkhxT7VX44O4016nH7+N9MTJdcTFZWr14m0YDDw44zVuVU EaKdDyWLb2EFbG8A8AtlIqRvqDewqZgEypeTnpnqQI0gMWH4GhnfwcOWtssxapx7LNoR XSnQsehMEUy04Svd9QUDycHq+2gJ5pfIdfe1q2QtGGHrkaVJ5dBu6ZjI83eoECAjPhl+ KPHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=wczBVJTB; 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 nb17si13820693ejc.226.2021.05.24.12.03.34; Mon, 24 May 2021 12:04:08 -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=wczBVJTB; 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 S233354AbhEXTB3 (ORCPT + 99 others); Mon, 24 May 2021 15:01:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233326AbhEXTB2 (ORCPT ); Mon, 24 May 2021 15:01:28 -0400 Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E2DFC061756 for ; Mon, 24 May 2021 11:59:58 -0700 (PDT) Received: by mail-yb1-xb32.google.com with SMTP id w206so7809374ybg.7 for ; Mon, 24 May 2021 11:59:58 -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=d2qRtcBPi7fkJde21gR/Y6WPC5DkPL6SAS4CSueAMYY=; b=wczBVJTBvwgIw9qC1aMEMc2GowUXpLLM0YE7d21fILY814nCuVWmY/QLmDXJcDdH4Z lTFuec9T86+TA8DibRUdhHCCF+U0gZ3fTHMw8/tPiUpu7BvZG3UjXZG1J0zhR7cIc4B9 9DyS6tuCWCWNuBOUF5bPAowwrTZua9oseYaTAZk7q7HMpy9NpbcHkHyy5CZ+Ogh/0rzX dc/ohpVLPmF8lS0LiCxdd7o6gQSFxsfR5Y0o3GnNluSGSD/Fk3yY4y5kMqlUC6gFEuCv NruMJFLltUHLI3IIQOMwARMxlp/JUThqBqO42Mgggz5QAr74T5OFMFEIij0kGn9k4OHE TOFQ== 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=d2qRtcBPi7fkJde21gR/Y6WPC5DkPL6SAS4CSueAMYY=; b=L71ouDpEJfeq8gIY1CRcxORTmDSYRHi8Xp4d4t2W9X6xGW5EuTs7/vECKgNTBG/wwZ HDmyTfJiXao2adikElKu1RG5ID73Pgxb9JiUqrZF1SkQzIyYFnPbQu25i22+iyoiQZTY FjG00cxQBrTo5OnlixljhslGCRCfi+yIrLhR6wduHHO1y4E9mNUxEAHbwgP18Zx1zeKY kEjR8AbILVA9KPNwnl0yhw40wy1tFHo3rYxm0aFqhQSqALUSpuEMB/ZTdo9UtoECeNhH sQ7jRPU/9EtsL4YvLgw+xO3Z+fTZhR+AAhA4wvKB4HIKCNc4pLQZQ6Qjb7O9IJWP5ZwR BdMw== X-Gm-Message-State: AOAM532uFNb6N9Xx5Zqn1O3WasVsLQlFa8ufz8bmZ+8b7etC7re8N/+k tyYwOW8PNVk2GDPK4n91vr+pyH17nnl+MZfM6RmzbA== X-Received: by 2002:a25:c092:: with SMTP id c140mr2240873ybf.25.1621882797973; Mon, 24 May 2021 11:59:57 -0700 (PDT) MIME-Version: 1.0 References: <20210515105831.9439-1-aardelean@deviqon.com> In-Reply-To: <20210515105831.9439-1-aardelean@deviqon.com> From: Bartosz Golaszewski Date: Mon, 24 May 2021 20:59:47 +0200 Message-ID: Subject: Re: [PATCH] gpio: gpio-tc3589x: emove platform_set_drvdata() + cleanup probe To: Alexandru Ardelean Cc: linux-gpio , LKML , Linus Walleij 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 12:58 PM 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-tc3589x.c | 11 +---------- > 1 file changed, 1 insertion(+), 10 deletions(-) > > diff --git a/drivers/gpio/gpio-tc3589x.c b/drivers/gpio/gpio-tc3589x.c > index 55b8dbd13d11..8d158492488f 100644 > --- a/drivers/gpio/gpio-tc3589x.c > +++ b/drivers/gpio/gpio-tc3589x.c > @@ -357,16 +357,7 @@ static int tc3589x_gpio_probe(struct platform_device *pdev) > return ret; > } > > - ret = devm_gpiochip_add_data(&pdev->dev, &tc3589x_gpio->chip, > - tc3589x_gpio); > - if (ret) { > - dev_err(&pdev->dev, "unable to add gpiochip: %d\n", ret); > - return ret; > - } > - > - platform_set_drvdata(pdev, tc3589x_gpio); > - > - return 0; > + return devm_gpiochip_add_data(&pdev->dev, &tc3589x_gpio->chip, tc3589x_gpio); > } > > static struct platform_driver tc3589x_gpio_driver = { > -- > 2.31.1 > Applied, thanks! Bart