* [iio:testing 16/16] drivers/iio/light/vcnl4000.c:153 vcnl4200_set_power_state() warn: ignoring unreachable code.
@ 2020-02-07 3:34 Dan Carpenter
0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2020-02-07 3:34 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 2744 bytes --]
CC: kbuild-all(a)lists.01.org
TO: "Guido Günther" <agx@sigxcpu.org>
CC: Jonathan Cameron <Jonathan.Cameron@huawei.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git testing
head: ce08fb79f9c866d1fe6dba977a32954cdc444059
commit: ce08fb79f9c866d1fe6dba977a32954cdc444059 [16/16] iio: vcnl4000: Enable runtime pm for vcnl4200/4040
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/iio/light/vcnl4000.c:153 vcnl4200_set_power_state() warn: ignoring unreachable code.
# https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/commit/?id=ce08fb79f9c866d1fe6dba977a32954cdc444059
git remote add iio https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git
git remote update iio
git checkout ce08fb79f9c866d1fe6dba977a32954cdc444059
vim +153 drivers/iio/light/vcnl4000.c
be38866fbb97f0e Tomas Novotny 2018-07-25 142
ce08fb79f9c866d Guido Günther 2020-02-03 143 static int vcnl4200_set_power_state(struct vcnl4000_data *data, bool on)
ce08fb79f9c866d Guido Günther 2020-02-03 144 {
ce08fb79f9c866d Guido Günther 2020-02-03 145 u16 val = on ? 0 /* power on */ : 1 /* shut down */;
ce08fb79f9c866d Guido Günther 2020-02-03 146 int ret;
ce08fb79f9c866d Guido Günther 2020-02-03 147
ce08fb79f9c866d Guido Günther 2020-02-03 148 ret = i2c_smbus_write_word_data(data->client, VCNL4200_AL_CONF, val);
ce08fb79f9c866d Guido Günther 2020-02-03 149 if (ret < 0)
ce08fb79f9c866d Guido Günther 2020-02-03 150 return ret;
ce08fb79f9c866d Guido Günther 2020-02-03 151
ce08fb79f9c866d Guido Günther 2020-02-03 152 return i2c_smbus_write_word_data(data->client, VCNL4200_PS_CONF1, val);
ret =
ce08fb79f9c866d Guido Günther 2020-02-03 @153 if (ret < 0)
ce08fb79f9c866d Guido Günther 2020-02-03 154 return ret;
ce08fb79f9c866d Guido Günther 2020-02-03 155
ce08fb79f9c866d Guido Günther 2020-02-03 156 if (on) {
ce08fb79f9c866d Guido Günther 2020-02-03 157 /* Wait@least one integration cycle before fetching data */
ce08fb79f9c866d Guido Günther 2020-02-03 158 data->vcnl4200_al.last_measurement = ktime_get();
ce08fb79f9c866d Guido Günther 2020-02-03 159 data->vcnl4200_ps.last_measurement = ktime_get();
ce08fb79f9c866d Guido Günther 2020-02-03 160 }
ce08fb79f9c866d Guido Günther 2020-02-03 161
ce08fb79f9c866d Guido Günther 2020-02-03 162 return 0;
ce08fb79f9c866d Guido Günther 2020-02-03 163 }
ce08fb79f9c866d Guido Günther 2020-02-03 164
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* [iio:testing 16/16] drivers/iio/light/vcnl4000.c:153 vcnl4200_set_power_state() warn: ignoring unreachable code.
@ 2020-02-07 3:35 ` Dan Carpenter
0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2020-02-07 3:35 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 2681 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git testing
head: ce08fb79f9c866d1fe6dba977a32954cdc444059
commit: ce08fb79f9c866d1fe6dba977a32954cdc444059 [16/16] iio: vcnl4000: Enable runtime pm for vcnl4200/4040
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/iio/light/vcnl4000.c:153 vcnl4200_set_power_state() warn: ignoring unreachable code.
# https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/commit/?id=ce08fb79f9c866d1fe6dba977a32954cdc444059
git remote add iio https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git
git remote update iio
git checkout ce08fb79f9c866d1fe6dba977a32954cdc444059
vim +153 drivers/iio/light/vcnl4000.c
be38866fbb97f0e Tomas Novotny 2018-07-25 142
ce08fb79f9c866d Guido Günther 2020-02-03 143 static int vcnl4200_set_power_state(struct vcnl4000_data *data, bool on)
ce08fb79f9c866d Guido Günther 2020-02-03 144 {
ce08fb79f9c866d Guido Günther 2020-02-03 145 u16 val = on ? 0 /* power on */ : 1 /* shut down */;
ce08fb79f9c866d Guido Günther 2020-02-03 146 int ret;
ce08fb79f9c866d Guido Günther 2020-02-03 147
ce08fb79f9c866d Guido Günther 2020-02-03 148 ret = i2c_smbus_write_word_data(data->client, VCNL4200_AL_CONF, val);
ce08fb79f9c866d Guido Günther 2020-02-03 149 if (ret < 0)
ce08fb79f9c866d Guido Günther 2020-02-03 150 return ret;
ce08fb79f9c866d Guido Günther 2020-02-03 151
ce08fb79f9c866d Guido Günther 2020-02-03 152 return i2c_smbus_write_word_data(data->client, VCNL4200_PS_CONF1, val);
^^^^^^^^^^^^^^^
ret =
ce08fb79f9c866d Guido Günther 2020-02-03 @153 if (ret < 0)
ce08fb79f9c866d Guido Günther 2020-02-03 154 return ret;
ce08fb79f9c866d Guido Günther 2020-02-03 155
ce08fb79f9c866d Guido Günther 2020-02-03 156 if (on) {
ce08fb79f9c866d Guido Günther 2020-02-03 157 /* Wait@least one integration cycle before fetching data */
ce08fb79f9c866d Guido Günther 2020-02-03 158 data->vcnl4200_al.last_measurement = ktime_get();
ce08fb79f9c866d Guido Günther 2020-02-03 159 data->vcnl4200_ps.last_measurement = ktime_get();
ce08fb79f9c866d Guido Günther 2020-02-03 160 }
ce08fb79f9c866d Guido Günther 2020-02-03 161
ce08fb79f9c866d Guido Günther 2020-02-03 162 return 0;
ce08fb79f9c866d Guido Günther 2020-02-03 163 }
ce08fb79f9c866d Guido Günther 2020-02-03 164
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* [iio:testing 16/16] drivers/iio/light/vcnl4000.c:153 vcnl4200_set_power_state() warn: ignoring unreachable code.
@ 2020-02-07 3:35 ` Dan Carpenter
0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2020-02-07 3:35 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2681 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git testing
head: ce08fb79f9c866d1fe6dba977a32954cdc444059
commit: ce08fb79f9c866d1fe6dba977a32954cdc444059 [16/16] iio: vcnl4000: Enable runtime pm for vcnl4200/4040
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/iio/light/vcnl4000.c:153 vcnl4200_set_power_state() warn: ignoring unreachable code.
# https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/commit/?id=ce08fb79f9c866d1fe6dba977a32954cdc444059
git remote add iio https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git
git remote update iio
git checkout ce08fb79f9c866d1fe6dba977a32954cdc444059
vim +153 drivers/iio/light/vcnl4000.c
be38866fbb97f0e Tomas Novotny 2018-07-25 142
ce08fb79f9c866d Guido Günther 2020-02-03 143 static int vcnl4200_set_power_state(struct vcnl4000_data *data, bool on)
ce08fb79f9c866d Guido Günther 2020-02-03 144 {
ce08fb79f9c866d Guido Günther 2020-02-03 145 u16 val = on ? 0 /* power on */ : 1 /* shut down */;
ce08fb79f9c866d Guido Günther 2020-02-03 146 int ret;
ce08fb79f9c866d Guido Günther 2020-02-03 147
ce08fb79f9c866d Guido Günther 2020-02-03 148 ret = i2c_smbus_write_word_data(data->client, VCNL4200_AL_CONF, val);
ce08fb79f9c866d Guido Günther 2020-02-03 149 if (ret < 0)
ce08fb79f9c866d Guido Günther 2020-02-03 150 return ret;
ce08fb79f9c866d Guido Günther 2020-02-03 151
ce08fb79f9c866d Guido Günther 2020-02-03 152 return i2c_smbus_write_word_data(data->client, VCNL4200_PS_CONF1, val);
^^^^^^^^^^^^^^^
ret =
ce08fb79f9c866d Guido Günther 2020-02-03 @153 if (ret < 0)
ce08fb79f9c866d Guido Günther 2020-02-03 154 return ret;
ce08fb79f9c866d Guido Günther 2020-02-03 155
ce08fb79f9c866d Guido Günther 2020-02-03 156 if (on) {
ce08fb79f9c866d Guido Günther 2020-02-03 157 /* Wait@least one integration cycle before fetching data */
ce08fb79f9c866d Guido Günther 2020-02-03 158 data->vcnl4200_al.last_measurement = ktime_get();
ce08fb79f9c866d Guido Günther 2020-02-03 159 data->vcnl4200_ps.last_measurement = ktime_get();
ce08fb79f9c866d Guido Günther 2020-02-03 160 }
ce08fb79f9c866d Guido Günther 2020-02-03 161
ce08fb79f9c866d Guido Günther 2020-02-03 162 return 0;
ce08fb79f9c866d Guido Günther 2020-02-03 163 }
ce08fb79f9c866d Guido Günther 2020-02-03 164
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-02-07 3:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-07 3:34 [iio:testing 16/16] drivers/iio/light/vcnl4000.c:153 vcnl4200_set_power_state() warn: ignoring unreachable code Dan Carpenter
2020-02-07 3:35 Dan Carpenter
2020-02-07 3:35 ` Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.