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: 10546529 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 47EAA139A for ; Fri, 27 Jul 2018 00:00:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E743B2B8F2 for ; Fri, 27 Jul 2018 00:00:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E54AA2BB68; Fri, 27 Jul 2018 00:00:06 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 441462BA3D for ; Fri, 27 Jul 2018 00:00:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731630AbeG0BTN (ORCPT ); Thu, 26 Jul 2018 21:19:13 -0400 Received: from merlin.infradead.org ([205.233.59.134]:44232 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731412AbeG0BTN (ORCPT ); Thu, 26 Jul 2018 21:19:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Date:Message-ID:Subject:From:Cc:To:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=dihL/gpULWlAoE8rSNOYw991MnhRhsaYbJyI8BpnHLU=; b=J8SQbEZeZky8HAJOOmGxTTrLJq e/EyCEuYZ4doTPgsBwGagMn83oX0KH/sCs9TtC6CuYqMYYZP8oancD+3Qjh93MTdboV9bA3hsfMlv w/x6H1UTtFIg9/gW0q7hDFkAHCSLcPadzUI4SKdREe4n9+Dsm4VeHGJPHETBnRx14bnJbWZLQsVhs eyGhjTSAGQwmESK4Y2KH0BLhjhJS1OZ5NQpgxNUD+EWDbdKA2uwfh7IahlSAOYxTqr6GiS9HsnOP0 LXGnrfGb7m5iq8Q+ALlTA2EFW5PeauFvdkD4gpY7Z3fOVXeiDEVO6f6aZyNFb58CP4DZvFABcoHhf 5Pwh1CXw==; 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 Cc: Geert Uytterhoeven , Bartlomiej Zolnierkiewicz 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 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org 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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 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)