From: Julia Lawall <julia.lawall@lip6.fr>
To: Corey Minyard <cminyard@mvista.com>,
Guenter Roeck <linux@roeck-us.net>,
Wolfram Sang <wsa@the-dreams.de>
Cc: kbuild-all@01.org, linux-i2c@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] i2c-mux-pca9541: fix setup_timer.cocci warnings
Date: Wed, 27 Apr 2016 21:06:47 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.02.1604272105150.2043@localhost6.localdomain6> (raw)
Use setup_timer function instead of initializing timer with the function
and data fields
Generated by: scripts/coccinelle/api/setup_timer.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---
tree: git://git.code.sf.net/p/openipmi/linux-ipmi v4.5-ipmi
head: 671fec027e30fdac67b341f0271841f02db0a027
commit: 4a199ab1bf7b7a2b5f7e0b0eb4162b4e98b9cd7f [25/33] i2c-mux-pca9541:
Add support for non-blocking handling
i2c-mux-pca9541.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- a/drivers/i2c/muxes/i2c-mux-pca9541.c
+++ b/drivers/i2c/muxes/i2c-mux-pca9541.c
@@ -547,9 +547,7 @@ static int pca9541_probe(struct i2c_clie
data->op_e.smbus.data = &data->op_data;
data->op_e.smbus.size = I2C_SMBUS_BYTE_DATA;
- init_timer(&data->timer);
- data->timer.data = (unsigned long) data;
- data->timer.function = pca9541_timeout;
+ setup_timer(&data->timer, pca9541_timeout, (unsigned long)data);
/*
* I2C accesses are unprotected here.
next reply other threads:[~2016-04-27 19:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 19:06 Julia Lawall [this message]
2016-04-27 21:42 ` [PATCH] i2c-mux-pca9541: fix setup_timer.cocci warnings Peter Rosin
2016-05-11 15:14 ` Wolfram Sang
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=alpine.DEB.2.02.1604272105150.2043@localhost6.localdomain6 \
--to=julia.lawall@lip6.fr \
--cc=cminyard@mvista.com \
--cc=kbuild-all@01.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=wsa@the-dreams.de \
/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