Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp4588804pja; Thu, 21 Nov 2019 22:23:59 -0800 (PST) X-Google-Smtp-Source: APXvYqzi1u/qwH6gyBLzvPTMKjYAtH7z2cw1QhSu0w7+voHuJ4gMRW0Eas0iaUFuzy+GU5FpMlYh X-Received: by 2002:a17:906:2508:: with SMTP id i8mr7061885ejb.323.1574403839368; Thu, 21 Nov 2019 22:23:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574403839; cv=none; d=google.com; s=arc-20160816; b=L/N4+gS4+B7U+fF2fda4RdmYLmC7dHq+NYkDzYiH6K2pXafF8JL4/BoPSlT43IqN4I 6ZNgepxtwpSoa0tPqaA8rkskw7tKVuA5vcxsiq4lxZukbl2OLyQ85ZOLRFJuU3WaPw2Q 6r8WsTNvtdvs0KYNMhLDu0KbEPFMSaQDQ12MdNVkMFi1Ue2T7v3EV6Cn2pdsv+5x63M1 FyYWxBYT6hCqBumQUzQGuLOGu5MW0L9wcJgmeiLUBBy5ZB81mvjIMGCZYlWyWG0GR2Z3 GZk5zZ5i92jkTovGQ/Y2j8KFX8nmE5VFLaORI2ljkSZd021LtG5fCbXdmrpQ6rRjEno2 myyA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FkCDwzQxjmARukF0Gt7RHfeqy4ZLsrU0RLiIYTrg4IU=; b=Rw7KqXLu9v2FK/5XxH3xx/cOM+VsYysC+cbuwMO7GU/ilzodWJ66Zuv4jaCk++xwGy IPrjC3SfDt2xGxPFPqeQgr6gxLCZ0hGg2Jr+YIyj3QSph13H3alA/jD0HCXTg778Qram upKBKrz2a28brX9FfZ0hRrcntNTKas4QVLg/utV5HSkSJUV0HC/XlcN/3hbNxihOoyal K8sTBwUUEQkzZ72/u2UTiMswNk31bbsM5SvJI8hMpinQyOIYsFm6QkbqXT6Rfn4jGElX kqvTZfoIaPbirW4pOQLbP+ybL0VMBGG/HvGqS7hR62y6yjcRhSp488ZuViQCV5fKEDzq m9mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="mO6GRh/0"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o3si4123174edi.374.2019.11.21.22.23.32; Thu, 21 Nov 2019 22:23:59 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b="mO6GRh/0"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729052AbfKVGVU (ORCPT + 99 others); Fri, 22 Nov 2019 01:21:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:58100 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728507AbfKVFwX (ORCPT ); Fri, 22 Nov 2019 00:52:23 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 38A0B2070A; Fri, 22 Nov 2019 05:52:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574401942; bh=8YvM9+J34BD6t+/ML1qLi5wu14hLYMK6CX1h3JsZ7+s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mO6GRh/0du4vSEAHIhLwh7IRG28H9kNH6oOFHTfM6762JC2nKIuE+zpByv2hxX7Yz TtqkYc1O2JHJi4GrtWszc7Yv6+9Q+r8sELONUB2UaTwQtICX8FKgRrGnU0RRFHm/Th ORFxkwct0gIfixPM1WWoAr/KoafzklAQ+bEMLeZ4= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Yi Wang , Michal Hocko , Mike Rapoport , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH AUTOSEL 4.19 166/219] fork: fix some -Wmissing-prototypes warnings Date: Fri, 22 Nov 2019 00:48:18 -0500 Message-Id: <20191122054911.1750-159-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191122054911.1750-1-sashal@kernel.org> References: <20191122054911.1750-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yi Wang [ Upstream commit fb5bf31722d0805a3f394f7d59f2e8cd07acccb7 ] We get a warning when building kernel with W=1: kernel/fork.c:167:13: warning: no previous prototype for `arch_release_thread_stack' [-Wmissing-prototypes] kernel/fork.c:779:13: warning: no previous prototype for `fork_init' [-Wmissing-prototypes] Add the missing declaration in head file to fix this. Also, remove arch_release_thread_stack() completely because no arch seems to implement it since bb9d81264 (arch: remove tile port). Link: http://lkml.kernel.org/r/1542170087-23645-1-git-send-email-wang.yi59@zte.com.cn Signed-off-by: Yi Wang Acked-by: Michal Hocko Acked-by: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- include/linux/sched/task.h | 2 ++ init/main.c | 1 - kernel/fork.c | 5 ----- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/include/linux/sched/task.h b/include/linux/sched/task.h index 108ede99e5335..44c6f15800ff5 100644 --- a/include/linux/sched/task.h +++ b/include/linux/sched/task.h @@ -39,6 +39,8 @@ void __noreturn do_task_dead(void); extern void proc_caches_init(void); +extern void fork_init(void); + extern void release_task(struct task_struct * p); #ifdef CONFIG_HAVE_COPY_THREAD_TLS diff --git a/init/main.c b/init/main.c index 020972fed1171..38a603f62b7bb 100644 --- a/init/main.c +++ b/init/main.c @@ -105,7 +105,6 @@ static int kernel_init(void *); extern void init_IRQ(void); -extern void fork_init(void); extern void radix_tree_init(void); /* diff --git a/kernel/fork.c b/kernel/fork.c index aef1430bdce0b..8cb5cd7c97e19 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -163,10 +163,6 @@ static inline void free_task_struct(struct task_struct *tsk) } #endif -void __weak arch_release_thread_stack(unsigned long *stack) -{ -} - #ifndef CONFIG_ARCH_THREAD_STACK_ALLOCATOR /* @@ -376,7 +372,6 @@ static void release_task_stack(struct task_struct *tsk) return; /* Better to leak the stack than to free prematurely */ account_kernel_stack(tsk, -1); - arch_release_thread_stack(tsk->stack); free_thread_stack(tsk); tsk->stack = NULL; #ifdef CONFIG_VMAP_STACK -- 2.20.1