All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: John Stultz <john.stultz@linaro.org>
Cc: Guodong Xu <guodong.xu@linaro.org>,
	dri-devel@lists.freedesktop.org,
	lkml <linux-kernel@vger.kernel.org>,
	Jose Abreu <joabreu@synopsys.com>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Mark Brown <broonie@kernel.org>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	Dave Long <dave.long@linaro.org>, Andy Green <andy@warmcat.com>,
	Zhangfei Gao <zhangfei.gao@linaro.org>
Subject: Re: [PATCH 1/4 v2] drm/bridge: adv7511: Move the common data structures to header file
Date: Tue, 30 Aug 2016 11:56:43 +0300	[thread overview]
Message-ID: <7766481.8H4bRDdhqf@avalon> (raw)
In-Reply-To: <1472514096-10915-2-git-send-email-john.stultz@linaro.org>

Hi John,

Thank you for the patch.

On Monday 29 Aug 2016 16:41:33 John Stultz wrote:
> From: Archit Taneja <architt@codeaurora.org>
> 
> This patch moves the adv7511 data structure to header file so that the
> audio driver file could use it.

Actually it doesn't, the data structure is already in the header file.

> Cc: David Airlie <airlied@linux.ie>
> Cc: Archit Taneja <architt@codeaurora.org>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
> Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
> Cc: Andy Green <andy@warmcat.com>
> Cc: Dave Long <dave.long@linaro.org>
> Cc: Guodong Xu <guodong.xu@linaro.org>
> Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Cc: Jose Abreu <joabreu@synopsys.com>
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Signed-off-by: John Stultz <john.stultz@linaro.org>
> ---
>  drivers/gpu/drm/bridge/adv7511/adv7511.h     | 8 ++++++++
>  drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 4 ++--
>  2 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511.h
> b/drivers/gpu/drm/bridge/adv7511/adv7511.h index 161c923..c7002a0 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511.h
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511.h
> @@ -16,6 +16,14 @@
>  #include <drm/drm_crtc_helper.h>
>  #include <drm/drm_mipi_dsi.h>
> 
> +#include <drm/drm_crtc_helper.h>

Isn't it enough to include that header once ? :-)

> +
> +struct regmap;

This isn't needed, the header includes linux/regmap.h.

> +struct adv7511;
> +
> +int adv7511_packet_enable(struct adv7511 *adv7511, unsigned int packet);
> +int adv7511_packet_disable(struct adv7511 *adv7511, unsigned int packet);

You can move those two functions at the end, with all the other function 
declarations, and get rid of the forward declaration of struct adv7511.

