lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 18 Jul 2014 21:35:13 +0300
From:	Igor Bezukh <igbzkh@...il.com>
To:	gregkh@...uxfoundation.org
Cc:	devel@...verdev.osuosl.org, forest@...ttletooquiet.net,
	linux-kernel@...r.kernel.org, igbzkh@...il.com
Subject: [PATCH] Staging: vt6655: apply kernel coding style to wCommandTimerWait function

Since there is a lot of stuff that need to be changed in order to meet the kernel
coding style in wcmd.c file, I've decided to fix function-per-patch.
The following changes were made in vCommandTimerWait function:

- Camel case change:
   - MSecond ---> msec
   - hDdeviceContext ---> private
   - pDevice ---> priv
- Removed redundant return
- Removed redndant comment

In future patches, I will also change the function name itself.

Signed-off-by: Igor Bezukh <igbzkh@...il.com>
---
 drivers/staging/vt6655/wcmd.c |   20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/vt6655/wcmd.c b/drivers/staging/vt6655/wcmd.c
index a689645..e5073d9 100644
--- a/drivers/staging/vt6655/wcmd.c
+++ b/drivers/staging/vt6655/wcmd.c
@@ -281,21 +281,15 @@ s_MgrMakeProbeRequest(
 	return pTxPacket;
 }
 
-void
-vCommandTimerWait(
-	void *hDeviceContext,
-	unsigned int MSecond
-)
+void vCommandTimerWait(void *private, unsigned int msec)
 {
-	PSDevice        pDevice = (PSDevice)hDeviceContext;
+	PSDevice priv = (PSDevice)private;
 
-	init_timer(&pDevice->sTimerCommand);
-	pDevice->sTimerCommand.data = (unsigned long) pDevice;
-	pDevice->sTimerCommand.function = (TimerFunction)vCommandTimer;
-	// RUN_AT :1 msec ~= (HZ/1024)
-	pDevice->sTimerCommand.expires = (unsigned int)RUN_AT((MSecond * HZ) >> 10);
-	add_timer(&pDevice->sTimerCommand);
-	return;
+	init_timer(&priv->sTimerCommand);
+	priv->sTimerCommand.data = (unsigned long)priv;
+	priv->sTimerCommand.function = (TimerFunction)vCommandTimer;
+	priv->sTimerCommand.expires = (unsigned int)RUN_AT((msec * HZ) >> 10);
+	add_timer(&priv->sTimerCommand);
 }
 
 void
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists