All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Brian Norris <computersforpeace@gmail.com>,
	Axel Lin <axel.lin@ingics.com>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	Gregory Fong <gregory.0xf0@gmail.com>,
	linux-pwm@vger.kernel.org
Subject: Re: [PATCH] pwm: brcmstb: Don't set can_sleep flag
Date: Tue, 03 Nov 2015 16:49:52 -0800	[thread overview]
Message-ID: <56395630.1030405@gmail.com> (raw)
In-Reply-To: <20151104003153.GJ7274@google.com>

On 03/11/15 16:31, Brian Norris wrote:
> On Tue, Nov 03, 2015 at 06:08:40PM +0800, Axel Lin wrote:
>> The .can_sleep flag is used for some PWM controllers that can't be used
>> in atomic context. Not such case for this driver, so don't set the
>> can_sleep flag.
>>
>> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> 
> Looks sane to me, though I've never touched this driver.
> 
> Reviewed-by: Brian Norris <computersforpeace@gmail.com>
> 
> BTW just a comment from an outsider here, the "can sleep" terminology
> seems a bit misleading here. Just IMO of course, but saying something
> "can sleep" sounds like a permissive statement, when actually it's a
> restrictive statement being made by the driver (which is in this case
> unnecessarily restrictive). The "might sleep" terminology used in one
> other place would (again IMO) better communicate what I think is
> intended here.
> 
> Though this problem is most likely result of mindless copy-and-paste,
> it's possible that the terminology made it easier to gloss over. Or I
> could just be blowing smoke.

Well, in this particular case, I have to admit this was copy and paste
which resulted in setting can_sleep initially.

Now, I do agree that the terminology is a little confusing here. If you
look at the GPIO API there are gpio_*_cansleep() accessors, which in
their case, convey the correct meaning: the operation can/might sleep.

Should we prepare a coccinelle script which fixes that at least for the
PWM subsystem?
-- 
Florian

  reply	other threads:[~2015-11-04  0:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-03 10:08 [PATCH] pwm: brcmstb: Don't set can_sleep flag Axel Lin
2015-11-04  0:18 ` Florian Fainelli
2015-11-04  0:31 ` Brian Norris
2015-11-04  0:49   ` Florian Fainelli [this message]
2015-11-04  1:08     ` Brian Norris

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=56395630.1030405@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=axel.lin@ingics.com \
    --cc=computersforpeace@gmail.com \
    --cc=gregory.0xf0@gmail.com \
    --cc=linux-pwm@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.