From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751660AbeAPDqZ (ORCPT + 1 other); Mon, 15 Jan 2018 22:46:25 -0500 Received: from terminus.zytor.com ([65.50.211.136]:59049 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751615AbeAPDqX (ORCPT ); Mon, 15 Jan 2018 22:46:23 -0500 Date: Mon, 15 Jan 2018 19:43:01 -0800 From: tip-bot for Anna-Maria Gleixner Message-ID: Cc: john.stultz@linaro.org, linux-kernel@vger.kernel.org, hch@lst.de, mingo@kernel.org, tglx@linutronix.de, anna-maria@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, hpa@zytor.com Reply-To: tglx@linutronix.de, mingo@kernel.org, hch@lst.de, linux-kernel@vger.kernel.org, john.stultz@linaro.org, torvalds@linux-foundation.org, hpa@zytor.com, peterz@infradead.org, anna-maria@linutronix.de In-Reply-To: <20171221104205.7269-8-anna-maria@linutronix.de> References: <20171221104205.7269-8-anna-maria@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:timers/core] hrtimer: Clean up 'enum hrtimer_mode' Git-Commit-ID: 19b51cb5ff6ab7957bcbbec4ff812b83208f7e99 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 Return-Path: Commit-ID: 19b51cb5ff6ab7957bcbbec4ff812b83208f7e99 Gitweb: https://git.kernel.org/tip/19b51cb5ff6ab7957bcbbec4ff812b83208f7e99 Author: Anna-Maria Gleixner AuthorDate: Thu, 21 Dec 2017 11:41:36 +0100 Committer: Ingo Molnar CommitDate: Tue, 16 Jan 2018 02:35:45 +0100 hrtimer: Clean up 'enum hrtimer_mode' It's not obvious that the HRTIMER_MODE variants are bit combinations, because all modes are hard coded constants currently. Change it so the bit meanings are clear; and use the symbols for creating modes which combine bits. While at it get rid of the ugly tail comments as well. Signed-off-by: Anna-Maria Gleixner Cc: Christoph Hellwig Cc: John Stultz Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: keescook@chromium.org Link: http://lkml.kernel.org/r/20171221104205.7269-8-anna-maria@linutronix.de Signed-off-by: Ingo Molnar --- include/linux/hrtimer.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 4e6a884..28f267c 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -28,13 +28,19 @@ struct hrtimer_cpu_base; /* * Mode arguments of xxx_hrtimer functions: + * + * HRTIMER_MODE_ABS - Time value is absolute + * HRTIMER_MODE_REL - Time value is relative to now + * HRTIMER_MODE_PINNED - Timer is bound to CPU (is only considered + * when starting the timer) */ enum hrtimer_mode { - HRTIMER_MODE_ABS = 0x0, /* Time value is absolute */ - HRTIMER_MODE_REL = 0x1, /* Time value is relative to now */ - HRTIMER_MODE_PINNED = 0x02, /* Timer is bound to CPU */ - HRTIMER_MODE_ABS_PINNED = 0x02, - HRTIMER_MODE_REL_PINNED = 0x03, + HRTIMER_MODE_ABS = 0x00, + HRTIMER_MODE_REL = 0x01, + HRTIMER_MODE_PINNED = 0x02, + + HRTIMER_MODE_ABS_PINNED = HRTIMER_MODE_ABS | HRTIMER_MODE_PINNED, + HRTIMER_MODE_REL_PINNED = HRTIMER_MODE_REL | HRTIMER_MODE_PINNED, }; /*