From patchwork Tue May 11 19:35:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1477294 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=Tm8IWPaA; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=aNMnjM0x; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Ffp8Z0x3tz9sW4 for ; Wed, 12 May 2021 05:37:02 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=+7wWKzMyoKpqv9yd2jhF7uJUocLNPjuRJ3nxhWznHA4=; b=Tm8IWPaAr7ZuxA15DVSZeVOGIr Hpd0owXcMGx7mBQXjzjmLSAQILVIx/HCVVjW4tt8yMcQvKAAzz55CkMhUAfIMPGjo60veJoDiyKZj UrtQzW23vcpIaS6FJZsglwITfu+FdbMv78bTxacprOUB2F058KLe5Ts2iwkNLGgm8Y57UusItEdif tGw7UuvUoG3Est8z0GE8KHIEaq8tdrml0ynpXirAxpg2lDQtt1382Z5ueAtqg+p2uixho45jO+Z7z pSHGVNhC2ikh3Bo3hl2+qI1ZkTt1+2SNJhuFcml8MrbxdDYZvRt2c4d8oFCdZLFeibpDc7nrHCpos 7gk4uFSw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lgYAi-001907-V8; Tue, 11 May 2021 19:36:01 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgYAd-0018zP-Kg for hostap@desiato.infradead.org; Tue, 11 May 2021 19:35:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=YpR900NuPZBJkfA1nAebhoA0fCaEBH29kmPlaQGpYWc=; b=aNMnjM0xPlF1O+VrXCm3PPF+Bz NBlLtFi4i4lSkawqTzMhTj9ZF0uEMmOWVVN2bJCfZIaXmB9z25kYPg3ac2aUog0KbYoVNtUFAdhF1 iRivfZqTsKCrUAnuMw89tz4ZgcnkInuYfjkH23wf7L1cNyA+e5rFUjDhzgCjFUeDD4CnnSYRSaGNt t9jtOmpU7krii0F9nd6zuPNVKu/TAqJAjjrA3knf1zXbcxJLCJQnLOwTjuIHOmvn6mXszmr6nRpYZ JkCEVkPRf7ivAdas5nRJKhj1crasi6Sfzkc8HcWxxopAwPHgmfve9NFVAcwdMtxc8PeLH6IlvB1cV 1CfjbmKg==; Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgYAa-009sPZ-AH for hostap@lists.infradead.org; Tue, 11 May 2021 19:35:54 +0000 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2) (envelope-from ) id 1lgYAS-007cuE-8e; Tue, 11 May 2021 21:35:44 +0200 From: Johannes Berg To: hostap@lists.infradead.org Cc: Johannes Berg Subject: [PATCH] tests: fst_test_common: remove dead code from HapdRegCtrl Date: Tue, 11 May 2021 21:35:40 +0200 Message-Id: <1620761740-Idbada8fc777f9dc26ad58e6931362c845fa2f424@changeid> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210511_123552_377988_8DC1E2E8 X-CRM114-Status: UNSURE ( 8.02 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.1 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Johannes Berg Since refcnt is never incremented, this is dead code, just remove it. Signed-off-by: Johannes Berg --- tests/hwsim/fst_test_common.py | 5 ----- 1 file changed, 5 deletions(-) Content analysis details: (0.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg Since refcnt is never incremented, this is dead code, just remove it. Signed-off-by: Johannes Berg --- tests/hwsim/fst_test_common.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/hwsim/fst_test_common.py b/tests/hwsim/fst_test_common.py index 4b6bab07d780..440d65f9f3fd 100644 --- a/tests/hwsim/fst_test_common.py +++ b/tests/hwsim/fst_test_common.py @@ -24,14 +24,9 @@ fst_test_def_reg_domain = '00' class HapdRegCtrl: def __init__(self): - self.refcnt = 0 self.ifname = None self.changed = False - def __del__(self): - if self.refcnt != 0 and self.changed == True: - self.restore_reg_domain() - def start(self): if self.ifname != None: hapd = hostapd.Hostapd(self.ifname)