Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1361574pxv; Fri, 2 Jul 2021 01:44:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDHqh37NjPvYbrMYO2PAyz+x2zyGnZbtyCahEEijEvxaxvywtcAZ3TvbRXbPJCOiD3wJdk X-Received: by 2002:aa7:c518:: with SMTP id o24mr5354410edq.137.1625215442489; Fri, 02 Jul 2021 01:44:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625215442; cv=none; d=google.com; s=arc-20160816; b=zkZlYgT54V+NHhd/pQVxeY2O7mkBHKrY9yEIlcjx3kas1qrm160ZmUpHyNdYii0BVm p8MUeWNQjdBapNFyQtk38yGOWJUZJOHD8VcrcS8uzvYKx4jEUPkkEcgw4Eqs4nv/4btE LnHsav++LqCNXWWmn6curFe6rVZigvVAg/RKHn6GGDfzGLjR3xeA6wQ7G0kPxt9Ab4Gk HMMDTp3mZkGXpDwn3BywQY4NB6uX4WBUfJ7195RxVoCOVPVLf3pUj8H2dGLBA9VYWK0n IQUPEjGSB1Zel0Fay04I2CyVH7iXOTlIUkNJa1jCd8joCF9IHlV26QeAmtvpIdiY8rgO ENNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=1OnGl7xq3NOFK3e1GzhJyCLVnMWI/X73iPrxvmoKimg=; b=nIeHdpG+XhxI+M/0FsTo10Hx6SQzQLb82lSVXVXRGcTTWD/f05MgzWiSmbcwC00UPH 0PpOx+UoNcLF7HUfZTgCmNoJR6EUZBWPLsWqKhQxwZYGiakl1B0pg0iVcG32Ow6EWy+2 KTf0zzTPSmiwvHtZ465uSU289lkBQSc4uaJk+gJLFw7GMgPdeMKhU5t/Pch/+RgAbSbE LNgX2Pw238XKeIFqgmamsjazNTQskzszxtk0ngvDxvv04U/uwql2+T0UAZyYeiJ5/0M9 tmEzu3ZMpRZECd4HMjjg4WlT6gmnLhZdBqtLultitWBBUw6uI9jXoR9/4rPXmnYM7glF Bxqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="rGcBqFz/"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 5si2540118ejh.625.2021.07.02.01.43.34; Fri, 02 Jul 2021 01:44:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="rGcBqFz/"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230367AbhGBImm (ORCPT + 99 others); Fri, 2 Jul 2021 04:42:42 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:16675 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S230166AbhGBImm (ORCPT ); Fri, 2 Jul 2021 04:42:42 -0400 X-UUID: 742705fc12f64afc8debfd8d4d33cf27-20210702 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=1OnGl7xq3NOFK3e1GzhJyCLVnMWI/X73iPrxvmoKimg=; b=rGcBqFz/mpIM8KXQQ9tSSx84OrIHihCS8FG/qi+MvvwJrqlKtCIiB3X3bhH0Ty0w6J2X813pwizq9CSAQPsfdZCkk3MR6NhaTwJJiqy7zCYx33hgwFjl78z3lrNBd7K28FtvAyETTjYy34x3BjMe22/OTWWOzFxy62wFR8E9l+k=; X-UUID: 742705fc12f64afc8debfd8d4d33cf27-20210702 Received: from mtkcas36.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 5926091; Fri, 02 Jul 2021 16:40:00 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS31N1.mediatek.inc (172.27.4.69) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 2 Jul 2021 16:39:52 +0800 Received: from mcddlt001.gcn.mediatek.inc (10.19.240.15) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 2 Jul 2021 16:39:52 +0800 From: Bo Jiao To: Felix Fietkau CC: linux-wireless , Ryder Lee , Xing Song , Sujuan Chen , linux-mediatek , Bo Jiao Subject: [PATCH] mt76: mt7915: cleanup miscellaneous errors and redundant codes Date: Fri, 2 Jul 2021 16:39:49 +0800 Message-ID: <20210702083949.4431-1-bo.jiao@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: E5970F82D679ACA60D60ABEF64347722AD57499F5300A5D1BA73B0C9D78891502000:8 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org RnJvbTogQm8gSmlhbyA8Qm8uSmlhb0BtZWRpYXRlay5jb20+DQoNCmNsZWFudXAgbWlzY2VsbGFu ZW91cyBlcnJvcnMgYW5kIHJlZHVuZGFudCBjb2Rlcy4NCg0KU2lnbmVkLW9mZi1ieTogQm8gSmlh byA8Qm8uSmlhb0BtZWRpYXRlay5jb20+DQotLS0NCiBkcml2ZXJzL25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