From: Wolfram Sang <wsa@the-dreams.de>
To: Peter Rosin <peda@axentia.se>
Cc: Tero Kristo <t-kristo@ti.com>,
preid@electromag.com.au, Keerthy <j-keerthy@ti.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-renesas-soc@vger.kernel.org,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Grygorii Strashko <grygorii.strashko@ti.com>,
linux-i2c@vger.kernel.org,
Stefan Lengfeld <contact@stefanchrist.eu>,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC PATCH 3/4] i2c: core: use I2C locking behaviour also for SMBUS
Date: Fri, 21 Sep 2018 00:48:18 +0200 [thread overview]
Message-ID: <20180920224818.GB988@kunai> (raw)
In-Reply-To: <e31d69ed-d849-db98-00c2-27d489a2dac1@axentia.se>
[-- Attachment #1.1: Type: text/plain, Size: 793 bytes --]
On Thu, Sep 20, 2018 at 07:31:19PM +0200, Peter Rosin wrote:
> On 2018-09-20 18:14, Wolfram Sang wrote:
> > If I2C transfers are executed in atomic contexts, trylock is used
> > instead of lock. This behaviour was missing for SMBUS, although a lot of
> > transfers are of SMBUS type, either emulated or direct. So, factor out
> > the locking routine into a helper and use it for I2C and SMBUS.
> >
> > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
>
> Is it ok with static analyzers to "hide" the locking in helpers like
> this? Will it not be harder for them to "see" what's going on? But I
> don't think we have any annotations anyway, so...
Yes, you are right. Yet, I prefer this to open coding the same twice and
have the problem to keep them in sync.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <wsa@the-dreams.de>
To: Peter Rosin <peda@axentia.se>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
linux-i2c@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Stefan Lengfeld <contact@stefanchrist.eu>,
preid@electromag.com.au, linux-omap@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, Keerthy <j-keerthy@ti.com>,
Tero Kristo <t-kristo@ti.com>,
Grygorii Strashko <grygorii.strashko@ti.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: [RFC PATCH 3/4] i2c: core: use I2C locking behaviour also for SMBUS
Date: Fri, 21 Sep 2018 00:48:18 +0200 [thread overview]
Message-ID: <20180920224818.GB988@kunai> (raw)
In-Reply-To: <e31d69ed-d849-db98-00c2-27d489a2dac1@axentia.se>
[-- Attachment #1: Type: text/plain, Size: 793 bytes --]
On Thu, Sep 20, 2018 at 07:31:19PM +0200, Peter Rosin wrote:
> On 2018-09-20 18:14, Wolfram Sang wrote:
> > If I2C transfers are executed in atomic contexts, trylock is used
> > instead of lock. This behaviour was missing for SMBUS, although a lot of
> > transfers are of SMBUS type, either emulated or direct. So, factor out
> > the locking routine into a helper and use it for I2C and SMBUS.
> >
> > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
>
> Is it ok with static analyzers to "hide" the locking in helpers like
> this? Will it not be harder for them to "see" what's going on? But I
> don't think we have any annotations anyway, so...
Yes, you are right. Yet, I prefer this to open coding the same twice and
have the problem to keep them in sync.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: wsa@the-dreams.de (Wolfram Sang)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 3/4] i2c: core: use I2C locking behaviour also for SMBUS
Date: Fri, 21 Sep 2018 00:48:18 +0200 [thread overview]
Message-ID: <20180920224818.GB988@kunai> (raw)
In-Reply-To: <e31d69ed-d849-db98-00c2-27d489a2dac1@axentia.se>
On Thu, Sep 20, 2018 at 07:31:19PM +0200, Peter Rosin wrote:
> On 2018-09-20 18:14, Wolfram Sang wrote:
> > If I2C transfers are executed in atomic contexts, trylock is used
> > instead of lock. This behaviour was missing for SMBUS, although a lot of
> > transfers are of SMBUS type, either emulated or direct. So, factor out
> > the locking routine into a helper and use it for I2C and SMBUS.
> >
> > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
>
> Is it ok with static analyzers to "hide" the locking in helpers like
> this? Will it not be harder for them to "see" what's going on? But I
> don't think we have any annotations anyway, so...
Yes, you are right. Yet, I prefer this to open coding the same twice and
have the problem to keep them in sync.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180921/d7ab1c6e/attachment.sig>
next prev parent reply other threads:[~2018-09-20 22:48 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-20 16:14 [RFC PATCH 0/4] i2c: core: introduce master_xfer_irqless Wolfram Sang
2018-09-20 16:14 ` Wolfram Sang
2018-09-20 16:14 ` Wolfram Sang
2018-09-20 16:14 ` [RFC PATCH 1/4] i2c: core: remove outdated DEBUG output Wolfram Sang
2018-09-20 16:14 ` Wolfram Sang
2018-09-20 16:14 ` Wolfram Sang
2018-09-20 17:23 ` Peter Rosin
2018-09-20 17:23 ` Peter Rosin
2018-09-20 17:23 ` Peter Rosin
2018-10-05 16:14 ` Wolfram Sang
2018-10-05 16:14 ` Wolfram Sang
2018-10-05 16:14 ` Wolfram Sang
2018-09-20 16:14 ` [RFC PATCH 2/4] i2c: core: remove level of indentation in i2c_transfer Wolfram Sang
2018-09-20 16:14 ` Wolfram Sang
2018-09-20 16:14 ` Wolfram Sang
2018-09-20 17:26 ` Peter Rosin
2018-09-20 17:26 ` Peter Rosin
2018-09-20 17:26 ` Peter Rosin
2018-09-20 22:46 ` Wolfram Sang
2018-09-20 22:46 ` Wolfram Sang
2018-09-20 22:46 ` Wolfram Sang
2018-10-05 16:15 ` Wolfram Sang
2018-10-05 16:15 ` Wolfram Sang
2018-10-05 16:15 ` Wolfram Sang
2018-09-20 16:14 ` [RFC PATCH 3/4] i2c: core: use I2C locking behaviour also for SMBUS Wolfram Sang
2018-09-20 16:14 ` Wolfram Sang
2018-09-20 16:14 ` Wolfram Sang
2018-09-20 17:31 ` Peter Rosin
2018-09-20 17:31 ` Peter Rosin
2018-09-20 17:31 ` Peter Rosin
2018-09-20 22:48 ` Wolfram Sang [this message]
2018-09-20 22:48 ` Wolfram Sang
2018-09-20 22:48 ` Wolfram Sang
2018-09-20 16:14 ` [RFC PATCH 4/4] i2c: core: introduce master_xfer_irqless callback Wolfram Sang
2018-09-20 16:14 ` Wolfram Sang
2018-09-20 16:14 ` Wolfram Sang
2018-09-20 17:41 ` Peter Rosin
2018-09-20 17:41 ` Peter Rosin
2018-09-20 17:41 ` Peter Rosin
2018-09-20 22:55 ` Wolfram Sang
2018-09-20 22:55 ` Wolfram Sang
2018-09-20 22:55 ` Wolfram Sang
2018-10-18 10:44 ` Russell King - ARM Linux
2018-10-18 10:44 ` Russell King - ARM Linux
2018-10-18 10:44 ` Russell King - ARM Linux
2019-02-09 18:03 ` Wolfram Sang
2019-02-09 18:03 ` Wolfram Sang
2018-09-20 22:02 ` [RFC PATCH 0/4] i2c: core: introduce master_xfer_irqless Tony Lindgren
2018-09-20 22:02 ` Tony Lindgren
2018-09-20 22:02 ` Tony Lindgren
2018-09-20 22:56 ` Wolfram Sang
2018-09-20 22:56 ` Wolfram Sang
2018-09-20 22:56 ` Wolfram Sang
2018-10-18 10:35 ` Keerthy
2018-10-18 10:35 ` Keerthy
2018-10-18 10:35 ` Keerthy
2018-09-20 23:01 ` Wolfram Sang
2018-09-20 23:01 ` Wolfram Sang
2018-09-20 23:01 ` Wolfram Sang
2018-09-23 20:20 ` Stefan Lengfeld
2018-09-23 20:20 ` Stefan Lengfeld
2018-09-23 20:20 ` Stefan Lengfeld
2018-10-07 15:39 ` [RFC PATCH 0/3] " Stefan Lengfeld
2018-10-07 15:39 ` [RFC PATCH 1/3] i2c: imx: implement master_xfer_irqless callback Stefan Lengfeld
2018-10-08 10:06 ` Andy Shevchenko
2018-10-07 15:39 ` [RFC PATCH 2/3] watchdog: da9062: avoid regmap in restart handler Stefan Lengfeld
2018-10-08 10:07 ` Andy Shevchenko
2018-10-07 15:39 ` [RFC PATCH 3/3] ARM: dts: phyboard-mira-dl: rely on PMIC for reboot and watchdog Stefan Lengfeld
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=20180920224818.GB988@kunai \
--to=wsa@the-dreams.de \
--cc=andriy.shevchenko@linux.intel.com \
--cc=contact@stefanchrist.eu \
--cc=grygorii.strashko@ti.com \
--cc=j-keerthy@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=peda@axentia.se \
--cc=preid@electromag.com.au \
--cc=t-kristo@ti.com \
--cc=wsa+renesas@sang-engineering.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.