Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp231725iob; Thu, 28 Apr 2022 00:45:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwO622nVsbE7lR0m6h0E1OiF9Qf/uDcZVsnKNB/LUpB1Sfn9OG4o23EvK6vYwbQW9o03SCk X-Received: by 2002:a17:906:99c1:b0:6ef:d995:11ac with SMTP id s1-20020a17090699c100b006efd99511acmr29252228ejn.244.1651131927432; Thu, 28 Apr 2022 00:45:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651131927; cv=none; d=google.com; s=arc-20160816; b=ZZXgy0dZ956uPRbXGyh7RWKUzrdYSzbBy7TOLu6qSR0ahTdbLauFadWXpYbDRGYrSe yLRkZ97Wc0vQNsV5nKH57uBL0M4m9+6OkUwyIKVH2gcQgsbBvKFvLsQ0x0+vXTBmD+X+ roNCFBSuhvbyQe+u4mFzppaVa5fuu+0JCELZz1bVt8Bj6chFjbTg8kMkSuDq0Cuc4mh/ vTw2Wzm1MGPoAAjH2ShRLuXZW9KU41P8mdvXDtCinsEWvKjgWKTsklZ4SBqzgTeYiX/j 3MHmrNt/vS2O4aMcOILsidt9hwW0cgmPf3p3u20YJLCHj8Z0503WC/rFwiA7p/tw/cDF v/MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:mime-version :content-transfer-encoding:references:in-reply-to:subject:cc:to:from :date; bh=ZWW2OA0cLEC4bo2G+rYxAJD2hWslpFAVMgqRdo8/8CU=; b=gxkL0xwiRn5stnLTQ93G+wh5B8OlGVy0lJmOTmQXDE44QdR1nt+8B58rTbgofGvFLE B9VDpdlEB1NyC9vum/UnrgqhJGiidG/y8jJLVDsw/N0mqW6cl6KApxCv1dLEvHYK61eo oikqA2p0OM0zlo1SaLrKD0LhtfYFb5R2bJ9RBBDk1QPRfBGpIgHRIS6aYJM0lOjVtmT3 qdEJi1mwJ5wlxeQDlsfq21Y9JSBdWfVM/bKmgUmlsjmCwXhD/K3OVahX2kVVUfTkLDie 70Bp82+zKakQnsqbcKqagdb/siFtuXoOcKkj8fvOXPqeRCfscyMVO6rlFllniFq0TMzm 2UFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 a18-20020a170906685200b006f39126039asi3153581ejs.597.2022.04.28.00.45.00; Thu, 28 Apr 2022 00:45:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242276AbiD1EHe (ORCPT + 99 others); Thu, 28 Apr 2022 00:07:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231944AbiD1EH1 (ORCPT ); Thu, 28 Apr 2022 00:07:27 -0400 Received: from zju.edu.cn (spam.zju.edu.cn [61.164.42.155]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4FB8B986C2; Wed, 27 Apr 2022 21:04:10 -0700 (PDT) Received: by ajax-webmail-mail-app4 (Coremail) ; Thu, 28 Apr 2022 12:03:45 +0800 (GMT+08:00) X-Originating-IP: [10.190.64.199] Date: Thu, 28 Apr 2022 12:03:45 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: duoming@zju.edu.cn To: "Jakub Kicinski" Cc: krzysztof.kozlowski@linaro.org, pabeni@redhat.com, linux-kernel@vger.kernel.org, davem@davemloft.net, gregkh@linuxfoundation.org, alexander.deucher@amd.com, akpm@linux-foundation.org, broonie@kernel.org, netdev@vger.kernel.org, linma@zju.edu.cn Subject: Re: Re: [PATCH net v4] nfc: nfcmrvl: main: reorder destructive operations in nfcmrvl_nci_unregister_dev to avoid bugs X-Priority: 3 X-Mailer: Coremail Webmail Server Version XT5.0.13 build 20210104(ab8c30b6) Copyright (c) 2002-2022 www.mailtech.cn zju.edu.cn In-Reply-To: <20220427174548.2ae53b84@kernel.org> References: <20220427011438.110582-1-duoming@zju.edu.cn> <20220427174548.2ae53b84@kernel.org> Content-Transfer-Encoding: base64 Content-Type: text/plain; charset=UTF-8 MIME-Version: 1.0 Message-ID: <12cdcfe5.1d62.1806e56d31f.Coremail.duoming@zju.edu.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: cS_KCgBXX6ciEmpixLT0AQ--.64701W X-CM-SenderInfo: qssqjiasttq6lmxovvfxof0/1tbiAggOAVZdtZcUkAABsp X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VWxJw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaYxvI4VCIwcAKzIAtYxBI daVFxhVjvjDU= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS 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-kernel@vger.kernel.org SGVsbG8sCgpPbiBXZWQsIDI3IEFwciAyMDIyIDE3OjQ1OjQ4IC0wNzAwIEpha3ViIEtpY2luc2tp IHdyb3RlOgoKPiA+IGRpZmYgLS1naXQgYS9uZXQvbmZjL2NvcmUuYyBiL25ldC9uZmMvY29yZS5j Cj4gPiBpbmRleCBkYzdhMjQwNGVmZC4uMWQ5MTMzNGVlODYgMTAwNjQ0Cj4gPiAtLS0gY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