From patchwork Wed Sep 11 10:13:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19959 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f199.google.com (mail-qc0-f199.google.com [209.85.216.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 824B0248D9 for ; Wed, 11 Sep 2013 10:17:22 +0000 (UTC) Received: by mail-qc0-f199.google.com with SMTP id u18sf10335664qcx.2 for ; Wed, 11 Sep 2013 03:17:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state: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=/Tlo3+Dz8zrQlsIXg54FJCx89hkNv8ZZ5VuLZf7MhPk=; b=dllENawynsZu8T9U3ogf8hqkrAwnFJO1r30VzJW5yLKMiWd5SippvddNonFwv0XeYp Fj+LIfccTycQyd47ICuzp8IxCeoqhvC18uu/FtkWGKHYUX0QqfWzPdBU+TkWuwv6V+rx P/CGHuraAq+0rMrwxv2F/rngzIg+Su5jS5O3BhIR8CddtXRBX0PCSinWtxNu9ZLVERgB /L5FTlvsuM9NH0FXXIXNZFBr3X9C0OzJzvtQ7GmUQ1ndpVNmegM64hL5wKvbRVUhYNaA C7hWDpocqrqKhWCuedNyphkFHLMQCvaHUpDX2L2pA50XLKv8A1HrwwdDX3h/Jk2Vk8PD 8tvg== X-Received: by 10.236.186.101 with SMTP id v65mr339702yhm.12.1378894642384; Wed, 11 Sep 2013 03:17:22 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.50.169 with SMTP id d9ls189697qeo.21.gmail; Wed, 11 Sep 2013 03:17:22 -0700 (PDT) X-Received: by 10.58.246.8 with SMTP id xs8mr520590vec.9.1378894641737; Wed, 11 Sep 2013 03:17:21 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id oh2si5778301vcb.85.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Sep 2013 03:17:21 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.175 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.175; Received: by mail-ve0-f175.google.com with SMTP id jy13so5544267veb.34 for ; Wed, 11 Sep 2013 03:17:21 -0700 (PDT) X-Gm-Message-State: ALoCoQmWXguZlnWRR1FLdhC1ppen2LF/u/tmVQOo1m88RwqGmnUA3y3QvWYjfeJmUA16DZOQWMlW X-Received: by 10.58.165.70 with SMTP id yw6mr508709veb.19.1378894641619; Wed, 11 Sep 2013 03:17:21 -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 u4csp47849vcz; Wed, 11 Sep 2013 03:17:21 -0700 (PDT) X-Received: by 10.68.29.36 with SMTP id g4mr789944pbh.145.1378894640801; Wed, 11 Sep 2013 03:17:20 -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 tp5si1662156pac.280.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Sep 2013 03:17:20 -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 w10so9002190pde.9 for ; Wed, 11 Sep 2013 03:17:20 -0700 (PDT) X-Received: by 10.68.183.131 with SMTP id em3mr927896pbc.56.1378894640347; Wed, 11 Sep 2013 03:17:20 -0700 (PDT) Received: from localhost ([27.57.128.127]) by mx.google.com with ESMTPSA id dw3sm3590179pbc.17.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 11 Sep 2013 03:17:19 -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, Viresh Kumar Subject: [PATCH 3/5] cpufreq: rewrite cpufreq_driver->flags using shift operator Date: Wed, 11 Sep 2013 15:43:09 +0530 Message-Id: <0f41597e75e01964046009df288555cc16506fa5.1378893296.git.viresh.kumar@linaro.org> 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.175 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 | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index fcabc42..c71dc0f 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -211,13 +211,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);