mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Tian Tao <tiantao6@hisilicon.com>,
	puck.chen@hisilicon.com, airlied@linux.ie, daniel@ffwll.ch,
	tzimmermann@suse.de, kraxel@redhat.com,
	alexander.deucher@amd.com, tglx@linutronix.de,
	dri-devel@lists.freedesktop.org, xinliang.liu@linaro.org,
	linux-kernel@vger.kernel.org
Cc: linuxarm@huawei.com
Subject: Re: [PATCH] drm/hisilicon: Code refactoring for hibmc_drv_vdac
Date: Fri, 10 Apr 2020 20:43:02 -0700	[thread overview]
Message-ID: <78e966cacffbab8c43be6a02aa3f5af2478917d0.camel@perches.com> (raw)
In-Reply-To: <1586573387-42003-1-git-send-email-tiantao6@hisilicon.com>

On Sat, 2020-04-11 at 10:49 +0800, Tian Tao wrote:
> code refactoring for hibmc_drv_vdac.c, no actual function changes.

Seems sensible.

> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
[]
> @@ -109,13 +83,6 @@ int hibmc_vdac_init(struct hibmc_drm_private *priv)
>  	struct drm_connector *connector;
>  	int ret;
>  
> -	connector = hibmc_connector_init(priv);
> -	if (IS_ERR(connector)) {
> -		DRM_ERROR("failed to create connector: %ld\n",
> -			  PTR_ERR(connector));
> -		return PTR_ERR(connector);
> -	}
> -
>  	encoder = devm_kzalloc(dev->dev, sizeof(*encoder), GFP_KERNEL);
>  	if (!encoder) {
>  		DRM_ERROR("failed to alloc memory when init encoder\n");

The alloc error messages could be removed.

> @@ -131,6 +98,21 @@ int hibmc_vdac_init(struct hibmc_drm_private *priv)
>  	}
>  
>  	drm_encoder_helper_add(encoder, &hibmc_encoder_helper_funcs);
> +
> +	connector = devm_kzalloc(dev->dev, sizeof(*connector), GFP_KERNEL);
> +	if (!connector) {
> +		DRM_ERROR("failed to alloc memory when init connector\n");

and here.



  reply	other threads:[~2020-04-11  3:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-11  2:49 Tian Tao
2020-04-11  3:43 ` Joe Perches [this message]
2020-04-11  6:12   ` tiantao (H)

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=78e966cacffbab8c43be6a02aa3f5af2478917d0.camel@perches.com \
    --to=joe@perches.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kraxel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=puck.chen@hisilicon.com \
    --cc=tglx@linutronix.de \
    --cc=tiantao6@hisilicon.com \
    --cc=tzimmermann@suse.de \
    --cc=xinliang.liu@linaro.org \
    /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

all inboxes | Powered by JetHome®