Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5688215pxv; Wed, 21 Jul 2021 11:21:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuDUWV9vHZtralezBsgceObjEE9Hsw/qsjcWb+bCWKo5291k6/CdJt7P4J12V1AA+yOv9c X-Received: by 2002:a05:6e02:550:: with SMTP id i16mr24669426ils.207.1626891683487; Wed, 21 Jul 2021 11:21:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626891683; cv=none; d=google.com; s=arc-20160816; b=CI+m2Eun7MV0ifdx3+j6Ifq6dVKe6vda+lEg9QP8k0fwR5FtmQw3YDrKxBCRHwUBZX rk1H520urF8zXTVceMLAgNw1ZUNbBuPOwMHF1Np8BcADHqcdfcsrJozhVKIkoTIztsYs nnuNqMpiVBrAD9l614koWUB+AzjQu6icdhGeQ/Xf5wcg9ndCBi4KAb23X13cFJSnbGcr SqtA1TKaBNwaJkTY8JsoSnPmfa8s2YxXQgl3ypJwT0+tpDlI8iUWbOKzbR7oCBoXYKvH U9nXZcxtBhzh4Re/S7xZ99IRVaWfECivX8jpgh/FpPdhEhRyHUZOT3iisMzACHUqzR/9 rQOg== 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=IKJrexLnW7vtMVtnT0P0NrpurExWWFqAFNKELJtWKt4=; b=RZUIczJYvEmhBny5KwRcWqswAKHjGP2OlwJRCtAe7zw9rQrl65kzGsSMYbsuiqb3VX N+/g/LQvebzHasaYu6HxO8TTOXKpy1kt5j8CNWvG/BVm8FCvGOofvk0yFwafQ+A3dxWr /upKq/QQJd5sIQTkcxeG6VxzX28LQNZ2CrKle4PHUjDAqZHTPO85DSvsB/m+iMNn19rh a/BZNp5aW5AabyTkovIzZqrO1yuhP3Kbc+C37qDw/ni+BD9jF2x/Wti2eXWoNj7jhurw 9+a0FSve4NoG1WsIzZddrotJbK7sNClf4ZJE1steNB9RyW4+OK+d13L0opmjW/I3dcn3 TmtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=VcxuuEwb; 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 f12si9710062ilc.19.2021.07.21.11.20.56; Wed, 21 Jul 2021 11:21:23 -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=VcxuuEwb; 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 S236964AbhGUMf7 (ORCPT + 99 others); Wed, 21 Jul 2021 08:35:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231680AbhGUMf6 (ORCPT ); Wed, 21 Jul 2021 08:35:58 -0400 Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81B09C061762 for ; Wed, 21 Jul 2021 06:16:34 -0700 (PDT) Received: by mail-yb1-xb2f.google.com with SMTP id r135so197618ybc.0 for ; Wed, 21 Jul 2021 06:16: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=IKJrexLnW7vtMVtnT0P0NrpurExWWFqAFNKELJtWKt4=; b=VcxuuEwbwdsJw2M45kM15U0QwW6FGzNjae+GhnBCC9hT12pjl/dhMYEd43QBL1CrOY qzmLSG+XIBN+9e44Y3c5tZkd34CihV3dfLXz49df8VSZCqTKhtka6OtDkvEhy/LUktJG H2GSuTC0/OAmoGVC8oqP6LkodfhTepbx7azO4umMAmY+/tw2KJMl2fr/QVdvP6REFrjV Km0Q4Wg45n2FHfi0wIdWb3F9Ip9qTDauG8LdTwhUnFAYISPLqjBnjCw/WP9cuhLgzSL2 7lkGP/HUpT8JHkUOvtGpIBuobZJQrdm4lq+omVmiYiw06s77gC9vLzxQ6RMswkH2vuEE E8zg== 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=IKJrexLnW7vtMVtnT0P0NrpurExWWFqAFNKELJtWKt4=; b=T3FIAL8jBbYxiyQJ64T0qJOOlv6+62i6e4etobU2Kb8sm9TjSAvOrk4b/nMvz52P8u iUFYDYzwBzfmR5+IBZpt8+ryOn+fytS6wvH7PEfD1N4IiC+l5upK1vuAfHc2YVpC3Jmk 0iYLDT5RbgwpGNYZYP/hGeuczQ7/B/BG+VJ7+KD72cHKOJ9oEWelzcJeMow4LgOm22in 88jhAGVQs5yHT0V1b/SPF9CPGEtkD3QvjDMhBk12kxf5RbpEVuUDh6TWBKE0kOQqrRCW yUb83HnNYdgc3NosRKP3SvRnXsusTNKYPbQxcMdpC4mNDkRmxAo66zIQUHAR3KabFx3O P/PA== X-Gm-Message-State: AOAM530rrXCqf2Tbo1EfLFl49KLLHzUjvC4WMb/keSxOVvSctInRd+tg yKl4zmJmYKI2h1Xwbr8xPYdlauJz2ONb++bkQs3sgg== X-Received: by 2002:a25:cc04:: with SMTP id l4mr44007353ybf.312.1626873393677; Wed, 21 Jul 2021 06:16:33 -0700 (PDT) MIME-Version: 1.0 References: <20210707135144.191567-1-aardelean@deviqon.com> In-Reply-To: <20210707135144.191567-1-aardelean@deviqon.com> From: Bartosz Golaszewski Date: Wed, 21 Jul 2021 15:16:23 +0200 Message-ID: Subject: Re: [PATCH] gpio: viperboard: remove platform_set_drvdata() call in 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 Wed, Jul 7, 2021 at 3:51 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. > > This change removes it. > > Signed-off-by: Alexandru Ardelean > --- > drivers/gpio/gpio-viperboard.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/drivers/gpio/gpio-viperboard.c b/drivers/gpio/gpio-viperboard.c > index c301c1d56dd2..98ddd6590362 100644 > --- a/drivers/gpio/gpio-viperboard.c > +++ b/drivers/gpio/gpio-viperboard.c > @@ -422,12 +422,8 @@ static int vprbrd_gpio_probe(struct platform_device *pdev) > vb_gpio->gpiob.direction_input = vprbrd_gpiob_direction_input; > vb_gpio->gpiob.direction_output = vprbrd_gpiob_direction_output; > ret = devm_gpiochip_add_data(&pdev->dev, &vb_gpio->gpiob, vb_gpio); > - if (ret < 0) { > + if (ret < 0) > dev_err(vb_gpio->gpiob.parent, "could not add gpio b"); > - return ret; > - } > - > - platform_set_drvdata(pdev, vb_gpio); > > return ret; > } > -- > 2.31.1 > The log is not really needed, we'll get an error message from gpiolib core. Can you remove it while you're at it and just return the result of devm_gpiochip_add_data()? Bart