From patchwork Thu Aug 20 10:51:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 7043591 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2A37A9F373 for ; Thu, 20 Aug 2015 10:51:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 841BD205C1 for ; Thu, 20 Aug 2015 10:51:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 426FB205BB for ; Thu, 20 Aug 2015 10:51:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751792AbbHTKv1 (ORCPT ); Thu, 20 Aug 2015 06:51:27 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:45729 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751634AbbHTKvZ (ORCPT ); Thu, 20 Aug 2015 06:51:25 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id t7KApIhK031602; Thu, 20 Aug 2015 05:51:18 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id t7KApI5Z028622; Thu, 20 Aug 2015 05:51:18 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.224.2; Thu, 20 Aug 2015 05:51:18 -0500 Received: from [192.168.2.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id t7KApGTP006690; Thu, 20 Aug 2015 05:51:16 -0500 Message-ID: <55D5B123.8090000@ti.com> Date: Thu, 20 Aug 2015 13:51:15 +0300 From: Tomi Valkeinen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: Sudip Mukherjee , Rob Herring CC: , , Nicolas Ferre , Jean-Christophe Plagniol-Villard Subject: Re: [PATCH] video: fbdev: atmel: fix warning for const return value References: <1438011701-18423-1-git-send-email-robh@kernel.org> <20150807052221.GC3537@sudip-pc> In-Reply-To: <20150807052221.GC3537@sudip-pc> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=unavailable 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 On 07/08/15 08:22, Sudip Mukherjee wrote: > On Mon, Jul 27, 2015 at 10:41:41AM -0500, Rob Herring wrote: >> A const on a return value is meaningless and generates a warning on some >> versions of gcc: >> >> drivers/video/fbdev/atmel_lcdfb.c:1003: warning: type qualifiers ignored on function return type > maybe this one should have been static instead of const. I think that makes sense. I will apply the following patch instead of Rob's, if no one complains. Author: Tomi Valkeinen Date: Thu Aug 20 13:46:10 2015 +0300 video: fbdev: atmel: fix warning for const return value A const on a return value is meaningless and generates a warning on some versions of gcc: drivers/video/fbdev/atmel_lcdfb.c:1003: warning: type qualifiers ignored on function return type The function in question is only used inside the .c file, so the author of the code most likely means "static" instead of "const". Change the const to static. Reported-by: Fengguang Wu Cc: Nicolas Ferre Signed-off-by: Tomi Valkeinen diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c index abadc490fa1f..016cae1425a4 100644 --- a/drivers/video/fbdev/atmel_lcdfb.c +++ b/drivers/video/fbdev/atmel_lcdfb.c @@ -999,7 +999,7 @@ static const char *atmel_lcdfb_wiring_modes[] = { [ATMEL_LCDC_WIRING_RGB] = "RGB", }; -const int atmel_lcdfb_get_of_wiring_modes(struct device_node *np) +static int atmel_lcdfb_get_of_wiring_modes(struct device_node *np) { const char *mode; int err, i;