Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753209AbdGJJaX (ORCPT ); Mon, 10 Jul 2017 05:30:23 -0400 Received: from mail-ua0-f195.google.com ([209.85.217.195]:34415 "EHLO mail-ua0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750812AbdGJJaW (ORCPT ); Mon, 10 Jul 2017 05:30:22 -0400 MIME-Version: 1.0 In-Reply-To: <20170710044632.GD2928@vireshk-i7> References: <20170709212809.14277-1-tasman@leaflabs.com> <20170710002506.15036-1-tasman@leaflabs.com> <20170710044632.GD2928@vireshk-i7> From: Frans Klaver Date: Mon, 10 Jul 2017 11:30:20 +0200 Message-ID: Subject: Re: [greybus-dev] [PATCH v2] staging: greybus: arche: wrap over-length lines To: Viresh Kumar Cc: Mitchell Tasman , driverdevel , Greg Kroah-Hartman , Johan Hovold , "linux-kernel@vger.kernel.org" , greybus-dev@lists.linaro.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2200 Lines: 41 On Mon, Jul 10, 2017 at 6:46 AM, Viresh Kumar 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 >> --- >> 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".