* [PATCH linux-next] fb: make fp_get_options name argument const
@ 2013-06-18 14:23 Vincent Stehlé
2013-06-26 13:21 ` Tomi Valkeinen
0 siblings, 1 reply; 5+ messages in thread
From: Vincent Stehlé @ 2013-06-18 14:23 UTC (permalink / raw)
To: linux-next, linux-fbdev
Cc: Vincent Stehlé, Jean-Christophe Plagniol-Villard,
Tomi Valkeinen, Dave Airlie, trivial
drm_get_connector_name now returns a const value, which causes the following
compilation warning:
drivers/gpu/drm/drm_fb_helper.c: In function ‘drm_fb_helper_parse_command_line’:
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]
In file included from drivers/gpu/drm/drm_fb_helper.c:35:0:
include/linux/fb.h:627:12: note: expected ‘char *’ but argument is of type ‘const char *’
As fb_get_options uses its name argument as read only, make it const. This
fixes the aforementioned compilation warning.
Signed-off-by: Vincent Stehlé <vincent.stehle@freescale.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: trivial@kernel.org
---
Hi,
I remarked this warning while building linux-next with imx_v6_v7_defconfig.
Is changing fb_get_options prototype "permitted", please?
Best regards,
V.
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.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH linux-next] fb: make fp_get_options name argument const
2013-06-18 14:23 [PATCH linux-next] fb: make fp_get_options name argument const Vincent Stehlé
@ 2013-06-26 13:21 ` Tomi Valkeinen
2013-06-27 5:14 ` David Airlie
0 siblings, 1 reply; 5+ messages in thread
From: Tomi Valkeinen @ 2013-06-26 13:21 UTC (permalink / raw)
To: Vincent Stehlé
Cc: linux-next, linux-fbdev, Jean-Christophe Plagniol-Villard,
Dave Airlie, trivial
[-- Attachment #1: Type: text/plain, Size: 1254 bytes --]
On 18/06/13 17:23, Vincent Stehlé wrote:
> drm_get_connector_name now returns a const value, which causes the following
> compilation warning:
>
> drivers/gpu/drm/drm_fb_helper.c: In function ‘drm_fb_helper_parse_command_line’:
> 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]
> In file included from drivers/gpu/drm/drm_fb_helper.c:35:0:
> include/linux/fb.h:627:12: note: expected ‘char *’ but argument is of type ‘const char *’
>
> As fb_get_options uses its name argument as read only, make it const. This
> fixes the aforementioned compilation warning.
>
> Signed-off-by: Vincent Stehlé <vincent.stehle@freescale.com>
> Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Cc: Dave Airlie <airlied@redhat.com>
> Cc: trivial@kernel.org
> ---
>
>
> Hi,
>
> I remarked this warning while building linux-next with imx_v6_v7_defconfig.
> Is changing fb_get_options prototype "permitted", please?
I don't see how changing the parameter to const could break anything, so
I've applied this to fbdev-3.11 branch.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH linux-next] fb: make fp_get_options name argument const
2013-06-26 13:21 ` Tomi Valkeinen
@ 2013-06-27 5:14 ` David Airlie
2013-06-27 6:31 ` Tomi Valkeinen
0 siblings, 1 reply; 5+ messages in thread
From: David Airlie @ 2013-06-27 5:14 UTC (permalink / raw)
To: Tomi Valkeinen
Cc: Vincent Stehlé, linux-next, linux-fbdev,
Jean-Christophe Plagniol-Villard, trivial
> >
> >
> > Hi,
> >
> > I remarked this warning while building linux-next with imx_v6_v7_defconfig.
> > Is changing fb_get_options prototype "permitted", please?
>
> I don't see how changing the parameter to const could break anything, so
> I've applied this to fbdev-3.11 branch.
>
Hi Tomi,
What tree does Jean-Christophe PLAGNIOL-VILLARD control?
he said he merged the original patch to fix this from Ville, but I've no idea
where it ended up, so I just didn't merge it to drm-next at the time.
Message-Id: <1370619787-15341-3-git-send-email-ville.syrjala@linux.intel.com>
is the original properly attributed fix.
Dave.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH linux-next] fb: make fp_get_options name argument const
2013-06-27 5:14 ` David Airlie
@ 2013-06-27 6:31 ` Tomi Valkeinen
2013-06-27 8:51 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 5+ messages in thread
From: Tomi Valkeinen @ 2013-06-27 6:31 UTC (permalink / raw)
To: David Airlie
Cc: Vincent Stehlé, linux-next, linux-fbdev,
Jean-Christophe Plagniol-Villard, trivial
[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]
On 27/06/13 08:14, David Airlie wrote:
>>>
>>>
>>> Hi,
>>>
>>> I remarked this warning while building linux-next with imx_v6_v7_defconfig.
>>> Is changing fb_get_options prototype "permitted", please?
>>
>> I don't see how changing the parameter to const could break anything, so
>> I've applied this to fbdev-3.11 branch.
>>
>
> Hi Tomi,
>
> What tree does Jean-Christophe PLAGNIOL-VILLARD control?
git://git.kernel.org/pub/scm/linux/kernel/git/plagnioj/linux-fbdev.git
> he said he merged the original patch to fix this from Ville, but I've no idea
> where it ended up, so I just didn't merge it to drm-next at the time.
>
> Message-Id: <1370619787-15341-3-git-send-email-ville.syrjala@linux.intel.com>
>
> is the original properly attributed fix.
Hmm, ok. He asked me to collect fbdev patches as he's been away, so I
went through my inbox and picked up what's there. I can't see the patch
from Ville in Jean-Christophe's tree.
Jean-Christophe, have you taken that (and maybe other patches) but you
haven't pushed them to the kernel.org tree?
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH linux-next] fb: make fp_get_options name argument const
2013-06-27 6:31 ` Tomi Valkeinen
@ 2013-06-27 8:51 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 5+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-06-27 8:51 UTC (permalink / raw)
To: Tomi Valkeinen
Cc: David Airlie, Vincent Stehlé, linux-next, linux-fbdev,
trivial
On 09:31 Thu 27 Jun , Tomi Valkeinen wrote:
> On 27/06/13 08:14, David Airlie wrote:
> >>>
> >>>
> >>> Hi,
> >>>
> >>> I remarked this warning while building linux-next with imx_v6_v7_defconfig.
> >>> Is changing fb_get_options prototype "permitted", please?
> >>
> >> I don't see how changing the parameter to const could break anything, so
> >> I've applied this to fbdev-3.11 branch.
> >>
> >
> > Hi Tomi,
> >
> > What tree does Jean-Christophe PLAGNIOL-VILLARD control?
>
> git://git.kernel.org/pub/scm/linux/kernel/git/plagnioj/linux-fbdev.git
>
> > he said he merged the original patch to fix this from Ville, but I've no idea
> > where it ended up, so I just didn't merge it to drm-next at the time.
> >
> > Message-Id: <1370619787-15341-3-git-send-email-ville.syrjala@linux.intel.com>
> >
> > is the original properly attributed fix.
>
> Hmm, ok. He asked me to collect fbdev patches as he's been away, so I
> went through my inbox and picked up what's there. I can't see the patch
> from Ville in Jean-Christophe's tree.
>
> Jean-Christophe, have you taken that (and maybe other patches) but you
> haven't pushed them to the kernel.org tree?
Sorry get seek for few days and did not push my tree (too much tired)
I'm pushing it today
Best Regards,
J.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-06-27 8:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-18 14:23 [PATCH linux-next] fb: make fp_get_options name argument const Vincent Stehlé
2013-06-26 13:21 ` Tomi Valkeinen
2013-06-27 5:14 ` David Airlie
2013-06-27 6:31 ` Tomi Valkeinen
2013-06-27 8:51 ` Jean-Christophe PLAGNIOL-VILLARD
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).