Re: checkpatch guide for newbies

2013-09-26 Thread Alexander Holler
Am 26.09.2013 07:53, schrieb Julia Lawall: >> void get_xtime_and_monotonic_and_sleep_offset(struct timespec *xtim, >> struct timespec *wtom, struct timespec >> *sleep); >> >> I like such function names ;) (ok I wouldn't have use those and), but it's >> hard to

Re: checkpatch guide for newbies

2013-09-26 Thread Alexander Holler
Am 26.09.2013 07:53, schrieb Julia Lawall: void get_xtime_and_monotonic_and_sleep_offset(struct timespec *xtim, struct timespec *wtom, struct timespec *sleep); I like such function names ;) (ok I wouldn't have use those and), but it's hard to press this into

Re: checkpatch guide for newbies

2013-09-25 Thread Julia Lawall
On Thu, 26 Sep 2013, Alexander Holler wrote: > Am 26.09.2013 05:04, schrieb Al Viro: > > On Thu, Sep 26, 2013 at 04:57:32AM +0200, Alexander Holler wrote: > > > Am 26.09.2013 04:52, schrieb Alexander Holler: > > > > > > > I'm aware of people which do nest 8 levels deep just to avoid a return, >

Re: checkpatch guide for newbies

2013-09-25 Thread Alexander Holler
Am 26.09.2013 05:48, schrieb Al Viro: On Thu, Sep 26, 2013 at 05:27:15AM +0200, Alexander Holler wrote: Oh, personally I don't have any limit there. ;) I like descriptive function and variable names whenever they make sense. And often they make comments uneccessary and therefor prevent errors

Re: checkpatch guide for newbies

2013-09-25 Thread Al Viro
On Thu, Sep 26, 2013 at 05:27:15AM +0200, Alexander Holler wrote: > Oh, personally I don't have any limit there. ;) I like descriptive > function and variable names whenever they make sense. And often they > make comments uneccessary and therefor prevent errors because those > descriptive names

Re: checkpatch guide for newbies

2013-09-25 Thread Alexander Holler
Am 26.09.2013 05:04, schrieb Al Viro: On Thu, Sep 26, 2013 at 04:57:32AM +0200, Alexander Holler wrote: Am 26.09.2013 04:52, schrieb Alexander Holler: I'm aware of people which do nest 8 levels deep just to avoid a return, break or goto. But trying to limit that by limiting the line length

Re: checkpatch guide for newbies

2013-09-25 Thread Al Viro
On Thu, Sep 26, 2013 at 04:57:32AM +0200, Alexander Holler wrote: > Am 26.09.2013 04:52, schrieb Alexander Holler: > > > I'm aware of people which do nest 8 levels deep just to avoid a return, > > break or goto. > > > > But trying to limit that by limiting the line length is like ... > > (choose

Re: checkpatch guide for newbies

2013-09-25 Thread Alexander Holler
Am 26.09.2013 04:52, schrieb Alexander Holler: > I'm aware of people which do nest 8 levels deep just to avoid a return, > break or goto. > > But trying to limit that by limiting the line length is like ... > (choose your own own misguided comparison, it's too late for me I > currently only

Re: checkpatch guide for newbies

2013-09-25 Thread Alexander Holler
Am 26.09.2013 04:11, schrieb Al Viro: > On Wed, Sep 25, 2013 at 12:10:57AM +0200, Alexander Holler wrote: > >> Sure and I'm the last one who wants that people do have to use >> anything else than i for simple loop counters. And allowing longer >> lines doesn't mean people have to use long names,

Re: checkpatch guide for newbies

2013-09-25 Thread Al Viro
On Wed, Sep 25, 2013 at 12:10:57AM +0200, Alexander Holler wrote: > Sure and I'm the last one who wants that people do have to use > anything else than i for simple loop counters. And allowing longer > lines doesn't mean people have to use long names, it allows them use > them (if it makes

Re: checkpatch guide for newbies

2013-09-25 Thread Al Viro
On Wed, Sep 25, 2013 at 12:10:57AM +0200, Alexander Holler wrote: Sure and I'm the last one who wants that people do have to use anything else than i for simple loop counters. And allowing longer lines doesn't mean people have to use long names, it allows them use them (if it makes sense).

Re: checkpatch guide for newbies

2013-09-25 Thread Alexander Holler
Am 26.09.2013 04:11, schrieb Al Viro: On Wed, Sep 25, 2013 at 12:10:57AM +0200, Alexander Holler wrote: Sure and I'm the last one who wants that people do have to use anything else than i for simple loop counters. And allowing longer lines doesn't mean people have to use long names, it

Re: checkpatch guide for newbies

2013-09-25 Thread Alexander Holler
Am 26.09.2013 04:52, schrieb Alexander Holler: I'm aware of people which do nest 8 levels deep just to avoid a return, break or goto. But trying to limit that by limiting the line length is like ... (choose your own own misguided comparison, it's too late for me I currently only meorize

Re: checkpatch guide for newbies

2013-09-25 Thread Al Viro
On Thu, Sep 26, 2013 at 04:57:32AM +0200, Alexander Holler wrote: Am 26.09.2013 04:52, schrieb Alexander Holler: I'm aware of people which do nest 8 levels deep just to avoid a return, break or goto. But trying to limit that by limiting the line length is like ... (choose your own

Re: checkpatch guide for newbies

2013-09-25 Thread Alexander Holler
Am 26.09.2013 05:04, schrieb Al Viro: On Thu, Sep 26, 2013 at 04:57:32AM +0200, Alexander Holler wrote: Am 26.09.2013 04:52, schrieb Alexander Holler: I'm aware of people which do nest 8 levels deep just to avoid a return, break or goto. But trying to limit that by limiting the line length

Re: checkpatch guide for newbies

2013-09-25 Thread Al Viro
On Thu, Sep 26, 2013 at 05:27:15AM +0200, Alexander Holler wrote: Oh, personally I don't have any limit there. ;) I like descriptive function and variable names whenever they make sense. And often they make comments uneccessary and therefor prevent errors because those descriptive names are

Re: checkpatch guide for newbies

2013-09-25 Thread Alexander Holler
Am 26.09.2013 05:48, schrieb Al Viro: On Thu, Sep 26, 2013 at 05:27:15AM +0200, Alexander Holler wrote: Oh, personally I don't have any limit there. ;) I like descriptive function and variable names whenever they make sense. And often they make comments uneccessary and therefor prevent errors

Re: checkpatch guide for newbies

2013-09-25 Thread Julia Lawall
On Thu, 26 Sep 2013, Alexander Holler wrote: Am 26.09.2013 05:04, schrieb Al Viro: On Thu, Sep 26, 2013 at 04:57:32AM +0200, Alexander Holler wrote: Am 26.09.2013 04:52, schrieb Alexander Holler: I'm aware of people which do nest 8 levels deep just to avoid a return, break or

Re: checkpatch guide for newbies

2013-09-24 Thread Alexander Holler
Am 24.09.2013 22:13, schrieb Bjorn Helgaas: On Tue, Sep 24, 2013 at 1:29 PM, Peter Senna Tschudin wrote: On Tue, Sep 24, 2013 at 7:26 PM, Alexander Holler wrote: On Mon, Sep 23, 2013 at 3:01 AM, Dan Carpenter wrote: Long Lines Historically screens were 80 characters

Re: checkpatch guide for newbies

2013-09-24 Thread Bjorn Helgaas
On Tue, Sep 24, 2013 at 1:29 PM, Peter Senna Tschudin wrote: > On Tue, Sep 24, 2013 at 7:26 PM, Alexander Holler > wrote: >>> On Mon, Sep 23, 2013 at 3:01 AM, Dan Carpenter >>> wrote: Long Lines Historically screens were 80 characters wide and it was

Re: checkpatch guide for newbies

2013-09-24 Thread Dan Carpenter
On Tue, Sep 24, 2013 at 09:29:49PM +0200, Peter Senna Tschudin wrote: > I was about to disagree because I've never seen variables named a, b > or c, but I found that there are at least 2238 variables named a, b or > c in linux-next. This is not good. > In XGIfb_mode_rate_to_ddata() we have:

Re: checkpatch guide for newbies

2013-09-24 Thread Peter Senna Tschudin
On Tue, Sep 24, 2013 at 7:26 PM, Alexander Holler wrote: > Am 24.09.2013 18:36, schrieb Bjorn Helgaas: >> >> On Mon, Sep 23, 2013 at 3:01 AM, Dan Carpenter >> wrote: >>> >>> Long Lines >>> >>> Historically screens were 80 characters wide and it was annoying when >>> code went

Re: checkpatch guide for newbies

2013-09-24 Thread Alexander Holler
Am 24.09.2013 19:43, schrieb Alexander Holler: Am 24.09.2013 19:26, schrieb Alexander Holler: Am 24.09.2013 18:36, schrieb Bjorn Helgaas: On Mon, Sep 23, 2013 at 3:01 AM, Dan Carpenter wrote: Long Lines Historically screens were 80 characters wide and it was annoying when

Re: checkpatch guide for newbies

2013-09-24 Thread Alexander Holler
Am 24.09.2013 19:26, schrieb Alexander Holler: Am 24.09.2013 18:36, schrieb Bjorn Helgaas: On Mon, Sep 23, 2013 at 3:01 AM, Dan Carpenter wrote: Long Lines Historically screens were 80 characters wide and it was annoying when code went over the edge. These days we have

Re: checkpatch guide for newbies

2013-09-24 Thread Alexander Holler
Am 24.09.2013 18:36, schrieb Bjorn Helgaas: On Mon, Sep 23, 2013 at 3:01 AM, Dan Carpenter wrote: Long Lines Historically screens were 80 characters wide and it was annoying when code went over the edge. These days we have larger screens, but we keep the 80 character limit

Re: checkpatch guide for newbies

2013-09-24 Thread Bjorn Helgaas
On Mon, Sep 23, 2013 at 3:01 AM, Dan Carpenter wrote: > I've written a checkpatch guide for newbies because it seems like they > make the same mistakes over and over. I intend to put it under > Documentation/. Could you look it over? I think this is great. >

Re: checkpatch guide for newbies

2013-09-24 Thread Bjorn Helgaas
On Mon, Sep 23, 2013 at 3:01 AM, Dan Carpenter dan.carpen...@oracle.com wrote: I've written a checkpatch guide for newbies because it seems like they make the same mistakes over and over. I intend to put it under Documentation/. Could you look it over? I think this is great

Re: checkpatch guide for newbies

2013-09-24 Thread Alexander Holler
Am 24.09.2013 18:36, schrieb Bjorn Helgaas: On Mon, Sep 23, 2013 at 3:01 AM, Dan Carpenter dan.carpen...@oracle.com wrote: Long Lines Historically screens were 80 characters wide and it was annoying when code went over the edge. These days we have larger screens, but we keep

Re: checkpatch guide for newbies

2013-09-24 Thread Alexander Holler
Am 24.09.2013 19:26, schrieb Alexander Holler: Am 24.09.2013 18:36, schrieb Bjorn Helgaas: On Mon, Sep 23, 2013 at 3:01 AM, Dan Carpenter dan.carpen...@oracle.com wrote: Long Lines Historically screens were 80 characters wide and it was annoying when code went over the edge.

Re: checkpatch guide for newbies

2013-09-24 Thread Alexander Holler
Am 24.09.2013 19:43, schrieb Alexander Holler: Am 24.09.2013 19:26, schrieb Alexander Holler: Am 24.09.2013 18:36, schrieb Bjorn Helgaas: On Mon, Sep 23, 2013 at 3:01 AM, Dan Carpenter dan.carpen...@oracle.com wrote: Long Lines Historically screens were 80 characters wide

Re: checkpatch guide for newbies

2013-09-24 Thread Peter Senna Tschudin
On Tue, Sep 24, 2013 at 7:26 PM, Alexander Holler hol...@ahsoftware.de wrote: Am 24.09.2013 18:36, schrieb Bjorn Helgaas: On Mon, Sep 23, 2013 at 3:01 AM, Dan Carpenter dan.carpen...@oracle.com wrote: Long Lines Historically screens were 80 characters wide and it was

Re: checkpatch guide for newbies

2013-09-24 Thread Dan Carpenter
On Tue, Sep 24, 2013 at 09:29:49PM +0200, Peter Senna Tschudin wrote: I was about to disagree because I've never seen variables named a, b or c, but I found that there are at least 2238 variables named a, b or c in linux-next. This is not good. In XGIfb_mode_rate_to_ddata() we have:

Re: checkpatch guide for newbies

2013-09-24 Thread Bjorn Helgaas
On Tue, Sep 24, 2013 at 1:29 PM, Peter Senna Tschudin peter.se...@gmail.com wrote: On Tue, Sep 24, 2013 at 7:26 PM, Alexander Holler hol...@ahsoftware.de wrote: On Mon, Sep 23, 2013 at 3:01 AM, Dan Carpenter dan.carpen...@oracle.com wrote: Long Lines Historically screens

Re: checkpatch guide for newbies

2013-09-24 Thread Alexander Holler
Am 24.09.2013 22:13, schrieb Bjorn Helgaas: On Tue, Sep 24, 2013 at 1:29 PM, Peter Senna Tschudin peter.se...@gmail.com wrote: On Tue, Sep 24, 2013 at 7:26 PM, Alexander Holler hol...@ahsoftware.de wrote: On Mon, Sep 23, 2013 at 3:01 AM, Dan Carpenter dan.carpen...@oracle.com wrote:

Re: checkpatch guide for newbies

2013-09-23 Thread Joe Perches
On Mon, 2013-09-23 at 11:06 -0700, Joe Perches wrote: > Maybe I'll submit some auto-neatening script eventually > and see what you think. Maybe something like: From: Joe Perches Subject: [PATCH] scripts/fix_with_checkpatch.sh: Add a trivial script to fix simple style defects Add a few

Re: checkpatch guide for newbies

2013-09-23 Thread Joe Perches
On Mon, 2013-09-23 at 12:01 +0300, Dan Carpenter wrote: > I've written a checkpatch guide for newbies because it seems like they > make the same mistakes over and over. I intend to put it under > Documentation/. Could you look it over? > > > Introduction

Re: checkpatch guide for newbies

2013-09-23 Thread bojan prtvar
Hi Dan, On Mon, Sep 23, 2013 at 11:01 AM, Dan Carpenter wrote: > I've written a checkpatch guide for newbies because it seems like they > make the same mistakes over and over. I intend to put it under > Documentation/. Could you look it over? Maybe to add a paragraph about general

Re: checkpatch guide for newbies

2013-09-23 Thread Geert Uytterhoeven
On Mon, Sep 23, 2013 at 2:46 PM, Peter Senna Tschudin wrote: >> Ask yourself, is the warning message is clear? Is it needed? Could a s/is clear/clear/ >> It's preferred if the operator goes at the end of the first line instead of >> at >> the start of the second line: >> Bad: >> -

Re: checkpatch guide for newbies

2013-09-23 Thread Dan Carpenter
On Mon, Sep 23, 2013 at 02:46:38PM +0200, Peter Senna Tschudin wrote: > > It's preferred if the operator goes at the end of the first line instead of > > at > > the start of the second line: > > Bad: > > - PowerData = (1 << 31) | (0 << 30) | (24 << 24) > > - |

Re: checkpatch guide for newbies

2013-09-23 Thread Peter Senna Tschudin
On Mon, Sep 23, 2013 at 11:01 AM, Dan Carpenter wrote: > I've written a checkpatch guide for newbies because it seems like they > make the same mistakes over and over. I intend to put it under > Documentation/. Could you look it over? > > > Introduction

checkpatch guide for newbies

2013-09-23 Thread Dan Carpenter
I've written a checkpatch guide for newbies because it seems like they make the same mistakes over and over. I intend to put it under Documentation/. Could you look it over? Introduction This document is aimed at new kernel contributors using "checkpatch.pl --file".

checkpatch guide for newbies

2013-09-23 Thread Dan Carpenter
I've written a checkpatch guide for newbies because it seems like they make the same mistakes over and over. I intend to put it under Documentation/. Could you look it over? Introduction This document is aimed at new kernel contributors using checkpatch.pl --file. The first

Re: checkpatch guide for newbies

2013-09-23 Thread Peter Senna Tschudin
On Mon, Sep 23, 2013 at 11:01 AM, Dan Carpenter dan.carpen...@oracle.com wrote: I've written a checkpatch guide for newbies because it seems like they make the same mistakes over and over. I intend to put it under Documentation/. Could you look it over? Introduction

Re: checkpatch guide for newbies

2013-09-23 Thread Dan Carpenter
On Mon, Sep 23, 2013 at 02:46:38PM +0200, Peter Senna Tschudin wrote: It's preferred if the operator goes at the end of the first line instead of at the start of the second line: Bad: - PowerData = (1 31) | (0 30) | (24 24) - |

Re: checkpatch guide for newbies

2013-09-23 Thread Geert Uytterhoeven
On Mon, Sep 23, 2013 at 2:46 PM, Peter Senna Tschudin peter.se...@gmail.com wrote: Ask yourself, is the warning message is clear? Is it needed? Could a s/is clear/clear/ It's preferred if the operator goes at the end of the first line instead of at the start of the second line: Bad: -

Re: checkpatch guide for newbies

2013-09-23 Thread bojan prtvar
Hi Dan, On Mon, Sep 23, 2013 at 11:01 AM, Dan Carpenter dan.carpen...@oracle.com wrote: I've written a checkpatch guide for newbies because it seems like they make the same mistakes over and over. I intend to put it under Documentation/. Could you look it over? Maybe to add a paragraph

Re: checkpatch guide for newbies

2013-09-23 Thread Joe Perches
On Mon, 2013-09-23 at 12:01 +0300, Dan Carpenter wrote: I've written a checkpatch guide for newbies because it seems like they make the same mistakes over and over. I intend to put it under Documentation/. Could you look it over? Introduction This document is aimed

Re: checkpatch guide for newbies

2013-09-23 Thread Joe Perches
On Mon, 2013-09-23 at 11:06 -0700, Joe Perches wrote: Maybe I'll submit some auto-neatening script eventually and see what you think. Maybe something like: From: Joe Perches j...@perches.com Subject: [PATCH] scripts/fix_with_checkpatch.sh: Add a trivial script to fix simple style defects Add