public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Tian Tao <tiantao6@hisilicon.com>
Cc: <airlied@linux.ie>, <daniel@ffwll.ch>, <kraxel@redhat.com>,
	<alexander.deucher@amd.com>, <tglx@linutronix.de>,
	<dri-devel@lists.freedesktop.org>, <xinliang.liu@linaro.org>,
	<linux-kernel@vger.kernel.org>, <linuxarm@huawei.com>
Subject: Re: [PATCH drm/hisilicon v2 2/2] drm/hisilicon: Use the same style of variable type in hibmc_drm_drv
Date: Thu, 15 Oct 2020 12:29:57 +0200	[thread overview]
Message-ID: <20201015122957.6590adb3@linux-uq9g> (raw)
In-Reply-To: <1602752417-20598-3-git-send-email-tiantao6@hisilicon.com>

Hi

On Thu, 15 Oct 2020 17:00:17 +0800 Tian Tao <tiantao6@hisilicon.com> wrote:

> Consistently Use the same style of variable type in hibmc_drm_drv.c and
> hibmc_drm_drv.h.
> 
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
> Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>  drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 13 ++++++-------
>  drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h |  8 ++++----
>  2 files changed, 10 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c index 5632bce..0c1b40d
> 100644 --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> @@ -121,12 +121,11 @@ static void hibmc_kms_fini(struct hibmc_drm_private
> *priv) /*
>   * It can operate in one of three modes: 0, 1 or Sleep.
>   */
> -void hibmc_set_power_mode(struct hibmc_drm_private *priv,
> -			  unsigned int power_mode)
> +void hibmc_set_power_mode(struct hibmc_drm_private *priv, u32 power_mode)
>  {
> -	unsigned int control_value = 0;
> +	u32 control_value = 0;
>  	void __iomem   *mmio = priv->mmio;
> -	unsigned int input = 1;
> +	u32 input = 1;
>  
>  	if (power_mode > HIBMC_PW_MODE_CTL_MODE_SLEEP)
>  		return;
> @@ -144,8 +143,8 @@ void hibmc_set_power_mode(struct hibmc_drm_private
> *priv, 
>  void hibmc_set_current_gate(struct hibmc_drm_private *priv, unsigned int
> gate) {
> -	unsigned int gate_reg;
> -	unsigned int mode;
> +	u32 gate_reg;
> +	u32 mode;
>  	void __iomem   *mmio = priv->mmio;
>  
>  	/* Get current power mode. */
> @@ -170,7 +169,7 @@ void hibmc_set_current_gate(struct hibmc_drm_private
> *priv, unsigned int gate) 
>  static void hibmc_hw_config(struct hibmc_drm_private *priv)
>  {
> -	unsigned int reg;
> +	u32 reg;
>  
>  	/* On hardware reset, power mode 0 is default. */
>  	hibmc_set_power_mode(priv, HIBMC_PW_MODE_CTL_MODE_MODE0);
> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
> b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h index 6a63502..5c4030d
> 100644 --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
> @@ -33,8 +33,8 @@ struct hibmc_drm_private {
>  	/* hw */
>  	void __iomem   *mmio;
>  	void __iomem   *fb_map;
> -	unsigned long  fb_base;
> -	unsigned long  fb_size;
> +	u64  fb_base;
> +	u64  fb_size;

No comment on why u64 is better than resource_size_t ?

Best regards
Thomas

>  
>  	/* drm */
>  	struct drm_device  *dev;
> @@ -56,9 +56,9 @@ static inline struct hibmc_drm_private
> *to_hibmc_drm_private(struct drm_device * }
>  
>  void hibmc_set_power_mode(struct hibmc_drm_private *priv,
> -			  unsigned int power_mode);
> +			  u32 power_mode);
>  void hibmc_set_current_gate(struct hibmc_drm_private *priv,
> -			    unsigned int gate);
> +			    u32 gate);
>  
>  int hibmc_de_init(struct hibmc_drm_private *priv);
>  int hibmc_vdac_init(struct hibmc_drm_private *priv);



-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

      reply	other threads:[~2020-10-15 10:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15  9:00 [PATCH drm/hisilicon v2 0/2] Use the same style of variable type Tian Tao
2020-10-15  9:00 ` [PATCH drm/hisilicon v2 1/2] drm/hisilicon: Use the same style of variable type in hibmc_drm_de Tian Tao
2020-10-15  9:00 ` [PATCH drm/hisilicon v2 2/2] drm/hisilicon: Use the same style of variable type in hibmc_drm_drv Tian Tao
2020-10-15 10:29   ` Thomas Zimmermann [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=20201015122957.6590adb3@linux-uq9g \
    --to=tzimmermann@suse.de \
    --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=tglx@linutronix.de \
    --cc=tiantao6@hisilicon.com \
    --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