Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp322762pxu; Thu, 15 Oct 2020 05:03:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxN5WUkDjLfB+5WFaiCrIRclq6h8N27lHRYdb/cWeg13VnNOyouZq2v2LRbOsx7d+i80Dl4 X-Received: by 2002:adf:d849:: with SMTP id k9mr3796242wrl.332.1602763417555; Thu, 15 Oct 2020 05:03:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602763417; cv=none; d=google.com; s=arc-20160816; b=NT6tBXgpuH0NQnl0+r1RF0aaGhJqObfaQ6aLo00TKksWBz4TWq5GdoD/FlSQgYJCgy GvMyqcEBYB9P4J/7x+l707ebCopfKe+rs6AvLNHo6BAFxDf/vxS55oViCiiDIEyZI4C+ SsyVGKsU0BPtSwi8ehRTTiZMcCReHt2bBvlA98zJW4GTUtOXqVdbbFMFTKMU6pep0ekB iL3bFW5xlslwBKopb5nUlvJbb3lbxmHg6AO5iomIBj03UPZEp5O8ZuiOERRcoLCcxrpM 5IRif4a+fJJs3xwc3AuVTYz/m0eAGlvYkFZGUYBu0TOHX4Ve+qnwLfxyH4/rLcNYtMJa bu9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=zpDfMnTM6HWBIgM3zM8gQI4ecH2KkbG1YbUu0RUSQss=; b=KwyYZZBfz/cM6zTPWjdAReSLt/MbEOuApe6UHxEtF7uFpf18jUmHzolvMcRDm5uS74 DLU1dvtzZf6DW9eE1rWyXLAzxoG9ClVi7Miro5sMUHO64OlHSclir3y8HXBqd1i82lW+ 2kKovTGPHz+9hQVUjnnPtMYgFlwdiucbkOg1/VLpMfLPBoNeE3hIq3oEnwLegBqVge04 BVqf+1lH7BI95t7HNzknl6nlPsSCXPQRsL+Ay8LWsaN2L1du1Yw4cATV958BNvaqm635 o+bUYb58lxSpEG7wxA9HBFuJIJXr4aOkNgEcqC/2Ywv1o+oK7VMAimoPwT2TFEEed9hD cE+Q== ARC-Authentication-Results: i=1; mx.google.com; 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 bx3si128367ejb.709.2020.10.15.05.03.08; Thu, 15 Oct 2020 05:03:37 -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; 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 S1728121AbgJOKaC convert rfc822-to-8bit (ORCPT + 99 others); Thu, 15 Oct 2020 06:30:02 -0400 Received: from mx2.suse.de ([195.135.220.15]:38702 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728292AbgJOKaB (ORCPT ); Thu, 15 Oct 2020 06:30:01 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 6C8ACAD1E; Thu, 15 Oct 2020 10:29:59 +0000 (UTC) Date: Thu, 15 Oct 2020 12:29:57 +0200 From: Thomas Zimmermann To: Tian Tao Cc: , , , , , , , , Subject: Re: [PATCH drm/hisilicon v2 2/2] drm/hisilicon: Use the same style of variable type in hibmc_drm_drv Message-ID: <20201015122957.6590adb3@linux-uq9g> In-Reply-To: <1602752417-20598-3-git-send-email-tiantao6@hisilicon.com> References: <1602752417-20598-1-git-send-email-tiantao6@hisilicon.com> <1602752417-20598-3-git-send-email-tiantao6@hisilicon.com> Organization: SUSE Software Solutions Germany GmbH X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi On Thu, 15 Oct 2020 17:00:17 +0800 Tian Tao wrote: > Consistently Use the same style of variable type in hibmc_drm_drv.c and > hibmc_drm_drv.h. > > Signed-off-by: Tian Tao > Acked-by: Thomas Zimmermann > --- > 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