* [PATCH] staging: ks7010: Fix unnecessary parentheses checks.
@ 2017-06-26 19:02 Jonathan Whitaker
2017-06-29 14:40 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Whitaker @ 2017-06-26 19:02 UTC (permalink / raw)
To: Greg Kroah-Hartman, wsa, driverdev-devel
[-- Attachment #1: Type: text/plain, Size: 1803 bytes --]
This patch fixes "Unnecessary parentheses" checks reported by
the checkpatch.pl script.
Signed-off-by: Jonathan Bennion Whitaker <jon.b.whitaker@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++;
/* length check in advance ! */
--(priv->rx_size);
return data;
@@ -200,7 +200,7 @@ int get_current_ap(struct ks_wlan_private *priv, struct
link_ap_info_t *ap_info)
" capability=%04X\n",
ap->bssid[0], ap->bssid[1], ap->bssid[2],
ap->bssid[3], ap->bssid[4], ap->bssid[5],
- &(ap->ssid.body[0]),
+ &ap->ssid.body[0],
ap->rate_set.body[0], ap->rate_set.body[1],
ap->rate_set.body[2], ap->rate_set.body[3],
ap->rate_set.body[4], ap->rate_set.body[5],
@@ -851,7 +851,7 @@ void hostif_scan_indication(struct ks_wlan_private
*priv)
DPRINTK(4, " scan_ind_count=%d :: aplist.size=%d\n",
priv->scan_ind_count, priv->aplist.size);
get_ap_information(priv, (struct ap_info_t *)(priv->rxp),
- &(priv->aplist.ap[priv->scan_ind_count -
1]));
+ &priv->aplist.ap[priv->scan_ind_count -
1]);
priv->aplist.size = priv->scan_ind_count;
} else {
DPRINTK(4, " count over :: scan_ind_count=%d\n",
--
2.9.4
[-- Attachment #2: Type: text/html, Size: 2594 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: ks7010: Fix unnecessary parentheses checks.
2017-06-26 19:02 [PATCH] staging: ks7010: Fix unnecessary parentheses checks Jonathan Whitaker
@ 2017-06-29 14:40 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2017-06-29 14:40 UTC (permalink / raw)
To: Jonathan Whitaker; +Cc: wsa, driverdev-devel
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@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-29 14:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-26 19:02 [PATCH] staging: ks7010: Fix unnecessary parentheses checks Jonathan Whitaker
2017-06-29 14:40 ` Greg Kroah-Hartman
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.