Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5983317imu; Mon, 21 Jan 2019 00:51:24 -0800 (PST) X-Google-Smtp-Source: ALg8bN7W+roIZZzmfZvbyJgx2miXVqUt3n9QSter01OFFfPNAU35k3NC/DIvZnDBhw2g5PRpUSNQ X-Received: by 2002:a17:902:690c:: with SMTP id j12mr12159258plk.206.1548060684861; Mon, 21 Jan 2019 00:51:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548060684; cv=none; d=google.com; s=arc-20160816; b=Gw6ybeWt4ExBAh9uo69Nu58uxnStjR+h/J0H34tVRWncRxW87nghJbelBqN5/zZ99g gIdzUg5atIEQad+PelXBV/B9JVR32jox9Q/WS+1pgiLn8xnV/lfX0t3M1Jpw8WsGiTOd kssseGRwmeX4imjgO0r+U9IRMmzQav7Dt2IRc3cZsmf9A1wR3JE6m14s7nTRA+ffgBFA +puksMIgs1etdKPl7+0UznjyO9bHVf/dN3VeWxE/9b7EEOLztk0yM9OoIqPD7FZXePA9 g7+EJHSnCTosqWXlaKgb/OZCaMht8rxmIsuyCCJNJrUpUkbFOvdapAaJVP4AM+j3Wd+F zZhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=c+9cA8JT0ead3Uudm6rJptJL7nogvAmv8BUGGtAKAr0=; b=solOaEb8Dixewy/P/72Z5rB1n9/JBn5tB0WlinOQBL3QHgtvPsUaWu6M+48rrOMilP kOYG+0TMT/yeC1zPHVk4mCCP60vkPtZI7vQlRHSLhzzRWJedo2koPHSBwGhfnWQxi4iw OZ5hbAZk55upYcOLT3/zdHRgWfm+ic5T87eYZQQLPewaPlwjABEJrwmONrCaAptBgiBV nUb/Th1bmsi/7dwG8XWvwWuYNkQoqM7aJAbiP50ZZB139kG3Zk1oNWSF5XIG3hG8Ep1U RHz6nnW69al4TrJaZE4JHOqBr/BrU+Qt4tPiCr3RU7Hh7lOnUF1uylfh2EZRTSbKrPVL QF7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kYL9UYUV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l8si11650689pfc.98.2019.01.21.00.51.09; Mon, 21 Jan 2019 00:51:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kYL9UYUV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729410AbfAUItM (ORCPT + 99 others); Mon, 21 Jan 2019 03:49:12 -0500 Received: from mail-vk1-f195.google.com ([209.85.221.195]:43938 "EHLO mail-vk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728514AbfAUItL (ORCPT ); Mon, 21 Jan 2019 03:49:11 -0500 Received: by mail-vk1-f195.google.com with SMTP id o130so4404053vke.10 for ; Mon, 21 Jan 2019 00:49:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c+9cA8JT0ead3Uudm6rJptJL7nogvAmv8BUGGtAKAr0=; b=kYL9UYUV5lclIrOE6uh0Yc19JiTPgUL3WL99XG4LsMnCtQD0PahggNMnuU4QJaoCZx 0RrcfoyvjRAdNHfhJfkUAr04k//Xyx39YAZSrVChXD1JPvv2DpYAR9j/hG2x0brqKZKA DWvu8j6wtXqQb/DUkUGFIrQd5yGx4LKRZXMgE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c+9cA8JT0ead3Uudm6rJptJL7nogvAmv8BUGGtAKAr0=; b=VSULTGpHxSuEg18XCGA0o+bTygecl1U/L1TEXV8BXCAvJEQOLzBvH8Oayj7Vc0PclS bB9lgyAiq8IYC9Rg3WnM4nvA+fPL1gk7Tvw1v1XCLyysUhK0YRcCq+qk2F7CQWNI5xIk 6alU7q+LLHLddJsUkUWEsGcVKnJkFDncBobIHBiE96YqIH1rqWkzZXjHO9LYfycm8EyT D4Ze46PCHIKwkv36nfMyXcUBniPJPf4+/sc5UxRoaip0i1K6Z+c0IGz2LuhhylnbVQBG z2cZwhXWXb7njegXGtcvwrozILgPYaUept0rloQ3ySnG4mW8HYFy08x/CceUjk3wSKob lL4w== X-Gm-Message-State: AJcUukcsMpEsyrN55WhESFdBgG7W8akY58zUtcONVYOpK/f6FhrcEfzB PqeO+vZbr8ja1up7kH4/L8ZAZZMqik8mrUIbZMYylQ== X-Received: by 2002:a1f:a8c5:: with SMTP id r188mr11764670vke.44.1548060550308; Mon, 21 Jan 2019 00:49:10 -0800 (PST) MIME-Version: 1.0 References: <2392396.AI7Hxg4e4v@aspire.rjw.lan> In-Reply-To: <2392396.AI7Hxg4e4v@aspire.rjw.lan> From: Amit Kucheria Date: Mon, 21 Jan 2019 14:18:59 +0530 Message-ID: Subject: Re: [PATCH v1 03/10] cpufreq: Replace open-coded << with BIT() To: "Rafael J. Wysocki" Cc: LKML , linux-arm-msm , Viresh Kumar , Eduardo Valentin , Stephen Boyd , Douglas Anderson , Matthias Kaehlcke , Linux PM list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 17, 2019 at 4:26 AM Rafael J. Wysocki wrote: > > On Monday, January 14, 2019 5:34:55 PM CET Amit Kucheria wrote: > > Minor clean-up to use BIT() and keep checkpatch happy. Clean up the > > comment formatting while we're at it to make it easier to read. > > > > Signed-off-by: Amit Kucheria > > Can you please do this cleanup as the first patch in the series, so it > doesn't depend on the other patches in it, which isn't necessary IMO? I've sent it out separately now, unconnected to the series. Thanks. Regards, Amit > > --- > > include/linux/cpufreq.h | 27 ++++++++++++++------------- > > 1 file changed, 14 insertions(+), 13 deletions(-) > > > > diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h > > index 70ad02088825..ea303dfd5f05 100644 > > --- a/include/linux/cpufreq.h > > +++ b/include/linux/cpufreq.h > > @@ -351,14 +351,15 @@ struct cpufreq_driver { > > }; > > > > /* flags */ > > -#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 isn't removed even if all ->init() calls failed */ > > +#define CPUFREQ_STICKY BIT(0) > > + > > +/* loops_per_jiffy or other kernel "constants" aren't affected by frequency transitions */ > > +#define CPUFREQ_CONST_LOOPS BIT(1) > > + > > +/* don't warn on suspend/resume speed mismatches */ > > +#define CPUFREQ_PM_NO_WARN BIT(2) > > > > /* > > * This should be set by platforms having multiple clock-domains, i.e. > > @@ -366,14 +367,14 @@ struct cpufreq_driver { > > * be created in cpu/cpu/cpufreq/ directory and so they can use the same > > * governor with different tunables for different clusters. > > */ > > -#define CPUFREQ_HAVE_GOVERNOR_PER_POLICY (1 << 3) > > +#define CPUFREQ_HAVE_GOVERNOR_PER_POLICY BIT(3) > > > > /* > > * 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 (1 << 4) > > +#define CPUFREQ_ASYNC_NOTIFICATION BIT(4) > > > > /* > > * Set by drivers which want cpufreq core to check if CPU is running at a > > @@ -382,19 +383,19 @@ struct cpufreq_driver { > > * from the table. And if that fails, we will stop further boot process by > > * issuing a BUG_ON(). > > */ > > -#define CPUFREQ_NEED_INITIAL_FREQ_CHECK (1 << 5) > > +#define CPUFREQ_NEED_INITIAL_FREQ_CHECK BIT(5) > > > > /* > > * Set by drivers to disallow use of governors with "dynamic_switching" flag > > * set. > > */ > > -#define CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING (1 << 6) > > +#define CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING BIT(6) > > > > /* > > * Set by drivers that want the core to automatically register the cpufreq > > * driver as a thermal cooling device > > */ > > -#define CPUFREQ_AUTO_REGISTER_COOLING_DEV (1 << 7) > > +#define CPUFREQ_AUTO_REGISTER_COOLING_DEV BIT(7) > > > > int cpufreq_register_driver(struct cpufreq_driver *driver_data); > > int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); > > > >