* [PATCH] iio: imu: kmx61: fix simple_return.cocci warnings [not found] <201412270742.z0dX9rhu%fengguang.wu@intel.com> @ 2014-12-26 23:07 ` kbuild test robot 2014-12-27 8:05 ` Daniel Baluta 0 siblings, 1 reply; 2+ messages in thread From: kbuild test robot @ 2014-12-26 23:07 UTC (permalink / raw) To: Daniel Baluta Cc: kbuild-all, Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald, linux-iio, linux-kernel drivers/iio/imu/kmx61.c:543:1-4: WARNING: end returns can be simpified drivers/iio/imu/kmx61.c:480:1-4: WARNING: end returns can be simpified if negative or 0 value Simplify a trivial if-return sequence. Possibly combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci CC: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> --- kmx61.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) --- a/drivers/iio/imu/kmx61.c +++ b/drivers/iio/imu/kmx61.c @@ -540,11 +540,7 @@ static int kmx61_setup_new_data_interrup return ret; } - ret = kmx61_set_mode(data, mode, KMX61_ACC | KMX61_MAG, true); - if (ret) - return ret; - - return 0; + return kmx61_set_mode(data, mode, KMX61_ACC | KMX61_MAG, true); } /** ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] iio: imu: kmx61: fix simple_return.cocci warnings 2014-12-26 23:07 ` [PATCH] iio: imu: kmx61: fix simple_return.cocci warnings kbuild test robot @ 2014-12-27 8:05 ` Daniel Baluta 0 siblings, 0 replies; 2+ messages in thread From: Daniel Baluta @ 2014-12-27 8:05 UTC (permalink / raw) To: kbuild test robot Cc: Daniel Baluta, kbuild-all, Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald, linux-iio@vger.kernel.org, Linux Kernel Mailing List On Sat, Dec 27, 2014 at 1:07 AM, kbuild test robot <fengguang.wu@intel.com> wrote: > drivers/iio/imu/kmx61.c:543:1-4: WARNING: end returns can be simpified > drivers/iio/imu/kmx61.c:480:1-4: WARNING: end returns can be simpified if negative or 0 value > > Simplify a trivial if-return sequence. Possibly combine with a > preceding function call. > Generated by: scripts/coccinelle/misc/simple_return.cocci > > CC: Daniel Baluta <daniel.baluta@intel.com> > Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> > --- > > kmx61.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > --- a/drivers/iio/imu/kmx61.c > +++ b/drivers/iio/imu/kmx61.c > @@ -540,11 +540,7 @@ static int kmx61_setup_new_data_interrup > return ret; > } > > - ret = kmx61_set_mode(data, mode, KMX61_ACC | KMX61_MAG, true); > - if (ret) > - return ret; > - > - return 0; > + return kmx61_set_mode(data, mode, KMX61_ACC | KMX61_MAG, true); > } > > /** Fixed with this patch: http://marc.info/?l=linux-iio&m=141934100614777&w=2 Daniel. ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-27 8:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <201412270742.z0dX9rhu%fengguang.wu@intel.com>
2014-12-26 23:07 ` [PATCH] iio: imu: kmx61: fix simple_return.cocci warnings kbuild test robot
2014-12-27 8:05 ` Daniel Baluta
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.