Re: [PATCH] iio/accel/bmc150: Improve unlocking of a mutex in two functions

2017-10-26 Thread Jonathan Cameron
On Thu, 26 Oct 2017 16:51:13 +0100 Jonathan Cameron wrote: > On Wed, 25 Oct 2017 18:22:02 +0200 > Hans de Goede wrote: > > > Hi, > > > > On 25-10-17 18:15, SF Markus Elfring wrote: > > >> IMHO, if you do this, you should rework the function so that

Re: [PATCH] iio/accel/bmc150: Improve unlocking of a mutex in two functions

2017-10-26 Thread Jonathan Cameron
On Thu, 26 Oct 2017 16:51:13 +0100 Jonathan Cameron wrote: > On Wed, 25 Oct 2017 18:22:02 +0200 > Hans de Goede wrote: > > > Hi, > > > > On 25-10-17 18:15, SF Markus Elfring wrote: > > >> IMHO, if you do this, you should rework the function so that there is a > > >> single unlock call > >

Re: [PATCH] iio/accel/bmc150: Improve unlocking of a mutex in two functions

2017-10-26 Thread Jonathan Cameron
On Wed, 25 Oct 2017 18:22:02 +0200 Hans de Goede wrote: > Hi, > > On 25-10-17 18:15, SF Markus Elfring wrote: > >> IMHO, if you do this, you should rework the function so that there is a > >> single unlock call > >> at the end, not a separate one in in error label. > >

Re: [PATCH] iio/accel/bmc150: Improve unlocking of a mutex in two functions

2017-10-26 Thread Jonathan Cameron
On Wed, 25 Oct 2017 18:22:02 +0200 Hans de Goede wrote: > Hi, > > On 25-10-17 18:15, SF Markus Elfring wrote: > >> IMHO, if you do this, you should rework the function so that there is a > >> single unlock call > >> at the end, not a separate one in in error label. > > > > Thanks for your

Re: [PATCH] iio/accel/bmc150: Improve unlocking of a mutex in two functions

2017-10-25 Thread Hans de Goede
Hi, On 25-10-17 18:15, SF Markus Elfring wrote: IMHO, if you do this, you should rework the function so that there is a single unlock call at the end, not a separate one in in error label. Thanks for your update suggestion. Does it indicate that I may propose similar source code adjustments

Re: [PATCH] iio/accel/bmc150: Improve unlocking of a mutex in two functions

2017-10-25 Thread Hans de Goede
Hi, On 25-10-17 18:15, SF Markus Elfring wrote: IMHO, if you do this, you should rework the function so that there is a single unlock call at the end, not a separate one in in error label. Thanks for your update suggestion. Does it indicate that I may propose similar source code adjustments

Re: [PATCH] iio/accel/bmc150: Improve unlocking of a mutex in two functions

2017-10-25 Thread SF Markus Elfring
> IMHO, if you do this, you should rework the function so that there is a > single unlock call > at the end, not a separate one in in error label. Thanks for your update suggestion. Does it indicate that I may propose similar source code adjustments in this software area? > Could e.g. change

Re: [PATCH] iio/accel/bmc150: Improve unlocking of a mutex in two functions

2017-10-25 Thread SF Markus Elfring
> IMHO, if you do this, you should rework the function so that there is a > single unlock call > at the end, not a separate one in in error label. Thanks for your update suggestion. Does it indicate that I may propose similar source code adjustments in this software area? > Could e.g. change

Re: [PATCH] iio/accel/bmc150: Improve unlocking of a mutex in two functions

2017-10-25 Thread Hans de Goede
Hi, On 25-10-17 16:33, SF Markus Elfring wrote: From: Markus Elfring Date: Wed, 25 Oct 2017 16:26:29 +0200 Add a jump target so that a call of the function "mutex_unlock" is mostly stored at the end of these function implementations. Replace five calls by goto

Re: [PATCH] iio/accel/bmc150: Improve unlocking of a mutex in two functions

2017-10-25 Thread Hans de Goede
Hi, On 25-10-17 16:33, SF Markus Elfring wrote: From: Markus Elfring Date: Wed, 25 Oct 2017 16:26:29 +0200 Add a jump target so that a call of the function "mutex_unlock" is mostly stored at the end of these function implementations. Replace five calls by goto statements. This issue was

[PATCH] iio/accel/bmc150: Improve unlocking of a mutex in two functions

2017-10-25 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 25 Oct 2017 16:26:29 +0200 Add a jump target so that a call of the function "mutex_unlock" is mostly stored at the end of these function implementations. Replace five calls by goto statements. This issue was detected by using the

[PATCH] iio/accel/bmc150: Improve unlocking of a mutex in two functions

2017-10-25 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 25 Oct 2017 16:26:29 +0200 Add a jump target so that a call of the function "mutex_unlock" is mostly stored at the end of these function implementations. Replace five calls by goto statements. This issue was detected by using the Coccinelle software.