All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ravi Teja Darbha <ravi2j@gmail.com>
To: Larry.Finger@lwfinger.net, florian.c.schilhabel@googlemail.com
Cc: gregkh@linuxfoundation.org, mahfouz.saif.elyazal@gmail.com,
	vthakkar1994@gmail.com, haggai.eran@gmail.com,
	sudipm.mukherjee@gmail.com, krinkin.m.u@gmail.com,
	krinkin.m.u@gmail.com, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] rtl8712:Fix checkpatch warning
Date: Tue, 30 Jun 2015 01:27:47 +0530	[thread overview]
Message-ID: <5591A33B.8000209@gmail.com> (raw)


1. Fix line over 80 characters warning.
2. The checkpatch warning at line 499 seems to be false positive.
WARNING: else is not generally useful after a break or return
#499: FILE: rtl8712_recv.c:499:
+            return false;
+        else

while(condition1) {
    if(condition2)
        foo();
    else if(condition3)
        return false;
    else
        break;
}

The else condition here cannot be eliminated

Signed-off-by: Ravi Teja Darbha <ravi2j@gmail.com>
---
 drivers/staging/rtl8712/rtl8712_recv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl8712_recv.c b/drivers/staging/rtl8712/rtl8712_recv.c
index fcb8c61..4fa2540 100644
--- a/drivers/staging/rtl8712/rtl8712_recv.c
+++ b/drivers/staging/rtl8712/rtl8712_recv.c
@@ -58,8 +58,8 @@ int r8712_init_recv_priv(struct recv_priv *precvpriv, struct _adapter *padapter)
 
     /*init recv_buf*/
     _init_queue(&precvpriv->free_recv_buf_queue);
-    precvpriv->pallocated_recv_buf = kzalloc(NR_RECVBUFF * sizeof(struct recv_buf) + 4,
-                         GFP_ATOMIC);
+    precvpriv->pallocated_recv_buf =
+        kzalloc(NR_RECVBUFF * sizeof(struct recv_buf) + 4, GFP_ATOMIC);
     if (precvpriv->pallocated_recv_buf == NULL)
         return _FAIL;
     precvpriv->precv_buf = precvpriv->pallocated_recv_buf + 4 -
-- 
1.9.1


             reply	other threads:[~2015-06-29 19:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-29 19:57 Ravi Teja Darbha [this message]
2015-06-29 20:09 ` [PATCH] rtl8712:Fix checkpatch warning Greg KH
2015-06-30  4:29 ` Sudip Mukherjee
2015-06-30  5:56   ` Larry Finger

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=5591A33B.8000209@gmail.com \
    --to=ravi2j@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=florian.c.schilhabel@googlemail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=haggai.eran@gmail.com \
    --cc=krinkin.m.u@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mahfouz.saif.elyazal@gmail.com \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=vthakkar1994@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.