Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp921016rdh; Fri, 24 Nov 2023 00:48:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IHiOhKnoi35LdVV6jTgf69fHZd2D1e/D6Ubcwvev1TWC18psj0VgiR56OOFSC05gRLJ51YS X-Received: by 2002:a05:6a00:8d87:b0:6cb:64b7:a3bc with SMTP id im7-20020a056a008d8700b006cb64b7a3bcmr2167825pfb.29.1700815696992; Fri, 24 Nov 2023 00:48:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700815696; cv=none; d=google.com; s=arc-20160816; b=vCKsyeftyxsZWdgSlA9wO1F7hYXeTo6UZ3ntsZojfwORjn2yMPbD4+OebvorJcH++A AqEFjqdqrOX1g4UWSs9f+uZCa7NRyGt6lmyc4fNzEmGRz8ZHOyhaYBqMhym6c86A/VA3 hB1mM/ztjfCbt9pmoI0ptKhoKz8R+k0NH04WUA+LfPKyJuz6BjqlVZimmbsIdXHpGHFZ 8CpPxmTpPbElC6ZVCOu/5W0Fpl02Ips+G1tJeSy2/b7+qEGVKco0/9Rhel+m+l9kcyph ktkTLCzQPnSk3ZUZCzI9iTCS9UTTppqieuwia0263p2W3csN7rbPFWV/7rC2Iz50F2Jp lrHA== ARC-Message-Signature: i=1; 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:message-id :date:subject:cc:to:from:dkim-signature; bh=8GaSsLDoPz8wCRqBpOMB7EjTrs+p6JOrPUk0hE0LQsM=; fh=W+eSkce8uvUdQ8A1Dj5F8klEXQy967eJmFo02igvYfU=; b=aXzvGG6yBT+u3tnE9omnokC9WUri3/lMREha+tapGLulPPLVsEDShr1REpHmdEBnIo E8xlnF52vv56GhHYu05roiRQGo9160wkIitA3HDwhhugupxc+rogkUUdHRkUNA6Bu0kT g5AaDqI23IpuZqvJzCLfgPEklfPbH1Zk8sFUp9gTB8o4ZlldwQsyybxN6Wby2NP6X+iX AwWkILehE/PvntPgyiDQfMPXRlY+9B/PRQuFk1ewf3uXXeWgzNQZ0A+sjmCThnlyZG+U GyOtz8AytgE4fq/m4/zy6IXxFUsn0AE2uR0INRllAN32HS2jLhF+uENW+5YkrxgS6T/S qJwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="l6KyaxO/"; spf=pass (google.com: domain of linux-wireless+bounces-38-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-38-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u11-20020a056a00124b00b0068e3efffe2csi3128634pfi.243.2023.11.24.00.48.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 00:48:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-38-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="l6KyaxO/"; spf=pass (google.com: domain of linux-wireless+bounces-38-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-38-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 681F028134F for ; Fri, 24 Nov 2023 08:48:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 139DA65C; Fri, 24 Nov 2023 08:48:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="l6KyaxO/" X-Original-To: linux-wireless@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4D96D5C; Fri, 24 Nov 2023 00:48:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700815692; x=1732351692; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Cuf+QXuL+m32xRWl5bc7WZf9izw1GwzkTLEiiqics7o=; b=l6KyaxO/lyaCvyb4vYDMA3WmMAd4nELmF4ldUOpPlgeSPJtdKMxxl4+u BRYODq8wPP9nc+xjrD5c75S5R0Lwip1e8kWIc3KLt+fL+FqDCw218r0K4 b4sBQEv61Eq2drXWzDIXintzPMOLGuaIRBf2jW28K3oe58NgiJ+1OoEtA X76UU/CPLSI6FjRGc/uIjmdPwinXJWphV1mEaPptf40t7JiXOHVwFdvi5 uk6bufOUYR5JyNL0/Sn4u0whyKGEdKpQvipiaZNPKRFQJA/mOH047JUtK oQC+81yqtFdKXJnGN1gG+VhoTkaHFurfO7kEEUgnld1NQR9HEnx7lKnlp A==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="13945484" X-IronPort-AV: E=Sophos;i="6.04,223,1695711600"; d="scan'208";a="13945484" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2023 00:48:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="833640567" X-IronPort-AV: E=Sophos;i="6.04,223,1695711600"; d="scan'208";a="833640567" Received: from mvlasov-mobl1.ger.corp.intel.com (HELO localhost) ([10.251.220.89]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2023 00:48:08 -0800 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: "John W. Linville" , Kalle Valo , Larry Finger , linux-wireless@vger.kernel.org, Ping-Ke Shih , Bjorn Helgaas , linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH v2 04/10] wifi: rtlwifi: rtl8821ae: Remove unnecessary PME_Status bit set Date: Fri, 24 Nov 2023 10:47:19 +0200 Message-Id: <20231124084725.12738-5-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231124084725.12738-1-ilpo.jarvinen@linux.intel.com> References: <20231124084725.12738-1-ilpo.jarvinen@linux.intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BIT(7) (PME_Status) is first checked and then set unnecessarily. Remove the unnecessary setting for the bit that is already on and adjust the comment related to it. Signed-off-by: Ilpo Järvinen --- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c index 1633328bc3d1..6ae37d61a2a2 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c @@ -2312,9 +2312,7 @@ static void _rtl8821ae_clear_pci_pme_status(struct ieee80211_hw *hw) pci_read_config_byte(rtlpci->pdev, cap_pointer + 5, &pmcs_reg); if (pmcs_reg & BIT(7)) { - /* PME event occured, clear the PM_Status by write 1 */ - pmcs_reg = pmcs_reg | BIT(7); - + /* Clear PME_Status with write */ pci_write_config_byte(rtlpci->pdev, cap_pointer + 5, pmcs_reg); /* Read it back to check */ -- 2.30.2