Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3044087rwd; Mon, 22 May 2023 07:58:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5KBPiwrDXy8zDsoldSVERxlAOXiSEFsrUy04yN0tjWnnOww6M+lcNq0NEr6hmZnZ46APv7 X-Received: by 2002:a17:902:7587:b0:1ac:8db3:d4e5 with SMTP id j7-20020a170902758700b001ac8db3d4e5mr9068253pll.69.1684767515905; Mon, 22 May 2023 07:58:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684767515; cv=none; d=google.com; s=arc-20160816; b=P6A3l0ixZAsEiSo9x80MxC64NGVTokhMPQY62rCdNuKJ+0AmzNE5H+USopzyyn9iFL zQuAuj1oPIavHI2SZO4nd4UBYGpyuVbk2ezYv+wssljCcD3cigEQO4V6idS4zWdQBtwR yFkwHb4a06vPe0JWMRWJ6o1ApV+x7PlOl54l+R382ns+ITaTxc21cMbF9XgJxoIksEwO OKbViW3Crel4Nc9hqUAkpQYAwqf4J6WFqsvofxGCtgVYojrSI+9ubDOwnc3hfQznSgRK lAvucgyBHTOTy/oyzHUBCEcCanXyGoxCofHNOdWjqDRY5tnzmkZ/7K/l7mmMYHePLpje zzfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=23KmM5Vjp/r+0CEVZoYhx1NZ0LhMxpN04GBEUCeHBaA=; b=Cp6Hqq4koMlFZHWVQnlI8ifBKDnT+tzMSdULZo81ROYbITO/BxzeXvmzy11d9I9/Kv Tl4N1uPAn6BGtpSywbGqLeHTJUjzWdhbbyqxGQuIuNSdbZGmBGRzJIA+CQpIV62Urb4/ A8bJTpJxTAE3vUV2Ix/GFk+OVfO60fhDcj4YtzW4beylkEa+gBkMcUlou6JXzAF7kCTl 5DQXvvOLs02zNppd7tdC2+1G64M8fCdpysVo0CwlmFqwEGvFKLV+ta4NJTAS23d2VBWY puTdeQMVB9G+BymMKND4Xrn2LgXXYXD5OcieMtx6XdlLxJpqpFuTNKcmNpejmBz17FWd 3tbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=Dotd6gRN; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t19-20020a17090a951300b00250331e6044si4764587pjo.25.2023.05.22.07.58.20; Mon, 22 May 2023 07:58:35 -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; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=Dotd6gRN; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233631AbjEVOc2 (ORCPT + 99 others); Mon, 22 May 2023 10:32:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231609AbjEVOc1 (ORCPT ); Mon, 22 May 2023 10:32:27 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D9E19E; Mon, 22 May 2023 07:32:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1684765902; i=linosanfilippo@gmx.de; bh=23KmM5Vjp/r+0CEVZoYhx1NZ0LhMxpN04GBEUCeHBaA=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Dotd6gRN0IZGqFv0g+0zOBKVgPxT9vZS7OwjQLeoqXusmJGOTOETnLkeT91QPpT3k 7/qLO6HpAoLMkkRogeeMO2zvQ1FglYnEUgQ5ZteuUvSTeJUa4LEtLG//U2qHsk2kHf F9ELFT3uoQIfTY5rJFpharCFXIkJsj9om3vlpFT4e5mQIAJdl28pYUKdfdW/tMuQ6l eyKFcDzJ7YSyngaCbWhD3+LgX/KOMSUFyRqS5+hWmvyqJbiiC4/jOLE/AmQgcDQisL /pEjFRcTh8MPiM/AQsDpUhCMjM716aBGKv4NFqFe4kPhPX5IbJLqdIk4MRr32i3FRa yYZouriZOBzHg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from Venus.speedport.ip ([84.162.2.106]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MQv8n-1po5rm4Akh-00Nxtb; Mon, 22 May 2023 16:31:42 +0200 From: Lino Sanfilippo To: peterhuewe@gmx.de, jarkko@kernel.org, jgg@ziepe.ca Cc: jsnitsel@redhat.com, hdegoede@redhat.com, oe-lkp@lists.linux.dev, lkp@intel.com, peter.ujfalusi@linux.intel.com, peterz@infradead.org, linux@mniewoehner.de, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, l.sanfilippo@kunbus.com, LinoSanfilippo@gmx.de, lukas@wunner.de, p.rosenberger@kunbus.com Subject: [PATCH 2/2] tpm, tpm_tis: reuse code in disable_interrupts() Date: Mon, 22 May 2023 16:31:05 +0200 Message-Id: <20230522143105.8617-2-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230522143105.8617-1-LinoSanfilippo@gmx.de> References: <20230522143105.8617-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-Prov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q+Lfqtb0mtDnxRjWJTv6+CE300J7bJ2sAxVk7 AKyRB85fUGxikbuxWndZO3x5i41ACAPa6pn2MOheXHDCWix856MX13PtZ517FjaR9bISucqZo nEEDN/A3Sn2t6SMJdP4s1C+AFH2i46Ev3RUIhSU3tvEzhl0EUjY4rDTqkW29C2n3hMJ2lmR7+ tlAHQw== X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,MIME_BASE64_TEXT, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 RnJvbTogTGlubyBTYW5maWxpcHBvIDxsLnNhbmZpbGlwcG9Aa3VuYnVzLmNvbT4KCkF2b2lkIGNv ZGUgcmVkdW5kYW5jeSBieSBzaGlmdGluZyBwYXJ0IG9mIHRoZSBjb2RlIGluIGRpc2FibGVfaW50 ZXJydXB0cygpCmludG8gYSBzdWJmdW5jdGlvbiBhbmQgcmV1c2luZyB0aGlzIGZ1bmN0aW9uIGlu IHRwbV90aXNfaGFuZGxlX2lycV9zdG9ybSgpLgpNYWtlIHN1cmUgdGhhdCBpbiB0aGUgc3ViZnVu Y3Rpb24gdGhlIElOVF9FTkFCTEUgcmVnaXN0ZXIgaXMgd3JpdHRlbiB3aXRoIGEKY2xhaW1lZCBs b2NhbGl0eSBldmVuIGlmIHRoZSBjYWxsZXIgZGlkIG5vdCBjbGFpbSBpdCBiZWZvcmUuCgpJbiB0 aGUgc2hpZnRlZCBjb2RlIGdldCByaWQgb2YgdGhlIHZhcmlhYmxlICJyYyIgYnkgaW5pdGlhbGl6 aW5nIHRoZQppbnRlcnJ1cHQgbWFzayB0byB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