diff mbox

[1/3] drm/edid: Fix constness warning in drm_load_edid_firmware()

Message ID 1373454996-21706-1-git-send-email-geert@linux-m68k.org (mailing list archive)
State New, archived
Headers show

Commit Message

Geert Uytterhoeven July 10, 2013, 11:16 a.m. UTC
drivers/gpu/drm/drm_edid_load.c: In function ‘drm_load_edid_firmware’:
drivers/gpu/drm/drm_edid_load.c:245: warning: initialization discards qualifiers from pointer target type

drm_get_connector_name() returns a "const char *", hence propagate the
const where needed.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 drivers/gpu/drm/drm_edid_load.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Alex Deucher July 10, 2013, 1:23 p.m. UTC | #1
On Wed, Jul 10, 2013 at 7:16 AM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> drivers/gpu/drm/drm_edid_load.c: In function ‘drm_load_edid_firmware’:
> drivers/gpu/drm/drm_edid_load.c:245: warning: initialization discards qualifiers from pointer target type
>
> drm_get_connector_name() returns a "const char *", hence propagate the
> const where needed.
>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

For the series:

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/drm_edid_load.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_edid_load.c b/drivers/gpu/drm/drm_edid_load.c
> index a4f5ce1..2c2803f 100644
> --- a/drivers/gpu/drm/drm_edid_load.c
> +++ b/drivers/gpu/drm/drm_edid_load.c
> @@ -134,7 +134,7 @@ static u8 generic_edid[GENERIC_EDIDS][128] = {
>  };
>
>  static u8 *edid_load(struct drm_connector *connector, char *name,
> -                       char *connector_name)
> +                       const char *connector_name)
>  {
>         const struct firmware *fw;
>         struct platform_device *pdev;
> @@ -242,7 +242,7 @@ out:
>
>  int drm_load_edid_firmware(struct drm_connector *connector)
>  {
> -       char *connector_name = drm_get_connector_name(connector);
> +       const char *connector_name = drm_get_connector_name(connector);
>         char *edidname = edid_firmware, *last, *colon;
>         int ret;
>         struct edid *edid;
> --
> 1.7.9.5
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_edid_load.c b/drivers/gpu/drm/drm_edid_load.c
index a4f5ce1..2c2803f 100644
--- a/drivers/gpu/drm/drm_edid_load.c
+++ b/drivers/gpu/drm/drm_edid_load.c
@@ -134,7 +134,7 @@  static u8 generic_edid[GENERIC_EDIDS][128] = {
 };
 
 static u8 *edid_load(struct drm_connector *connector, char *name,
-			char *connector_name)
+			const char *connector_name)
 {
 	const struct firmware *fw;
 	struct platform_device *pdev;
@@ -242,7 +242,7 @@  out:
 
 int drm_load_edid_firmware(struct drm_connector *connector)
 {
-	char *connector_name = drm_get_connector_name(connector);
+	const char *connector_name = drm_get_connector_name(connector);
 	char *edidname = edid_firmware, *last, *colon;
 	int ret;
 	struct edid *edid;