Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp378365ybh; Thu, 12 Mar 2020 03:50:14 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuwL8HLw/FDussnylV4P4x4CaMYNrmLwyRxej5mTitDfw0m53MXZ3dK1EZW7gYFCW+xdWcc X-Received: by 2002:a9d:6946:: with SMTP id p6mr5773699oto.224.1584010214624; Thu, 12 Mar 2020 03:50:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584010214; cv=none; d=google.com; s=arc-20160816; b=0tivaoY2/BI68yKr+eC4avomHCdLNn5NbOl1QEIRiAFdQCy4dktsEk+lPqaTt2FRQH e2iFwDnwzLvYxPDzNYColydLY5eI24C6iQhbdaGmWbtz9jG32wQHr5PsHATIkCK/8Ydj VSh1W7HW3ARqJBKt2z/3/dh2iW/I6V040ov34sngsh4AIzgWjAgE+2VbK0+NDVyFSmFP 6oifRmMoomvLfC6OttYFQ1z1OTVKGWZl4tgzBCbXByVIohgy69JFcI3s4mQQe3XFdW/7 IdhVke6CYwH0UJaqvaTuTpf/0pn1nKhsk2tr5hQ0C70BovK49XAkg2Gw+/nq7o7jnwWG h9Pw== 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=P2A+MWPDJS9BMNvSSXTXy86pJe3j87twEPJ+EN89k3Q=; b=q/Xbivz1hVqXfV1+eWX+PgNI/1L5QEa7pSR9LzLV7WFvSwE+2ouRc8QrC2z9DyxV3O HufPpQeKVB21KWRWAvPK2K6eEDmG7h65gUtAaOn02f9v8jiVl5sPQpxJUzUQ+ofe86o0 mKCWTPQ5Ud8tq5y1iEiGivBpyPlwBAckAbHImo/4YKEVydZ2miQY+CtIT4Ik9VqvNUb9 yUWANRSZ1ffP5YGHSfAtkp1oBQhLifIps6CJaf2a8p/BFWs7+Qc7O3dlr9rT5U6w2Lri qfir9ahGAer/ha+N1wTR6aqaflAOBWy5Qb1eaveT5tSBFhOhQYx2+hohajQZc8H1rPqb pLpA== 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 f19si1489147oos.44.2020.03.12.03.50.02; Thu, 12 Mar 2020 03:50:14 -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 S1726964AbgCLKtY (ORCPT + 99 others); Thu, 12 Mar 2020 06:49:24 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:36005 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726023AbgCLKtX (ORCPT ); Thu, 12 Mar 2020 06:49:23 -0400 X-IronPort-AV: E=Sophos;i="5.70,544,1574118000"; d="scan'208";a="439991803" Received: from abo-173-121-68.mrs.modulonet.fr (HELO hadrien) ([85.68.121.173]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Mar 2020 11:49:21 +0100 Date: Thu, 12 Mar 2020 11:49:20 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Stefano Brivio cc: Lakshmi Ramasubramanian , Shreeya Patel , gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, outreachy-kernel@googlegroups.com, daniel.baluta@gmail.com, hverkuil@xs4all.nl, Larry.Finger@lwfinger.net Subject: Re: [Outreachy kernel] [PATCH] Staging: rtl8723bs: rtw_mlme: Remove unnecessary conditions In-Reply-To: <20200312113416.23d3db5c@elisabeth> Message-ID: References: <20200311135859.5626-1-shreeya.patel23498@gmail.com> <61a6c3d7-6592-b57b-6466-995309302cc2@linux.microsoft.com> <20200312113416.23d3db5c@elisabeth> 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 Thu, 12 Mar 2020, Stefano Brivio wrote: > Hi Lakshmi, > > On Wed, 11 Mar 2020 19:42:06 -0700 > Lakshmi Ramasubramanian wrote: > > > On 3/11/2020 6:58 AM, Shreeya Patel wrote: > > > > > Remove unnecessary if and else conditions since both are leading to the > > > initialization of "phtpriv->ampdu_enable" with the same value. > > > > > > Signed-off-by: Shreeya Patel > > > > Stating this based on the patch descriptions I have seen. > > Others, please advise\correct me if I am wrong. > > > > Patch description should state the problem first[1] and then describe > > how that is fixed in the given patch. > > > > For example: > > > > In the function rtw_update_ht_cap(), phtpriv->ampdu_enable is set to the > > same value in both if and else statements. > > > > This patch removes this unnecessary if-else statement. > > That's my general preference as well, but I can't find any point in the > "Describe your changes" section of submitting-patches.rst actually > defining the order. I wouldn't imply that from the sequence the steps > are presented in. > > In case it's possible to say everything with a single statement as > Shreeya did here, though, I guess that becomes rather a linguistic > factor, and I personally prefer the concise version here. https://kernelnewbies.org/PatchPhilosophy suggests: In patch descriptions and in the subject, it is common and preferable to use present-tense, imperative language. Write as if you are telling git what to do with your patch. It provides the following as an example of a good description: somedriver: fix sleep while atomic in send_a_packet() The send_a_packet() function is called in atomic context but takes a mutex, causing a sleeping while atomic warning. Change the skb_lock to be a spin lock instead of a mutex to fix. So this illustrates the order that Lakshmi suggests, even though I don't think that order is ever suggested explicitly. On the other hand it avoids "This patch...", which would add some clutter, in my opinion. julia > > -- > Stefano > > -- > 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/20200312113416.23d3db5c%40elisabeth. >