Skip to contentSkip to conversation

Staging: iio: remove exceptional & on function name

PATCH New Bhumika Goyal 1 participant 4 messages Feb 12, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover Staging: iio: remove exceptional & on function name

These files function names are otherwise used as pointers without &. Found using coccinelle.
// <smpl>
@r@
identifier f;
@@

f(...) { ... }
@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Bhumika Goyal (3):
Staging: iio: light: remove exceptional & on function name
Staging: iio: light: remove exceptional & on function name
Staging: iio: magnetometer: remove exceptional & on function name

 drivers/staging/iio/light/isl29018.c            | 8 ++++----
 drivers/staging/iio/light/isl29028.c            | 4 ++--
 drivers/staging/iio/magnetometer/hmc5843_core.c | 6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/3 Staging: iio: light: remove exceptional & on function name

In this file,function names are otherwise used as pointers without &. Found using coccinelle.
// <smpl>
@r@
identifier f;
@@

f(...) { ... }
@@
identifier r.f;
@@

- &f
+ f
// </smpl>

---
 drivers/staging/iio/light/isl29018.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/iio/light/isl29018.c +4 -4
index bbf7e35..756057c 100644
@@ -614,15 +614,15 @@ static int isl29018_chip_init(struct isl29018_chip *chip)
 static const struct iio_info isl29018_info = {
 	.attrs = &isl29018_group,
 	.driver_module = THIS_MODULE,
-	.read_raw = &isl29018_read_raw,
-	.write_raw = &isl29018_write_raw,
+	.read_raw = isl29018_read_raw,
+	.write_raw = isl29018_write_raw,
 };
 
 static const struct iio_info isl29023_info = {
 	.attrs = &isl29023_group,
 	.driver_module = THIS_MODULE,
-	.read_raw = &isl29018_read_raw,
-	.write_raw = &isl29018_write_raw,
+	.read_raw = isl29018_read_raw,
+	.write_raw = isl29018_write_raw,
 };
 
 static bool is_volatile_reg(struct device *dev, unsigned int reg)
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/3 Staging: iio: light: remove exceptional & on function name

In reply to Bhumika Goyal

In this file,function names are otherwise used as pointers without &. Found using coccinelle.
// <smpl>
@r@
identifier f;
@@

f(...) { ... }
@@
identifier r.f;
@@

- &f
+ f
// </smpl>

---
 drivers/staging/iio/light/isl29028.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/iio/light/isl29028.c +2 -2
index 32ae112..e1bca9c 100644
@@ -406,8 +406,8 @@ static const struct iio_chan_spec isl29028_channels[] = {
 static const struct iio_info isl29028_info = {
 	.attrs = &isl29108_group,
 	.driver_module = THIS_MODULE,
-	.read_raw = &isl29028_read_raw,
-	.write_raw = &isl29028_write_raw,
+	.read_raw = isl29028_read_raw,
+	.write_raw = isl29028_write_raw,
 };
 
 static int isl29028_chip_init(struct isl29028_chip *chip)
Signature · 1 line
1.9.1
#3 lore raw

PATCH 3/3 Staging: iio: magnetometer: remove exceptional & on function name

In reply to Bhumika Goyal

In this file,function names are otherwise used as pointers without &. Found using coccinelle.
// <smpl>
@r@
identifier f;
@@

f(...) { ... }
@@
identifier r.f;
@@

- &f
+ f
// </smpl>

---
 drivers/staging/iio/magnetometer/hmc5843_core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/iio/magnetometer/hmc5843_core.c +3 -3
index 394bc14..aaa5023 100644
@@ -554,9 +554,9 @@ static int hmc5843_init(struct hmc5843_data *data)
 
 static const struct iio_info hmc5843_info = {
 	.attrs = &hmc5843_group,
-	.read_raw = &hmc5843_read_raw,
-	.write_raw = &hmc5843_write_raw,
-	.write_raw_get_fmt = &hmc5843_write_raw_get_fmt,
+	.read_raw = hmc5843_read_raw,
+	.write_raw = hmc5843_write_raw,
+	.write_raw_get_fmt = hmc5843_write_raw_get_fmt,
 	.driver_module = THIS_MODULE,
 };
 
Signature · 1 line
1.9.1