Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1684095
| From | Frans Klaver <fransklaver@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [greybus-dev] [PATCH v2] staging: greybus: arche: wrap over-length lines |
| Date | 2017-07-10 11:40 +0200 |
| Message-ID | <u1DkB-3e1-13@gated-at.bofh.it> (permalink) |
| References | <u1rWa-4vq-39@gated-at.bofh.it> <u1uKl-6e8-1@gated-at.bofh.it> <u1yNY-nv-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Jul 10, 2017 at 6:46 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> Hi Mitchell,
>
> On 09-07-17, 20:25, Mitchell Tasman wrote:
>> Adjust formatting of various statements to keep line length within
>> the 80 column limit preferred by the Linux kernel coding style.
>
> We try to follow that most of the time, but the end result should be easily
> readable. If it isn't, then we just ignore the rule.
>
>> Signed-off-by: Mitchell Tasman <tasman@leaflabs.com>
>> ---
>> Changes in v2: Add back a missing space in a comment
>>
>> drivers/staging/greybus/arche-platform.c | 29 +++++++++++++++++++----------
>> 1 file changed, 19 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
>> index eced2d2..eedd239 100644
>> --- a/drivers/staging/greybus/arche-platform.c
>> +++ b/drivers/staging/greybus/arche-platform.c
>> @@ -172,15 +172,21 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid)
>> if (arche_pdata->wake_detect_state == WD_STATE_BOOT_INIT) {
>> if (time_before(jiffies,
>> arche_pdata->wake_detect_start +
>> - msecs_to_jiffies(WD_COLDBOOT_PULSE_WIDTH_MS))) {
>> - arche_platform_set_wake_detect_state(arche_pdata,
>> - WD_STATE_IDLE);
>> + msecs_to_jiffies(
>> + WD_COLDBOOT_PULSE_WIDTH_MS))) {
>> + arche_platform_set_wake_detect_state(
>
> We don't break the lines like this in kernel to satisfy the 80 column width
> rule. Surely, some places would have similar code, but in general this isn't
> recommended. And that's why we never bothered about 80 column rule in this and
> below cases.
In cases like this, one could argue that you should start looking at
the level of indentation, rather than the line length per se. After
all, the documentation states that "if you need more than 3 levels of
indentation, you're screwed anyway, and you should fix your program".
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] staging: greybus: arche: wrap over-length lines Mitchell Tasman <tasman@leaflabs.com> - 2017-07-09 23:30 +0200
[PATCH v2] staging: greybus: arche: wrap over-length lines Mitchell Tasman <tasman@leaflabs.com> - 2017-07-10 02:30 +0200
Re: [greybus-dev] [PATCH v2] staging: greybus: arche: wrap over-length lines Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-10 06:50 +0200
Re: [greybus-dev] [PATCH v2] staging: greybus: arche: wrap over-length lines Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-10 11:40 +0200
Re: [greybus-dev] [PATCH v2] staging: greybus: arche: wrap over-length lines Joe Perches <joe@perches.com> - 2017-07-11 07:30 +0200
Re: [greybus-dev] [PATCH v2] staging: greybus: arche: wrap over-length lines Frans Klaver <fransklaver@gmail.com> - 2017-07-10 11:40 +0200
[PATCH v3] staging: greybus: arche: wrap over-length lines Mitchell Tasman <tasman@leaflabs.com> - 2017-07-11 05:20 +0200
Re: [greybus-dev] [PATCH v3] staging: greybus: arche: wrap over-length lines Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-11 05:30 +0200
csiph-web