Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3905499rdb; Mon, 11 Dec 2023 03:42:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IHRjmPlqTCu0EiHKjz1u6jFWMb3WpQaDS/kgdPHmgyRmKLLoEaRA/T/rEwDRvZK5jQaRVsx X-Received: by 2002:a05:620a:1353:b0:77e:ffc0:e446 with SMTP id c19-20020a05620a135300b0077effc0e446mr5125258qkl.75.1702294963951; Mon, 11 Dec 2023 03:42:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702294963; cv=none; d=google.com; s=arc-20160816; b=PdQGFwZHXPFDwYBP1FxlJK1IfAu8VpXTnksZNnhvb2bZwqExOyzAzYrJLaiHZ4QY3R dVINLln8wzr3AExjYq0Dy2QiKG+OOOConYU53Upz7ZAyv80VQ6u6ZSfGQUcb+rD3MNT4 VbO1bv3Iqzaaxxjz0UQ2ODqB0czrXUOFinBageE50eN7JgxS++cejlO/pwkAf0Z+TxI4 xxbyze0O48GiVAdJzVjRV7Mj+m35qSpePXn6fGFjP8rG5pfQpDfZcVhCYIptYLSribNB qEMocN3ecGlM98GNVF7N/HnObqM+irrSKUTBneMZtpTX6b1Va8hysF9vgcqg0wh7HKnW 0uUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from; bh=/NoHiNMNpF99CGL7hgi8poJ5rQB/Y4G4qtUzWJKsX60=; fh=lF3870B4H3G4A487FoRcDxEPFNO7iSYLzi+mvzbRvV4=; b=osW0rNbLv3yPbWvK+h5JuX2KPYXEZum/FzT8II1Aeg2Z6Xsr29yA8jzBwKE3eVeACP R+GlLh0DrExQw+206HampyQs77CXRjmUWQ2D9S8vAJUTMpDWLFfS2ZfBvP1qmopex1+v Y8Jga8TmeU8dAL5Zdoz/mjCEWqC2+guBVTmGGCYKclPgV3YZZ0Lng5R1+M904L0Wj+bR 6XpVb/ttXNKGkYM/chIA8GU/Mrxz6jg261TMams24LQq4RqymHZ/cL0yIF8vVRX0zXJc u+Tmzd6RVwaqCLvWPbDjjnkZlanKrGPOEYliOgnt1oFmWrnXB1E2h1Yv0+T+HsELcGF4 Z1ag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto+bounces-694-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-crypto+bounces-694-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id qs21-20020a05620a395500b0077f31ef9589si7571500qkn.6.2023.12.11.03.42.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 03:42:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-694-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto+bounces-694-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-crypto+bounces-694-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B18311C210D6 for ; Mon, 11 Dec 2023 11:42:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B743538DD9; Mon, 11 Dec 2023 11:42:37 +0000 (UTC) X-Original-To: linux-crypto@vger.kernel.org Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BA0ECD; Mon, 11 Dec 2023 03:42:31 -0800 (PST) Received: from mail.maildlp.com (unknown [172.19.88.194]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4SpfxD4lNyz14M13; Mon, 11 Dec 2023 19:42:24 +0800 (CST) Received: from dggpemm500006.china.huawei.com (unknown [7.185.36.236]) by mail.maildlp.com (Postfix) with ESMTPS id 100F8140517; Mon, 11 Dec 2023 19:42:30 +0800 (CST) Received: from DESKTOP-8LI8G6S.china.huawei.com (10.174.149.11) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 11 Dec 2023 19:42:29 +0800 From: Gonglei To: CC: , , , , , wangyangxin , Gonglei Subject: [PATCH 2/2] crypto: virtio-crypto: Fix gcc check warnings Date: Mon, 11 Dec 2023 19:42:16 +0800 Message-ID: <1702294936-61080-3-git-send-email-arei.gonglei@huawei.com> X-Mailer: git-send-email 2.8.2.windows.1 In-Reply-To: <1702294936-61080-1-git-send-email-arei.gonglei@huawei.com> References: <1702294936-61080-1-git-send-email-arei.gonglei@huawei.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm500006.china.huawei.com (7.185.36.236) From: wangyangxin Fix gcc check warnings in W=1 build mode. Variable cpu not used when CONFIG_SMP not defined. Fixes: dbaf0624ffa5 ("crypto: add virtio-crypto driver") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312040315.kPrI1OCE-lkp@int el.com/ Signed-off-by: wangyangxin Signed-off-by: Gonglei --- drivers/crypto/virtio/virtio_crypto_common.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/virtio/virtio_crypto_common.h b/drivers/crypto/virtio/virtio_crypto_common.h index 7059bbe5a2eb..f0340bb7a10b 100644 --- a/drivers/crypto/virtio/virtio_crypto_common.h +++ b/drivers/crypto/virtio/virtio_crypto_common.h @@ -134,10 +134,9 @@ virtcrypto_clear_request(struct virtio_crypto_request *vc_req); static inline int virtio_crypto_get_current_node(void) { - int cpu, node; + int node; - cpu = get_cpu(); - node = topology_physical_package_id(cpu); + node = topology_physical_package_id(get_cpu()); put_cpu(); return node; -- 2.33.0