All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 1/2] video: fbmem: Use 'const char' in fb_get_options()
Date: Wed, 19 Jun 2013 07:33:41 +0000	[thread overview]
Message-ID: <20130619073341.GF5004@intel.com> (raw)
In-Reply-To: <1371561988-30989-1-git-send-email-fabio.estevam@freescale.com>

On Tue, Jun 18, 2013 at 10:26:27AM -0300, Fabio Estevam wrote:
> Commit d20d31748 (drm: Constify the pretty-print functions) causes the following
> build warning:
> 
> drivers/gpu/drm/drm_fb_helper.c:127:3: warning: passing argument 1 of 'fb_get_options' discards 'const' qualifier from pointer target type [enabled by default]
> 
> Let's change the first argument of fb_get_options from 'char *' to 'const char *' 
> so that we can get rid of this warning.

I already sent the same patch alongside the drm constify patches. It
just needs to trickle back into the drm tree via the fbdev folks.

> 
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Dave Airlie <airlied@redhat.com>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  drivers/video/fbmem.c | 2 +-
>  include/linux/fb.h    | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
> index 098bfc6..d8d5779 100644
> --- a/drivers/video/fbmem.c
> +++ b/drivers/video/fbmem.c
> @@ -1881,7 +1881,7 @@ static int ofonly __read_mostly;
>   *
>   * NOTE: Needed to maintain backwards compatibility
>   */
> -int fb_get_options(char *name, char **option)
> +int fb_get_options(const char *name, char **option)
>  {
>  	char *opt, *options = NULL;
>  	int retval = 0;
> diff --git a/include/linux/fb.h b/include/linux/fb.h
> index d49c60f..ffac70a 100644
> --- a/include/linux/fb.h
> +++ b/include/linux/fb.h
> @@ -624,7 +624,7 @@ extern void fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch, u3
>  extern void fb_set_suspend(struct fb_info *info, int state);
>  extern int fb_get_color_depth(struct fb_var_screeninfo *var,
>  			      struct fb_fix_screeninfo *fix);
> -extern int fb_get_options(char *name, char **option);
> +extern int fb_get_options(const char *name, char **option);
>  extern int fb_new_modelist(struct fb_info *info);
>  
>  extern struct fb_info *registered_fb[FB_MAX];
> -- 
> 1.8.1.2
> 

-- 
Ville Syrjälä
Intel OTC

      parent reply	other threads:[~2013-06-19  7:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-18 13:26 [PATCH 1/2] video: fbmem: Use 'const char' in fb_get_options() Fabio Estevam
2013-06-18 13:26 ` [PATCH 2/2] i915: i915_gem: Print a size_t with %z Fabio Estevam
2013-06-18 13:26   ` Fabio Estevam
2013-06-18 14:53   ` Geert Uytterhoeven
2013-06-18 14:53     ` Geert Uytterhoeven
2013-06-19  7:33 ` Ville Syrjälä [this message]

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=20130619073341.GF5004@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=linux-fbdev@vger.kernel.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.