All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: dgnc: fixed code style issue
@ 2015-04-19 19:18 Yorick Rommers
  2015-04-19 20:34 ` Joe Perches
  2015-04-20  8:13 ` [PATCH] Staging: dgnc: fixed code style issue Dan Carpenter
  0 siblings, 2 replies; 15+ messages in thread
From: Yorick Rommers @ 2015-04-19 19:18 UTC (permalink / raw)
  To: lidza.louina, markh, gregkh
  Cc: driverdev-devel, devel, linux-kernel, Yorick Rommers

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 <yorick-rommers@hotmail.com>
---
 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];
 
 		di.info_bdtype = dgnc_Board[brd]->dpatype;
 		di.info_bdstate = dgnc_Board[brd]->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;
 		else
-- 
2.3.5


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-05-03 19:04 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-19 19:18 [PATCH] Staging: dgnc: fixed code style issue Yorick Rommers
2015-04-19 20:34 ` Joe Perches
2015-04-19 21:58   ` [PATCH] Staging: dgnc: Using temporary value for repeated dereferences Yorick Rommers
2015-04-20  0:54     ` Joe Perches
2015-04-20  0:54       ` Joe Perches
2015-04-20  7:33       ` [PATCH] Staging: dgnc: Using a " Yorick Rommers
2015-04-20  7:33         ` Yorick Rommers
2015-05-03 18:50         ` Greg KH
2015-05-03 18:50           ` Greg KH
2015-04-20  8:33       ` [PATCH] Staging: dgnc: Using " Dan Carpenter
2015-04-20 10:42         ` gcc doesn't warn about uninitialized variable use in switch/case with -O (was: Re: [PATCH] Staging: dgnc: Using temporary value for repeated dereferences) Joe Perches
2015-04-20 12:28           ` Joe Perches
2015-04-20 12:28             ` Joe Perches
2015-04-20  8:27     ` [PATCH] Staging: dgnc: Using temporary value for repeated dereferences Dan Carpenter
2015-04-20  8:13 ` [PATCH] Staging: dgnc: fixed code style issue Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.