Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4053549rwr; Mon, 8 May 2023 02:02:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4m8RFuYzB4SH55bXmIol6jELU3hb0zWYiLfcu+71b6twEW4jLPozGh1BhuQRFLsugB86o3 X-Received: by 2002:a17:90a:ee89:b0:24e:13c5:d99 with SMTP id i9-20020a17090aee8900b0024e13c50d99mr10389634pjz.32.1683536553251; Mon, 08 May 2023 02:02:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683536553; cv=none; d=google.com; s=arc-20160816; b=Ip4X8KVWxiG/SQvPpL+ZLEyU9e6sFrmaVOUnWTyRXanBXDYocEU6DOcFCTxgMrf2Sd KueuwvtD7gNf3R3/p5h0pHaaVUs+oP0DRp29frF2O8mdhy97VGukcLqLwhlOiWziDRth ZDq9z00X/yxBXzwyxWYLiWQyLYnPPnfGgykBrw40SMfw3JnRRHDqwySker2mYf+JIfiZ vjD5Fwf8P0ickdKSyYn0XHSOHuguibKHEF8M8/W3/rwYnTQFXLhJY1AxKbuzXqppkelW ASX7LxW3gxJtnJocPMDkDMj5ZfkAxbkKakjDEd5rz2KV8+IAUZ6csJQPRdsq+ZJpOy2k f1EQ== 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=4PjMtjeWAxMS0qNXO21eAjNAGlBfxSzOLMZ8iWbGT0c=; b=BHoi8ujARLnhBXCrpYVfXQawS+9/FwcAv/277UUh42Wfpll7w07Xb75WiC54CNzrg6 qNj+w1aKowFMwjSghYZP9Q6VHy+APA2iwYjFfWIIkL8vj9W42qCyr1xDH3X3ALyUodSv 0V/JV56pnv5tdRQ36IxcKja3XoMqxD2R8YX9nPzmXvP480HSODQqar2gzLcSDtYfbk4F uoz7NZjotnMDppMuJLGB6/1fR9klqRgCh+Owg5L4t6r/1Xj0BhFF95ycTnwJaCrd7//L 0JQEAD6+412k/0Hi28FuJGCto7i3yXhCldzcQFYtXSDzygtnFBxG7gROpjJQp1qzQQdC K5UA== 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 26-20020a17090a191a00b00247398cd640si10972451pjg.76.2023.05.08.02.02.24; Mon, 08 May 2023 02:02:33 -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 S233703AbjEHJBb convert rfc822-to-8bit (ORCPT + 62 others); Mon, 8 May 2023 05:01:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233343AbjEHJAz (ORCPT ); Mon, 8 May 2023 05:00:55 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2F9F93C1 for ; Mon, 8 May 2023 02:00:34 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 34890KgU4002165, 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 34890KgU4002165 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Mon, 8 May 2023 17:00:20 +0800 Received: from RTEXDAG01.realtek.com.tw (172.21.6.100) 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 17:00:26 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXDAG01.realtek.com.tw (172.21.6.100) 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 17:00:25 +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 17:00:25 +0800 From: Ping-Ke Shih To: Ping-Ke Shih , 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+PUCPgkEGu0NoEQg74H69PrtFAgABqVRA= Date: Mon, 8 May 2023 09:00:25 +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: RTEXDAG01.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 > -----Original Message----- > From: Ping-Ke Shih > Sent: Monday, May 8, 2023 10:39 AM > 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 > > 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? > I have made a patch [1] along with above idea. [1] https://lore.kernel.org/linux-wireless/20230508085539.46795-1-pkshih@realtek.com/T/#u Ping-Ke