From patchwork Wed Oct 2 08:43:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2973651 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D0B57BFF0B for ; Wed, 2 Oct 2013 08:45:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4B287203DD for ; Wed, 2 Oct 2013 08:45:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7C116203D9 for ; Wed, 2 Oct 2013 08:45:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753675Ab3JBIou (ORCPT ); Wed, 2 Oct 2013 04:44:50 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:64503 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753326Ab3JBIoj (ORCPT ); Wed, 2 Oct 2013 04:44:39 -0400 Received: by mail-pd0-f177.google.com with SMTP id y10so583686pdj.36 for ; Wed, 02 Oct 2013 01:44:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=6xbGYPG7Po5zN5xy5065czBKLwKmJDnWJV8/RB+tI/E=; b=LQOzKONoAp/VxOZ9k0OCcJbion0uSHUe+p9Lmi+yKZ8xyR9E/deiQSZ81s8/q8brnt kh29RYvlbex0zaooxlODZHyEq4qwDKezeSpafOSD8pNSofZygcye+P2vZaHvH/F4ZQjh BUR/p0ZdivMBz9oZelXl4U/Pyv6Lh/YHZfigkp51dpsaiHXi6/fxVe8ashydMOOcCUzX 7IUDx114u/hbtmbEabm2lkC5bGh/Kc0I6NA6cNd+yE/YACgs1ceKV1TbSk3ev9iIXWIf KfJsif6IaPalaholceSnQmcwaaqVV7MuVWFXqC3NEih6Gu1I8mtXH+8OIMa0uRp/dMZO klRg== X-Gm-Message-State: ALoCoQmR9Eif8cjGFbrZL+1bKNIzToWMF5yrbUynIeM1X/W6jM+1NH7aBz+oyj73GttqAiI6RurW X-Received: by 10.68.223.161 with SMTP id qv1mr1204599pbc.79.1380703478842; Wed, 02 Oct 2013 01:44:38 -0700 (PDT) Received: from localhost ([122.167.152.64]) by mx.google.com with ESMTPSA id wd6sm2057521pab.3.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 02 Oct 2013 01:44:38 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Cc: cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, Viresh Kumar Subject: [PATCH RESEND 09/11] cpufreq: rewrite cpufreq_driver->flags using shift operator Date: Wed, 2 Oct 2013 14:13:17 +0530 Message-Id: <7b34bf61846bed19e4a7e8ee18a55e717c570fef.1380703248.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently cpufreq_driver's flags are defined directly using 0x1, 0x2, 0x4, 0x8, etc.. As the list grows it doesn't stays much readable.. Lets use bitwise shift operator << to generate these numbers for respective positions. Signed-off-by: Viresh Kumar Reviewed-by: Srivatsa S. Bhat --- include/linux/cpufreq.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index a72bac2..9321059 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -225,13 +225,14 @@ struct cpufreq_driver { }; /* flags */ -#define CPUFREQ_STICKY 0x01 /* the driver isn't removed even if - * all ->init() calls failed */ -#define CPUFREQ_CONST_LOOPS 0x02 /* loops_per_jiffy or other kernel - * "constants" aren't affected by - * frequency transitions */ -#define CPUFREQ_PM_NO_WARN 0x04 /* don't warn on suspend/resume speed - * mismatches */ +#define CPUFREQ_STICKY (1 << 0) /* driver isn't removed even if + all ->init() calls failed */ +#define CPUFREQ_CONST_LOOPS (1 << 1) /* loops_per_jiffy or other + kernel "constants" aren't + affected by frequency + transitions */ +#define CPUFREQ_PM_NO_WARN (1 << 2) /* don't warn on suspend/resume + speed mismatches */ int cpufreq_register_driver(struct cpufreq_driver *driver_data); int cpufreq_unregister_driver(struct cpufreq_driver *driver_data);