Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1730238lql; Wed, 13 Mar 2024 06:50:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXG4dzeuVFmdWw8Hb2qmxM/lIs3T9C23ke1NIoMJJCKxKv5DMz71KU3C3+navSINRnis3hB6pwOCV5WUjENq8QTzXI5Uefc3jcatote6Q== X-Google-Smtp-Source: AGHT+IHXsZwKsvH/1+s7TItUpvtc7sQXBbO3MKQLyp+4yIXhBW6ZxUtNplkcTHnt1Z8DNozTvPcj X-Received: by 2002:a17:90a:c684:b0:299:5b95:cd7d with SMTP id n4-20020a17090ac68400b002995b95cd7dmr8762427pjt.45.1710337801158; Wed, 13 Mar 2024 06:50:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710337801; cv=pass; d=google.com; s=arc-20160816; b=s2uiCBBJ39vyZHaSYdrZ1DUeco1U7xmgMIUnL9iz9/aMt1KFD9rrmL7SAn3KztgNIK QPuTzclwQjFrJZPzIZTPk9IX6/vmpP1TMUxx2PHgO0gntxL6B5l9wucXWF6ycUrwxv85 c8DC5cwX/nvrvhmDkHF83p62PDgS8MXl9vOCdM4MX6QZvJnRvpBol6yOHa1l+w+eJc9V Nd5M7IX3DXR5Hjl9mWBit3xZLtw8H6mLzBwTxJO/e7YTKnltJ1Emjy9r3BJ4FvGypame xtXC1x5RhUFk/TFTmIew+KnISf5/iD/BkRS+WSVQsmqcec70EgmXnj9JhwrsRLW1nshF NfHA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to :organization:message-id:date:subject:cc:to:from:dkim-signature; bh=6SoFDVulgViYVD8lg6iAlJvWyvqP+m29uQXsZi+E9EI=; fh=/u10+5Dm6KgtsqsWVqBOlSjDaUg1nYVDdzrscuOcoNU=; b=gt1VbosLOR5Pr8r+L2qFHQjKZBO9yaWVgtoobPJaN+vxZUfPZ6nYvYhsL18GeIGIOc o0SMhH/xZpK68kuc2GH4GObKQZG9qyU2e+2ORZ87vFWTbbC0VdOx230U80hbahYMF0+U 2nWYcMNqx8clNGhAwm6ckEB2zeng905TfJ9hgEPtm/YSAYuLyoXMZqq9h57SG/HKcFyr x6xjj9PtBm06aNYWLyoUETQh5HdVulEk9bRVSGlFUeT3/c/zIJJt6xk5qeQPVvau+6Uw KGxowi/brLmcYk9wsdEw6Ldd4/m4oCqgdji/nHka7FArOcFT/Nx6hM7I82FtzQ9lyNLB Ijig==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VRyLy1Fl; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-101326-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101326-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id pg7-20020a17090b1e0700b0029c67300bf6si894716pjb.32.2024.03.13.06.50.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 06:50:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-101326-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VRyLy1Fl; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-101326-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101326-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 4DBBCB217D3 for ; Wed, 13 Mar 2024 10:09:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9FDEA38DF7; Wed, 13 Mar 2024 10:08:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="VRyLy1Fl" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 789BD383B9 for ; Wed, 13 Mar 2024 10:08:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710324533; cv=none; b=NT7iaGONSTGCCGsIpc9CJXCjiSc0T9Y9B5o14UvMJzS+gVv5fSOcE3Ul1itHG/DfngGizfdaj+qDAJvfIPHZqX4tG9N/aoanT4uDJAGkG2Q6D2Fc1vN7joA2nK7D66wJBFXhk6NySQxztPIUYuXV8PjFK0/+sYyL9JRZpNSJpio= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710324533; c=relaxed/simple; bh=aSw6o7ezc8c9/Vjkfi+RE9UYn23okpahByuvCrBXroI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=akUI2Y6MDq+CBM80eSd9KONi7iyV/J8OBQJ1YO3KeivCKoFmD+Pp8T6LVuArSeJR92qEByK7nyG1VESSK3swJF7RoWldPQM8NDOWfxHuxPMGQqYVd59TyrAKeDGSQmRuwKVk+xJ1ftLsykKJuVHOlApaVsyXkJih8mKx0BqDMMs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=VRyLy1Fl; arc=none smtp.client-ip=192.198.163.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710324532; x=1741860532; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=aSw6o7ezc8c9/Vjkfi+RE9UYn23okpahByuvCrBXroI=; b=VRyLy1FlcOaOB+M4wVCpEZa+/wgIxT6sFsRB3lfPDYkXJzm0dZiLxcMq 0x6KsvuvMI6pjb3ddMwBzWfbtIHnFDsxn/S3yILBScKPlQ4K6b3158fuD VUry7gJm9sDYbJBgbpvHxBW31HMT2T0dDNfXv6AjXY7HP0N33qIXdvZCo cT4oCPgFFL1qZfL7uUQMUlYrwIkIG6ZZrG+x6RUSWDkJNy/haI9lSLiEO rVkxdUIqIr3k0W+7WduhcgQixNa1gbhxNbR4HeUIFHaFHizoA7JpSvaXV y/DLmW3QqurS2pHiJCHAiWr+Ig4UTIU9drHwCahVd06oGBrad25xwOcnd Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11011"; a="8848410" X-IronPort-AV: E=Sophos;i="6.07,122,1708416000"; d="scan'208";a="8848410" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2024 03:08:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,122,1708416000"; d="scan'208";a="16442321" Received: from fdefranc-mobl3.ger.corp.intel.com (HELO fdefranc-mobl3.localnet) ([10.213.6.143]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2024 03:08:48 -0700 From: "Fabio M. De Francesco" To: Larry.Finger@lwfinger.net, florian.c.schilhabel@googlemail.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, Ayush Tiwari Cc: outreachy@lists.linux.dev Subject: Re: [PATCH v5] staging: rtl8712: rename tmpVal to avg_val Date: Wed, 13 Mar 2024 11:08:45 +0100 Message-ID: <2263049.iZASKD2KPV@fdefranc-mobl3> Organization: intel In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" On Wednesday, 13 March 2024 09:52:43 CET Ayush Tiwari wrote: > Rename local variable tmpVal back to avg_val in function process_link_qual You are making a new patch versions (v5) against your previous one. This is not how the development process works... Make v6 against a clean staging tree, and change your commit message accordingly: Rename tmpVal to avg_val in process_link_qual() to reflect the intended use of the variable and conform to the kernel coding style. Not directly related but, there is no need to say that process_link_qual() is a function (parentheses already say that). Furthermore, by renaming you make it clear what is the intended use of symbols, you don't "give meaning" to them (they already have meaning by the mere fact that they serve their intended purpose - https://ludwig.guru/s/to+give+meaning+to+something). Remember that only the final versions of patches, the accepted version, will be applied against the kernel. Therefore, if this version was good, it couldn't be applied because in process_link_qual() there is no variable called pct_val. git-am on your patch gives expected errors: Applying: staging: rtl8712: rename tmpVal to avg_val error: patch failed: drivers/staging/rtl8712/rtl8712_recv.c:861 error: drivers/staging/rtl8712/rtl8712_recv.c: patch does not apply > to give intuitive meaning to variable and match the common kernel > coding style. > > Signed-off-by: Ayush Tiwari > --- > > [skip] > > --- a/drivers/staging/rtl8712/rtl8712_recv.c > +++ b/drivers/staging/rtl8712/rtl8712_recv.c > @@ -861,7 +861,7 @@ static void query_rx_phy_status(struct _adapter > *padapter, static void process_link_qual(struct _adapter *padapter, > union recv_frame *prframe) > { > - u32 last_evm = 0, pct_val; As said, a clean process_link_qual() has no pct_val variable. Fabio > + u32 last_evm = 0, avg_val; > struct rx_pkt_attrib *pattrib; > struct smooth_rssi_data *sqd = &padapter->recvpriv.signal_qual_data; > > @@ -883,8 +883,8 @@ static void process_link_qual(struct _adapter *padapter, > sqd->index = 0; > > /* <1> Showed on UI for user, in percentage. */ > - pct_val = sqd->total_val / sqd->total_num; > - padapter->recvpriv.signal = (u8)pct_val; > + avg_val = sqd->total_val / sqd->total_num; > + padapter->recvpriv.signal = (u8)avg_val; > } > }