From patchwork Fri Jul 13 07:56:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10522715 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A1A0A602A0 for ; Fri, 13 Jul 2018 07:57:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9381D2893F for ; Fri, 13 Jul 2018 07:57:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 85A5B293E5; Fri, 13 Jul 2018 07:57:24 +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.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 265342893F for ; Fri, 13 Jul 2018 07:57:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729790AbeGMIKw (ORCPT ); Fri, 13 Jul 2018 04:10:52 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:9235 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729284AbeGMIKw (ORCPT ); Fri, 13 Jul 2018 04:10:52 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 138709596BA09; Fri, 13 Jul 2018 15:57:08 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.382.0; Fri, 13 Jul 2018 15:57:00 +0800 From: YueHaibing To: , CC: , , , YueHaibing Subject: [PATCH] video: fbdev: via: hide unused procfs helpers Date: Fri, 13 Jul 2018 15:56:25 +0800 Message-ID: <20180713075625.11252-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected 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 When CONFIG_PROC_FS isn't set, gcc warning this: drivers/video/fbdev/via/viafbdev.c:1471:12: warning: ‘viafb_sup_odev_proc_show’ defined but not used [-Wunused-function] static int viafb_sup_odev_proc_show(struct seq_file *m, void *v) ^ fix this by adding #ifdef around it. Signed-off-by: YueHaibing --- drivers/video/fbdev/via/viafbdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/fbdev/via/viafbdev.c b/drivers/video/fbdev/via/viafbdev.c index d2f7850..edca3e0 100644 --- a/drivers/video/fbdev/via/viafbdev.c +++ b/drivers/video/fbdev/via/viafbdev.c @@ -1468,12 +1468,14 @@ static const struct file_operations viafb_vt1636_proc_fops = { #endif /* CONFIG_FB_VIA_DIRECT_PROCFS */ +#ifdef CONFIG_PROC_FS static int viafb_sup_odev_proc_show(struct seq_file *m, void *v) { via_odev_to_seq(m, supported_odev_map[ viaparinfo->shared->chip_info.gfx_chip_name]); return 0; } +#endif static ssize_t odev_update(const char __user *buffer, size_t count, u32 *odev) {