Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp23671rdh; Wed, 22 Nov 2023 16:43:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IHUKqbxMMKnQtZK0cTIELxm85pcfBED3hS+trP2SUby5cwfwyVN2OmY0k7ZIRnyaGw14JYu X-Received: by 2002:a05:6a00:2d12:b0:6be:2991:d878 with SMTP id fa18-20020a056a002d1200b006be2991d878mr4448604pfb.15.1700700234550; Wed, 22 Nov 2023 16:43:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700700234; cv=none; d=google.com; s=arc-20160816; b=wOwHUoisHdawAJ2jZvPKpZkfTL+td6yTpu7KxLIg5+Ag0g5nzEtaDpHe4tWs+QdQya ICl7+LfI5dfggar8yd/EZz5wSBHpB19FuZkOUI2vZJ5zLfcnlKzeWGtfDp2EF2l/2e2b CwiHPm8BeAPsm+Uo8iGRHP8YSt6W8T64uslpei52HwXnHIol3jibmFPumRNDM52CY8B2 4NCt3VkVhH5VlQAqBDLyme9fn0rmPp2T4MkgbepEH3rkxJ0BqwOdZZ3mrtSVpkHyLlX5 1N4l13FnLmrracyk02KBELeIydJKX8hL/ko7bxaOvKuwyfsbIprsK+vJ5XgtWdSwN1WL AXvQ== 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; bh=4gRfY5PqMLTgwtCU12ETV9n/672bCaCzlm48mDM4a2g=; fh=N0wuJfqGiH7MQ/taTVDTW0UlZxES1ME/lyF0o0R4HBA=; b=UmZdCoeHQKj+iHOY4ob5AQd16HenM/xT19AHsRI2HDw1qcMg4PdBWN+xCS5ZOGR8Fu E6Sl+foXUkvtRct1dbfgRKXLcGYNcUUYuLK5O81qNcAXnVwpWa9yVvsfNoezPGeD6Rvs 6Yymnw3m4pWLH723c/lg4FVAdgHXUYEvamleJsi+BSsLe8ibhqZ2OFBMJ2gnV0VVF/bG IKVEyKpP9aJJ/ql2NtiZUWvLwiYaCdUE2Zg5htHHl5SDr2KFgdmMlsVKg2GkhPoQhRGk mLZjCOBMAUX7cL2JbwfFiQjw4zFQw+hu4uwoVYB24H4622Og5qV96dJk7BJyPm6MQzMN /9QA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id e7-20020a056a001a8700b006a68a46431bsi189575pfv.50.2023.11.22.16.43.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 16:43:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 0735E825BF4C; Wed, 22 Nov 2023 16:43:49 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229481AbjKWAnu convert rfc822-to-8bit (ORCPT + 53 others); Wed, 22 Nov 2023 19:43:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229576AbjKWAnt (ORCPT ); Wed, 22 Nov 2023 19:43:49 -0500 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35F99D41; Wed, 22 Nov 2023 16:43:43 -0800 (PST) X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 3AN0fd9A32593574, 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.95/5.92) with ESMTPS id 3AN0fd9A32593574 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 23 Nov 2023 08:41:39 +0800 Received: from RTEXMBS01.realtek.com.tw (172.21.6.94) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.32; Thu, 23 Nov 2023 08:41:40 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS01.realtek.com.tw (172.21.6.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Thu, 23 Nov 2023 08:41:39 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::40c2:6c24:2df4:e6c7]) by RTEXMBS04.realtek.com.tw ([fe80::40c2:6c24:2df4:e6c7%5]) with mapi id 15.01.2375.007; Thu, 23 Nov 2023 08:41:39 +0800 From: Ping-Ke Shih To: Dan Carpenter , Su Hui CC: "kvalo@kernel.org" , "nathan@kernel.org" , "ndesaulniers@google.com" , "trix@redhat.com" , "lizetao1@huawei.com" , "linville@tuxdriver.com" , "Larry.Finger@lwfinger.net" , "linux-wireless@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "llvm@lists.linux.dev" , "kernel-janitors@vger.kernel.org" Subject: RE: [PATCH wireless-next 2/2] rtlwifi: rtl8821ae: phy: fix an undefined bitwise shift behavior Thread-Topic: [PATCH wireless-next 2/2] rtlwifi: rtl8821ae: phy: fix an undefined bitwise shift behavior Thread-Index: AQHaHSNCghVLlD1f6kiAq806Rpki+bCFx80AgAFHvAA= Date: Thu, 23 Nov 2023 00:41:39 +0000 Message-ID: <99ec66d717b249e781f9316cbd689521@realtek.com> References: <20231122090210.951185-1-suhui@nfschina.com> <20231122090210.951185-2-suhui@nfschina.com> <2ec14802-78b0-4a3f-a730-19e95ec8d359@suswa.mountain> In-Reply-To: <2ec14802-78b0-4a3f-a730-19e95ec8d359@suswa.mountain> Accept-Language: en-US, zh-TW Content-Language: zh-TW x-originating-ip: [172.21.69.94] x-kse-serverinfo: RTEXMBS01.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=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 22 Nov 2023 16:43:49 -0800 (PST) > -----Original Message----- > From: Dan Carpenter > Sent: Wednesday, November 22, 2023 9:02 PM > To: Su Hui > Cc: Ping-Ke Shih ; kvalo@kernel.org; nathan@kernel.org; ndesaulniers@google.com; > trix@redhat.com; lizetao1@huawei.com; linville@tuxdriver.com; Larry.Finger@lwfinger.net; > linux-wireless@vger.kernel.org; linux-kernel@vger.kernel.org; llvm@lists.linux.dev; > kernel-janitors@vger.kernel.org > Subject: Re: [PATCH wireless-next 2/2] rtlwifi: rtl8821ae: phy: fix an undefined bitwise shift behavior > > Perhaps, a better way to silence the warning is to just change > _rtl8821ae_phy_calculate_bit_shift() to not return 32 bits? Do we > really ever pass bitmask 0? No idea... > I think the bitmask should not 0, so just replace _rtl8821ae_phy_calculate_bit_shift() by __ffs(bitmask). To be safer, callers can check bitmask is not 0 before calling. Ping-Ke