dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javierm@redhat.com>
To: Liao Yuanhong <liaoyuanhong@vivo.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	"open list:DRM DRIVERS" <dri-devel@lists.freedesktop.org>,
	open list <linux-kernel@vger.kernel.org>
Cc: Liao Yuanhong <liaoyuanhong@vivo.com>
Subject: Re: [PATCH] drm/ssd130x: Remove the use of dev_err_probe()
Date: Mon, 01 Sep 2025 16:08:28 +0200	[thread overview]
Message-ID: <87plcafeoz.fsf@minerva.mail-host-address-is-not-set> (raw)
In-Reply-To: <20250820131416.500048-1-liaoyuanhong@vivo.com>

Liao Yuanhong <liaoyuanhong@vivo.com> writes:

Hello Liao,

Thanks for your patch.

> Logging messages that show some type of "out of memory" error are generally
> unnecessary as there is a generic message and a stack dump done by the
> memory subsystem. These messages generally increase kernel size without
> much added value[1].
>
> The dev_err_probe() doesn't do anything when error is '-ENOMEM'. Therefore,
> remove the useless call to dev_err_probe(), and just return the value
> instead.
>
> [1]: https://lore.kernel.org/lkml/1402419340.30479.18.camel@joe-AO725/
>
> Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
> ---
>  drivers/gpu/drm/solomon/ssd130x-spi.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/solomon/ssd130x-spi.c b/drivers/gpu/drm/solomon/ssd130x-spi.c
> index 7c935870f7d2..b52f5fd592a1 100644
> --- a/drivers/gpu/drm/solomon/ssd130x-spi.c
> +++ b/drivers/gpu/drm/solomon/ssd130x-spi.c
> @@ -74,8 +74,7 @@ static int ssd130x_spi_probe(struct spi_device *spi)
>  
>  	t = devm_kzalloc(dev, sizeof(*t), GFP_KERNEL);
>  	if (!t)
> -		return dev_err_probe(dev, -ENOMEM,
> -				     "Failed to allocate SPI transport data\n");
> +		return -ENOMEM;
>  
>  	t->spi = spi;
>  	t->dc = dc;
> -- 
> 2.34.1
>

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

Pushed to drm-misc (drm-misc-next). Thanks!

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


      reply	other threads:[~2025-09-01 14:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-20 13:14 [PATCH] drm/ssd130x: Remove the use of dev_err_probe() Liao Yuanhong
2025-09-01 14:08 ` Javier Martinez Canillas [this message]

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=87plcafeoz.fsf@minerva.mail-host-address-is-not-set \
    --to=javierm@redhat.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=liaoyuanhong@vivo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /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;
as well as URLs for NNTP newsgroup(s).