Re: "CodingStyle: Clarify and complete chapter 7" in docs-next

2016-09-22 Thread Jean Delvare
On Thu, 22 Sep 2016 10:49:47 -0700, Joe Perches wrote: > On Thu, 2016-09-22 at 13:57 +0200, Jean Delvare wrote: > > Sure. But I'm afraid you keep changing topics and I have no idea where > > you are going. We started with "should there be a space before jump > > labels", then out of nowhere we

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next

2016-09-22 Thread Jean Delvare
On Thu, 22 Sep 2016 10:49:47 -0700, Joe Perches wrote: > On Thu, 2016-09-22 at 13:57 +0200, Jean Delvare wrote: > > Sure. But I'm afraid you keep changing topics and I have no idea where > > you are going. We started with "should there be a space before jump > > labels", then out of nowhere we

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next

2016-09-22 Thread Joe Perches
On Thu, 2016-09-22 at 13:57 +0200, Jean Delvare wrote: > Sure. But I'm afraid you keep changing topics and I have no idea where > you are going. We started with "should there be a space before jump > labels", then out of nowhere we were discussing the wording of the > output of checkpatch (how is

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next

2016-09-22 Thread Joe Perches
On Thu, 2016-09-22 at 13:57 +0200, Jean Delvare wrote: > Sure. But I'm afraid you keep changing topics and I have no idea where > you are going. We started with "should there be a space before jump > labels", then out of nowhere we were discussing the wording of the > output of checkpatch (how is

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next

2016-09-22 Thread Joe Perches
On Thu, 2016-09-22 at 14:11 +0100, Al Viro wrote: > The main intent of checkpatch these days appears to be providing an easy > way of thoughtless inflation of commit counts, everything else be damned. You've made this statement several times over many years. I don't believe it's true. I doubt

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next

2016-09-22 Thread Joe Perches
On Thu, 2016-09-22 at 14:11 +0100, Al Viro wrote: > The main intent of checkpatch these days appears to be providing an easy > way of thoughtless inflation of commit counts, everything else be damned. You've made this statement several times over many years. I don't believe it's true. I doubt

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next

2016-09-22 Thread Julia Lawall
> > The main intent of checkpatch these days appears to be providing an easy > > way of thoughtless inflation of commit counts, everything else be damned. > > Make-work, in other words. > > Yes, I've noticed the trend too :-( But that's a problem with the > people using the tool, mostly, not with

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next

2016-09-22 Thread Julia Lawall
> > The main intent of checkpatch these days appears to be providing an easy > > way of thoughtless inflation of commit counts, everything else be damned. > > Make-work, in other words. > > Yes, I've noticed the trend too :-( But that's a problem with the > people using the tool, mostly, not with

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next

2016-09-22 Thread Jean Delvare
On Thu, 22 Sep 2016 14:11:03 +0100, Al Viro wrote: > On Thu, Sep 22, 2016 at 01:57:58PM +0200, Jean Delvare wrote: > > > > > > MUST is much stronger language than I would prefer. > > > > That's what error means, really. When your compiler fails with an > > error, you have no choice but to fix

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next

2016-09-22 Thread Jean Delvare
On Thu, 22 Sep 2016 14:11:03 +0100, Al Viro wrote: > On Thu, Sep 22, 2016 at 01:57:58PM +0200, Jean Delvare wrote: > > > > > > MUST is much stronger language than I would prefer. > > > > That's what error means, really. When your compiler fails with an > > error, you have no choice but to fix

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next

2016-09-22 Thread Al Viro
On Thu, Sep 22, 2016 at 01:57:58PM +0200, Jean Delvare wrote: > > > > MUST is much stronger language than I would prefer. > > That's what error means, really. When your compiler fails with an > error, you have no choice but to fix your code. Warnings on the other > hand may be ignored sometimes.

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next

2016-09-22 Thread Al Viro
On Thu, Sep 22, 2016 at 01:57:58PM +0200, Jean Delvare wrote: > > > > MUST is much stronger language than I would prefer. > > That's what error means, really. When your compiler fails with an > error, you have no choice but to fix your code. Warnings on the other > hand may be ignored sometimes.

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next

2016-09-22 Thread Jani Nikula
On Thu, 22 Sep 2016, Jean Delvare wrote: > Hi Jani, > > On Thu, 22 Sep 2016 13:43:42 +0300, Jani Nikula wrote: >> >> You could make checkpatch have different defaults for patches and files, >> to encourage better style in new code, but to discourage finding >> problems in

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next

2016-09-22 Thread Jani Nikula
On Thu, 22 Sep 2016, Jean Delvare wrote: > Hi Jani, > > On Thu, 22 Sep 2016 13:43:42 +0300, Jani Nikula wrote: >> >> You could make checkpatch have different defaults for patches and files, >> to encourage better style in new code, but to discourage finding >> problems in existing code. > >

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next

