* [PATCH] i2c: omap: don't save a value only needed for read-clearing
@ 2012-11-14 17:21 Wolfram Sang
[not found] ` <1352913666-11022-1-git-send-email-wolfram-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Wolfram Sang @ 2012-11-14 17:21 UTC (permalink / raw)
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA
Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA, Felipe Balbi, Shubhrajyoti D,
Wolfram Sang
Signed-off-by: Wolfram Sang <wolfram-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
---
This makes one of my code analyzers happy and makes me a part of the
i2c-omap-patch crowd \o/
drivers/i2c/busses/i2c-omap.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 482c63d..49b12fb 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1291,14 +1291,13 @@ static int omap_i2c_runtime_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct omap_i2c_dev *_dev = platform_get_drvdata(pdev);
- u16 iv;
_dev->iestate = omap_i2c_read_reg(_dev, OMAP_I2C_IE_REG);
omap_i2c_write_reg(_dev, OMAP_I2C_IE_REG, 0);
if (_dev->rev < OMAP_I2C_OMAP1_REV_2) {
- iv = omap_i2c_read_reg(_dev, OMAP_I2C_IV_REG); /* Read clears */
+ omap_i2c_read_reg(_dev, OMAP_I2C_IV_REG); /* Read clears */
} else {
omap_i2c_write_reg(_dev, OMAP_I2C_STAT_REG, _dev->iestate);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread[parent not found: <1352913666-11022-1-git-send-email-wolfram-z923LK4zBo2bacvFa/9K2g@public.gmane.org>]
* Re: [PATCH] i2c: omap: don't save a value only needed for read-clearing [not found] ` <1352913666-11022-1-git-send-email-wolfram-z923LK4zBo2bacvFa/9K2g@public.gmane.org> @ 2012-11-14 18:37 ` Felipe Balbi [not found] ` <20121114183739.GA30212-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Felipe Balbi @ 2012-11-14 18:37 UTC (permalink / raw) To: Wolfram Sang Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA, Felipe Balbi, Shubhrajyoti D [-- Attachment #1: Type: text/plain, Size: 1661 bytes --] Hi, On Wed, Nov 14, 2012 at 06:21:06PM +0100, Wolfram Sang wrote: > Signed-off-by: Wolfram Sang <wolfram-z923LK4zBo2bacvFa/9K2g@public.gmane.org> fine by me. I'd like to see a commit log (even if obvious) there. But no strong feelings. Acked-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> > --- > > This makes one of my code analyzers happy and makes me a part of the anything open source which we could all be using ? :-) > i2c-omap-patch crowd \o/ > > drivers/i2c/busses/i2c-omap.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c > index 482c63d..49b12fb 100644 > --- a/drivers/i2c/busses/i2c-omap.c > +++ b/drivers/i2c/busses/i2c-omap.c > @@ -1291,14 +1291,13 @@ static int omap_i2c_runtime_suspend(struct device *dev) > { > struct platform_device *pdev = to_platform_device(dev); > struct omap_i2c_dev *_dev = platform_get_drvdata(pdev); > - u16 iv; > > _dev->iestate = omap_i2c_read_reg(_dev, OMAP_I2C_IE_REG); > > omap_i2c_write_reg(_dev, OMAP_I2C_IE_REG, 0); > > if (_dev->rev < OMAP_I2C_OMAP1_REV_2) { > - iv = omap_i2c_read_reg(_dev, OMAP_I2C_IV_REG); /* Read clears */ > + omap_i2c_read_reg(_dev, OMAP_I2C_IV_REG); /* Read clears */ > } else { > omap_i2c_write_reg(_dev, OMAP_I2C_STAT_REG, _dev->iestate); > > -- > 1.7.10.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-omap" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <20121114183739.GA30212-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>]
* Re: [PATCH] i2c: omap: don't save a value only needed for read-clearing [not found] ` <20121114183739.GA30212-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org> @ 2012-11-14 18:50 ` Wolfram Sang [not found] ` <20121114185033.GB26955-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Wolfram Sang @ 2012-11-14 18:50 UTC (permalink / raw) To: Felipe Balbi Cc: Wolfram Sang, linux-i2c-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA, Shubhrajyoti D [-- Attachment #1: Type: text/plain, Size: 456 bytes --] > > This makes one of my code analyzers happy and makes me a part of the > > anything open source which we could all be using ? :-) 'my' as in 'one of those I am using'. It was cppcheck which found that flaw. Its use for kernel code is limited, but it does find one or the other thing. -- Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <20121114185033.GB26955-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>]
* Re: [PATCH] i2c: omap: don't save a value only needed for read-clearing [not found] ` <20121114185033.GB26955-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> @ 2012-11-15 10:04 ` Shubhrajyoti Datta [not found] ` <CAM=Q2cuRBK4SG9HfcV+L7Yfwv4kv8rTOXzrnUbjfE+-c7JNoNA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Shubhrajyoti Datta @ 2012-11-15 10:04 UTC (permalink / raw) To: Wolfram Sang Cc: Felipe Balbi, Wolfram Sang, linux-i2c-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA, Shubhrajyoti D On Thu, Nov 15, 2012 at 12:20 AM, Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> wrote: > >> > This makes one of my code analyzers happy and makes me a part of the >> >> anything open source which we could all be using ? :-) > > 'my' as in 'one of those I am using'. It was cppcheck which found that > flaw. Its use for kernel code is limited, but it does find one or the > other thing. sparse did not complain though. So it seems it helps to run multiple static tools:-) > > -- > Pengutronix e.K. | Wolfram Sang | > Industrial Linux Solutions | http://www.pengutronix.de/ | ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <CAM=Q2cuRBK4SG9HfcV+L7Yfwv4kv8rTOXzrnUbjfE+-c7JNoNA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] i2c: omap: don't save a value only needed for read-clearing [not found] ` <CAM=Q2cuRBK4SG9HfcV+L7Yfwv4kv8rTOXzrnUbjfE+-c7JNoNA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2012-11-15 12:51 ` Felipe Balbi 0 siblings, 0 replies; 5+ messages in thread From: Felipe Balbi @ 2012-11-15 12:51 UTC (permalink / raw) To: Shubhrajyoti Datta Cc: Wolfram Sang, Felipe Balbi, Wolfram Sang, linux-i2c-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA, Shubhrajyoti D [-- Attachment #1: Type: text/plain, Size: 650 bytes --] Hi, On Thu, Nov 15, 2012 at 03:34:10PM +0530, Shubhrajyoti Datta wrote: > On Thu, Nov 15, 2012 at 12:20 AM, Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> wrote: > > > >> > This makes one of my code analyzers happy and makes me a part of the > >> > >> anything open source which we could all be using ? :-) > > > > 'my' as in 'one of those I am using'. It was cppcheck which found that > > flaw. Its use for kernel code is limited, but it does find one or the > > other thing. > > sparse did not complain though. > So it seems it helps to run multiple static tools:-) or sending a patch to sparse ;-) -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-11-15 12:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-14 17:21 [PATCH] i2c: omap: don't save a value only needed for read-clearing Wolfram Sang
[not found] ` <1352913666-11022-1-git-send-email-wolfram-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2012-11-14 18:37 ` Felipe Balbi
[not found] ` <20121114183739.GA30212-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2012-11-14 18:50 ` Wolfram Sang
[not found] ` <20121114185033.GB26955-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-11-15 10:04 ` Shubhrajyoti Datta
[not found] ` <CAM=Q2cuRBK4SG9HfcV+L7Yfwv4kv8rTOXzrnUbjfE+-c7JNoNA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-15 12:51 ` Felipe Balbi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox