Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp494814ybl; Wed, 28 Aug 2019 00:45:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2gpaIpMB6g6hC/20VsDixMkh1+CU0OJF7ChETxrfRMfuFdSYMC+p2RWSidX6E3gPy1T4J X-Received: by 2002:a17:902:141:: with SMTP id 59mr3026475plb.324.1566978343669; Wed, 28 Aug 2019 00:45:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566978343; cv=none; d=google.com; s=arc-20160816; b=ZAlVM5lzQ7kMiUHpiGIPbjEQ5+Ev0z/N0RLhF0B9gijhNJcmsNnBxvdGe4NnRLZOqj MjtWvemqxOn0B8jQ+fkORFBzrpBTbdoDArC8T4uZ7YlV5AYT9WPM9M3jtoZ/YT3qaD9m 65efMIcna0oppQDO8TpeMOd6m+i+keZIMf+SLyFQZVlvoYNiW1jLmiIixhYNOh991ZcO NtZWJYULBi7dZxy0+2dgErpyqq0rLebcX0IWjbSCvJEoW70VYXUD5BneKkrvAtFUJtnh nKlm8tTQLtcL3fLDhuY18i+EJugdygEdcyfX7CRdgcKW5X7f8+kvSA4V1l234R0+iKgI xunw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=jMRFbsYcTy1dNpiULxptOXToSHThY23YxaJSGIR36F8=; b=E+ck5SrbcUCyNwSc7lGRKSOBG02w7a2mhIg2wOcgY+pnNI0B2vQ+6NZ4NY4/jz6M2t C4kJPek4CYaRpdCPyL1y57i/bxpa6mK99KYxh9pYEFW2crrb23oc6tsbCdBAGz9qNbk7 ifQr/iG+qyGRAjwK5i852n5dGuDOQMxc3Fq0WBTO3fme3TbH5hFUACe37Ur9kHMRBNOR v412yA4Ez1FKYyL178BVOp0xTTZdlYwcOpEfc5EATBCJFrDrWJgqk7UbXmlFtcTGpPoW XtOXNU4tTtfwbRsVeJztjP9WdDm1dw3whh4Unh+NEpMwXRZlcFbdvUV6mezCBT/Lw6V2 DIlg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q199si1641119pfq.112.2019.08.28.00.45.27; Wed, 28 Aug 2019 00:45:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726394AbfH1Ho2 convert rfc822-to-8bit (ORCPT + 99 others); Wed, 28 Aug 2019 03:44:28 -0400 Received: from mx7.zte.com.cn ([202.103.147.169]:39536 "EHLO mxct.zte.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726253AbfH1Ho2 (ORCPT ); Wed, 28 Aug 2019 03:44:28 -0400 Received: from mse-fl2.zte.com.cn (unknown [10.30.14.239]) by Forcepoint Email with ESMTPS id 244A6ABB5E9B5C8EB589; Wed, 28 Aug 2019 15:44:26 +0800 (CST) Received: from notes_smtp.zte.com.cn (notes_smtp.zte.com.cn [10.30.1.239]) by mse-fl2.zte.com.cn with ESMTP id x7S7glHe066154; Wed, 28 Aug 2019 15:42:47 +0800 (GMT-8) (envelope-from wang.yi59@zte.com.cn) Received: from fox-host8.localdomain ([10.74.120.8]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2019082815430719-3232524 ; Wed, 28 Aug 2019 15:43:07 +0800 From: Yi Wang To: akpm@linux-foundation.org Cc: keescook@chromium.org, dan.j.williams@intel.com, wang.yi59@zte.com.cn, cai@lca.pw, linux-mm@kvack.org, linux-kernel@vger.kernel.org, osalvador@suse.de, mhocko@suse.com, rppt@linux.ibm.com, david@redhat.com, richardw.yang@linux.intel.com, xue.zhihong@zte.com.cn, up2wing@gmail.com, wang.liang82@zte.com.cn Subject: [PATCH] mm: fix -Wmissing-prototypes warnings Date: Wed, 28 Aug 2019 15:42:41 +0800 Message-Id: <1566978161-7293-1-git-send-email-wang.yi59@zte.com.cn> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2019-08-28 15:43:07, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2019-08-28 15:42:49 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-MAIL: mse-fl2.zte.com.cn x7S7glHe066154 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We get two warnings when build kernel W=1: mm/shuffle.c:36:12: warning: no previous prototype for ‘shuffle_show’ [-Wmissing-prototypes] mm/sparse.c:220:6: warning: no previous prototype for ‘subsection_mask_set’ [-Wmissing-prototypes] Make the function static to fix this. Signed-off-by: Yi Wang --- mm/shuffle.c | 2 +- mm/sparse.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/shuffle.c b/mm/shuffle.c index 3ce1248..b3fe97f 100644 --- a/mm/shuffle.c +++ b/mm/shuffle.c @@ -33,7 +33,7 @@ __meminit void page_alloc_shuffle(enum mm_shuffle_ctl ctl) } static bool shuffle_param; -extern int shuffle_show(char *buffer, const struct kernel_param *kp) +static int shuffle_show(char *buffer, const struct kernel_param *kp) { return sprintf(buffer, "%c\n", test_bit(SHUFFLE_ENABLE, &shuffle_state) ? 'Y' : 'N'); diff --git a/mm/sparse.c b/mm/sparse.c index 72f010d..49006dd 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -217,7 +217,7 @@ static inline unsigned long first_present_section_nr(void) return next_present_section_nr(-1); } -void subsection_mask_set(unsigned long *map, unsigned long pfn, +static void subsection_mask_set(unsigned long *map, unsigned long pfn, unsigned long nr_pages) { int idx = subsection_map_index(pfn); -- 1.8.3.1