Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932371AbbBGV53 (ORCPT ); Sat, 7 Feb 2015 16:57:29 -0500 Received: from mail-ie0-f177.google.com ([209.85.223.177]:41769 "EHLO mail-ie0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932190AbbBGV50 (ORCPT ); Sat, 7 Feb 2015 16:57:26 -0500 MIME-Version: 1.0 In-Reply-To: <1423346058-12995-13-git-send-email-baspeters93@gmail.com> References: <1423346058-12995-1-git-send-email-baspeters93@gmail.com> <1423346058-12995-13-git-send-email-baspeters93@gmail.com> Date: Sat, 7 Feb 2015 22:57:25 +0100 Message-ID: Subject: Re: [PATCH 1/3] drivers: isdn: isdnloop: isdnloop.c: remove assignment of variables in if conditions, in accordance with the CodingStyle. From: Bas Peters 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 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2659 Lines: 74 Please discard all these e-mails, something went wrong and I sent the wrong directory of patches. 2015-02-07 22:54 GMT+01:00 Bas Peters : > Signed-off-by: Bas Peters > --- > 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 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/