From patchwork Wed Dec 24 00:55:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 5535951 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EFF82BEEBA for ; Wed, 24 Dec 2014 00:56:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1F2402012D for ; Wed, 24 Dec 2014 00:56:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 140382018E for ; Wed, 24 Dec 2014 00:56:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750724AbaLXA4F (ORCPT ); Tue, 23 Dec 2014 19:56:05 -0500 Received: from smtprelay0141.hostedemail.com ([216.40.44.141]:34921 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750708AbaLXA4D (ORCPT ); Tue, 23 Dec 2014 19:56:03 -0500 Received: from filter.hostedemail.com (unknown [216.40.38.60]) by smtprelay08.hostedemail.com (Postfix) with ESMTP id A05B229DD78; Wed, 24 Dec 2014 00:56:01 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2, 0, 0, , d41d8cd98f00b204, joe@perches.com, :::::::, RULES_HIT:41:69:152:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1543:1593:1594:1711:1730:1747:1777:1792:1801:2393:2553:2559:2562:3138:3139:3140:3141:3142:3354:3622:3865:3866:3867:3868:3870:3872:4250:4321:4605:5007:6261:7514:10004:10400:10848:11026:11232:11473:11658:11914:12043:12291:12438:12517:12519:12555:12683:12740:13255:13894:13972:21080, 0, RBL:none, CacheIP:none, Bayesian:0.5, 0.5, 0.5, Netcheck:none, DomainCache:0, MSF:not bulk, SPF:fn, MSBL:0, DNSBL:none, Custom_rules:0:0:0 X-HE-Tag: lip87_51939fb1e2125 X-Filterd-Recvd-Size: 4307 Received: from joe-X200MA.home (pool-71-103-235-196.lsanca.fios.verizon.net [71.103.235.196]) (Authenticated sender: joe@perches.com) by omf04.hostedemail.com (Postfix) with ESMTPA; Wed, 24 Dec 2014 00:56:00 +0000 (UTC) Message-ID: <1419382559.6157.1.camel@perches.com> Subject: Re: [PATCH] Drivers: bcma: Fix three coding style issues, more than 80 characters per line. From: Joe Perches To: =?UTF-8?Q?Rafa=C5=82_Mi=C5=82ecki?= Cc: Oscar Forner Martinez , "linux-wireless@vger.kernel.org" , Linux Kernel Mailing List Date: Tue, 23 Dec 2014 16:55:59 -0800 In-Reply-To: References: <1419378909-14414-1-git-send-email-oscar.forner.martinez@gmail.com> X-Mailer: Evolution 3.12.7-0ubuntu1 Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, 2014-12-24 at 00:46 +0100, Rafa? Mi?ecki wrote: > On 24 December 2014 at 00:55, Oscar Forner Martinez > wrote: > > Three lines with more than 80 characters per line have been split in several lines. > > > > Signed-off-by: Oscar Forner Martinez > > --- > > drivers/bcma/driver_chipcommon.c | 10 +++++++--- > > 1 file changed, 7 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/bcma/driver_chipcommon.c b/drivers/bcma/driver_chipcommon.c [] > > - bcma_err(cc->core->bus, "serial not supported on this device ccrev: 0x%x\n", ccrev); > > + bcma_err(cc->core->bus, > > + "serial not supported on this device ccrev: 0x%x\n", > > + ccrev); > > I think some subsystems agreed to keep dev/bus pointed and string in > the one line. It makes more sense for me too. And it would probably be better to invert the test above and error out immediately to reduce the indentation. Something like: drivers/bcma/driver_chipcommon.c | 42 +++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 20 deletions(-) --- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/bcma/driver_chipcommon.c b/drivers/bcma/driver_chipcommon.c index 19f6796..e63fabfc 100644 --- a/drivers/bcma/driver_chipcommon.c +++ b/drivers/bcma/driver_chipcommon.c @@ -316,29 +316,31 @@ void bcma_chipco_serial_init(struct bcma_drv_cc *cc) unsigned int ccrev = cc->core->id.rev; struct bcma_serial_port *ports = cc->serial_ports; - if (ccrev >= 11 && ccrev != 15) { - baud_base = bcma_chipco_get_alp_clock(cc); - if (ccrev >= 21) { - /* Turn off UART clock before switching clocksource. */ - bcma_cc_write32(cc, BCMA_CC_CORECTL, - bcma_cc_read32(cc, BCMA_CC_CORECTL) - & ~BCMA_CC_CORECTL_UARTCLKEN); - } - /* Set the override bit so we don't divide it */ - bcma_cc_write32(cc, BCMA_CC_CORECTL, - bcma_cc_read32(cc, BCMA_CC_CORECTL) - | BCMA_CC_CORECTL_UARTCLK0); - if (ccrev >= 21) { - /* Re-enable the UART clock. */ - bcma_cc_write32(cc, BCMA_CC_CORECTL, - bcma_cc_read32(cc, BCMA_CC_CORECTL) - | BCMA_CC_CORECTL_UARTCLKEN); - } - } else { - bcma_err(cc->core->bus, "serial not supported on this device ccrev: 0x%x\n", ccrev); + if (ccrev < 11 || ccrev == 15) { + bcma_err(cc->core->bus, + "serial not supported on this device ccrev: 0x%x\n", + ccrev); return; } + baud_base = bcma_chipco_get_alp_clock(cc); + if (ccrev >= 21) { + /* Turn off UART clock before switching clocksource */ + bcma_cc_write32(cc, BCMA_CC_CORECTL, + bcma_cc_read32(cc, BCMA_CC_CORECTL) + & ~BCMA_CC_CORECTL_UARTCLKEN); + } + /* Set the override bit so we don't divide it */ + bcma_cc_write32(cc, BCMA_CC_CORECTL, + bcma_cc_read32(cc, BCMA_CC_CORECTL) | + BCMA_CC_CORECTL_UARTCLK0); + if (ccrev >= 21) { + /* Re-enable the UART clock */ + bcma_cc_write32(cc, BCMA_CC_CORECTL, + bcma_cc_read32(cc, BCMA_CC_CORECTL) + | BCMA_CC_CORECTL_UARTCLKEN); + } + irq = bcma_core_irq(cc->core, 0); /* Determine the registers of the UARTs */