[PATCH] staging: ks7010: Fix unnecessary parentheses checks.
Greg Kroah-Hartman
gregkh at linuxfoundation.org
Thu Jun 29 14:40:00 UTC 2017
On Mon, Jun 26, 2017 at 01:02:27PM -0600, Jonathan Whitaker wrote:
> This patch fixes "Unnecessary parentheses" checks reported by
> the checkpatch.pl script.
>
> Signed-off-by: Jonathan Bennion Whitaker <jon.b.whitaker at gmail.com>
> ---
> drivers/staging/ks7010/ks_hostif.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_
> hostif.c
> index db01a48..3bb812a 100644
> --- a/drivers/staging/ks7010/ks_hostif.c
> +++ b/drivers/staging/ks7010/ks_hostif.c
> @@ -36,7 +36,7 @@ inline u8 get_BYTE(struct ks_wlan_private *priv)
> {
> u8 data;
>
> - data = *(priv->rxp)++;
> + data = *priv->rxp++;
Ick, no, can you now tell me, at a glance, what this line does
correctly? I can't, without having to go look up the
order-of-operations rules for C and pointers and the like. Leave this
as-is please, checkpatch.pl is a hint, not a hard rule for foolish
code like this.
thanks,
greg k-h
More information about the devel
mailing list