Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753221AbbEHNWh (ORCPT ); Fri, 8 May 2015 09:22:37 -0400 Received: from terminus.zytor.com ([198.137.202.10]:48078 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752617AbbEHNWe (ORCPT ); Fri, 8 May 2015 09:22:34 -0400 Date: Fri, 8 May 2015 06:21:41 -0700 From: tip-bot for Nicholas Mc Guire Message-ID: Cc: hpa@zytor.com, tglx@linutronix.de, hofrat@osadl.org, akpm@linux-foundation.org, mingo@kernel.org, peterz@infradead.org, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, bp@alien8.de Reply-To: torvalds@linux-foundation.org, peterz@infradead.org, bp@alien8.de, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, hofrat@osadl.org, hpa@zytor.com, tglx@linutronix.de, mingo@kernel.org In-Reply-To: <1430643116-24049-1-git-send-email-hofrat@osadl.org> References: <1430643116-24049-1-git-send-email-hofrat@osadl.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/core] sched/core: Remove unnecessary down/ up conversion Git-Commit-ID: ce2f5fe46303d1e1a2ba453753a7e8200d32182c 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 Content-Length: 2154 Lines: 53 Commit-ID: ce2f5fe46303d1e1a2ba453753a7e8200d32182c Gitweb: http://git.kernel.org/tip/ce2f5fe46303d1e1a2ba453753a7e8200d32182c Author: Nicholas Mc Guire AuthorDate: Sun, 3 May 2015 10:51:56 +0200 Committer: Ingo Molnar CommitDate: Fri, 8 May 2015 12:10:07 +0200 sched/core: Remove unnecessary down/up conversion 'rt_period_us' is automatically type converted from u64 to long and then cast back to u64 - this down/up conversion is unnecessary and can be removed to improve readability. This will also help us not truncate 'rt_period_us' to 32 bits on 32-bit kernels, should we ever have so large values. (unlikely, not the least due to procfs.) Signed-off-by: Nicholas Mc Guire Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1430643116-24049-1-git-send-email-hofrat@osadl.org Signed-off-by: Ingo Molnar --- kernel/sched/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 527fc28..46a5d6f 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -7738,11 +7738,11 @@ static long sched_group_rt_runtime(struct task_group *tg) return rt_runtime_us; } -static int sched_group_set_rt_period(struct task_group *tg, long rt_period_us) +static int sched_group_set_rt_period(struct task_group *tg, u64 rt_period_us) { u64 rt_runtime, rt_period; - rt_period = (u64)rt_period_us * NSEC_PER_USEC; + rt_period = rt_period_us * NSEC_PER_USEC; rt_runtime = tg->rt_bandwidth.rt_runtime; return tg_set_rt_bandwidth(tg, rt_period, rt_runtime); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/