mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@suse.de>, devel@driverdev.osuosl.org
Subject: [PATCH 11/13] drivers/staging/vt6655: Hoist assign from if
Date: Wed, 24 Mar 2010 22:17:05 -0700	[thread overview]
Message-ID: <8628ca12402a0806eebb7fee9c8cb980e0448401.1269493047.git.joe@perches.com> (raw)
In-Reply-To: <cover.1269493047.git.joe@perches.com>


Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/staging/vt6655/desc.h        |    6 ++++--
 drivers/staging/vt6655/device.h      |    6 ++++--
 drivers/staging/vt6655/device_main.c |    3 ++-
 drivers/staging/vt6655/iwctl.c       |    3 ++-
 4 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/vt6655/desc.h b/drivers/staging/vt6655/desc.h
index b573ef7..78c863a 100644
--- a/drivers/staging/vt6655/desc.h
+++ b/drivers/staging/vt6655/desc.h
@@ -232,7 +232,8 @@ typedef struct tagDEVICE_RD_INFO {
 /*
 static inline PDEVICE_RD_INFO alloc_rd_info(void) {
     PDEVICE_RD_INFO  ptr;
-    if ((ptr = kmalloc(sizeof(DEVICE_RD_INFO), GFP_ATOMIC)) == NULL)
+    ptr = kmalloc(sizeof(DEVICE_RD_INFO), GFP_ATOMIC);
+    if (ptr == NULL)
         return NULL;
     else {
         memset(ptr,0,sizeof(DEVICE_RD_INFO));
@@ -361,7 +362,8 @@ typedef struct tagDEVICE_TD_INFO{
 /*
 static inline PDEVICE_TD_INFO alloc_td_info(void) {
     PDEVICE_TD_INFO  ptr;
-    if ((ptr = kmalloc(sizeof(DEVICE_TD_INFO),GFP_ATOMIC))==NULL)
+    ptr = kmalloc(sizeof(DEVICE_TD_INFO),GFP_ATOMIC);
+    if (ptr==NULL)
         return NULL;
     else {
         memset(ptr,0,sizeof(DEVICE_TD_INFO));
diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
index cde44d2..7a9f406 100644
--- a/drivers/staging/vt6655/device.h
+++ b/drivers/staging/vt6655/device.h
@@ -898,7 +898,8 @@ inline static BOOL device_get_ip(PSDevice pInfo) {
 
 static inline PDEVICE_RD_INFO alloc_rd_info(void) {
     PDEVICE_RD_INFO  ptr;
-    if ((ptr = (PDEVICE_RD_INFO)kmalloc((int)sizeof(DEVICE_RD_INFO), (int)GFP_ATOMIC)) == NULL)
+    ptr = (PDEVICE_RD_INFO)kmalloc((int)sizeof(DEVICE_RD_INFO), (int)GFP_ATOMIC);
+    if (ptr == NULL)
         return NULL;
     else {
         memset(ptr,0,sizeof(DEVICE_RD_INFO));
@@ -908,7 +909,8 @@ static inline PDEVICE_RD_INFO alloc_rd_info(void) {
 
 static inline PDEVICE_TD_INFO alloc_td_info(void) {
     PDEVICE_TD_INFO  ptr;
-    if ((ptr = (PDEVICE_TD_INFO)kmalloc((int)sizeof(DEVICE_TD_INFO), (int)GFP_ATOMIC))==NULL)
+    ptr = (PDEVICE_TD_INFO)kmalloc((int)sizeof(DEVICE_TD_INFO), (int)GFP_ATOMIC);
+    if (ptr == NULL)
         return NULL;
     else {
         memset(ptr,0,sizeof(DEVICE_TD_INFO));
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index 1d64365..66fe7ba 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -637,7 +637,8 @@ byValue1 = SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_ANTENNA);
 //2008-8-4 <add> by chester
 //zonetype initial
  pDevice->byOriginalZonetype = pDevice->abyEEPROM[EEP_OFS_ZONETYPE];
- if((zonetype=Config_FileOperation(pDevice,FALSE,NULL)) >= 0) {         //read zonetype file ok!
+ zonetype = Config_FileOperation(pDevice,FALSE,NULL);
+ if (zonetype >= 0) {         //read zonetype file ok!
   if ((zonetype == 0)&&
         (pDevice->abyEEPROM[EEP_OFS_ZONETYPE] !=0x00)){          //for USA
     pDevice->abyEEPROM[EEP_OFS_ZONETYPE] = 0;
diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwctl.c
index 78b4983..2f26c6d 100644
--- a/drivers/staging/vt6655/iwctl.c
+++ b/drivers/staging/vt6655/iwctl.c
@@ -1702,7 +1702,8 @@ int iwctl_giwpower(struct net_device *dev,
     DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWPOWER \n");
 
 
-	if ((wrq->disabled = (mode == WMAC_POWER_CAM)))
+	wrq->disabled = (mode == WMAC_POWER_CAM);
+	if (wrq->disabled)
 	    return 0;
 
 	if ((wrq->flags & IW_POWER_TYPE) == IW_POWER_TIMEOUT) {
-- 
1.7.0.14.g7e948


  parent reply	other threads:[~2010-03-25  5:17 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-25  5:16 [PATCH 00/13] drivers/staging: Hoist assigns " Joe Perches
2010-03-25  5:16 ` [PATCH 01/13] drivers/staging/cx25821: Hoist assign " Joe Perches
2010-03-25  5:16 ` [PATCH 02/13] drivers/staging/dt3155: " Joe Perches
2010-04-28 18:20   ` Greg KH
2010-03-25  5:16 ` [PATCH 03/13] drivers/staging/otus/80211core: " Joe Perches
2010-03-25  5:16 ` [PATCH 04/13] drivers/staging/otus: " Joe Perches
2010-03-25  5:16 ` [PATCH 05/13] drivers/staging/rt2860: " Joe Perches
2010-03-25  5:17 ` [PATCH 06/13] drivers/staging/rt2870: " Joe Perches
2010-03-25  5:17 ` [PATCH 07/13] drivers/staging/rtl8187se: " Joe Perches
2010-04-28 18:24   ` Greg KH
2010-03-25  5:17 ` [PATCH 08/13] drivers/staging/rtl8192e: " Joe Perches
2010-04-28 18:26   ` Greg KH
2010-03-25  5:17 ` [PATCH 09/13] drivers/staging/rtl8192su: " Joe Perches
2010-04-28 18:27   ` Greg KH
2010-04-28 19:04     ` Joe Perches
2010-04-28 19:11       ` Greg KH
2010-04-28 19:20         ` Joe Perches
2010-04-28 19:41           ` Greg KH
2010-04-28 20:11             ` Joe Perches
2010-03-25  5:17 ` [PATCH 10/13] drivers/staging/rtl8192u: " Joe Perches
2010-04-28 18:27   ` Greg KH
2010-03-25  5:17 ` Joe Perches [this message]
2010-04-28 18:28   ` [PATCH 11/13] drivers/staging/vt6655: " Greg KH
2010-03-25  5:17 ` [PATCH 12/13] drivers/staging/vt6656: " Joe Perches
2010-04-28 18:29   ` Greg KH
2010-03-25  5:17 ` [PATCH 13/13] drivers/staging/wlags49_h2: " Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8628ca12402a0806eebb7fee9c8cb980e0448401.1269493047.git.joe@perches.com \
    --to=joe@perches.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®