2016-09-22 Thread Jean Delvare
Hi Jani, On Thu, 22 Sep 2016 13:43:42 +0300, Jani Nikula wrote: > On Thu, 22 Sep 2016, Jean Delvare wrote: > > You need to think in terms of actual use cases. Who uses checkpatch and > > why? I think there are 3 groups of users: > > * Beginners. They won't run the script by

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next

2016-09-22 Thread Jean Delvare
Hi Jani, On Thu, 22 Sep 2016 13:43:42 +0300, Jani Nikula wrote: > On Thu, 22 Sep 2016, Jean Delvare wrote: > > You need to think in terms of actual use cases. Who uses checkpatch and > > why? I think there are 3 groups of users: > > * Beginners. They won't run the script by themselves, instead

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next

2016-09-22 Thread Jean Delvare
On Thu, 22 Sep 2016 03:42:10 -0700, Joe Perches wrote: > On Thu, 2016-09-22 at 11:24 +0200, Jean Delvare wrote: > > I would rather suggest: > > > > ERROR -> MUST_FIX > > WARNING -> SHOULD_FIX > > CHECK -> MAY_FIX > > MUST is much stronger language than I would prefer. That's what error means,

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next

2016-09-22 Thread Jean Delvare
On Thu, 22 Sep 2016 03:42:10 -0700, Joe Perches wrote: > On Thu, 2016-09-22 at 11:24 +0200, Jean Delvare wrote: > > I would rather suggest: > > > > ERROR -> MUST_FIX > > WARNING -> SHOULD_FIX > > CHECK -> MAY_FIX > > MUST is much stronger language than I would prefer. That's what error means,

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next

2016-09-22 Thread Jani Nikula
On Thu, 22 Sep 2016, Jean Delvare wrote: > Hi Joe, > > On Mon, 19 Sep 2016 23:32:03 -0700, Joe Perches wrote: >> On Tue, 2016-09-20 at 07:53 +0200, Julia Lawall wrote: >> > I think it is better to be clear.  CHECK was never really clear to me, >> > especially if you see it in

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next

2016-09-22 Thread Jani Nikula
On Thu, 22 Sep 2016, Jean Delvare wrote: > Hi Joe, > > On Mon, 19 Sep 2016 23:32:03 -0700, Joe Perches wrote: >> On Tue, 2016-09-20 at 07:53 +0200, Julia Lawall wrote: >> > I think it is better to be clear.  CHECK was never really clear to me, >> > especially if you see it in isolation, on a file

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next

2016-09-22 Thread Joe Perches
On Thu, 2016-09-22 at 11:24 +0200, Jean Delvare wrote: [] > > The seriousness with which some beginners take these message > > types though is troublesome, [] > You need to think in terms of actual use cases. Who uses checkpatch and > why? I think there are 3 groups of users: > * Beginners. They

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next

2016-09-22 Thread Joe Perches
On Thu, 2016-09-22 at 11:24 +0200, Jean Delvare wrote: [] > > The seriousness with which some beginners take these message > > types though is troublesome, [] > You need to think in terms of actual use cases. Who uses checkpatch and > why? I think there are 3 groups of users: > * Beginners. They

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next

2016-09-22 Thread Jean Delvare
Hi Joe, On Mon, 19 Sep 2016 23:32:03 -0700, Joe Perches wrote: > On Tue, 2016-09-20 at 07:53 +0200, Julia Lawall wrote: > > I think it is better to be clear.  CHECK was never really clear to me, > > especially if you see it in isolation, on a file that doesn't also have > > ERROR or WARNING. 

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next

2016-09-22 Thread Jean Delvare
Hi Joe, On Mon, 19 Sep 2016 23:32:03 -0700, Joe Perches wrote: > On Tue, 2016-09-20 at 07:53 +0200, Julia Lawall wrote: > > I think it is better to be clear.  CHECK was never really clear to me, > > especially if you see it in isolation, on a file that doesn't also have > > ERROR or WARNING. 

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next (was Re: [PATCH 03/47] block-rbd: Adjust the position of a jump label in rbd_header_from_disk())

2016-09-20 Thread Julia Lawall
On Mon, 19 Sep 2016, Joe Perches wrote: > On Tue, 2016-09-20 at 07:53 +0200, Julia Lawall wrote: > > On Mon, 19 Sep 2016, Joe Perches wrote: > > > On Tue, 2016-09-20 at 01:11 +0100, Al Viro wrote: > > > > IMO what we need is to go through all rules in CodingStyle and if for > > > > some rule

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next (was Re: [PATCH 03/47] block-rbd: Adjust the position of a jump label in rbd_header_from_disk())

2016-09-20 Thread Julia Lawall
On Mon, 19 Sep 2016, Joe Perches wrote: > On Tue, 2016-09-20 at 07:53 +0200, Julia Lawall wrote: > > On Mon, 19 Sep 2016, Joe Perches wrote: > > > On Tue, 2016-09-20 at 01:11 +0100, Al Viro wrote: > > > > IMO what we need is to go through all rules in CodingStyle and if for > > > > some rule

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next (was Re: [PATCH 03/47] block-rbd: Adjust the position of a jump label in rbd_header_from_disk())

2016-09-20 Thread Joe Perches
On Tue, 2016-09-20 at 07:53 +0200, Julia Lawall wrote: > On Mon, 19 Sep 2016, Joe Perches wrote: > > On Tue, 2016-09-20 at 01:11 +0100, Al Viro wrote: > > > IMO what we need is to go through all rules in CodingStyle and if for > > > some rule there is no overwhelming majority in the core kernel,

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next (was Re: [PATCH 03/47] block-rbd: Adjust the position of a jump label in rbd_header_from_disk())

2016-09-20 Thread Joe Perches
On Tue, 2016-09-20 at 07:53 +0200, Julia Lawall wrote: > On Mon, 19 Sep 2016, Joe Perches wrote: > > On Tue, 2016-09-20 at 01:11 +0100, Al Viro wrote: > > > IMO what we need is to go through all rules in CodingStyle and if for > > > some rule there is no overwhelming majority in the core kernel,

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next (was Re: [PATCH 03/47] block-rbd: Adjust the position of a jump label in rbd_header_from_disk())

2016-09-19 Thread Julia Lawall
On Mon, 19 Sep 2016, Joe Perches wrote: > On Tue, 2016-09-20 at 01:11 +0100, Al Viro wrote: > > IMO what we need is to go through all rules in CodingStyle and if for > > some rule there is no overwhelming majority in the core kernel, well, > > the list has grown way too large and could use

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next (was Re: [PATCH 03/47] block-rbd: Adjust the position of a jump label in rbd_header_from_disk())

2016-09-19 Thread Julia Lawall
On Mon, 19 Sep 2016, Joe Perches wrote: > On Tue, 2016-09-20 at 01:11 +0100, Al Viro wrote: > > IMO what we need is to go through all rules in CodingStyle and if for > > some rule there is no overwhelming majority in the core kernel, well, > > the list has grown way too large and could use

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next (was Re: [PATCH 03/47] block-rbd: Adjust the position of a jump label in rbd_header_from_disk())

2016-09-19 Thread Joe Perches
On Tue, 2016-09-20 at 01:11 +0100, Al Viro wrote: > IMO what we need is to go through all rules in CodingStyle and if for > some rule there is no overwhelming majority in the core kernel, well, > the list has grown way too large and could use massive trimming. I'm in complete agreement. I also

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next (was Re: [PATCH 03/47] block-rbd: Adjust the position of a jump label in rbd_header_from_disk())

2016-09-19 Thread Joe Perches
On Tue, 2016-09-20 at 01:11 +0100, Al Viro wrote: > IMO what we need is to go through all rules in CodingStyle and if for > some rule there is no overwhelming majority in the core kernel, well, > the list has grown way too large and could use massive trimming. I'm in complete agreement. I also

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next (was Re: [PATCH 03/47] block-rbd: Adjust the position of a jump label in rbd_header_from_disk())

2016-09-19 Thread Al Viro
On Mon, Sep 19, 2016 at 01:53:37PM +0200, Ilya Dryomov wrote: > > I did consider the reason to be good enough to warrant a "change", > > actually. Or more exactly from "one space is allowed" to "one space is > > recommended." Which is quite different from changing all the code > > actively. I can

Re: "CodingStyle: Clarify and complete chapter 7" in docs-next (was Re: [PATCH 03/47] block-rbd: Adjust the position of a jump label in rbd_header_from_disk())

2016-09-19 Thread Al Viro
On Mon, Sep 19, 2016 at 01:53:37PM +0200, Ilya Dryomov wrote: > > I did consider the reason to be good enough to warrant a "change", > > actually. Or more exactly from "one space is allowed" to "one space is > > recommended." Which is quite different from changing all the code > > actively. I can

"CodingStyle: Clarify and complete chapter 7" in docs-next (was Re: [PATCH 03/47] block-rbd: Adjust the position of a jump label in rbd_header_from_disk())

2016-09-19 Thread Ilya Dryomov
On Mon, Sep 19, 2016 at 11:37 AM, Jean Delvare wrote: > Hi Ilya, > > Sorry for the late answer. > > On Tue, 13 Sep 2016 20:31:57 +0200, Ilya Dryomov wrote: >> Sorry, navigating lkml.org archive is a pain, and I was expecting to >> see patch. Your points >> >> "The acceptance of

