Message ID | 20230204233001.1511643-5-martin.blumenstingl@googlemail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1550898wrn; Sat, 4 Feb 2023 15:46:26 -0800 (PST) X-Google-Smtp-Source: AK7set+VVLHcYtZPHiOppVOrrAapuV5a8eSdm2wt5G5taqkVawwC6ed1dC54Z8D2IH4cIzzjFNMn X-Received: by 2002:a17:902:e383:b0:198:f574:1d26 with SMTP id g3-20020a170902e38300b00198f5741d26mr2193104ple.26.1675554386283; Sat, 04 Feb 2023 15:46:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675554386; cv=none; d=google.com; s=arc-20160816; b=N+f/5XuKDN2ssTqWMQD/8ao6YPrwoROPCqCbp2fXxaYRKXE5yLbx2WBoEeWcbUHRRk ICJzJ3lHQZ5SbbpEYtDys2paJ0BwDblp5YiO68Hb7jxt+OrGtWUESAhE0jh9pZn+binD b5iLwDQ/dO4y4TZp6kcJcFU5nYDtoTzx41h9FC9viQDbibZHWO5z8h9GqnKPU4i6DIlS x4L5g40u2d63ZtunPuqrbjyqjfAymzQbU/uM6s9imsBx4QCZglQi3RJpprQTohs+tCSC FAWAXZbrsmSvVTl66Sw5gf8I7b4BN6zbsPgfUvYWUHazgo8ImPbyyW3iCBaMGoVHMPav p8ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=z2OOn9fRXNRi/D1wH37mZYRXmM0quMrDez5IgGiosfE=; b=DD0bw3H6yoXpeS4aHjcw0ACi4zKiULSblER0bDT84wUQHZyiuaUk8/UULq9muMvsWL JN6cspvrTXqHUJfRuDeTZgurjwdL31AXgAPshyoHZZkznPAFAmYvJTyK1m+O06zG+2Db xMkCj1DsgTBSgTNIQBrq/2J7M1HE4YVAdFxM0pIAJG76QSs59p8EzTHEQWRhoIa3XTTe 4H69xFmDCHfzEKAK12u9XF/dZguOgigw49FJgjV6/z6tuFLswuziV51DKL+Xepvq3e+F twzJisFHTsmQJeqate0IXM5aja1deCdMsCZ55gERCdKB+6ukWzM0nfPvV2kbC3kN436S V9mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20210112 header.b=SEpEv7LY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d4-20020a170902cec400b00192c6aeaf07si7273718plg.191.2023.02.04.15.46.13; Sat, 04 Feb 2023 15:46:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@googlemail.com header.s=20210112 header.b=SEpEv7LY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232813AbjBDXam (ORCPT <rfc822;il.mystafa@gmail.com> + 99 others); Sat, 4 Feb 2023 18:30:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229578AbjBDXab (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 4 Feb 2023 18:30:31 -0500 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFA3B20D3F; Sat, 4 Feb 2023 15:30:29 -0800 (PST) Received: by mail-ej1-x62f.google.com with SMTP id k4so24897643eje.1; Sat, 04 Feb 2023 15:30:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=z2OOn9fRXNRi/D1wH37mZYRXmM0quMrDez5IgGiosfE=; b=SEpEv7LYUi6fgDWjw58MnVru5yw3PR4Nv9F5hz9BybL1VI5ncXJWDCa0A+RMTUDTW9 VS8x1Johk107INT5c6XKACchwDjsJ0wAKpkXTkITuGwAp5pzu2vO7jr7cKFksMJjXtcm zxSWaqoudv9upUL1uek3oEHUBglZUOozLKhCsV5nKOIoyGDfMO/UwmKMQTD3LSfYPtNj pt6rLNM19iVCnjUaRNrQQznFMYJAZ/IoIeHyUAbImG6dGVd9lvmPCZh9LAlwoyMqk0iN O4utBltvi7sqz6ohwpgxCXeHKzGKRzmcn4WWX6YlXNGKdGXM+bnL4jkzDBhW9LxcGsUn mcXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=z2OOn9fRXNRi/D1wH37mZYRXmM0quMrDez5IgGiosfE=; b=sgMjfN1WG5x+ypSUh8sRoMbEB1MnJHaFPSUWAvvXwCmpFdNdgmuqeefrTLpgtcRYAd 2WfY8jYcO7wHxVfWbjc3BEVLFS4W21b5w9OzIvQ0BpR/5mX9/WNcNwpMb+NBNWttfNXA nWNlPFXEidOI1fk0QRRqaVE7an8RM6pdGa78uJuUkLbTeKC8v5c0iq4qDBGfpdvgH6hf gNlymxyBfz3GHTvjQXcq27EKzsdNd3Ep9WcCnSb3k44qNSX1zSaOqTjFmazfhxwAlFbz YQ7ppu265Nb7xPMgwOqZ7C5ktle3hzl0cWFqcoBCt62+QD6Uyt7Y2jmMGb2fO9TtR5Am gl5Q== X-Gm-Message-State: AO0yUKWkpZyKTdAdMrol7oOUk15ZCOeh1adnCgGjsOoanRcNeMMt964x LfKMspovPIsvfIdSuFBKk7j+8f8FQio= X-Received: by 2002:a17:906:5658:b0:878:7b5c:3811 with SMTP id v24-20020a170906565800b008787b5c3811mr13627277ejr.42.1675553428265; Sat, 04 Feb 2023 15:30:28 -0800 (PST) Received: from localhost.localdomain (dynamic-2a01-0c22-7777-cc00-f22f-74ff-fe21-0725.c22.pool.telefonica.de. [2a01:c22:7777:cc00:f22f:74ff:fe21:725]) by smtp.googlemail.com with ESMTPSA id v5-20020a1709061dc500b0084d4e9a13cbsm3386658ejh.221.2023.02.04.15.30.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Feb 2023 15:30:27 -0800 (PST) From: Martin Blumenstingl <martin.blumenstingl@googlemail.com> To: linux-wireless@vger.kernel.org Cc: tony0620emma@gmail.com, kvalo@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Neo Jou <neojou@gmail.com>, Jernej Skrabec <jernej.skrabec@gmail.com>, pkshih@realtek.com, Martin Blumenstingl <martin.blumenstingl@googlemail.com> Subject: [PATCH v2 4/4] wifi: rtw88: mac: Use existing macros in rtw_pwr_seq_parser() Date: Sun, 5 Feb 2023 00:30:01 +0100 Message-Id: <20230204233001.1511643-5-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230204233001.1511643-1-martin.blumenstingl@googlemail.com> References: <20230204233001.1511643-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756946115861319718?= X-GMAIL-MSGID: =?utf-8?q?1756946115861319718?= |
Series |
rtw88: four small code-cleanups and refactorings
|
|
Commit Message
Martin Blumenstingl
Feb. 4, 2023, 11:30 p.m. UTC
Replace the magic numbers for the intf_mask with their existing RTW_PWR_INTF_PCI_MSK and RTW_PWR_INTF_USB_MSK macros to make the code easier to understand. Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> --- Changes from v1 -> v2: - reword subject and include the "wifi" prefix - add Ping-Ke's Acked-by drivers/net/wireless/realtek/rtw88/mac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On Sun, Feb 05, 2023 at 12:30:01AM +0100, Martin Blumenstingl wrote: > Replace the magic numbers for the intf_mask with their existing > RTW_PWR_INTF_PCI_MSK and RTW_PWR_INTF_USB_MSK macros to make the code > easier to understand. > > Acked-by: Ping-Ke Shih <pkshih@realtek.com> > Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Simon Horman <simon.horman@corigine.com>
diff --git a/drivers/net/wireless/realtek/rtw88/mac.c b/drivers/net/wireless/realtek/rtw88/mac.c index 98777f294945..4e5c194aac29 100644 --- a/drivers/net/wireless/realtek/rtw88/mac.c +++ b/drivers/net/wireless/realtek/rtw88/mac.c @@ -217,10 +217,10 @@ static int rtw_pwr_seq_parser(struct rtw_dev *rtwdev, cut_mask = cut_version_to_mask(cut); switch (rtw_hci_type(rtwdev)) { case RTW_HCI_TYPE_PCIE: - intf_mask = BIT(2); + intf_mask = RTW_PWR_INTF_PCI_MSK; break; case RTW_HCI_TYPE_USB: - intf_mask = BIT(1); + intf_mask = RTW_PWR_INTF_USB_MSK; break; default: return -EINVAL;