public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bas Peters <baspeters93@gmail.com>
To: gregkh@linuxgoundation.org, stern@rowland.harvard.edu
Cc: dan.j.williams@intel.com, hdegoede@redhat.com,
	sarah.a.sharp@linux.intel.com, peter.chen@freescale.com,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Bas Peters <baspeters93@gmail.com>
Subject: [PATCH 1/7] drivers: isdn: act2000: act2000_isa.c: Fix checkpatch errors
Date: Sat,  7 Feb 2015 22:53:58 +0100	[thread overview]
Message-ID: <1423346058-12995-2-git-send-email-baspeters93@gmail.com> (raw)
In-Reply-To: <1423346058-12995-1-git-send-email-baspeters93@gmail.com>

This patch adresses various checkpatch errors:
	3 assignments in if conditions
	1 return value enclosed in parenthesis

Signed-off-by: Bas Peters <baspeters93@gmail.com>
---
 drivers/isdn/act2000/act2000_isa.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/isdn/act2000/act2000_isa.c b/drivers/isdn/act2000/act2000_isa.c
index b5fad29..048507e 100644
--- a/drivers/isdn/act2000/act2000_isa.c
+++ b/drivers/isdn/act2000/act2000_isa.c
@@ -31,7 +31,8 @@ act2000_isa_reset(unsigned short portbase)
 	int serial = 0;
 
 	found = 0;
-	if ((reg = inb(portbase + ISA_COR)) != 0xff) {
+	reg = inb(portbase + ISA_COR);
+	if (reg != 0xff) {
 		outb(reg | ISA_COR_RESET, portbase + ISA_COR);
 		mdelay(10);
 		outb(reg, portbase + ISA_COR);
@@ -303,7 +304,8 @@ act2000_isa_send(act2000_card *card)
 	while (1) {
 		spin_lock_irqsave(&card->lock, flags);
 		if (!(card->sbuf)) {
-			if ((card->sbuf = skb_dequeue(&card->sndq))) {
+			card->sbuf = skb_dequeue(&card->sndq);
+			if (card->sbuf) {
 				card->ack_msg = card->sbuf->data;
 				msg = (actcapi_msg *)card->sbuf->data;
 				if ((msg->hdr.cmd.cmd == 0x86) &&
@@ -378,7 +380,8 @@ act2000_isa_getid(act2000_card *card)
 		printk(KERN_WARNING "act2000: Wrong Firmware-ID!\n");
 		return -EPROTO;
 	}
-	if ((p = strchr(fid.revision, '\n')))
+	p = strchr(fid.revision, '\n');
+	if (p)
 		*p = '\0';
 	printk(KERN_INFO "act2000: Firmware-ID: %s\n", fid.revision);
 	if (card->flags & ACT2000_FLAGS_IVALID) {
@@ -439,5 +442,5 @@ act2000_isa_download(act2000_card *card, act2000_ddef __user *cb)
 	}
 	kfree(buf);
 	msleep_interruptible(500);
-	return (act2000_isa_getid(card));
+	return act2000_isa_getid(card);
 }
-- 
2.1.0


  reply	other threads:[~2015-02-07 21:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-07 21:53 [PATCH V2 0/7] drivers: isdn: act2000: fix checkpatch errors Bas Peters
2015-02-07 21:53 ` Bas Peters [this message]
2015-02-07 21:56   ` [PATCH 1/7] drivers: isdn: act2000: act2000_isa.c: Fix " Bas Peters
2015-02-07 21:53 ` [PATCH 2/7] drivers: isdn: act2000: capi.c: fix " Bas Peters
2015-02-07 21:54 ` [PATCH 3/7] drivers: isdn: act2000: remove assignments of variables in if conditions Bas Peters
2015-02-07 21:54 ` [PATCH 4/7] drivers: isdn: act2000: module.c: remove NULL-initialization of static variable Bas Peters
2015-02-07 21:54 ` [PATCH 5/7] drivers: isdn: act2000: module.c: remove parenthesres around return values Bas Peters
2015-02-07 21:54 ` [PATCH 6/7] drivers: isdn: act2000: fix wrongly positioned brace Bas Peters
2015-02-07 21:54 ` [PATCH 7/7] drivers: isdn: act2000: capi.c: add macro \ and fix brace Bas Peters
2015-02-07 21:54 ` [PATCH 0/2] drivers: isdn: icn: fix checkpatch errors Bas Peters
2015-02-07 21:54 ` [PATCH 1/2] drivers: isdn: icn: icn.c: clean up all " Bas Peters
2015-02-07 21:54 ` [PATCH 2/2] drivers: isdn: icn: icn.h Clean up trivial " Bas Peters
2015-02-07 21:54 ` [PATCH 0/3] Fix checkpatch errors in drivers/isdn/isdnloop Bas Peters
2015-02-07 21:54 ` [PATCH 1/3] drivers: isdn: isdnloop: isdnloop.c: remove assignment of variables in if conditions, in accordance with the CodingStyle Bas Peters
2015-02-07 21:57   ` Bas Peters
2015-02-07 21:56 ` [PATCH V2 0/7] drivers: isdn: act2000: fix checkpatch errors Bas Peters
  -- strict thread matches above, loose matches on Subject: below --
2015-02-07 19:05 Bas Peters
2015-02-07 19:05 ` [PATCH 1/7] drivers: isdn: act2000: act2000_isa.c: Fix " Bas Peters

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=1423346058-12995-2-git-send-email-baspeters93@gmail.com \
    --to=baspeters93@gmail.com \
    --cc=dan.j.williams@intel.com \
    --cc=gregkh@linuxgoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=peter.chen@freescale.com \
    --cc=sarah.a.sharp@linux.intel.com \
    --cc=stern@rowland.harvard.edu \
    /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