From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752545AbdLFUfu (ORCPT ); Wed, 6 Dec 2017 15:35:50 -0500 Received: from terminus.zytor.com ([65.50.211.136]:46243 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751941AbdLFUft (ORCPT ); Wed, 6 Dec 2017 15:35:49 -0500 Date: Wed, 6 Dec 2017 12:31:11 -0800 From: tip-bot for Sascha Hauer Message-ID: Cc: tglx@linutronix.de, hpa@zytor.com, s.hauer@pengutronix.de, mingo@kernel.org, fujita.tomonori@lab.ntt.co.jp, peterz@infradead.org, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org Reply-To: peterz@infradead.org, fujita.tomonori@lab.ntt.co.jp, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, hpa@zytor.com, tglx@linutronix.de, s.hauer@pengutronix.de, mingo@kernel.org In-Reply-To: <20171205104415.17147-1-s.hauer@pengutronix.de> References: <20171205104415.17147-1-s.hauer@pengutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/core] sched/headers: Constify object_is_on_stack() Git-Commit-ID: 00ef0ef2cccb0350eae368e565c98453a9305b05 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 00ef0ef2cccb0350eae368e565c98453a9305b05 Gitweb: https://git.kernel.org/tip/00ef0ef2cccb0350eae368e565c98453a9305b05 Author: Sascha Hauer AuthorDate: Tue, 5 Dec 2017 11:44:15 +0100 Committer: Ingo Molnar CommitDate: Wed, 6 Dec 2017 20:50:02 +0100 sched/headers: Constify object_is_on_stack() object_is_on_stack() doesn't modify its argument and should never do it. Make it const. Signed-off-by: Sascha Hauer Cc: FUJITA Tomonori Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kernel@pengutronix.de Link: http://lkml.kernel.org/r/20171205104415.17147-1-s.hauer@pengutronix.de Signed-off-by: Ingo Molnar --- include/linux/sched/task_stack.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/sched/task_stack.h b/include/linux/sched/task_stack.h index cb4828a..6a84192 100644 --- a/include/linux/sched/task_stack.h +++ b/include/linux/sched/task_stack.h @@ -78,7 +78,7 @@ static inline void put_task_stack(struct task_struct *tsk) {} #define task_stack_end_corrupted(task) \ (*(end_of_stack(task)) != STACK_END_MAGIC) -static inline int object_is_on_stack(void *obj) +static inline int object_is_on_stack(const void *obj) { void *stack = task_stack_page(current);