>  #define ADV7511_REG_CHIP_REVISION		0x00
>  #define ADV7511_REG_N0				0x01
>  #define ADV7511_REG_N1				0x02
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c index ec8fb2e..f8eb7f8
> 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> @@ -160,7 +160,7 @@ static void adv7511_set_colormap(struct adv7511
> *adv7511, bool enable, ADV7511_CSC_UPDATE_MODE, 0);
>  }
> 
> -static int adv7511_packet_enable(struct adv7511 *adv7511, unsigned int
> packet)
> +int adv7511_packet_enable(struct adv7511 *adv7511, unsigned int packet)
>  {
>  	if (packet & 0xff)
>  		regmap_update_bits(adv7511->regmap, 
ADV7511_REG_PACKET_ENABLE0,
> @@ -175,7 +175,7 @@ static int adv7511_packet_enable(struct adv7511
> *adv7511, unsigned int packet) return 0;
>  }
> 
> -static int adv7511_packet_disable(struct adv7511 *adv7511, unsigned int
> packet)
> +int adv7511_packet_disable(struct adv7511 *adv7511, unsigned int packet)
>  {
>  	if (packet & 0xff)
>  		regmap_update_bits(adv7511->regmap, 
ADV7511_REG_PACKET_ENABLE0,

-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: John Stultz <john.stultz@linaro.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
	"Archit Taneja" <architt@codeaurora.org>,
	"David Airlie" <airlied@linux.ie>,
	"Wolfram Sang" <wsa+renesas@sang-engineering.com>,
	"Srinivas Kandagatla" <srinivas.kandagatla@linaro.org>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Boris Brezillon" <boris.brezillon@free-electrons.com>,
	"Andy Green" <andy@warmcat.com>,
	"Dave Long" <dave.long@linaro.org>,
	"Guodong Xu" <guodong.xu@linaro.org>,
	"Zhangfei Gao" <zhangfei.gao@linaro.org>,
	"Mark Brown" <broonie@kernel.org>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Jose Abreu" <joabreu@synopsys.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/4 v2] drm/bridge: adv7511: Move the common data structures to header file
Date: Tue, 30 Aug 2016 11:56:43 +0300	[thread overview]
Message-ID: <7766481.8H4bRDdhqf@avalon> (raw)
In-Reply-To: <1472514096-10915-2-git-send-email-john.stultz@linaro.org>

Hi John,

Thank you for the patch.

On Monday 29 Aug 2016 16:41:33 John Stultz wrote:
> From: Archit Taneja <architt@codeaurora.org>
> 
> This patch moves the adv7511 data structure to header file so that the
> audio driver file could use it.

Actually it doesn't, the data structure is already in the header file.

> Cc: David Airlie <airlied@linux.ie>
> Cc: Archit Taneja <architt@codeaurora.org>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
> Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
> Cc: Andy Green <andy@warmcat.com>
> Cc: Dave Long <dave.long@linaro.org>
> Cc: Guodong Xu <guodong.xu@linaro.org>
> Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Cc: Jose Abreu <joabreu@synopsys.com>
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Signed-off-by: John Stultz <john.stultz@linaro.org>
> ---
>  drivers/gpu/drm/bridge/adv7511/adv7511.h     | 8 ++++++++
>  drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 4 ++--
>  2 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511.h
> b/drivers/gpu/drm/bridge/adv7511/adv7511.h index 161c923..c7002a0 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511.h
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511.h
> @@ -16,6 +16,14 @@
>  #include <drm/drm_crtc_helper.h>
>  #include <drm/drm_mipi_dsi.h>
> 
> +#include <drm/drm_crtc_helper.h>

Isn't it enough to include that header once ? :-)

> +
> +struct regmap;

This isn't needed, the header includes linux/regmap.h.

> +struct adv7511;
> +
> +int adv7511_packet_enable(struct adv7511 *adv7511, unsigned int packet);
> +int adv7511_packet_disable(struct adv7511 *adv7511, unsigned int packet);

You can move those two functions at the end, with all the other function 
declarations, and get rid of the forward declaration of struct adv7511.

>  #define ADV7511_REG_CHIP_REVISION		0x00
>  #define ADV7511_REG_N0				0x01
>  #define ADV7511_REG_N1				0x02
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c index ec8fb2e..f8eb7f8
> 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> @@ -160,7 +160,7 @@ static void adv7511_set_colormap(struct adv7511
> *adv7511, bool enable, ADV7511_CSC_UPDATE_MODE, 0);
>  }
> 
> -static int adv7511_packet_enable(struct adv7511 *adv7511, unsigned int
> packet)
> +int adv7511_packet_enable(struct adv7511 *adv7511, unsigned int packet)
>  {
>  	if (packet & 0xff)
>  		regmap_update_bits(adv7511->regmap, 
ADV7511_REG_PACKET_ENABLE0,
> @@ -175,7 +175,7 @@ static int adv7511_packet_enable(struct adv7511
> *adv7511, unsigned int packet) return 0;
>  }
> 
> -static int adv7511_packet_disable(struct adv7511 *adv7511, unsigned int
> packet)
> +int adv7511_packet_disable(struct adv7511 *adv7511, unsigned int packet)
>  {
>  	if (packet & 0xff)
>  		regmap_update_bits(adv7511->regmap, 
ADV7511_REG_PACKET_ENABLE0,

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2016-08-30  8:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-29 23:41 [PATCH 0/4 v2] Audio support for adv7511 hdmi bridge John Stultz
2016-08-29 23:41 ` John Stultz
2016-08-29 23:41 ` [PATCH 1/4 v2] drm/bridge: adv7511: Move the common data structures to header file John Stultz
2016-08-29 23:41   ` John Stultz
2016-08-30  8:56   ` Laurent Pinchart [this message]
2016-08-30  8:56     ` Laurent Pinchart
2016-09-06 22:49     ` John Stultz
2016-09-06 22:49       ` John Stultz
2016-08-29 23:41 ` [PATCH 2/4 v2] drm/bridge: adv7511: Add Audio support John Stultz
2016-08-30  9:21   ` Laurent Pinchart
2016-08-30  9:21     ` Laurent Pinchart
2016-08-29 23:41 ` [PATCH 3/4 v2] drm/bridge: adv7511: Enable the audio data and clock pads on adv7533 John Stultz
2016-08-29 23:41   ` John Stultz
2016-08-29 23:41 ` [PATCH 4/4 v2] drm/bridge: adv7511: Initialize audio packet " John Stultz
2016-09-02  9:49   ` Archit Taneja
2016-09-02  9:49     ` Archit Taneja
2016-09-06 22:58     ` John Stultz
2016-08-30  9:23 ` [PATCH 0/4 v2] Audio support for adv7511 hdmi bridge Laurent Pinchart
2016-08-30  9:23   ` Laurent Pinchart
2016-09-06 22:17   ` John Stultz
2016-10-18 14:42     ` Laurent Pinchart
2016-10-18 14:42       ` Laurent Pinchart
2016-10-19  0:26       ` Kuninori Morimoto
2016-11-01 21:41         ` John Stultz
2016-11-01 21:41           ` John Stultz
2016-11-02  1:43           ` Kuninori Morimoto

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=7766481.8H4bRDdhqf@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=andy@warmcat.com \
    --cc=broonie@kernel.org \
    --cc=dave.long@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=guodong.xu@linaro.org \
    --cc=joabreu@synopsys.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=zhangfei.gao@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.