Linux USB
 help / color / mirror / Atom feed
From: "Maíra Canal" <mcanal@igalia.com>
To: Stefan Wahren <wahrenst@gmx.net>,
	Russell King <linux@armlinux.org.uk>,
	Doug Anderson <dianders@chromium.org>,
	Florian Fainelli <florian.fainelli@broadcom.com>,
	Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	Maxime Ripard <mripard@kernel.org>,
	Jassi Brar <jassisinghbrar@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Minas Harutyunyan <hminas@synopsys.com>
Cc: Dave Stevenson <dave.stevenson@raspberrypi.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	Lukas Wunner <lukas@wunner.de>,
	Artur Petrosyan <Arthur.Petrosyan@synopsys.com>,
	Peter Robinson <pbrobinson@gmail.com>,
	dri-devel@lists.freedesktop.org,
	bcm-kernel-feedback-list@broadcom.com, linux-pm@vger.kernel.org,
	linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	kernel-list@raspberrypi.com
Subject: Re: [PATCH V3 5/9] drm/vc4: v3d: simplify clock retrieval
Date: Thu, 22 Aug 2024 10:12:31 -0300	[thread overview]
Message-ID: <85fbee77-4457-449a-b85a-342a67f9f5e4@igalia.com> (raw)
In-Reply-To: <20240821214052.6800-6-wahrenst@gmx.net>

Hi Stefan,

On 8/21/24 18:40, Stefan Wahren wrote:
> Common pattern of handling deferred probe can be simplified with
> dev_err_probe() and devm_clk_get_optional(). This results in much
> less code.
> 
> Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
> Reviewed-by: Maíra Canal <mcanal@igalia.com>

Applied to drm/misc/kernel/drm-misc-next!

Best Regards,
- Maíra

> ---
>   drivers/gpu/drm/vc4/vc4_v3d.c | 18 +++---------------
>   1 file changed, 3 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c
> index 6e566584afbf..bf5c4e36c94e 100644
> --- a/drivers/gpu/drm/vc4/vc4_v3d.c
> +++ b/drivers/gpu/drm/vc4/vc4_v3d.c
> @@ -441,21 +441,9 @@ static int vc4_v3d_bind(struct device *dev, struct device *master, void *data)
>   	vc4->v3d = v3d;
>   	v3d->vc4 = vc4;
> 
> -	v3d->clk = devm_clk_get(dev, NULL);
> -	if (IS_ERR(v3d->clk)) {
> -		int ret = PTR_ERR(v3d->clk);
> -
> -		if (ret == -ENOENT) {
> -			/* bcm2835 didn't have a clock reference in the DT. */
> -			ret = 0;
> -			v3d->clk = NULL;
> -		} else {
> -			if (ret != -EPROBE_DEFER)
> -				dev_err(dev, "Failed to get V3D clock: %d\n",
> -					ret);
> -			return ret;
> -		}
> -	}
> +	v3d->clk = devm_clk_get_optional(dev, NULL);
> +	if (IS_ERR(v3d->clk))
> +		return dev_err_probe(dev, PTR_ERR(v3d->clk), "Failed to get V3D clock\n");
> 
>   	ret = platform_get_irq(pdev, 0);
>   	if (ret < 0)
> --
> 2.34.1
> 

  reply	other threads:[~2024-08-22 13:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-21 21:40 [PATCH V3 0/9] ARM: bcm2835: Implement initial S2Idle for Raspberry Pi Stefan Wahren
2024-08-21 21:40 ` [PATCH V3 1/9] mailbox: bcm2835: Fix timeout during suspend mode Stefan Wahren
2024-08-31  9:19   ` Stefan Wahren
2024-09-01 20:26     ` Jassi Brar
2024-09-01 20:57       ` Stefan Wahren
2024-08-21 21:40 ` [PATCH V3 2/9] drm/vc4: hdmi: Handle error case of pm_runtime_resume_and_get Stefan Wahren
2024-08-22 13:09   ` Maíra Canal
2024-08-21 21:40 ` [PATCH V3 3/9] drm/vc4: Get the rid of DRM_ERROR() Stefan Wahren
2024-08-22 13:10   ` Maíra Canal
2024-08-21 21:40 ` [PATCH V3 4/9] drm/vc4: hdmi: add PM suspend/resume support Stefan Wahren
2024-08-22 12:10   ` kernel test robot
2024-08-21 21:40 ` [PATCH V3 5/9] drm/vc4: v3d: simplify clock retrieval Stefan Wahren
2024-08-22 13:12   ` Maíra Canal [this message]
2024-08-21 21:40 ` [PATCH V3 6/9] drm/vc4: v3d: add PM suspend/resume support Stefan Wahren
2024-08-21 21:40 ` [PATCH V3 7/9] usb: dwc2: Refactor backup/restore of registers Stefan Wahren
2024-08-22  9:16   ` kernel test robot
2024-08-22 10:30   ` Stefan Wahren
2024-08-21 21:40 ` [PATCH V3 RFC 8/9] usb: dwc2: Implement recovery after PM domain off Stefan Wahren
2024-08-29 19:33   ` Doug Anderson
2024-08-21 22:36 ` [PATCH V3 9/9] ARM: bcm2835_defconfig: Enable SUSPEND Stefan Wahren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85fbee77-4457-449a-b85a-342a67f9f5e4@igalia.com \
    --to=mcanal@igalia.com \
    --cc=Arthur.Petrosyan@synopsys.com \
    --cc=airlied@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=daniel@ffwll.ch \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=florian.fainelli@broadcom.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hminas@synopsys.com \
    --cc=jassisinghbrar@gmail.com \
    --cc=kernel-list@raspberrypi.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lukas@wunner.de \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=pbrobinson@gmail.com \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.com \
    --cc=tzimmermann@suse.de \
    --cc=wahrenst@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox