Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp3771398rwr; Sun, 7 May 2023 19:56:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6S+GjPqUDMKm7TelLQg2KeAfugoFD0NbMv33s+vYTHQcV0kJPKRY7KJkcVn8dSXV0eP1cL X-Received: by 2002:a05:6a00:14c8:b0:63b:4e99:807d with SMTP id w8-20020a056a0014c800b0063b4e99807dmr12672186pfu.8.1683514590454; Sun, 07 May 2023 19:56:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683514590; cv=none; d=google.com; s=arc-20160816; b=hu8zzX5erx6xK+uwv/rQttZMcA81BPzqI9iklIWtvxVcBU0IDjtNAPkriv9b7usFhu grj2rINpOjEjEqP9K7YUcP2maQZ9IhyETSkcpxelGQXrONduNlbqPdezyE0rn62Hw6mY cYRuJIto3t0VHNk+5CxT9kxDyj/+hIuYe7W6OpFF4RIkwNIqOFIwJte/K/kcYuq7p70B g43sfAjXHuMm0mTY1ZHxq/55krRAb+CcvvOVWljOgKslEWI9VxZM39/izL1mrl8RlENy b8tRZ7YhHEnli5gfyOW/gn3h4huYuRz+P4SHYzP/p79J8nYCIH/8+IPUl+K8rUKqb4xh IwmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:authenticated-by; bh=p+FqfHDV5kVDroftWW7ArVv3Ll4hEfYKPk3bof+7tk0=; b=yKaWHUdoGCIOx4y9SbjQAIljxyxERFlg1VfH9OnkYPn+IgxVCl6h9+FOvJ53CH654B vlTKIQ781+dHlkywLmohznEkvKoNtmVkjRji/40XYzShtPIeWbrpxMTg/8t8xnnud8Lm /OxN9RYokyfbLD8RPwKf7mpqT8IBbkgj4Z8tVcRxX/XY0TKnNG41WyCNcABfJHTNjmSd /EatNvtO+3XyIzBqsquEo0O+GsV3QKdJxtBTrMJU3N6Oq8NiQuhzSqU65suzNOEZMR2L 5ma8PQCJFZiZ+e+xsvRle5qFeQhu81vOQ+r42vZrtsLSvmoDqBtC/6wH6cs3Z0lP/F/w KRnA== 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 x9-20020aa79a49000000b0063286f81d35si7627806pfj.262.2023.05.07.19.56.16; Sun, 07 May 2023 19:56:30 -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 S230415AbjEHCjj convert rfc822-to-8bit (ORCPT + 62 others); Sun, 7 May 2023 22:39:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbjEHCji (ORCPT ); Sun, 7 May 2023 22:39:38 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71EC140C3 for ; Sun, 7 May 2023 19:39:35 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 3482dECT1023812, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.81/5.90) with ESMTPS id 3482dECT1023812 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Mon, 8 May 2023 10:39:14 +0800 Received: from RTEXDAG02.realtek.com.tw (172.21.6.101) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.32; Mon, 8 May 2023 10:39:20 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXDAG02.realtek.com.tw (172.21.6.101) 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 10:39:19 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::e138:e7f1:4709:ff4d]) by RTEXMBS04.realtek.com.tw ([fe80::e138:e7f1:4709:ff4d%5]) with mapi id 15.01.2375.007; Mon, 8 May 2023 10:39:19 +0800 From: Ping-Ke Shih To: Dan Carpenter , "s.hauer@pengutronix.de" CC: "linux-wireless@vger.kernel.org" Subject: RE: [bug report] wifi: rtw88: usb: fix priority queue to endpoint mapping Thread-Topic: [bug report] wifi: rtw88: usb: fix priority queue to endpoint mapping Thread-Index: AQHZfnckew+PUCPgkEGu0NoEQg74H69PrtFA Date: Mon, 8 May 2023 02:39:19 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US, zh-TW Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.69.188] x-kse-serverinfo: RTEXDAG02.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-ServerInfo: RTEXH36505.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 Hi Sascha, > -----Original Message----- > From: Dan Carpenter > Sent: Thursday, May 4, 2023 6:56 PM > To: s.hauer@pengutronix.de > Cc: linux-wireless@vger.kernel.org > Subject: [bug report] wifi: rtw88: usb: fix priority queue to endpoint mapping > > Hello Sascha Hauer, > > The patch a6f187f92bcc: "wifi: rtw88: usb: fix priority queue to > endpoint mapping" from Apr 17, 2023, leads to the following Smatch > static checker warning: > > drivers/net/wireless/realtek/rtw88/usb.c:219 rtw_usb_parse() warn: assigning (-22) to unsigned variable > 'rtwusb->qsel_to_ep[8]' [...] > 218 rtwusb->qsel_to_ep[TX_DESC_QSEL_TID7] = dma_mapping_to_ep(rqpn->dma_map_vo); > --> 219 rtwusb->qsel_to_ep[TX_DESC_QSEL_TID8] = -EINVAL; > > Can't save negative error codes to a u8. > return type of dma_mapping_to_ep() is 'int' and it also possibly returns -EINVAL, and rtwusb->qsel_to_ep[] is used by qsel_to_ep() that also use 'int' as return type. Therefore, I would like to change type of qsel_to_ep[] from 'u8' to 'int'. Does it work to you? Ping-Ke