"CodingStyle: Clarify and complete chapter 7" in docs-next (was Re: [PATCH 03/47] block-rbd: Adjust the position of a jump label in rbd_header_from_disk())

2016-09-19 Thread Ilya Dryomov
On Mon, Sep 19, 2016 at 11:37 AM, Jean Delvare wrote: > Hi Ilya, > > Sorry for the late answer. > > On Tue, 13 Sep 2016 20:31:57 +0200, Ilya Dryomov wrote: >> Sorry, navigating lkml.org archive is a pain, and I was expecting to >> see patch. Your points >> >> "The acceptance of an optional

Re: CodingStyle: Clarify and complete chapter 7

2016-08-15 Thread SF Markus Elfring
>>> A common type of bug to be aware of is "one err bugs" which look like this: >>> >>> -err: >>> + err: >>> kfree(foo->bar); >>> kfree(foo); >>> return ret; >>> >>> The bug in this code is that on some exit paths "foo" is NULL. Normally >>> the >> >>

Re: CodingStyle: Clarify and complete chapter 7

2016-08-15 Thread SF Markus Elfring
>>> A common type of bug to be aware of is "one err bugs" which look like this: >>> >>> -err: >>> + err: >>> kfree(foo->bar); >>> kfree(foo); >>> return ret; >>> >>> The bug in this code is that on some exit paths "foo" is NULL. Normally >>> the >> >>

Re: [PATCH] CodingStyle: Clarify and complete chapter 7

2016-08-14 Thread Jonathan Corbet
On Sun, 14 Aug 2016 13:12:33 -0700 Mark D Rustad wrote: > >> + err: > >>kfree(foo->bar); > >>kfree(foo); > >>return ret; > >> > >> The bug in this code is that on some exit paths "foo" is NULL. Normally > >> the > > > > ...except that

Re: [PATCH] CodingStyle: Clarify and complete chapter 7

2016-08-14 Thread Jonathan Corbet
On Sun, 14 Aug 2016 13:12:33 -0700 Mark D Rustad wrote: > >> + err: > >>kfree(foo->bar); > >>kfree(foo); > >>return ret; > >> > >> The bug in this code is that on some exit paths "foo" is NULL. Normally > >> the > > > > ...except that kfree() can handle

Re: [PATCH] CodingStyle: Clarify and complete chapter 7

2016-08-14 Thread Mark D Rustad
Jonathan Corbet wrote: On Mon, 25 Jul 2016 14:29:06 +0200 Jean Delvare wrote: Chapter 7 (Centralized exiting of functions) of the coding style documentation is unclear at times, and lacks some information (such as the possibility to indent labels with a

Re: [PATCH] CodingStyle: Clarify and complete chapter 7

2016-08-14 Thread Mark D Rustad
Jonathan Corbet wrote: On Mon, 25 Jul 2016 14:29:06 +0200 Jean Delvare wrote: Chapter 7 (Centralized exiting of functions) of the coding style documentation is unclear at times, and lacks some information (such as the possibility to indent labels with a single space.) Clarify and complete

Re: [PATCH] CodingStyle: Clarify and complete chapter 7

2016-08-14 Thread Jonathan Corbet
On Mon, 25 Jul 2016 14:29:06 +0200 Jean Delvare wrote: > Chapter 7 (Centralized exiting of functions) of the coding style > documentation is unclear at times, and lacks some information (such > as the possibility to indent labels with a single space.) Clarify and > complete it.

Re: [PATCH] CodingStyle: Clarify and complete chapter 7

2016-08-14 Thread Jonathan Corbet
On Mon, 25 Jul 2016 14:29:06 +0200 Jean Delvare wrote: > Chapter 7 (Centralized exiting of functions) of the coding style > documentation is unclear at times, and lacks some information (such > as the possibility to indent labels with a single space.) Clarify and > complete it. OK, I've applied

[PATCH] CodingStyle: Clarify and complete chapter 7

2016-07-25 Thread Jean Delvare
Chapter 7 (Centralized exiting of functions) of the coding style documentation is unclear at times, and lacks some information (such as the possibility to indent labels with a single space.) Clarify and complete it. Signed-off-by: Jean Delvare Cc: Markus Elfring

[PATCH] CodingStyle: Clarify and complete chapter 7

2016-07-25 Thread Jean Delvare
Chapter 7 (Centralized exiting of functions) of the coding style documentation is unclear at times, and lacks some information (such as the possibility to indent labels with a single space.) Clarify and complete it. Signed-off-by: Jean Delvare Cc: Markus Elfring Cc: Jonathan Corbet ---