Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754222AbbDTIOH (ORCPT ); Mon, 20 Apr 2015 04:14:07 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:44398 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752637AbbDTIOF (ORCPT ); Mon, 20 Apr 2015 04:14:05 -0400 Date: Mon, 20 Apr 2015 11:13:49 +0300 From: Dan Carpenter To: Yorick Rommers Cc: lidza.louina@gmail.com, markh@compro.net, gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, driverdev-devel@linuxdriverproject.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Staging: dgnc: fixed code style issue Message-ID: <20150420081349.GT10964@mwanda> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1682 Lines: 49 On Sun, Apr 19, 2015 at 09:18:23PM +0200, Yorick Rommers wrote: > A patch for a line being too long (>80) in dgnc_mgmt.c, > fixed by making a temporary value for dgnc_Board[brd], and removing > an unnecessary typecast. > > Signed-off-by: Yorick Rommers > --- > drivers/staging/dgnc/dgnc_mgmt.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/staging/dgnc/dgnc_mgmt.c b/drivers/staging/dgnc/dgnc_mgmt.c > index b13318a..0e75d37 100644 > --- a/drivers/staging/dgnc/dgnc_mgmt.c > +++ b/drivers/staging/dgnc/dgnc_mgmt.c > @@ -143,12 +143,14 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) > di.info_bdnum = brd; > > spin_lock_irqsave(&dgnc_Board[brd]->bd_lock, flags); > + struct dgnc_board *bd = dgnc_Board[brd]; Change the others as well. > > di.info_bdtype = dgnc_Board[brd]->dpatype; di.info_bdtype = bd->dpatype; > di.info_bdstate = dgnc_Board[brd]->dpastatus; di.info_bdstate = bd->dpastatus; > di.info_ioport = 0; > di.info_physaddr = (ulong) dgnc_Board[brd]->membase; > - di.info_physsize = (ulong) dgnc_Board[brd]->membase - dgnc_Board[brd]->membase_end; > + di.info_physsize = bd->membase - bd->membase_end; > + > if (dgnc_Board[brd]->state != BOARD_FAILED) > di.info_nports = dgnc_Board[brd]->nasync; ^^^^^^^^^^^^^^^ Etc. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/