From: Julia Lawall <julia.lawall@lip6.fr>
To: Janani Ravichandran <janani.rvchndrn@gmail.com>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH] staging: unisys: Remove parentheses around right hand side of assignment
Date: Tue, 9 Feb 2016 15:18:41 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.10.1602091518280.2578@hadrien> (raw)
In-Reply-To: <20160209190204.GA6095@janani-Inspiron-3521>
On Tue, 9 Feb 2016, Janani Ravichandran wrote:
> Remove parentheses on the right hand side of assignment as they are not
> needed. Semantic patch used:
>
> @@
> expression a, b, c, d;
> @@
>
> (
> a = (c == d)
> |
> a =
> - (
> b
> - )
> )
> Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
> ---
> drivers/staging/unisys/visorbus/visorchannel.c | 4 ++--
> drivers/staging/unisys/visorhba/visorhba_main.c | 4 ++--
> drivers/staging/unisys/visornic/visornic_main.c | 4 ++--
> 3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/unisys/visorbus/visorchannel.c b/drivers/staging/unisys/visorbus/visorchannel.c
> index 891b8db..a80d72c 100644
> --- a/drivers/staging/unisys/visorbus/visorchannel.c
> +++ b/drivers/staging/unisys/visorbus/visorchannel.c
> @@ -461,7 +461,7 @@ signalinsert_inner(struct visorchannel *channel, u32 queue, void *msg)
> if (!sig_read_header(channel, queue, &sig_hdr))
> return false;
>
> - sig_hdr.head = ((sig_hdr.head + 1) % sig_hdr.max_slots);
> + sig_hdr.head = (sig_hdr.head + 1) % sig_hdr.max_slots;
> if (sig_hdr.head == sig_hdr.tail) {
> sig_hdr.num_overflows++;
> visorchannel_write(channel,
> @@ -521,7 +521,7 @@ visorchannel_signalqueue_slots_avail(struct visorchannel *channel, u32 queue)
> tail = sig_hdr.tail;
> if (head < tail)
> head = head + sig_hdr.max_slots;
> - slots_used = (head - tail);
> + slots_used = head - tail;
> slots_avail = sig_hdr.max_signals - slots_used;
> return (int)slots_avail;
> }
> diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c
> index 202bfab..5a78409 100644
> --- a/drivers/staging/unisys/visorhba/visorhba_main.c
> +++ b/drivers/staging/unisys/visorhba/visorhba_main.c
> @@ -323,9 +323,9 @@ static int forward_taskmgmt_command(enum task_mgmt_types tasktype,
> goto err_del_scsipending_ent;
>
> if (tasktype == TASK_MGMT_ABORT_TASK)
> - scsicmd->result = (DID_ABORT << 16);
> + scsicmd->result = DID_ABORT << 16;
> else
> - scsicmd->result = (DID_RESET << 16);
> + scsicmd->result = DID_RESET << 16;
>
> scsicmd->scsi_done(scsicmd);
>
> diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
> index 9b3eb95..a6786ec 100644
> --- a/drivers/staging/unisys/visornic/visornic_main.c
> +++ b/drivers/staging/unisys/visornic/visornic_main.c
> @@ -1029,7 +1029,7 @@ visornic_set_multi(struct net_device *netdev)
> cmdrsp->net.type = NET_RCV_PROMISC;
> cmdrsp->net.enbdis.context = netdev;
> cmdrsp->net.enbdis.enable =
> - (netdev->flags & IFF_PROMISC);
> + netdev->flags & IFF_PROMISC;
> visorchannel_signalinsert(devdata->dev->visorchannel,
> IOCHAN_TO_IOPART,
> cmdrsp);
> @@ -1766,7 +1766,7 @@ static int visornic_probe(struct visor_device *dev)
> }
>
> netdev->netdev_ops = &visornic_dev_ops;
> - netdev->watchdog_timeo = (5 * HZ);
> + netdev->watchdog_timeo = 5 * HZ;
> SET_NETDEV_DEV(netdev, &dev->device);
>
> /* Get MAC adddress from channel and read it into the device. */
> --
> 2.5.0
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160209190204.GA6095%40janani-Inspiron-3521.
> For more options, visit https://groups.google.com/d/optout.
>
prev parent reply other threads:[~2016-02-09 14:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-09 19:02 [PATCH] staging: unisys: Remove parentheses around right hand side of assignment Janani Ravichandran
2016-02-09 14:18 ` Julia Lawall [this message]
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=alpine.DEB.2.10.1602091518280.2578@hadrien \
--to=julia.lawall@lip6.fr \
--cc=janani.rvchndrn@gmail.com \
--cc=outreachy-kernel@googlegroups.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.