lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150113171429.GC12822@kroah.com>
Date:	Tue, 13 Jan 2015 09:14:29 -0800
From:	Greg KH <gregkh@...uxfoundation.org>
To:	Emrys Bayliss <emrys@...adise.net.nz>
Cc:	forest@...ttletooquiet.net, tvboxspy@...il.com,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging: vt6656: Checkpatch fix: else after break or
 return

On Wed, Jan 14, 2015 at 04:03:24AM +1100, Emrys Bayliss wrote:
> This patch fixes the following checkpatch.pl error:
> rxtx.c:558: WARNING: else is not generally useful after a break or return
> 
> Signed-off-by: Emrys Bayliss <emrys@...adise.net.nz>
> ---
> The else statement was replaced with a block to avoid the following
> compiler error:
> "warning: ISO C90 forbids mixed declarations and code"
> due to this declaration:
> struct vnt_cts *buf = &head->cts_g; (line 559)
> 
> Is there a better way such as using head (a union) directly instead?
> 
> The last patch I sent removed the return 0. Since this isn't related to
> the error in the title I left it for a separate patch.
> 
>  drivers/staging/vt6656/rxtx.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
> index ea5140a..831a051 100644
> --- a/drivers/staging/vt6656/rxtx.c
> +++ b/drivers/staging/vt6656/rxtx.c
> @@ -555,7 +555,9 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,
>  		memcpy(buf->data.ra, priv->current_net_addr, ETH_ALEN);
>  
>  		return vnt_rxtx_datahead_g_fb(tx_context, &buf->data_head);
> -	} else {
> +	}
> +
> +	{
>  		struct vnt_cts *buf = &head->cts_g;
>  		/* Get SignalField,ServiceField,Length */
>  		vnt_get_phy_field(priv, cts_frame_len,

This doesn't look correct at all, please fix up properly.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