Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Sharma, Shashank" <shashank.sharma@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
	dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/6] drm: Remove now pointelss blob->data casts
Date: Thu, 1 Mar 2018 14:27:55 +0530	[thread overview]
Message-ID: <d13d50bc-c94e-cfa8-c19f-b5e618e74734@intel.com> (raw)
In-Reply-To: <20180223192506.29992-2-ville.syrjala@linux.intel.com>

Regards

Shashank


On 2/24/2018 12:55 AM, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Now that blob->data is void* again we don't need the casts anymore.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>   drivers/gpu/drm/drm_atomic.c        | 3 +--
>   drivers/gpu/drm/drm_atomic_helper.c | 2 +-
>   drivers/gpu/drm/drm_edid.c          | 3 +--
>   drivers/gpu/drm/drm_fb_helper.c     | 2 +-
>   drivers/gpu/drm/drm_plane.c         | 2 +-
>   5 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
> index 46733d534587..8945357212ba 100644
> --- a/drivers/gpu/drm/drm_atomic.c
> +++ b/drivers/gpu/drm/drm_atomic.c
> @@ -391,8 +391,7 @@ int drm_atomic_set_mode_prop_for_crtc(struct drm_crtc_state *state,
>   	if (blob) {
>   		if (blob->length != sizeof(struct drm_mode_modeinfo) ||
>   		    drm_mode_convert_umode(state->crtc->dev, &state->mode,
> -		                           (const struct drm_mode_modeinfo *)
> -		                            blob->data))
> +					   blob->data))
>   			return -EINVAL;
>   
>   		state->mode_blob = drm_property_blob_get(blob);
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index ae3cbfe9e01c..6211a1b20405 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -3816,7 +3816,7 @@ int drm_atomic_helper_legacy_gamma_set(struct drm_crtc *crtc,
>   	}
>   
>   	/* Prepare GAMMA_LUT with the legacy values. */
> -	blob_data = (struct drm_color_lut *) blob->data;
> +	blob_data = blob->data;
>   	for (i = 0; i < size; i++) {
>   		blob_data[i].red = red[i];
>   		blob_data[i].green = green[i];
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 788fee4b4bf9..134069f36482 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -1575,8 +1575,7 @@ struct edid *drm_do_get_edid(struct drm_connector *connector,
>   	struct edid *override = NULL;
>   
>   	if (connector->override_edid)
> -		override = drm_edid_duplicate((const struct edid *)
> -					      connector->edid_blob_ptr->data);
> +		override = drm_edid_duplicate(connector->edid_blob_ptr->data);
>   
>   	if (!override)
>   		override = drm_load_edid_firmware(connector);
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 035784ddd133..0646b108030b 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -1351,7 +1351,7 @@ static struct drm_property_blob *setcmap_new_gamma_lut(struct drm_crtc *crtc,
>   	if (IS_ERR(gamma_lut))
>   		return gamma_lut;
>   
> -	lut = (struct drm_color_lut *)gamma_lut->data;
> +	lut = gamma_lut->data;
>   	if (cmap->start || cmap->len != size) {
>   		u16 *r = crtc->gamma_store;
>   		u16 *g = r + crtc->gamma_size;
> diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
> index 09de6ecb3968..9851616cf0f3 100644
> --- a/drivers/gpu/drm/drm_plane.c
> +++ b/drivers/gpu/drm/drm_plane.c
> @@ -104,7 +104,7 @@ static int create_in_format_blob(struct drm_device *dev, struct drm_plane *plane
>   	if (IS_ERR(blob))
>   		return -1;
>   
> -	blob_data = (struct drm_format_modifier_blob *)blob->data;
> +	blob_data = blob->data;
Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>
>   	blob_data->version = FORMAT_BLOB_CURRENT;
>   	blob_data->count_formats = plane->format_count;
>   	blob_data->formats_offset = sizeof(struct drm_format_modifier_blob);

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-03-01  8:57 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-23 19:25 [PATCH 1/6] Revert "drm: Use a flexible array member for blob property data" Ville Syrjala
2018-02-23 19:25 ` [PATCH 2/6] drm: Remove now pointelss blob->data casts Ville Syrjala
2018-03-01  8:57   ` Sharma, Shashank [this message]
2018-02-23 19:25 ` [PATCH 3/6] drm: Verify gamma/degamma LUT size Ville Syrjala
2018-03-01 13:13   ` [Intel-gfx] " Sharma, Shashank
2018-03-01 13:24     ` Ville Syrjälä
2018-03-01 14:28       ` Sharma, Shashank
2018-03-01 14:35         ` [Intel-gfx] " Ville Syrjälä
2018-03-06  7:56   ` Daniel Vetter
2018-03-15 15:22   ` [PATCH v2 " Ville Syrjala
2018-02-23 19:25 ` [PATCH 4/6] drm: Introduce drm_color_lut_size() Ville Syrjala
2018-03-06  7:54   ` Daniel Vetter
2018-03-16 14:14     ` [Intel-gfx] " Ville Syrjälä
2018-03-15 15:23   ` [PATCH v2 " Ville Syrjala
2018-02-23 19:25 ` [PATCH 5/6] drm/i915: Remove the blob->data casts Ville Syrjala
2018-03-15 17:13   ` [PATCH v2 " Ville Syrjala
2018-02-23 19:25 ` [PATCH 6/6] drm/i915: Use drm_color_lut_size() Ville Syrjala
2018-02-23 19:55 ` ✓ Fi.CI.BAT: success for series starting with [1/6] Revert "drm: Use a flexible array member for blob property data" Patchwork
2018-02-23 20:38 ` ✓ Fi.CI.IGT: " Patchwork
2018-03-15 15:45 ` ✗ Fi.CI.BAT: failure for series starting with [1/6] Revert "drm: Use a flexible array member for blob property data" (rev3) Patchwork
2018-03-15 18:11 ` ✗ Fi.CI.BAT: failure for series starting with [1/6] Revert "drm: Use a flexible array member for blob property data" (rev4) Patchwork
2018-03-15 20:09 ` ✓ Fi.CI.BAT: success " Patchwork
2018-03-15 23:27 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-03-16 10:33   ` Ville Syrjälä

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=d13d50bc-c94e-cfa8-c19f-b5e618e74734@intel.com \
    --to=shashank.sharma@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.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