From patchwork Fri Sep 13 12:59:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20060 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f71.google.com (mail-qe0-f71.google.com [209.85.128.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E5C4C202E6 for ; Fri, 13 Sep 2013 13:03:44 +0000 (UTC) Received: by mail-qe0-f71.google.com with SMTP id a11sf1204418qen.10 for ; Fri, 13 Sep 2013 06:03:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=fRSkuA8QKcJyd9FZnHMsqH4Q9Tnzv3+STaX9xogOgWo=; b=LydQ0c1Geh7arEMiWAH0lw1+biUeqV06R6TmCm+qfUCmLAcM1AYti0Yq71wZex4fCO BeAe3ueBQks6O/ogTikviCA2ZsFdfxBkJdg68aX8SIufWYyl7LSpU+vwWkC2dXiYDsZ8 P0jtozET6Ah7eyf2AKyCZdpNeZ5Qrzy0pBK+bzxg6Q9qXvkZ5vTNOQydobfh3UBvYq8/ LP898yfM2558A7lRs7zsc+e9IprZsthxhxSGmBbhDXvBLtgVwHbUpfnjN7QKLP61QqYB 7bZhruEd9069rEHkP/8ig3Sk5RwpAfplrtoXY++dSnQ8mzfpsaZw6EsaX9AiLs7tw8/F oLbg== X-Gm-Message-State: ALoCoQkC+b67swGSM/HIR2A8PM7HAJFvhJj2dYaoyCIkvsIKDanJZKGBAqad8r17zO/twWEPtkIe X-Received: by 10.58.240.10 with SMTP id vw10mr876778vec.14.1379077424707; Fri, 13 Sep 2013 06:03:44 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.71.209 with SMTP id x17ls1209068qeu.83.gmail; Fri, 13 Sep 2013 06:03:44 -0700 (PDT) X-Received: by 10.52.230.102 with SMTP id sx6mr9944720vdc.15.1379077424448; Fri, 13 Sep 2013 06:03:44 -0700 (PDT) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id dc9si3082128vec.125.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:03:44 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.171; Received: by mail-ve0-f171.google.com with SMTP id pa12so922021veb.16 for ; Fri, 13 Sep 2013 06:03:44 -0700 (PDT) X-Received: by 10.58.198.13 with SMTP id iy13mr11931559vec.11.1379077424362; Fri, 13 Sep 2013 06:03:44 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp79411vcz; Fri, 13 Sep 2013 06:03:43 -0700 (PDT) X-Received: by 10.68.216.227 with SMTP id ot3mr13473574pbc.80.1379077423423; Fri, 13 Sep 2013 06:03:43 -0700 (PDT) Received: from mail-pd0-f178.google.com (mail-pd0-f178.google.com [209.85.192.178]) by mx.google.com with ESMTPS id t8si7428171pbe.8.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:03:43 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.178 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.178; Received: by mail-pd0-f178.google.com with SMTP id w10so1205892pde.23 for ; Fri, 13 Sep 2013 06:03:43 -0700 (PDT) X-Received: by 10.66.230.138 with SMTP id sy10mr15405182pac.103.1379077422930; Fri, 13 Sep 2013 06:03:42 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id k4sm11657392pbd.11.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:03:42 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Viresh Kumar Subject: [PATCH 006/228] cpufreq: rewrite cpufreq_driver->flags using shift operator Date: Fri, 13 Sep 2013 18:29:12 +0530 Message-Id: X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- include/linux/cpufreq.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 10ab22d..0eda235 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -212,19 +212,20 @@ 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 */ /* * Driver will do POSTCHANGE notifications from outside of their ->target() * routine and so must set cpufreq_driver->flags with this flag, so that core * can handle them specially. */ -#define CPUFREQ_ASYNC_NOTIFICATION 0x08 +#define CPUFREQ_ASYNC_NOTIFICATION (1 << 3) int cpufreq_register_driver(struct cpufreq_driver *driver_data); int cpufreq_unregister_driver(struct cpufreq_driver *driver_data);