mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kevin Winchester <kjwinchester@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org,
	tglx@linutronix.de, mingo@elte.hu,
	linux-tip-commits@vger.kernel.org
Subject: Re: [tip:x86/urgent] x86, mce: therm_throt - change when we print  messages
Date: Wed, 12 Aug 2009 09:34:16 -0300	[thread overview]
Message-ID: <d1af83620908120534p70e8963x2d97326aa9b46657@mail.gmail.com> (raw)
In-Reply-To: <20090812024629.ADFC2526EC9@mailhub.coreip.homeip.net>

2009/8/11 Dmitry Torokhov <dmitry.torokhov@gmail.com>:
> On Tue, Aug 11, 2009 at 09:31:14AM -0300, Kevin Winchester wrote:
>> 2009/8/11 tip-bot for Dmitry Torokhov <dmitry.torokhov@gmail.com>:
>> >  static DEFINE_PER_CPU(__u64, next_check) = INITIAL_JIFFIES;
>> >  static DEFINE_PER_CPU(unsigned long, thermal_throttle_count);
>> > +static DEFINE_PER_CPU(bool, thermal_throttle_active);
>> >
>> >  static atomic_t therm_throt_en         = ATOMIC_INIT(0);
>> >
>> > @@ -96,24 +97,27 @@ static int therm_throt_process(int curr)
>> >  {
>> >        unsigned int cpu = smp_processor_id();
>> >        __u64 tmp_jiffs = get_jiffies_64();
>> > +       bool was_throttled = __get_cpu_var(thermal_throttle_active);
>> > +       bool is_throttled = __get_cpu_var(thermal_throttle_active) = curr;
>>
>> This seems a little odd (or perhaps my lack of experience is
>> showing...) - should it be:
>>
>> bool is_throttled = __get_cpu_var(thermal_throttle_active) == curr;
>>
>> ?
>
> No, you still want to assign the value to thermal_throttle_active.
> is_throttled is just a temp so you don't need to invoke
> __get_cpu_var(thermal_throttle_active) all over the function.
>

Thanks - now I understand.  I guess I'm used to seeing:

bool a = b == c;

So it jumped out at me.

-- 
Kevin Winchester

      reply	other threads:[~2009-08-12 12:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-10  4:44 [PATCH] " Dmitry Torokhov
2009-08-10  5:26 ` Hidetoshi Seto
2009-08-11  7:57 ` [tip:x86/urgent] " tip-bot for Dmitry Torokhov
2009-08-11 12:31   ` Kevin Winchester
2009-08-12  2:15     ` Dmitry Torokhov
2009-08-12 12:34       ` Kevin Winchester [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d1af83620908120534p70e8963x2d97326aa9b46657@mail.gmail.com \
    --to=kjwinchester@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®