linux_dsm_epyc7002/drivers/i2c/muxes
Julia Lawall b10d7a1fd6 i2c: mux: pca954x: merge calls to of_match_device and of_device_get_match_data
Drop call to of_match_device, which is subsumed by the subsequent
call to of_device_get_match_data.  The code becomes simpler, and a
temporary variable can be dropped.

The semantic match that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
local idexpression match;
identifier i;
expression x, dev, e, e1;
@@
-        match@i = of_match_device(x, dev);
-        if (match) e = of_device_get_match_data(dev);
-        else e = e1;
+        e = of_device_get_match_data(dev);
+        if (!e) e = e1;

@@
identifier r.i;
@@
- const struct of_device_id *i;
... when != i
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Peter Rosin <peda@axentia.se>
2018-05-24 13:51:25 +02:00
..
i2c-arb-gpio-challenge.c i2c: arb: gpio-challenge: stop double error reporting 2017-04-03 14:07:32 +02:00
i2c-demux-pinctrl.c i2c: mux: demux-pinctrl: use proper parent device for demux adapter 2018-05-24 13:45:04 +02:00
i2c-mux-gpio.c i2c: mux: gpio: stop double error reporting 2017-04-03 14:07:32 +02:00
i2c-mux-gpmux.c i2c: i2c-mux-gpmux: new driver 2017-06-03 19:29:26 +09:00
i2c-mux-ltc4306.c i2c: mux: ltc4306: switch to using .probe_new 2018-05-19 23:54:30 +02:00
i2c-mux-mlxcpld.c i2c: mux: mlxcpld: move header file out of I2C realm 2017-08-14 11:54:10 +02:00
i2c-mux-pca954x.c i2c: mux: pca954x: merge calls to of_match_device and of_device_get_match_data 2018-05-24 13:51:25 +02:00
i2c-mux-pca9541.c i2c: mux: pca954x: move header file out of I2C realm 2017-08-14 11:54:03 +02:00
i2c-mux-pinctrl.c i2c: mux: pinctrl: potential NULL dereference on error 2017-08-17 14:19:56 +02:00
i2c-mux-reg.c i2c: mux: reg: failed memory allocation is logged elsewhere 2018-05-24 13:14:21 +02:00
Kconfig i2c: mux: pca954x: add support for NXP PCA984x family 2017-12-30 23:12:34 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00