From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6673442126229929984 X-Received: by 2002:a1c:48b:: with SMTP id 133mr24705wme.4.1553783700828; Thu, 28 Mar 2019 07:35:00 -0700 (PDT) X-BeenThere: outreachy-kernel@googlegroups.com Received: by 2002:a05:600c:2292:: with SMTP id 18ls512241wmf.3.canary-gmail; Thu, 28 Mar 2019 07:34:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqzoGbOMMDTftPit/yJcS8UfSyp/rZRwRGY+ypedpsbPWqO7H31MdX7I5LiftdEkPYSAyNtS X-Received: by 2002:a1c:a74a:: with SMTP id q71mr21111wme.19.1553783699685; Thu, 28 Mar 2019 07:34:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553783699; cv=none; d=google.com; s=arc-20160816; b=UCFkaXm2E8OGfwWRXOXz7dtgXVCJ7Pgd78XW0mU85AV1wVDQr5UH0ZnG0X2ixH5mr/ 4CMitfr8jurGJoqNjmyZDl+bQeX6rniMbrOZt1P+gn/zAQpOyLyV8HZBhnk+8zu6UacJ iEphU5TqFV1NcVBkUZHLx6L0wSqWi4ajFGNDwM27x67URhPeGuRY0s7SuinGif8teZEW bl1ssdY/PF0REjYfmLq5C2g0jcIsA+zBecxARu3dOqz5VaiMVNupYLZxubU2CH+kwENo IyGWNm1Px379/mfJHj0ZlPANwy6g9d4zcbEEm/Hz67b7uCZV4uWzDdpdH+qXTNc3Qdes zcfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=0N1N6Mn6lGGsFMM2qaGkVZ9aS9Er4FwO104NZL98/10=; b=n6cmU0dA7ltoqKm48S4DreBK5LcfC3VofObBoe8GeaygfFoQI7UP5AZCqK7TIRMYIt JcMW5Gy14Eub8JfXoEUU1WuO7dWQ8pFTTy46nyY+CicB/xfdpoyoekxiCIoIYfk+P4uS A9yyDRGJf5TVi3+/5rBWSIO7Pdds8I8o/qsnhOMZM+c001a2nGkqZI8joPAaGnE+7lOj U7jMhmiEpObLVACHQUEgM70wRtNqLVFE765yloZ+ker4YTAFT8zVVOyaj0N9LrO+4qkb 0wbJYk8W+PY0m0T7kxYnNiROiE2RxPCl+zxFjpFUZe9/+B6J8IBSS7PXb4eY6dTVhlYE nVPA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=B1JSTOJ8; spf=pass (google.com: domain of payal.s.kshirsagar.98@gmail.com designates 2a00:1450:4864:20::136 as permitted sender) smtp.mailfrom=payal.s.kshirsagar.98@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com. [2a00:1450:4864:20::136]) by gmr-mx.google.com with ESMTPS id k15si1261606wrq.1.2019.03.28.07.34.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Mar 2019 07:34:59 -0700 (PDT) Received-SPF: pass (google.com: domain of payal.s.kshirsagar.98@gmail.com designates 2a00:1450:4864:20::136 as permitted sender) client-ip=2a00:1450:4864:20::136; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=B1JSTOJ8; spf=pass (google.com: domain of payal.s.kshirsagar.98@gmail.com designates 2a00:1450:4864:20::136 as permitted sender) smtp.mailfrom=payal.s.kshirsagar.98@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by mail-lf1-x136.google.com with SMTP id 10so14172014lfr.8 for ; Thu, 28 Mar 2019 07:34:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0N1N6Mn6lGGsFMM2qaGkVZ9aS9Er4FwO104NZL98/10=; b=B1JSTOJ8zXQS4XbS3p/Yc+W/BZ1y14HD2YRz31S738sRFjqw9XBWapJXMuV0GWWHT0 Z4tzj6l+iD/0DTxlvsNKXN7UPFkJgcfu+ZGyYQ/VRdZj0yu1tc00tB4VvGlHM2EdzXRV gj2O2LSTEFIEW+hCfHxPCxv0JWkpkVBR2wHE734Q9SQSY7hSMeqz5mwtOGYnojW/d+Vj YZZ6tmfgVbnss3o+Tt76QVuh94Fh/Luo5yowiNqTm/7ucUIUgzwL2TFEcX450pTIa1Xb uVzDRa7OCdPF7JBNd2ogufTbQcx/dXSOmTgRIYWLFrAdFDvkmcsL2fHxMazCdLxN/+oN g7YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0N1N6Mn6lGGsFMM2qaGkVZ9aS9Er4FwO104NZL98/10=; b=TaNVdYl0YyAAKBxaLHo/WjvzNz3lWwb5EVB5rn6JdvXYK4of5PyzCuHiiCy4O8LiXF AN7X0Rcz4H4dXUq1N8spDbR9C2yZGnE81JoZKzO8zLWdVACKQXFZ5sMb9ggW3exyLv9l EkQ9f4yZfeuPYoh4jwmL+ntaESxd+m6B1M9PwgarTZjWHL5xWJAsou89u6rmvFPfjXjN MHohB0TQP5snPDqwgraAxoj/Ao2DO+3ZhsTw7meM2hhzCGbx/I8kjIa0qlplCqds9L1m nkNneV5lahVjaa7T/xf+/zXCU5YAycaF6f7P7cRRR60FL1uQB8NJOyEWxs7J+nXFX/8C zHqA== X-Gm-Message-State: APjAAAWRfuv7wLQli1PyfqKPUG+0oiSJxf+8oQilW40bIwDRCJm/6/uJ YgNA69rbpN580HmrhX2MxFP1GuMZraJWtrZJ2CRDsw== X-Received: by 2002:a19:c314:: with SMTP id t20mr22209247lff.114.1553783699427; Thu, 28 Mar 2019 07:34:59 -0700 (PDT) MIME-Version: 1.0 References: <1553781808-10349-1-git-send-email-payal.s.kshirsagar.98@gmail.com> In-Reply-To: From: Payal Kshirsagar Date: Thu, 28 Mar 2019 20:04:46 +0530 Message-ID: Subject: Re: [Outreachy kernel] [PATCH] staging: rtl8723bs: Remove unnecessary parentheses To: Julia Lawall Cc: outreachy-kernel@googlegroups.com Content-Type: multipart/alternative; boundary="0000000000007654fe058528758b" --0000000000007654fe058528758b Content-Type: text/plain; charset="UTF-8" On Thu, Mar 28, 2019, 7:57 PM Julia Lawall wrote: > > > On Thu, 28 Mar 2019, Payal Kshirsagar wrote: > > > Challenge suggested by coccinelle > > > > This patch removes unnecessary parentheses while returning a value. > > Using following semantic patch: > > > > @@ > > local idexpression id; > > @@ > > > > - return(id); > > + return id; > > > > Signed-off-by: Payal Kshirsagar > > --- > > diff -u -p a/os_dep/ioctl_linux.c b/os_dep/ioctl_linux.c > > --- a/os_dep/ioctl_linux.c > > +++ b/os_dep/ioctl_linux.c > > @@ -961,7 +961,7 @@ static int rtw_wx_set_pmkid(struct net_d > > if (pPMK->cmd == IW_PMKSA_ADD) { > > DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n"); > > if (!memcmp(strIssueBssid, strZeroMacAddress, ETH_ALEN)) > > - return(intReturn); > > + return intReturn; > > else > > intReturn = true; > > > > @@ -1489,7 +1489,7 @@ exit: > > DBG_871X("DBG_IOCTL %s:%d return %d\n", __func__, __LINE__, ret); > > #endif > > > > - return ret ; > > + return ret; > > There are two kinds of change: one drops parentheses and one drops a > space. Both are good, but they should be in two separate patches. > Okay, I will put them in different patches and will send it again. Thanks, Payal The second one is because Coccinelle implicitly ignores parentheses, > unless you tell it not to, so it actually matches and repretty prints all > returns. In the second case it caused a change. > > julia > > > > > } > > > > > > -- > > 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/1553781808-10349-1-git-send-email-payal.s.kshirsagar.98%40gmail.com > . > > For more options, visit https://groups.google.com/d/optout. > > > > -- > 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/alpine.DEB.2.21.1903281525280.2438%40hadrien > . > For more options, visit https://groups.google.com/d/optout. > --0000000000007654fe058528758b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


= On Thu, Mar 28, 2019, 7:57 PM Julia Lawall <julia.lawall@lip6.fr> wrote:


On Thu, 28 Mar 2019, Payal Kshirsagar wrote:

> Challenge suggested by coccinelle
>
> This patch removes unnecessary parentheses while returning a value. > Using following semantic patch:
>
> @@
> local idexpression id;
> @@
>
> - return(id);
> + return id;
>
> Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.c><= br> > ---
> diff -u -p a/os_dep/ioctl_linux.c b/os_dep/ioctl_linux.c
> --- a/os_dep/ioctl_linux.c
> +++ b/os_dep/ioctl_linux.c
> @@ -961,7 +961,7 @@ static int rtw_wx_set_pmkid(struct net_d
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (pPMK->cmd =3D=3D IW_PMKSA_ADD= ) {
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 DBG_871X= ("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n");
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (!mem= cmp(strIssueBssid, strZeroMacAddress, ETH_ALEN))
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= return(intReturn);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= return intReturn;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 else
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 intReturn =3D true;
>
> @@ -1489,7 +1489,7 @@ exit:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0DBG_871X("DBG_IOCTL %s:%d return %d\n&q= uot;, __func__, __LINE__, ret);
>=C2=A0 =C2=A0 =C2=A0 =C2=A0#endif
>
> -=C2=A0 =C2=A0 =C2=A0return ret ;
> +=C2=A0 =C2=A0 =C2=A0return ret;

There are two kinds of change: one drops parentheses and one drops a
space.=C2=A0 Both are good, but they should be in two separate patches.
=

Okay, I will put them in different patches and will s= end it again.
Thanks,
Payal

The second one is because Coccinelle implicitly ignores parentheses,
unless you tell it not to, so it actually matches and repretty prints all returns.=C2=A0 In the second case it caused a change.

julia

>
>=C2=A0 }
>
>
> --
> You received this message because you are subscribed to the Google Gro= ups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send= an email to outreachy-kernel+unsubscribe@goog= legroups.com.
> To post to this group, send email to outreachy-kernel@g= ooglegroups.com.
> To view this discussion on the web visit = https://groups.google.com/d/msgid/outreachy-kernel/1553781808-10349-1-git-s= end-email-payal.s.kshirsagar.98%40gmail.com.
> For more options, visit https://groups.google.com/= d/optout.
>

--
You received this message because you are subscribed to the Google Groups &= quot;outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to outreachy-kernel+unsubscribe@googlegro= ups.com.
To post to this group, send email to outreachy-kernel@google= groups.com.
To view this discussion on the web visit https://groups.google.com/d/= msgid/outreachy-kernel/alpine.DEB.2.21.1903281525280.2438%40hadrien. For more options, visit https://groups.google.com/d/op= tout.
--0000000000007654fe058528758b--