Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3385641ybg; Sun, 20 Oct 2019 12:33:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqxhhj0gJ5QTGU/Qr1FxnfEeEeJxHprBLfBSlZ6PMfe+3gD1uwFUm1c+RUQjzN+nLaSgIVl/ X-Received: by 2002:a50:ee12:: with SMTP id g18mr20872637eds.114.1571600037327; Sun, 20 Oct 2019 12:33:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571600037; cv=none; d=google.com; s=arc-20160816; b=bnZhya2WFcgtc4m2DSB+BNTXsoqaXhgvRpv2UkhaoUA/sEBhmVbkVFfH5nsr9uqnlU z+h9TpJHeb29gpNv3YUnW5+DkMh3TqXHenC5SrOkfnhV9EgnZn6LQjZc/tb52F6w5m6P s6KKVi3sVp41B2drWLv63RblXuZGi2BntyPihMzlbV7RrHk4GxWIWPd95Bepfvk+4uYF o9w3MvDvZrjlbo3SW74+fL4oXpOKdDBY+DKfeR2b8DersELdtoVZDRmboB9AKUX1DfoZ 6j0z+DzhpiETi3JCaO23gLHsIZFUu0uW0r4T34+AEiyNcuVJMNKae5ZLpD0856q6lVlQ u9mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=zScsjqFmcj2tCi/KKswS3ROWDKNDHowq+EY01V5eVCQ=; b=cXPSCJx/GsHL7Jie3RbS2uDPHCKGuf3MY8/l7XjJjs52u0svtQGyTRKbDup/I6AvqB GeC/CNVUxG9aY6wgKSkPoIxnolC9qwJjw4ueXylbKRfLnndt8iiCPs//ss1lD90sRm8w X+TlthUmnsSIUBO8uZTQf8Fmaroavq+J2Em8FRPRgt22r4EyFY2pb+TBu3zwOyiPL1UT SSTmsP9h4isn4vQgqNMzbcyXGlrTviiDcEpSwbUNZev0mH1VZmmqKxr3W552YNgj1zNT BZ3S7hNhDTo9ixUoBtVQqj9VvdzIjplmZ53uUwitIqx8fQreMKLsLu3iXsNWe1qLcHop uSjg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ci21si7412723ejb.320.2019.10.20.12.33.33; Sun, 20 Oct 2019 12:33:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726816AbfJTT3F (ORCPT + 99 others); Sun, 20 Oct 2019 15:29:05 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:47376 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725818AbfJTT3F (ORCPT ); Sun, 20 Oct 2019 15:29:05 -0400 X-IronPort-AV: E=Sophos;i="5.67,320,1566856800"; d="scan'208";a="407079772" Received: from ip-121.net-89-2-166.rev.numericable.fr (HELO hadrien) ([89.2.166.121]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Oct 2019 21:29:02 +0200 Date: Sun, 20 Oct 2019 21:29:02 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Dan Carpenter cc: Joe Perches , Jules Irenge , devel@driverdev.osuosl.org, outreachy-kernel@googlegroups.com, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org Subject: Re: [Outreachy kernel] Re: [PATCH v1 1/5] staging: wfx: fix warnings of no space is necessary In-Reply-To: <20191020191759.GJ24678@kadam> Message-ID: References: <20191019140719.2542-1-jbi.octave@gmail.com> <20191019140719.2542-2-jbi.octave@gmail.com> <20191019142443.GH24678@kadam> <20191019180514.GI24678@kadam> <336960fdf88dbed69dd3ed2689a5fb1d2892ace8.camel@perches.com> <20191020191759.GJ24678@kadam> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 20 Oct 2019, Dan Carpenter wrote: > On Sat, Oct 19, 2019 at 01:02:31PM -0700, Joe Perches wrote: > > diff -u -p a/rtl8723bs/core/rtw_mlme_ext.c b/rtl8723bs/core/rtw_mlme_ext.c > > --- a/rtl8723bs/core/rtw_mlme_ext.c > > +++ b/rtl8723bs/core/rtw_mlme_ext.c > > @@ -1132,7 +1132,7 @@ unsigned int OnAuthClient(struct adapter > > goto authclnt_fail; > > } > > > > - memcpy((void *)(pmlmeinfo->chg_txt), (void *)(p + 2), len); > > + memcpy((void *)(pmlmeinfo->chg_txt), (p + 2), len); > > I wonder why it didn't remove the first void cast? If "it" is a semantic patch, it is probably because Coccinelle wasn't able to find the definition of the type of pmlmeinfo. By default, Coccinelle only consults a few header files (ones with the same names as the .c file or ones included with "" and located in the same directory). > > [ The rest of the email is bonus comments for outreachy developers ]. > > And someone needs to check the final patch probably to remove the extra > parentheses around "(p + 2)". Those were necessary when for the cast > but not required after the cast is gone. The rule could have contained - (void *)(e) + e That should also match cases with no parentheses. I think there is even something to put the parentheses back if they are needed, but overall the final patch should be checked carefully in any case. julia > > > pmlmeinfo->auth_seq = 3; > > issue_auth(padapter, NULL, 0); > > set_link_timer(pmlmeext, REAUTH_TO); > > It's sort of tricky to know what "one thing per patch means". > > - memset((void *)(&(pHTInfo->SelfHTCap)), 0, > + memset((&(pHTInfo->SelfHTCap)), 0, > sizeof(pHTInfo->SelfHTCap)); > > Here the parentheses were never related to the cast so we should leave > them as is. In other words, in the first example, if we didn't remove > the cast that would be "half a thing per patch" and in the second > example that would be "two things in one patch". > > regards, > dan carpenter > > -- > 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 view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20191020191759.GJ24678%40kadam. >