Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1474054rwl; Wed, 5 Apr 2023 18:27:59 -0700 (PDT) X-Google-Smtp-Source: AKy350bkfshzo0merQ71s/ur4RMajGPq1GS3KemYtHZpgK1P0vc1YyKXqN3oakQrbgxHyjfGK03k X-Received: by 2002:a17:906:37d4:b0:947:735b:fcbe with SMTP id o20-20020a17090637d400b00947735bfcbemr4303886ejc.19.1680744479315; Wed, 05 Apr 2023 18:27:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680744479; cv=none; d=google.com; s=arc-20160816; b=ONwvhxIytQ4UgijaiHcvdGQjj3kmE8MXkBVGyw1CN7uQvYgeYM9Na0emAmxNzDUXpn LjgW61CYiee2fvG0PN82vCMnh1PZkdPjhfo1gIdhJBiwdRVOdsjqOAcQcGNniBYLWPYY BUh44GwXLs4R8Qhj3UiyYhwB7MARrflOTXFmWfJTnk3LoFPHnsrztNK/ys17EyfG+fpu vtIU2urQB0IkktTbeRoREcrCLiWawD5utt1p8nSf6053nj1CJpla7okUGyexDDrXHm6u UQ3qaPH33KRkLibH4SHlro0EnG4GU04qtmThoL6X1t9dCiklNpXyVXW/helV2rEsDJrl 0e+w== 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=bKS5ojoHHwoyUgcYqAslXZYkibwq7t/Bg5aJDpoucxU=; b=0O1xosYNVnBhVnL0YANCTqDiRIT6N8WRc7onHCGfE2O71TmpKdSb14vudkX5HG7bKz ETI4MdMYJUKzPNhP85j2cAuMlpLoYLX1FQ5UP/bxoJ/WWtxRtVQWLUx02C4Ozl6++Hk+ p5dZL3BWR00dfR1zVF8nbhnAOtwq8ODPUrwnI6JbJ6JTjpgFGJua2FXIZAWMKnf6enCy 8Ywcjdntw1gm+ctXKnPXN5YLJ2WtX2yamNoaiRHkLfr8oCjWT8b2cP4eY9xa6As9cnUr IrMt1QXGn7LAGvS+AAx1oB1BbbQFIjynZIe5i98fcBQv+lsKIu34fis/r5RZql2QVkUh T2Cg== 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 a22-20020a170906275600b0093de089f33esi166177ejd.841.2023.04.05.18.27.41; Wed, 05 Apr 2023 18:27:59 -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 S231906AbjDFBQd (ORCPT + 60 others); Wed, 5 Apr 2023 21:16:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229520AbjDFBQc (ORCPT ); Wed, 5 Apr 2023 21:16:32 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06250F1 for ; Wed, 5 Apr 2023 18:16:30 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 3361G7b84028517, 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 3361G7b84028517 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Thu, 6 Apr 2023 09:16:07 +0800 Received: from RTEXMBS01.realtek.com.tw (172.21.6.94) 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; Thu, 6 Apr 2023 09:16:27 +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.2375.7; Thu, 6 Apr 2023 09:16:26 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::b4a2:2bcc:48d1:8b02]) by RTEXMBS04.realtek.com.tw ([fe80::b4a2:2bcc:48d1:8b02%5]) with mapi id 15.01.2375.007; Thu, 6 Apr 2023 09:16:26 +0800 From: Ping-Ke Shih To: Bitterblue Smith , "linux-wireless@vger.kernel.org" CC: Jes Sorensen Subject: RE: [PATCH 1/2] wifi: rtl8xxxu: Clean up some messy ifs Thread-Topic: [PATCH 1/2] wifi: rtl8xxxu: Clean up some messy ifs Thread-Index: AQHZZA3VOb/3C7mk9kGPYLUdN/MokK8df2cQ Date: Thu, 6 Apr 2023 01:16:26 +0000 Message-ID: <04d4ca3e27924ea6b2ad6e5b00ddb424@realtek.com> 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: RTEXMBS01.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: fallback X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindb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