Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4084181rwr; Mon, 8 May 2023 02:36:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4A2u5XQ9wzkpawNQr9vvJsBRpsMmeoDy81NLc9Rdbbo2kKbXX5jmYeuHWyS12q9z2zThOU X-Received: by 2002:a05:6a20:a122:b0:ff:d8a5:fa41 with SMTP id q34-20020a056a20a12200b000ffd8a5fa41mr7129479pzk.10.1683538570221; Mon, 08 May 2023 02:36:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683538570; cv=none; d=google.com; s=arc-20160816; b=ig71muG3T95a+wVYiGV1fiPELqn6Hm3nrIpaGxYGF/xTRbadcmNu8/RZ6wzrsFTBN0 OV/JB6Z8LLXlMLeX4BbvuF8CSvgBnOLnKjEyXjyXw6VGadCyupowzdXeDW3+PJ5dNb+8 d//9UYH8NkYvUNZqZDeOW4NVke+JkA6/jg23zdOK8dNtW4V9llZ7uL6IVQkzx+n/PVL/ pXU5ElTsVo4TzOKaUbqKOqun4FlNtOsEKcBd3ivF99vMJ/o+bXNkkEYmQR1QZuI5nF5t OfxRocZg+/d/OildLQIft+Go44Ip4SP7lB/CRAF4dL1O9pY5QHsxqnGw9SNlS1jUBXlS wW2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=twgEMnLoruV6swF5a45DNaRyTA/qmIzWRDh5LBABJ/4=; b=D5XZXy1lNZLbvTQb/aipDRtvZEdwSH503BC0ISVBtdRK1paS0oOa3ryiDGqC5wv4hZ CBWbp6MCWfc4XMCNmo6AVMUHtZi6TpobDDVSBqcLhIE+BSZSFysfcsqNckilrlGuZOIz RZ8C/qrhTJmKQRspP/SrphBFe6DDxcYefw/XNFhaq2lC+2KMyBndYsGzKEd1mHaqVgy6 /z12dNY32q1KdEaxIywzW3+tuMlQZiv/xvb6yrca+D0wahmYNj0emuudgQebas4NEVwZ +8FrmiTWdOfzVldPJ3UHUbShZyI0wZ4XXpMf9UvTmPDzg8XNGx3KqfnlxiNtXWoO8bY9 1g1g== 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 w2-20020aa79a02000000b0063b86ce6813si8147677pfj.41.2023.05.08.02.36.00; Mon, 08 May 2023 02:36:10 -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 S233587AbjEHJf1 (ORCPT + 62 others); Mon, 8 May 2023 05:35:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232854AbjEHJfZ (ORCPT ); Mon, 8 May 2023 05:35:25 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA52A13A for ; Mon, 8 May 2023 02:35:24 -0700 (PDT) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pvxH8-0001Rg-M1; Mon, 08 May 2023 11:35:22 +0200 Received: from sha by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1pvxH8-0001Sj-39; Mon, 08 May 2023 11:35:22 +0200 Date: Mon, 8 May 2023 11:35:22 +0200 From: "s.hauer@pengutronix.de" To: Ping-Ke Shih Cc: Dan Carpenter , "linux-wireless@vger.kernel.org" Subject: Re: [bug report] wifi: rtw88: usb: fix priority queue to endpoint mapping Message-ID: <20230508093522.GV29365@pengutronix.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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 Ping-Ke, On Mon, May 08, 2023 at 02:39:19AM +0000, Ping-Ke Shih wrote: > 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? Fine with me. I acked your patch. Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |