All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joel Stanley <joel@jms.id.au>
To: Eddie James <eajames@linux.vnet.ibm.com>
Cc: Andrew Jeffery <andrew@aj.id.au>,
	"Edward A. James" <eajames@us.ibm.com>,
	 OpenBMC Maillist <openbmc@lists.ozlabs.org>
Subject: Re: [PATCH linux dev-4.10 v5 31/31] drivers: hwmon: occ: Cancel occ operations in remove()
Date: Tue, 10 Oct 2017 12:27:20 +0930	[thread overview]
Message-ID: <CACPK8Xc7f0AYTSfuSBC2=kgPaYvWFw7q5O8y-tF=-TSNG7xyDw@mail.gmail.com> (raw)
In-Reply-To: <1b82ae0a-9754-b9d1-3cba-12a796b37366@linux.vnet.ibm.com>

2017-10-10 0:03 GMT+09:30 Eddie James <eajames@linux.vnet.ibm.com>:
>
>
> On 10/08/2017 09:00 PM, Joel Stanley wrote:
>>> +static void p9_sbe_occ_close_client(struct p9_sbe_occ *occ)
>>> +{
>>> +       struct occ_client *tmp_client;
>>> +
>>> +       spin_lock_irq(&occ->lock);
>>
>> Why not spin_lock_irqsave/spin_unlock_irqsave? Same throughout this patch.
>
>
> Well spin_lock_irq/spin_unlock_irq is used through the occ and sbefifo
> drivers. Just following suit here. I can switch it if necessary.

If you understand the differences and used the non-save/restore
versions intentionally, then we can keep the driver as it is.

In general, to be safe, more experienced kernel hackers than myself
recommend the irqsave/irqrestore versions of the spin lock functions
as they are safe to call from any context (IRQ or otherwise).

Cheers,

Joel

  reply	other threads:[~2017-10-10  2:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-06 14:29 [PATCH linux dev-4.10 v5 31/31] drivers: hwmon: occ: Cancel occ operations in remove() Eddie James
2017-10-09  2:00 ` Joel Stanley
2017-10-09 14:33   ` Eddie James
2017-10-10  2:57     ` Joel Stanley [this message]
2017-10-16 18:34       ` Brad Bishop

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='CACPK8Xc7f0AYTSfuSBC2=kgPaYvWFw7q5O8y-tF=-TSNG7xyDw@mail.gmail.com' \
    --to=joel@jms.id.au \
    --cc=andrew@aj.id.au \
    --cc=eajames@linux.vnet.ibm.com \
    --cc=eajames@us.ibm.com \
    --cc=openbmc@lists.ozlabs.org \
    /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.