fix error return get/set_native_max functions
Quoted 2 lines
This change is okay, thanks.
However changing coding style is not...
An interesting remark.
I belong to the people who look at kernel source on a screen with 80 columns. Code that is wider and wraps is unreadable.
Now of course you might react "buy a better monitor", but in fact this restriction leads to cleaner code. There is something wrong when code is indented too deeply, and almost always a cleanup is possible that splits some inner stuff out as a separate function.
As a side effect of that you'll see in patches from me changes that bring the code within the 80-column limit.
Review
Quoted 3 lines
(quoted diff) +2
-1-static unsigned long idedisk_set_max_address(ide_drive_t *drive, unsigned long addr_req) +static unsigned long +idedisk_set_max_address(ide_drive_t *drive, unsigned long addr_req)
It is a matter of taste precisely which transformation is best in order to bring the source within the 80-column limit, but having the type on the preceding line is very common in the kernel source (and elsewhere), so among the possible ways of splitting this line this is a very natural one.
I am not interested in a discussion about style, but will defend the 80-column limit.
Andries
---
Functions should be short and sweet, and do just one thing. They should fit on one or two screenfuls of text (the ISO/ANSI screen size is 80x24, as we all know), and do one thing and do that well.
Quoted 7 lines · On Tue, 5 Aug 2003 [email protected] wrote:
Quoted 2 lines
This change is okay, thanks.
However changing coding style is not...An interesting remark.
I belong to the people who look at kernel source on a screen with 80 columns. Code that is wider and wraps is unreadable.
/me too
Quoted 7 lines
Now of course you might react "buy a better monitor", but in fact this restriction leads to cleaner code. There is something wrong when code is indented too deeply, and almost always a cleanup is possible that splits some inner stuff out as a separate function.
As a side effect of that you'll see in patches from me changes that bring the code within the 80-column limit.
I think that mixing such changes with real changes is a bad thing.
Quoted 9 lines
Review
Quoted 3 lines
(quoted diff) +2
-1-static unsigned long idedisk_set_max_address(ide_drive_t *drive, unsigned long addr_req) +static unsigned long +idedisk_set_max_address(ide_drive_t *drive, unsigned long addr_req)It is a matter of taste precisely which transformation is best in order to bring the source within the 80-column limit, but having the type on the preceding line is very common in the kernel source (and elsewhere), so among the possible ways of splitting this line this is a very natural one.
It is not so common in drivers/ide/...
static unsigned long idedisk_set_max_address(ide_drive_t *drive,
unsigned long addr_req)
This format also clearly shows that actual function name suck and should be shortened :-).
Quoted 2 lines
I am not interested in a discussion about style, but will defend the 80-column limit.
Sure, 80-column is a must ;-).
--
Bartlomiej
Hi,
Quoted 7 lines · On Tue, 5 Aug 2003 [email protected] wrote:
Quoted 2 lines
This change is okay, thanks.
However changing coding style is not...An interesting remark.
I belong to the people who look at kernel source on a screen with 80 columns. Code that is wider and wraps is unreadable.
Get a better editor?
While I think 80 columns is a worthwhile goal, I don't see a good reason to wrap a random line only because it exceeds the limit by a few characters. What is especially annoying are patches with a one line fix hidden within 10 other formatting changes (I've seen this already from you). Please respect others people code and try to avoid randoming formatting changes or at least keep them separate.
bye, Roman