Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1490567 > unrolled thread
| Started by | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| First post | 2016-09-24 08:30 +0200 |
| Last post | 2016-09-25 19:40 +0200 |
| Articles | 9 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/7] iio: Rename a jump label in iio_buffer_store_watermark() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-24 08:30 +0200
Re: [PATCH 2/7] iio: Rename a jump label in iio_buffer_store_watermark() Jonathan Cameron <jic23@kernel.org> - 2016-09-24 17:40 +0200
Re: iio: Rename a jump label in iio_buffer_store_watermark() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-24 21:30 +0200
Re: iio: Rename a jump label in iio_buffer_store_watermark() Jonathan Cameron <jic23@kernel.org> - 2016-09-25 10:50 +0200
Re: iio: Rename a jump label in iio_buffer_store_watermark() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-25 15:10 +0200
Re: iio: Rename a jump label in iio_buffer_store_watermark() Jonathan Cameron <jic23@kernel.org> - 2016-09-25 16:30 +0200
Re: iio: Rename a jump label in iio_buffer_store_watermark() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-25 17:20 +0200
Re: iio: Rename a jump label in iio_buffer_store_watermark() Jonathan Cameron <jic23@kernel.org> - 2016-09-25 18:50 +0200
Re: iio: Rename a jump label in iio_buffer_store_watermark() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-25 19:40 +0200
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2016-09-24 08:30 +0200 |
| Subject | [PATCH 2/7] iio: Rename a jump label in iio_buffer_store_watermark() |
| Message-ID | <skODf-5Wa-1@gated-at.bofh.it> |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 24 Sep 2016 06:54:49 +0200
Adjust jump labels according to the current Linux coding style convention.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/iio/industrialio-buffer.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
index 7a4d9499..a865af8 100644
--- a/drivers/iio/industrialio-buffer.c
+++ b/drivers/iio/industrialio-buffer.c
@@ -1028,16 +1028,16 @@ static ssize_t iio_buffer_store_watermark(struct device *dev,
if (val > buffer->length) {
ret = -EINVAL;
- goto out;
+ goto unlock;
}
if (iio_buffer_is_active(indio_dev->buffer)) {
ret = -EBUSY;
- goto out;
+ goto unlock;
}
buffer->watermark = val;
-out:
+unlock:
mutex_unlock(&indio_dev->mlock);
return ret ? ret : len;
--
2.10.0
[toc] | [next] | [standalone]
| From | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| Date | 2016-09-24 17:40 +0200 |
| Subject | Re: [PATCH 2/7] iio: Rename a jump label in iio_buffer_store_watermark() |
| Message-ID | <skXdv-2Iz-13@gated-at.bofh.it> |
| In reply to | #1490567 |
On 24/09/16 07:25, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 24 Sep 2016 06:54:49 +0200
>
> Adjust jump labels according to the current Linux coding style convention.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
I'm not necessarily against this change which does perhaps clarify the code
ever so slightly, but I am interested to know where
'current Linux coding style convention' comes from?
Jonathan
> ---
> drivers/iio/industrialio-buffer.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
> index 7a4d9499..a865af8 100644
> --- a/drivers/iio/industrialio-buffer.c
> +++ b/drivers/iio/industrialio-buffer.c
> @@ -1028,16 +1028,16 @@ static ssize_t iio_buffer_store_watermark(struct device *dev,
>
> if (val > buffer->length) {
> ret = -EINVAL;
> - goto out;
> + goto unlock;
> }
>
> if (iio_buffer_is_active(indio_dev->buffer)) {
> ret = -EBUSY;
> - goto out;
> + goto unlock;
> }
>
> buffer->watermark = val;
> -out:
> +unlock:
> mutex_unlock(&indio_dev->mlock);
>
> return ret ? ret : len;
>
[toc] | [prev] | [next] | [standalone]
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2016-09-24 21:30 +0200 |
| Subject | Re: iio: Rename a jump label in iio_buffer_store_watermark() |
| Message-ID | <sl0O6-50n-49@gated-at.bofh.it> |
| In reply to | #1490665 |
> I'm not necessarily against this change which does perhaps clarify the code > ever so slightly, Thanks for another bit of positive feedback. > but I am interested to know where 'current Linux coding style convention' comes from? How often do you check the status of a document like "CodingStyle" for example? ;-) How do you think about information from a commit like "docs: Remove space-before-label guidance from CodingStyle" (on 2016-09-21)? https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/Documentation/CodingStyle?id=79c70c304b0b443429b2a0019518532c5162817a Regards, Markus
[toc] | [prev] | [next] | [standalone]
| From | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| Date | 2016-09-25 10:50 +0200 |
| Subject | Re: iio: Rename a jump label in iio_buffer_store_watermark() |
| Message-ID | <sldih-4kE-9@gated-at.bofh.it> |
| In reply to | #1490728 |
On 24/09/16 20:21, SF Markus Elfring wrote: >> I'm not necessarily against this change which does perhaps clarify the code >> ever so slightly, > > Thanks for another bit of positive feedback. > > >> but I am interested to know where 'current Linux coding style convention' comes from? > > How often do you check the status of a document like "CodingStyle" for example? ;-) Every time I see a patch doing a style change I don't remember being there last time I looked ;) I'm not seeing this one in there. Which tool is spitting it out? Or is the test yours? > > How do you think about information from a commit like > "docs: Remove space-before-label guidance from CodingStyle" (on 2016-09-21)? > https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/Documentation/CodingStyle?id=79c70c304b0b443429b2a0019518532c5162817a Yeah, I saw the discussion / flame war that resulted in that revert... > > Regards, > Markus >
[toc] | [prev] | [next] | [standalone]
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2016-09-25 15:10 +0200 |
| Subject | Re: iio: Rename a jump label in iio_buffer_store_watermark() |
| Message-ID | <slhlU-70j-29@gated-at.bofh.it> |
| In reply to | #1490852 |
> I'm not seeing this one in there. How much do you care about selection of appropriate identifiers in source files? > Which tool is spitting it out? Are you looking for any special tool? > Or is the test yours? Which test do you mean? > Yeah, I saw the discussion / flame war that resulted in that revert... Would you like to share any more constructive ideas for this software evolution? Regards, Markus
[toc] | [prev] | [next] | [standalone]
| From | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| Date | 2016-09-25 16:30 +0200 |
| Subject | Re: iio: Rename a jump label in iio_buffer_store_watermark() |
| Message-ID | <sliBj-7JC-9@gated-at.bofh.it> |
| In reply to | #1490887 |
On 25/09/16 14:00, SF Markus Elfring wrote: >> I'm not seeing this one in there. > > How much do you care about selection of appropriate identifiers in source files? It's not an inappropriate identifier as it stands. The point is that it could be better. > > >> Which tool is spitting it out? > > Are you looking for any special tool? I was wondering how you identified these particular issues as I wanted to know the logic behind the test. > > >> Or is the test yours? > > Which test do you mean? Whatever you used to find these jump labels (the patch series description suggested it was a static checker). > > >> Yeah, I saw the discussion / flame war that resulted in that revert... > > Would you like to share any more constructive ideas for this software evolution? Not a lot of time at the moment, sorry. Jonathan > > Regards, > Markus >
[toc] | [prev] | [next] | [standalone]
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2016-09-25 17:20 +0200 |
| Subject | Re: iio: Rename a jump label in iio_buffer_store_watermark() |
| Message-ID | <sljnH-8fi-9@gated-at.bofh.it> |
| In reply to | #1490912 |
> It's not an inappropriate identifier as it stands. The point is > that it could be better. Thanks for your interest in clarifying further improvement possibilities. >>> Which tool is spitting it out? >> >> Are you looking for any special tool? > I was wondering how you identified these particular > issues as I wanted to know the logic behind the test. Do you get any related ideas from information in a message like "Source code review around jump label usage" (from 2015-12-11)? https://lkml.org/lkml/2015/12/11/378 https://lkml.kernel.org/r/<566ABCD9.1060404@users.sourceforge.net> >> Which test do you mean? > Whatever you used to find these jump labels There is a general possibility that dedicated scripts for the semantic patch language can also adjust jump labels as I suggested it for five functions in this software. > (the patch series description suggested it was a static checker). The corresponding five patches are just a result of a source code review by the means of a current text editor wit extra support for programming. How do you think about to improve the capabilities of tools for advanced static source code analysis any further? Regards, Markus
[toc] | [prev] | [next] | [standalone]
| From | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| Date | 2016-09-25 18:50 +0200 |
| Subject | Re: iio: Rename a jump label in iio_buffer_store_watermark() |
| Message-ID | <slkMO-yu-15@gated-at.bofh.it> |
| In reply to | #1490918 |
On 25/09/16 16:17, SF Markus Elfring wrote: >> It's not an inappropriate identifier as it stands. The point is >> that it could be better. > > Thanks for your interest in clarifying further improvement possibilities. > > >>>> Which tool is spitting it out? >>> >>> Are you looking for any special tool? >> I was wondering how you identified these particular >> issues as I wanted to know the logic behind the test. > > Do you get any related ideas from information in a message like > "Source code review around jump label usage" (from 2015-12-11)? > > https://lkml.org/lkml/2015/12/11/378 > https://lkml.kernel.org/r/<566ABCD9.1060404@users.sourceforge.net> > > >>> Which test do you mean? >> Whatever you used to find these jump labels > > There is a general possibility that dedicated scripts for the semantic > patch language can also adjust jump labels as I suggested it for five > functions in this software. > > >> (the patch series description suggested it was a static checker). > > The corresponding five patches are just a result of a source code review > by the means of a current text editor wit extra support for programming. To my mind there is a divide between the cost of making changes like this as a result of initial review and that of doing it on existing code. I don't think this one is worth while for existing code. > > How do you think about to improve the capabilities of tools for advanced > static source code analysis any further? > > Regards, > Markus > -- > To unsubscribe from this list: send the line "unsubscribe linux-iio" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >
[toc] | [prev] | [next] | [standalone]
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2016-09-25 19:40 +0200 |
| Subject | Re: iio: Rename a jump label in iio_buffer_store_watermark() |
| Message-ID | <sllzb-13P-7@gated-at.bofh.it> |
| In reply to | #1490934 |
> To my mind there is a divide between the cost of making changes like this > as a result of initial review and that of doing it on existing code. I can follow this view. > I don't think this one is worth while for existing code. How do you think about once more to increase the usage of the jump label "unlock" also for this software module? Regards, Markus
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web