Linux SPI subsystem development
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: Serge Semin <Sergey.Semin@baikalelectronics.ru>,
	linux-spi@vger.kernel.org
Subject: Re: [PATCH] spi: Make spi_delay_exec() warn if called from atomic context
Date: Fri, 22 May 2020 19:04:17 +0300	[thread overview]
Message-ID: <20200522160417.GI1634618@smile.fi.intel.com> (raw)
In-Reply-To: <20200522160233.GH1634618@smile.fi.intel.com>

On Fri, May 22, 2020 at 07:02:33PM +0300, Andy Shevchenko wrote:
> On Fri, May 22, 2020 at 04:50:05PM +0100, Mark Brown wrote:
> > If the delay used is long enough the spi_delay_exec() will use a sleeping
> > function to implement it. Add a might_sleep() here to help avoid callers
> > using this from an atomic context and running into problems at runtime on
> > other systems.
> 
> Thanks!
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

We may improve it later, though, to be smarter and spill a warning only when it
uses non-atomic delays. For now this is good enough.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2020-05-22 16:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-22 15:50 [PATCH] spi: Make spi_delay_exec() warn if called from atomic context Mark Brown
2020-05-22 16:02 ` Andy Shevchenko
2020-05-22 16:04   ` Andy Shevchenko [this message]
2020-05-22 16:10     ` Serge Semin
2020-05-22 16:18       ` Mark Brown
2020-05-25 14:57 ` Mark Brown

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=20200522160417.GI1634618@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=Sergey.Semin@baikalelectronics.ru \
    --cc=broonie@kernel.org \
    --cc=linux-spi@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox