Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752718AbbF2UJe (ORCPT ); Mon, 29 Jun 2015 16:09:34 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:49774 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751159AbbF2UJ2 (ORCPT ); Mon, 29 Jun 2015 16:09:28 -0400 Date: Mon, 29 Jun 2015 13:09:27 -0700 From: Greg KH To: Ravi Teja Darbha Cc: Larry.Finger@lwfinger.net, florian.c.schilhabel@googlemail.com, mahfouz.saif.elyazal@gmail.com, vthakkar1994@gmail.com, haggai.eran@gmail.com, sudipm.mukherjee@gmail.com, krinkin.m.u@gmail.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rtl8712:Fix checkpatch warning Message-ID: <20150629200927.GA32593@kroah.com> References: <5591A33B.8000209@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5591A33B.8000209@gmail.com> User-Agent: Mutt/1.5.23+89 (0255b37be491) (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1686 Lines: 55 On Tue, Jun 30, 2015 at 01:27:47AM +0530, Ravi Teja Darbha wrote: > > 1. Fix line over 80 characters warning. Great, but: > 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 Why does that belong here in this changelog entry? Why would you want this text to show up in the kernel log? Please fix up. Also: > --- 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 Your patches are corrupted and can not be applied. Please fix your email client. greg k-h -- 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/