Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp441489lqb; Fri, 24 May 2024 03:19:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXMSSWJH9cTthOthI+th6dWpog2jV0mdWiO50QEGsm01BU2gDJ4zmnyrg8WNqqA0u9urbCTF3J2Bf4wr+APZrUoBFa6a77qlLrBJb0ZuQ== X-Google-Smtp-Source: AGHT+IHZX5CZXx/YX8XVgnCwyRE4SZFIA+bnVkCRvYqqehQMv+qv5S9t8ZiPyBi2bXXd6sOruPxV X-Received: by 2002:a05:6214:4688:b0:6ab:8bd8:18d4 with SMTP id 6a1803df08f44-6abbbc43cbemr16727516d6.3.1716545960557; Fri, 24 May 2024 03:19:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716545960; cv=pass; d=google.com; s=arc-20160816; b=f7PPC+Gd+owK3i7gVUWgpLri2BlCje+aK5hZun3L9dH2h+qQoEgm0E5ncq0hcJC+4K C5UaFRtScrJneP3IcEEf+JhxkGaCnC1lHtXMk348GSF1/7HhT/D/C3U+2wUPGrcGVJ3i zjCGyCJyJYp3uAXJiK/2U/2iJTv/43Zg8fl0iF4wrynbVtpmikAejvLZAEaWPENiacBa +sLEKgKGHRguyMWqcthOFoXDmTG0nqPKrepq2wXTiFOfTcajN0GpVMdXpAc1ox0Qe0FO exM8PtiBoh6BbkRftahDtB7fGT2vEq/t1j+hncy1NYZqw61LRPbdkZLbNPcMVou2rzqA wXnA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:from :content-language:subject:references:cc:to:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=eD4aGK2cX9KrbvG0DJp/VpQLhAY1GKGKoM5iZey2/S0=; fh=7i0mMJ3BHuHKtLn5ijDbU1aZT8YpoxFYH1c2PtjVl2A=; b=XBzJChPaBasVHs4ZgKa3ppjOk/LZe1nHZNPIj1pylz6rEH4ZAGrVcEp5A3+5JJEtG7 reIL7LMZo13kXmP2E0nkYbba5I/wZ8VgSkQpz27xJvC40tXyaS91WW5tQgwOvsorK+Vi KhamfXDRoMxsRiUJcVNE5/oG8tvWhn3Uog/mJk/g8GhzbCVpq/A+xmKDBqLiDHTC2RB0 Y9nUC0CYqjD8Cb9c1oH3rsDb9D4KyVTsEcD8j/WPMGb2nJ+f/k/mLWjZvWivwagtkVcj 2r9lewzq1ngCCeaFRfTR1nLRrjKhiqX32bXTk6OL/taPKC5AjIFkLM5mMVQNhNp7O2yF 9v9g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=JGm9A3oG; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-wireless+bounces-8044-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8044-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ac1625f17dsi12986436d6.390.2024.05.24.03.19.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 03:19:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8044-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=JGm9A3oG; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-wireless+bounces-8044-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8044-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id DE5341C21A29 for ; Fri, 24 May 2024 10:19:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 781E784DF5; Fri, 24 May 2024 10:19:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b="JGm9A3oG" X-Original-To: linux-wireless@vger.kernel.org Received: from mout.web.de (mout.web.de [212.227.17.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 DBF5E1AACC; Fri, 24 May 2024 10:19:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716545955; cv=none; b=FY+20d2ZScULraP7uLgIwDMzCJoZwJzrqtBi2PQSaqBVSc8zCena754UomWI+VEDRApg7Y+rmv0wtwUKX3Gw+gGRTFtWeFCfix2KDJXDoJcf5czPjtopDaszTGx9GckEB+WM8e9ZvvzJN+q+AyCDGBum6lT617B3doyEkVKXnZo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716545955; c=relaxed/simple; bh=nReJdwDjYKcKtI9FDKajlqqInbmssOMeKltqgga7Xe8=; h=Message-ID:Date:MIME-Version:To:Cc:References:Subject:From: In-Reply-To:Content-Type; b=epKc+2e2i7tckegAsPWB5HgVhMX2LiAxwT1Mg95n0Kgus2o8eAitu6fPvWZPdJDThcy0t7W+Q9FmznKHZ/Bi9Gyn7cG5r5hEm/3YzdaOzcyJta4x2DrCW059gmCmgVDOVGRGvGyvUyIouHmcRwWW+payZ2X0qo56V3hb/pshEgw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de; spf=pass smtp.mailfrom=web.de; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b=JGm9A3oG; arc=none smtp.client-ip=212.227.17.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=web.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1716545936; x=1717150736; i=markus.elfring@web.de; bh=eD4aGK2cX9KrbvG0DJp/VpQLhAY1GKGKoM5iZey2/S0=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:To:Cc:References: Subject:From:In-Reply-To:Content-Type:Content-Transfer-Encoding: cc:content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=JGm9A3oGw46GtDQxgiMe6SJkDlIhUFIIrYCXNM6YFzCp7eLHLmiOKbaNZQhfv2sN 2ly3Jwz9pWwxaUUJ23wq+BRtBEBxsrSlooKJPfaieIPrS5HaQsBZZefSjY3uc7FYU S9w6xYsASGIP0yrf1nIa/oDd8ale6aOxBwUL0jX+l2mEM3tliXal+1M/1OPLxBBXa AuzExC1vrXoKAukT0An3WsMzLhDrlJOG6FHW4MrDBIOIj5wNAfI5YkWIQ+LwG9pMJ eZlIJJy9WEZVOhJi9MDvi1M+ddtG7heig6K44Me1ah/u0KZ92OCteodpO89w1wDQE muEpFuQdb++Ryx2CFg== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.83.95]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1Ml46w-1svqWq15m0-00fyCw; Fri, 24 May 2024 12:18:56 +0200 Message-ID: <5da17b58-c407-498b-a666-be98584c8011@web.de> Date: Fri, 24 May 2024 12:18:46 +0200 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Jiapeng Chong , abaci@linux.alibaba.com, linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org, Ping-Ke Shih Cc: LKML , Kalle Valo References: <20240524075819.2789-1-jiapeng.chong@linux.alibaba.com> Subject: Re: [PATCH] wifi: rtw89: chan: Use swap() instead of open coding it Content-Language: en-GB From: Markus Elfring In-Reply-To: <20240524075819.2789-1-jiapeng.chong@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:yvXSYyhRuNt+LnoNZgQSyhtIG2CajJYTbJ54zQb2j9ihrzwk4Pe 1DzaZo4XB7QvBgPvQWnxsXj7VAmFzOHddLOad549auPmJDBozB+Svf16EyN72B4lzzbyDu3 3dJXtPSCEOY1LduvsqTyG/yiSvTJPQeGn7vKP3wKPUX24TpDoKDDFfScN5/zM0A1i6V4udp ypd3eQOUAr69eJTHP67+w== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:K1LvBUbMTqI=;Q0kze4LcBNm3U2z2itILblmvdPJ 951ScoDbyuiZpj7qZqrDf1xpDhwK+JhD+s358K85Nppdu95mlXGBENgmDlWz6dsswaMbEhUzd b/EkiPRyyMyKCiWMefrpBzYAZeUAorgvXzfMdCmZWa5uHf/D1leUlr6gXLQy7Z+aQKe2g5GRn 7uAIsHuVQMwTF6gIqJNDEsecIqYqs6MNrLCkfQr9RfLQDgGYr37gaYS8J8MHL/schh28ufKNw gLXs2sUYPbVuufPptIlmsaWJtjlI4bVxBKk1b8UJpA+gurAe1Io9WsxUTeeZLdZMRBWyMRMaC a18BDpIQNU0IS1hM5jKgcQUVcdQ0DCYqEth7NV0ybXBx1m1GHuBOkFZVY+EF4qHA2qqw851zI tahAd3iBeorjX/cnffLpIPyKELH7GfNqebc2Vj3ZGPnoXB/QD39h52G97k2vZfXOaV60dW+9f 33Q0skWotM5G3O0nRHcVn2Ur8IM3oNwAwGe5+lvphe3ik8dYGKnUegWwjpQ+9mv7UW7LQbf7E EsF/3liVEJkbTnTVXwsV31/hB2pFOrOjfiEZaafjtuaBJO6oBvt7hrCQ77G+myZHqbwOBcGe7 DuDJthCywqSfP8tMXwK9goULnOR5R3hzFUQrcnnMqzudJVWr9XZuDNbwDqdjNVjQnXd6YY49G A7BKfyhWAagHYolOfdN9J6RMll7/VgfcVGHffzOancIhLGS8ASj/QKjaRHFxHth//TAq/pAVF 14J11CJidodCQ0j3bEursWSvH+LbcGz5P86bTeCxqf6h8TBevd6rBkTgSdPRMt1zDTMA4TNAU OqN+JHC9FCxfa+T6HxPfuMbeJIxyMgJll8b3WyuAy+cDA= > Swap is a function interface that provides exchange function. To avoid > code duplication, we can use swap function. Would a wording approach (like the following) be a bit nicer for the second sentence? Use existing swap() function instead of keeping duplicate source code. How do you think about to apply the summary phrase =E2=80=9CUse swap() in = rtw89_swap_sub_entity()=E2=80=9D? > ./drivers/net/wireless/realtek/rtw89/chan.c:2336:32-33: WARNING opportun= ity for swap(). > > Reported-by: Abaci Robot > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=3D9174 Would another indication be helpful for the involved analysis tool? https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/sc= ripts/coccinelle/misc/swap.cocci?h=3Dv6.9 Regards, Markus