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/3] drivers: isdn: isdnloop: isdnloop.c: remove assignment of variables in if conditions, in accordance with the CodingStyle.
Date: Sat,  7 Feb 2015 22:54:09 +0100	[thread overview]
Message-ID: <1423346058-12995-13-git-send-email-baspeters93@gmail.com> (raw)
In-Reply-To: <1423346058-12995-1-git-send-email-baspeters93@gmail.com>

Signed-off-by: Bas Peters <baspeters93@gmail.com>
---
 drivers/isdn/isdnloop/isdnloop.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/isdn/isdnloop/isdnloop.c b/drivers/isdn/isdnloop/isdnloop.c
index 5a4da94..af96317 100644
--- a/drivers/isdn/isdnloop/isdnloop.c
+++ b/drivers/isdn/isdnloop/isdnloop.c
@@ -59,7 +59,8 @@ isdnloop_bchan_send(isdnloop_card *card, int ch)
 	isdn_ctrl cmd;
 
 	while (card->sndcount[ch]) {
-		if ((skb = skb_dequeue(&card->bqueue[ch]))) {
+		skb = skb_dequeue(&card->bqueue[ch]);
+		if (skb) {
 			len = skb->len;
 			card->sndcount[ch] -= len;
 			ack = *(skb->head); /* used as scratch area */
@@ -317,7 +318,8 @@ isdnloop_polldchan(unsigned long data)
 	u_char *p;
 	isdn_ctrl cmd;
 
-	if ((skb = skb_dequeue(&card->dqueue)))
+	skb = skb_dequeue(&card->dqueue);
+	if (skb)
 		avail = skb->len;
 	else
 		avail = 0;
@@ -471,8 +473,8 @@ isdnloop_fake(isdnloop_card *card, char *s, int ch)
 {
 	struct sk_buff *skb;
 	int len = strlen(s) + ((ch >= 0) ? 3 : 0);
-
-	if (!(skb = dev_alloc_skb(len))) {
+	skb = dev_alloc_skb(len);
+	if (!skb) {
 		printk(KERN_WARNING "isdnloop: Out of memory in isdnloop_fake\n");
 		return 1;
 	}
@@ -1439,8 +1441,8 @@ isdnloop_initcard(char *id)
 {
 	isdnloop_card *card;
 	int i;
-
-	if (!(card = kzalloc(sizeof(isdnloop_card), GFP_KERNEL))) {
+	card = kzalloc(sizeof(isdnloop_card), GFP_KERNEL);
+	if (!card) {
 		printk(KERN_WARNING
 		       "isdnloop: (%s) Could not allocate card-struct.\n", id);
 		return (isdnloop_card *) 0;
@@ -1489,8 +1491,8 @@ static int
 isdnloop_addcard(char *id1)
 {
 	isdnloop_card *card;
-
-	if (!(card = isdnloop_initcard(id1))) {
+	card = isdnloop_initcard(id1);
+	if (!card) {
 		return -EIO;
 	}
 	printk(KERN_INFO
-- 
2.1.0


  parent reply	other threads:[~2015-02-07 21:55 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 ` [PATCH 1/7] drivers: isdn: act2000: act2000_isa.c: Fix " Bas Peters
2015-02-07 21:56   ` 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 ` Bas Peters [this message]
2015-02-07 21:57   ` [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:56 ` [PATCH V2 0/7] drivers: isdn: act2000: fix checkpatch errors Bas Peters
  -- strict thread matches above, loose matches on Subject: below --
2015-02-04 22:32 [PATCH 0/3] Fix checkpatch errors in drivers/isdn/isdnloop Bas Peters
2015-02-04 22:32 ` [PATCH 1/3] drivers: isdn: isdnloop: isdnloop.c: remove assignment of variables in if conditions, in accordance with the CodingStyle 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-13-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