devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Paul <seanpaul@chromium.org>
To: Chris Zhong <zyw@rock-chips.com>
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
	pawel.moll@arm.com, yzq@rock-chips.com,
	linux-kernel@vger.kernel.org, dianders@chromium.org,
	dri-devel@lists.freedesktop.org, tfiga@chromium.org,
	linux-rockchip@lists.infradead.org, robh+dt@kernel.org,
	galak@codeaurora.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4 3/6] drm/rockchip/dsi: dw-mipi: correct the coding style
Date: Wed, 1 Feb 2017 13:47:59 -0500	[thread overview]
Message-ID: <20170201184759.GA14264@art_vandelay> (raw)
In-Reply-To: <1485225486-669-4-git-send-email-zyw@rock-chips.com>

On Tue, Jan 24, 2017 at 10:38:03AM +0800, Chris Zhong wrote:
> correct the coding style, according the checkpatch scripts
> 

Reviewed-by: Sean Paul <seanpaul@chromium.org>

> Signed-off-by: Chris Zhong <zyw@rock-chips.com>
> ---
> 
> Changes in v4: None
> Changes in v3: None
> 
>  drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 33 ++++++++++++++++-----------------
>  1 file changed, 16 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
> index b7b67be..a93ce97 100644
> --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
> +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
> @@ -157,7 +157,6 @@
>  #define LPRX_TO_CNT(p)			((p) & 0xffff)
>  
>  #define DSI_BTA_TO_CNT			0x8c
> -
>  #define DSI_LPCLK_CTRL			0x94
>  #define AUTO_CLKLANE_CTRL		BIT(1)
>  #define PHY_TXREQUESTCLKHS		BIT(0)
> @@ -223,11 +222,11 @@
>  
>  #define HSFREQRANGE_SEL(val)	(((val) & 0x3f) << 1)
>  
> -#define INPUT_DIVIDER(val)	((val - 1) & 0x7f)
> +#define INPUT_DIVIDER(val)	(((val) - 1) & 0x7f)
>  #define LOW_PROGRAM_EN		0
>  #define HIGH_PROGRAM_EN		BIT(7)
> -#define LOOP_DIV_LOW_SEL(val)	((val - 1) & 0x1f)
> -#define LOOP_DIV_HIGH_SEL(val)	(((val - 1) >> 5) & 0x1f)
> +#define LOOP_DIV_LOW_SEL(val)	(((val) - 1) & 0x1f)
> +#define LOOP_DIV_HIGH_SEL(val)	((((val) - 1) >> 5) & 0x1f)
>  #define PLL_LOOP_DIV_EN		BIT(5)
>  #define PLL_INPUT_DIV_EN	BIT(4)
>  
> @@ -370,6 +369,7 @@ static inline struct dw_mipi_dsi *encoder_to_dsi(struct drm_encoder *encoder)
>  {
>  	return container_of(encoder, struct dw_mipi_dsi, encoder);
>  }
> +
>  static inline void dsi_write(struct dw_mipi_dsi *dsi, u32 reg, u32 val)
>  {
>  	writel(val, dsi->base + reg);
> @@ -381,7 +381,7 @@ static inline u32 dsi_read(struct dw_mipi_dsi *dsi, u32 reg)
>  }
>  
>  static void dw_mipi_dsi_phy_write(struct dw_mipi_dsi *dsi, u8 test_code,
> -				 u8 test_data)
> +				  u8 test_data)
>  {
>  	/*
>  	 * With the falling edge on TESTCLK, the TESTDIN[7:0] signal content
> @@ -496,7 +496,6 @@ static int dw_mipi_dsi_phy_init(struct dw_mipi_dsi *dsi)
>  	dsi_write(dsi, DSI_PHY_RSTZ, PHY_ENFORCEPLL | PHY_ENABLECLK |
>  				     PHY_UNRSTZ | PHY_UNSHUTDOWNZ);
>  
> -
>  	ret = readl_poll_timeout(dsi->base + DSI_PHY_STATUS,
>  				 val, val & LOCK, 1000, PHY_STATUS_TIMEOUT_US);
>  	if (ret < 0) {
> @@ -572,7 +571,7 @@ static int dw_mipi_dsi_host_attach(struct mipi_dsi_host *host,
>  
>  	if (device->lanes > dsi->pdata->max_data_lanes) {
>  		dev_err(dsi->dev, "the number of data lanes(%u) is too many\n",
> -				device->lanes);
> +			device->lanes);
>  		return -EINVAL;
>  	}
>  
> @@ -960,8 +959,8 @@ static void dw_mipi_dsi_clear_err(struct dw_mipi_dsi *dsi)
>  }
>  
>  static void dw_mipi_dsi_encoder_mode_set(struct drm_encoder *encoder,
> -					struct drm_display_mode *mode,
> -					struct drm_display_mode *adjusted_mode)
> +					 struct drm_display_mode *mode,
> +					 struct drm_display_mode *adjusted_mode)
>  {
>  	struct dw_mipi_dsi *dsi = encoder_to_dsi(encoder);
>  
> @@ -1063,7 +1062,7 @@ dw_mipi_dsi_encoder_atomic_check(struct drm_encoder *encoder,
>  	return 0;
>  }
>  
> -static struct drm_encoder_helper_funcs
> +static const struct drm_encoder_helper_funcs
>  dw_mipi_dsi_encoder_helper_funcs = {
>  	.enable = dw_mipi_dsi_encoder_enable,
>  	.mode_set = dw_mipi_dsi_encoder_mode_set,
> @@ -1071,7 +1070,7 @@ dw_mipi_dsi_encoder_helper_funcs = {
>  	.atomic_check = dw_mipi_dsi_encoder_atomic_check,
>  };
>  
> -static struct drm_encoder_funcs dw_mipi_dsi_encoder_funcs = {
> +static const struct drm_encoder_funcs dw_mipi_dsi_encoder_funcs = {
>  	.destroy = drm_encoder_cleanup,
>  };
>  
> @@ -1107,7 +1106,7 @@ static void dw_mipi_dsi_drm_connector_destroy(struct drm_connector *connector)
>  	drm_connector_cleanup(connector);
>  }
>  
> -static struct drm_connector_funcs dw_mipi_dsi_atomic_connector_funcs = {
> +static const struct drm_connector_funcs dw_mipi_dsi_atomic_connector_funcs = {
>  	.dpms = drm_atomic_helper_connector_dpms,
>  	.fill_modes = drm_helper_probe_single_connector_modes,
>  	.destroy = dw_mipi_dsi_drm_connector_destroy,
> @@ -1117,7 +1116,7 @@ static struct drm_connector_funcs dw_mipi_dsi_atomic_connector_funcs = {
>  };
>  
>  static int dw_mipi_dsi_register(struct drm_device *drm,
> -				      struct dw_mipi_dsi *dsi)
> +				struct dw_mipi_dsi *dsi)
>  {
>  	struct drm_encoder *encoder = &dsi->encoder;
>  	struct drm_connector *connector = &dsi->connector;
> @@ -1138,14 +1137,14 @@ static int dw_mipi_dsi_register(struct drm_device *drm,
>  	drm_encoder_helper_add(&dsi->encoder,
>  			       &dw_mipi_dsi_encoder_helper_funcs);
>  	ret = drm_encoder_init(drm, &dsi->encoder, &dw_mipi_dsi_encoder_funcs,
> -			 DRM_MODE_ENCODER_DSI, NULL);
> +			       DRM_MODE_ENCODER_DSI, NULL);
>  	if (ret) {
>  		dev_err(dev, "Failed to initialize encoder with drm\n");
>  		return ret;
>  	}
>  
>  	drm_connector_helper_add(connector,
> -			&dw_mipi_dsi_connector_helper_funcs);
> +				 &dw_mipi_dsi_connector_helper_funcs);
>  
>  	drm_connector_init(drm, &dsi->connector,
>  			   &dw_mipi_dsi_atomic_connector_funcs,
> @@ -1220,7 +1219,7 @@ static const struct of_device_id dw_mipi_dsi_dt_ids[] = {
>  MODULE_DEVICE_TABLE(of, dw_mipi_dsi_dt_ids);
>  
>  static int dw_mipi_dsi_bind(struct device *dev, struct device *master,
> -			     void *data)
> +			    void *data)
>  {
>  	const struct of_device_id *of_id =
>  			of_match_device(dw_mipi_dsi_dt_ids, dev);
> @@ -1328,7 +1327,7 @@ static int dw_mipi_dsi_bind(struct device *dev, struct device *master,
>  }
>  
>  static void dw_mipi_dsi_unbind(struct device *dev, struct device *master,
> -	void *data)
> +			       void *data)
>  {
>  	struct dw_mipi_dsi *dsi = dev_get_drvdata(dev);
>  
> -- 
> 2.6.3
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-02-01 18:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-24  2:38 [PATCH v4 0/6] Rockchip dw-mipi-dsi driver Chris Zhong
2017-01-24  2:38 ` [PATCH v4 1/6] dt-bindings: add rk3399 support for dw-mipi-rockchip Chris Zhong
2017-01-24  2:38 ` [PATCH v4 2/6] drm/rockchip/dsi: dw-mipi: support RK3399 mipi dsi Chris Zhong
2017-02-01 18:41   ` Sean Paul
2017-01-24  2:38 ` [PATCH v4 3/6] drm/rockchip/dsi: dw-mipi: correct the coding style Chris Zhong
2017-02-01 18:47   ` Sean Paul [this message]
2017-01-24  2:38 ` [PATCH v4 4/6] drm/rockchip/dsi: remove mode_valid function Chris Zhong
2017-01-24  2:38 ` [PATCH v4 5/6] dt-bindings: add power domain node for dw-mipi-rockchip Chris Zhong
2017-01-24  2:38 ` [PATCH v4 6/6] drm/rockchip/dsi: add dw-mipi power domain support Chris Zhong

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=20170201184759.GA14264@art_vandelay \
    --to=seanpaul@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=galak@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=tfiga@chromium.org \
    --cc=yzq@rock-chips.com \
    --cc=zyw@rock-chips.com \
    /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).