Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1234987 > unrolled thread

[PATCH 0/8] mfd: Simplify return logic

Started byJavier Martinez Canillas <javier@osg.samsung.com>
First post2015-09-29 13:30 +0200
Last post2015-09-29 14:30 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/8] mfd: Simplify return logic Javier Martinez Canillas <javier@osg.samsung.com> - 2015-09-29 13:30 +0200
    [PATCH 6/8] mfd: da903x: Simplify function return logic Javier Martinez Canillas <javier@osg.samsung.com> - 2015-09-29 13:30 +0200
      RE: [PATCH 6/8] mfd: da903x: Simplify function return logic "Opensource [Adam Thomson]" <Adam.Thomson.Opensource@diasemi.com> - 2015-09-29 14:30 +0200

#1234987 — [PATCH 0/8] mfd: Simplify return logic

FromJavier Martinez Canillas <javier@osg.samsung.com>
Date2015-09-29 13:30 +0200
Subject[PATCH 0/8] mfd: Simplify return logic
Message-ID<qe1gB-53J-3@gated-at.bofh.it>
Hello Lee,

This series contains trivial patches that simplify the return logic in
a number of functions in mfd drivers. All these were found by running
make coccichek M=drivers/mfd.

The patches don't contain functional changes but makes the functions
simpler and removes unnecessary lines of code.

Best regards,
Javier


Javier Martinez Canillas (8):
  mfd: htc-i2cpld: Remove unneded ret variable
  mfd: arizona: Remove unneded ret variable
  mfd: pcf50633: Remove unneded ret variable
  mfd: kempld-core: Simplify function return logic
  mfd: rtsx: Simplify function return logic
  mfd: da903x: Simplify function return logic
  mfd: da9052: Simplify function return logic
  mfd: lm3533: Simplify function return logic

 drivers/mfd/arizona-core.c |  4 +---
 drivers/mfd/da903x.c       |  6 +-----
 drivers/mfd/da9052-i2c.c   |  6 +-----
 drivers/mfd/da9052-spi.c   |  6 +-----
 drivers/mfd/htc-i2cpld.c   |  3 +--
 drivers/mfd/kempld-core.c  | 14 ++------------
 drivers/mfd/lm3533-core.c  | 12 ++----------
 drivers/mfd/pcf50633-irq.c |  4 ++--
 drivers/mfd/rts5209.c      |  6 +-----
 drivers/mfd/rts5227.c      |  6 +-----
 drivers/mfd/rts5229.c      |  6 +-----
 drivers/mfd/rts5249.c      |  6 +-----
 drivers/mfd/rtsx_pcr.c     |  6 +-----
 13 files changed, 16 insertions(+), 69 deletions(-)

-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1234988 — [PATCH 6/8] mfd: da903x: Simplify function return logic

FromJavier Martinez Canillas <javier@osg.samsung.com>
Date2015-09-29 13:30 +0200
Subject[PATCH 6/8] mfd: da903x: Simplify function return logic
Message-ID<qe1gD-53J-35@gated-at.bofh.it>
In reply to#1234987
The invoked function already returns zero on success or a negative
errno code so there is no need to open code the logic in the caller.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---

 drivers/mfd/da903x.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/mfd/da903x.c b/drivers/mfd/da903x.c
index ef7fe2ae2fa4..37e4426ef061 100644
--- a/drivers/mfd/da903x.c
+++ b/drivers/mfd/da903x.c
@@ -532,11 +532,7 @@ static int da903x_probe(struct i2c_client *client,
 		return ret;
 	}
 
-	ret = da903x_add_subdevs(chip, pdata);
-	if (ret)
-		return ret;
-
-	return 0;
+	return da903x_add_subdevs(chip, pdata);
 }
 
 static int da903x_remove(struct i2c_client *client)
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1235020 — RE: [PATCH 6/8] mfd: da903x: Simplify function return logic

From"Opensource [Adam Thomson]" <Adam.Thomson.Opensource@diasemi.com>
Date2015-09-29 14:30 +0200
SubjectRE: [PATCH 6/8] mfd: da903x: Simplify function return logic
Message-ID<qe2cI-6p2-29@gated-at.bofh.it>
In reply to#1234988
T24gU2VwdGVtYmVyIDI5LCAyMDE1IDEyOjI2LCBKYXZpZXIgTWFydGluZXogQ2FuaWxsYXMgd3Jv
dGU6DQoNCj4gVGhlIGludm9rZWQgZnVuY3Rpb24gYWxyZWFkeSByZXR1cm5zIHplcm8gb24gc3Vj
Y2VzcyBvciBhIG5lZ2F0aXZlDQo+IGVycm5vIGNvZGUgc28gdGhlcmUgaXMgbm8gbmVlZCB0byBv
cGVuIGNvZGUgdGhlIGxvZ2ljIGluIHRoZSBjYWxsZXIuDQo+IA0KPiBTaWduZWQtb2ZmLWJ5OiBK
YXZpZXIgTWFydGluZXogQ2FuaWxsYXMgPGphdmllckBvc2cuc2Ftc3VuZy5jb20+DQo+IC0tLQ0K
DQpBY2tlZC1ieTogQWRhbSBUaG9tc29uIDxBZGFtLlRob21zb24uT3BlbnNvdXJjZUBkaWFzZW1p
LmNvbT4NCg==
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web