Commit e1d66d04 authored by Markus Elfring's avatar Markus Elfring Committed by Linus Torvalds

rapidio: adjust five function calls together with a variable assignment

checkpatch pointed information out like the following.

  ERROR: do not use assignment in if condition

Thus fix the affected source code places.

Link: http://lkml.kernel.org/r/6f5631ed-ec3e-503d-850a-ab09b5736dbe@users.sourceforge.netSigned-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Acked-by: default avatarAlexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 93dd49af
...@@ -252,9 +252,9 @@ int rio_request_inb_mbox(struct rio_mport *mport, ...@@ -252,9 +252,9 @@ int rio_request_inb_mbox(struct rio_mport *mport,
rio_init_mbox_res(res, mbox, mbox); rio_init_mbox_res(res, mbox, mbox);
/* Make sure this mailbox isn't in use */ /* Make sure this mailbox isn't in use */
if ((rc = rc = request_resource(&mport->riores[RIO_INB_MBOX_RESOURCE],
request_resource(&mport->riores[RIO_INB_MBOX_RESOURCE], res);
res)) < 0) { if (rc < 0) {
kfree(res); kfree(res);
goto out; goto out;
} }
...@@ -335,9 +335,9 @@ int rio_request_outb_mbox(struct rio_mport *mport, ...@@ -335,9 +335,9 @@ int rio_request_outb_mbox(struct rio_mport *mport,
rio_init_mbox_res(res, mbox, mbox); rio_init_mbox_res(res, mbox, mbox);
/* Make sure this outbound mailbox isn't in use */ /* Make sure this outbound mailbox isn't in use */
if ((rc = rc = request_resource(&mport->riores[RIO_OUTB_MBOX_RESOURCE],
request_resource(&mport->riores[RIO_OUTB_MBOX_RESOURCE], res);
res)) < 0) { if (rc < 0) {
kfree(res); kfree(res);
goto out; goto out;
} }
...@@ -406,9 +406,9 @@ rio_setup_inb_dbell(struct rio_mport *mport, void *dev_id, struct resource *res, ...@@ -406,9 +406,9 @@ rio_setup_inb_dbell(struct rio_mport *mport, void *dev_id, struct resource *res,
u16 info)) u16 info))
{ {
int rc = 0; int rc = 0;
struct rio_dbell *dbell; struct rio_dbell *dbell = kmalloc(sizeof(*dbell), GFP_KERNEL);
if (!(dbell = kmalloc(sizeof(struct rio_dbell), GFP_KERNEL))) { if (!dbell) {
rc = -ENOMEM; rc = -ENOMEM;
goto out; goto out;
} }
...@@ -452,9 +452,9 @@ int rio_request_inb_dbell(struct rio_mport *mport, ...@@ -452,9 +452,9 @@ int rio_request_inb_dbell(struct rio_mport *mport,
rio_init_dbell_res(res, start, end); rio_init_dbell_res(res, start, end);
/* Make sure these doorbells aren't in use */ /* Make sure these doorbells aren't in use */
if ((rc = rc = request_resource(&mport->riores[RIO_DOORBELL_RESOURCE],
request_resource(&mport->riores[RIO_DOORBELL_RESOURCE], res);
res)) < 0) { if (rc < 0) {
kfree(res); kfree(res);
goto out; goto out;
} }
...@@ -1411,7 +1411,9 @@ rio_mport_get_feature(struct rio_mport * port, int local, u16 destid, ...@@ -1411,7 +1411,9 @@ rio_mport_get_feature(struct rio_mport * port, int local, u16 destid,
ext_ftr_ptr, &ftr_header); ext_ftr_ptr, &ftr_header);
if (RIO_GET_BLOCK_ID(ftr_header) == ftr) if (RIO_GET_BLOCK_ID(ftr_header) == ftr)
return ext_ftr_ptr; return ext_ftr_ptr;
if (!(ext_ftr_ptr = RIO_GET_BLOCK_PTR(ftr_header)))
ext_ftr_ptr = RIO_GET_BLOCK_PTR(ftr_header);
if (!ext_ftr_ptr)
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment