From patchwork Tue Jun 18 14:23:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Vincent_Stehl=C3=A9?= X-Patchwork-Id: 2742761 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 686DEC0AB1 for ; Tue, 18 Jun 2013 14:23:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0CDB22039D for ; Tue, 18 Jun 2013 14:23:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 665F820387 for ; Tue, 18 Jun 2013 14:23:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932949Ab3FROXb (ORCPT ); Tue, 18 Jun 2013 10:23:31 -0400 Received: from co1ehsobe003.messaging.microsoft.com ([216.32.180.186]:40882 "EHLO co1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932868Ab3FROXa convert rfc822-to-8bit (ORCPT ); Tue, 18 Jun 2013 10:23:30 -0400 Received: from mail91-co1-R.bigfish.com (10.243.78.244) by CO1EHSOBE011.bigfish.com (10.243.66.74) with Microsoft SMTP Server id 14.1.225.23; Tue, 18 Jun 2013 14:23:30 +0000 Received: from mail91-co1 (localhost [127.0.0.1]) by mail91-co1-R.bigfish.com (Postfix) with ESMTP id F07293C0493; Tue, 18 Jun 2013 14:23:29 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzc89bhzz1f42h1ee6h1de0h1fdah1202h1e76h1d1ah1d2ah1fc6hzz8275bh8275dhz2dh2a8h668h839h93fhd24he5bhf0ah107ah1288h12a5h12a9h12bdh137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1d0ch1d2eh1d3fh1dc1h1dfeh1dffh1e1dh1e23h1155h) Received: from mail91-co1 (localhost.localdomain [127.0.0.1]) by mail91-co1 (MessageSwitch) id 1371565407170127_32211; Tue, 18 Jun 2013 14:23:27 +0000 (UTC) Received: from CO1EHSMHS003.bigfish.com (unknown [10.243.78.233]) by mail91-co1.bigfish.com (Postfix) with ESMTP id 08C79D00048; Tue, 18 Jun 2013 14:23:27 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CO1EHSMHS003.bigfish.com (10.243.66.13) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 18 Jun 2013 14:23:23 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-005.039d.mgd.msft.net (10.84.1.17) with Microsoft SMTP Server (TLS) id 14.2.328.11; Tue, 18 Jun 2013 14:23:19 +0000 Received: from debian ([10.214.137.23]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with SMTP id r5IEN8Mg022510; Tue, 18 Jun 2013 07:23:17 -0700 Received: by debian (sSMTP sendmail emulation); Tue, 18 Jun 2013 16:23:08 +0200 From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= To: , CC: =?UTF-8?q?Vincent=20Stehl=C3=A9?= , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , Dave Airlie , Subject: [PATCH linux-next] fb: make fp_get_options name argument const Date: Tue, 18 Jun 2013 16:23:05 +0200 Message-ID: <1371565386-23335-1-git-send-email-vincent.stehle@freescale.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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é Cc: Jean-Christophe Plagniol-Villard Cc: Tomi Valkeinen Cc: Dave Airlie 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];