Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4053363rwr; Mon, 8 May 2023 02:02:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7GKGYltPNa5CkPWQpZ7BTEMQwQtdyR7nysaEZV6hcMjSqHdRQ1Jd1QDkvWiqwQA99gPaFE X-Received: by 2002:a17:90b:1804:b0:24e:2759:8dbe with SMTP id lw4-20020a17090b180400b0024e27598dbemr12281067pjb.7.1683536542877; Mon, 08 May 2023 02:02:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683536542; cv=none; d=google.com; s=arc-20160816; b=ulUoZt3EnZm9pZh7B77yBVrl6R2t4L6HQQ487ooFnUUUPgIocItfypbNfb1DAYpgdk w28jEvB+UWy9UZAY+S+AdW/q+YJHHVJGz/SXoiPOVm5Hy55QE1/qPHMqr+pHuGdccid5 GpVYD7YJwCDcpKtq3I1FVdXe5eQo6Ak7ZK0puuOrWCXVp0clKQEvhr9NRSpR3XNlVaS/ 8L7eoFJxPy50PwbkAwASgGyVVT9hEbG9n6YSC8zrkebJQNrreqDUX4LBHqHDADGoqc65 ZS1hNlfbvkG25v6STgcxJRGKmROAFBRUEDKbJu1Rijx0kesO9Omgza4IZzYGWLK5sA+7 kNRQ== 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 :message-id:date:subject:cc:to:from:authenticated-by; bh=atenewFrEQJfWXJoARmtJWfAjkR9TfEhzCyn/iNBuqE=; b=Cbw0ieS39Mzrw5QtvvOT/Oz2lv8/rTHOj9C9sIdqO95boRMqNCAmfrPMtszLpQ8/Un nRAzw32nZlCH3tFIuoWmwi2SV1DUMmyvyC8gNDoeI9mkCmFMMEeKMXy12swtnzUYgi3A OQOoBWKhOPu9MVG4FFOugOtsqpB1mp6wtPge0nKy1cnF6Z+Y/QhqSLHq9ZCdm9PzfThw KlDWspZ4IP3KLOshKhM12mdV6fY5ckLJFbAZ59PIVvNeeTn27f/tFscR8DE5xoecQbxY HsLBijEFBw47Os5Tg1nTO54UxFMSoNympPLQbVEaQutPplrpdwLBZ2mvzwBzYnE+xlB7 n8VQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kk4-20020a17090b4a0400b00233d10c93b9si27096660pjb.179.2023.05.08.02.02.14; Mon, 08 May 2023 02:02:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233004AbjEHI4M (ORCPT + 61 others); Mon, 8 May 2023 04:56:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229999AbjEHI4K (ORCPT ); Mon, 8 May 2023 04:56:10 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1718C100D0; Mon, 8 May 2023 01:56:08 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 3488tg4L3031857, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.81/5.90) with ESMTPS id 3488tg4L3031857 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Mon, 8 May 2023 16:55:43 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.17; Mon, 8 May 2023 16:55:48 +0800 Received: from [127.0.1.1] (172.21.69.188) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Mon, 8 May 2023 16:55:48 +0800 From: Ping-Ke Shih To: , CC: , , , Subject: [PATCH] wifi: rtw88: correct qsel_to_ep[] type as int Date: Mon, 8 May 2023 16:55:39 +0800 Message-ID: <20230508085539.46795-1-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [172.21.69.188] X-ClientProxiedBy: RTEXMBS02.realtek.com.tw (172.21.6.95) To RTEXMBS04.realtek.com.tw (172.21.6.97) X-KSE-ServerInfo: RTEXMBS04.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-wireless@vger.kernel.org qsel_to_ep[] can be assigned negative value, so change type from 'u8' to 'int'. Otherwise, Smatch static checker warns: drivers/net/wireless/realtek/rtw88/usb.c:219 rtw_usb_parse() warn: assigning (-22) to unsigned variable 'rtwusb->qsel_to_ep[8]' Cc: stable@vger.kernel.org Fixes: a6f187f92bcc ("wifi: rtw88: usb: fix priority queue to endpoint mapping") Reported-by: Dan Carpenter Link: https://lore.kernel.org/linux-wireless/c3f70197-829d-48ed-ae15-66a9de80fa90@kili.mountain/ Cc: Sascha Hauer Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw88/usb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtw88/usb.h b/drivers/net/wireless/realtek/rtw88/usb.h index 30647f0dd61c6..ad1d7955c6a51 100644 --- a/drivers/net/wireless/realtek/rtw88/usb.h +++ b/drivers/net/wireless/realtek/rtw88/usb.h @@ -78,7 +78,7 @@ struct rtw_usb { u8 pipe_interrupt; u8 pipe_in; u8 out_ep[RTW_USB_EP_MAX]; - u8 qsel_to_ep[TX_DESC_QSEL_MAX]; + int qsel_to_ep[TX_DESC_QSEL_MAX]; u8 usb_txagg_num; struct workqueue_struct *txwq, *rxwq; -- 2.25.1