From patchwork Thu Jul 26 23:59:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 10546701 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BAD13174A for ; Fri, 27 Jul 2018 07:03:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC69E2B508 for ; Fri, 27 Jul 2018 07:03:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9EDA72B50D; Fri, 27 Jul 2018 07:03:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3ABB72B508 for ; Fri, 27 Jul 2018 07:03:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AA21B6E928; Fri, 27 Jul 2018 07:02:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id E9FA96E885 for ; Fri, 27 Jul 2018 00:00:07 +0000 (UTC) Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fiqAl-00088k-Lf; Thu, 26 Jul 2018 23:59:57 +0000 To: dri-devel , Linux Fbdev development list From: Randy Dunlap Subject: [PATCH] fb: amifb: fix build warnings when not builtin Message-ID: Date: Thu, 26 Jul 2018 16:59:53 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Language: en-US X-Mailman-Approved-At: Fri, 27 Jul 2018 07:01:20 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Geert Uytterhoeven , Bartlomiej Zolnierkiewicz Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Randy Dunlap Fix build warning when built as a loadable module. amifb_setup() and amifb_setup_mcap() are only needed when the driver is builtin. This matches how the functions are called (using #ifndef MODULE). ../drivers/video/fbdev/amifb.c:2344:19: warning: 'amifb_setup' defined but not used [-Wunused-function] static int __init amifb_setup(char *options) ../drivers/video/fbdev/amifb.c:2307:20: warning: 'amifb_setup_mcap' defined but not used [-Wunused-function] static void __init amifb_setup_mcap(char *spec) Signed-off-by: Randy Dunlap Cc: Geert Uytterhoeven Cc: Bartlomiej Zolnierkiewicz Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Reviewed-by: Geert Uytterhoeven --- drivers/video/fbdev/amifb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- linux-next-20180717.orig/drivers/video/fbdev/amifb.c +++ linux-next-20180717/drivers/video/fbdev/amifb.c @@ -2303,7 +2303,7 @@ static void ami_build_copper(struct fb_i ami_rebuild_copper(info->par); } - +#ifndef MODULE static void __init amifb_setup_mcap(char *spec) { char *p; @@ -2368,7 +2368,7 @@ static int __init amifb_setup(char *opti return 0; } - +#endif static int amifb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)