From patchwork Wed Dec 27 01:07:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 183385 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp1181739dyb; Tue, 26 Dec 2023 17:08:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IHBs8zijFFELcFAYQ3kqe17SCeqmpzj1nmgzhJLjfppdBTATcqWB98NVR1aYKAPkDBkYb4a X-Received: by 2002:a05:6808:180e:b0:3b9:e80b:708e with SMTP id bh14-20020a056808180e00b003b9e80b708emr9731329oib.82.1703639292848; Tue, 26 Dec 2023 17:08:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703639292; cv=none; d=google.com; s=arc-20160816; b=mv5xi97eII9qnlXw3nzhikDrYAaEM+OIQpV0OnHqXV2Kgo08ACdDEsxxeCIIjs7Q5L nmEshgOX9hvWFU9TmOgyZBDlIan00+liOAEybE3JKxOe5ti3ifELCna/Kp1rMut14DZy ZYgcjAdbMHjn16nhw9jBOAyAbr/LFzFuVdMdQnkqgBzeTdevZqXhZ72tTGQ9uz/4m01+ F+qfbe1g+gcM4ww34DowLRGEbHvnOdmrYojwFMPEkyOT3Q0zbHb53i5cGOnp9ABNhJbD Pwqu830QCH6dLpy+MhhgGeMM1gGxw0vHBTB7GzLWiRtOIPfuZanerdMLGpo2OoF1HYAD Vtrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=1YmUkz0VIfT+7ufOGukztD/52zdqDSYrXiOaVrLHV08=; fh=k5dKy3kKJJxYe2Fq2ITT/JNrw7WxHjbM6Cpr+vb7zqs=; b=HuX4KBZCaU0U6IILObAsUPz2ajxSZySEwNNGHErHdlq5ur9zFFMZdchZ3kQQhftnqQ 1cjUs0BdgfipZG3iYqiZW9V3NIMkGWDF9XQyPQOv7cO/obR5XaWwZR09ud78ggpoScTS ooBYGxerCisYjm1gzQcZoq0RatdAkxyY3xxLlII1TOgqrlXmM3Nj1xzTGOFwNdhJFkwi tVbODw1skV2fej3hRbsMsMVMftC0MbawC0CGY4pvyOLUO0gv4z4WBITQyBVCAbftmY3j 6rpnmShotD62fQPxpEZX/ytD5eSOhkbutq0kQysmTmTtVqScQU8FinCSf1xggWuJuqrB H66w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=hk5d3yTj; spf=pass (google.com: domain of linux-kernel+bounces-11746-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11746-ouuuleilei=gmail.com@vger.kernel.org" Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id f6-20020a17090ac28600b0028c0e0f024dsi7684828pjt.156.2023.12.26.17.08.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 17:08:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11746-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=hk5d3yTj; spf=pass (google.com: domain of linux-kernel+bounces-11746-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11746-ouuuleilei=gmail.com@vger.kernel.org" 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 00A01B2219E for ; Wed, 27 Dec 2023 01:08:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5075623B9; Wed, 27 Dec 2023 01:07:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="hk5d3yTj" X-Original-To: linux-kernel@vger.kernel.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 62F29290D; Wed, 27 Dec 2023 01:07:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org 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=1YmUkz0VIfT+7ufOGukztD/52zdqDSYrXiOaVrLHV08=; b=hk5d3yTjOJ1sAQVGNhUg5ePQrZ Z0sjl9lc6F4QreZ2k45x0xO7y2mm3MIHITLd5B8AflR1UrKM+K3EfW4w1dfekjddS3qW0RrI2SYdp ptokQ6EBGcYmQ9VIXm4pq7W5R5phqGibXzyuxbzzRsGXs99Jj5k2Aldg7KYWVepZ5r8ihqjwRWqdT mPFT/4HfwWnDn6cmbbkRbGMeGUX8ynyxj8XHnRMnXQVBNnyDqSSDZZ6QMLp7ZhEzbKMqUG8wsUm72 HW0qCV6Ok0OunyMYw9wkA1TfxPNrvQzmOCaZkOnA0S++LxzaWbpKB5MdQcNePe2j2ye9p46BfxKx2 J8WiPO+A==; Received: from [50.53.46.231] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1rIIOc-00Djz9-2U; Wed, 27 Dec 2023 01:07:42 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Bibo Mao , Tianrui Zhao , Huacai Chen , WANG Xuerui , kvm@vger.kernel.org, loongarch@lists.linux.dev, Stephen Rothwell Subject: [PATCH] LoongArch: KVM: add a return kvm_own_lasx() stub Date: Tue, 26 Dec 2023 17:07:42 -0800 Message-ID: <20231227010742.21539-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786395228439724228 X-GMAIL-MSGID: 1786395274977114421 The stub for kvm_own_lasx() when CONFIG_CPU_HAS_LASX is not defined should have a return value since it returns an int, so add "return -EINVAL;" to the stub. Fixes the build error: In file included from ../arch/loongarch/include/asm/kvm_csr.h:12, from ../arch/loongarch/kvm/interrupt.c:8: ../arch/loongarch/include/asm/kvm_vcpu.h: In function 'kvm_own_lasx': ../arch/loongarch/include/asm/kvm_vcpu.h:73:39: error: no return statement in function returning non-void [-Werror=return-type] 73 | static inline int kvm_own_lasx(struct kvm_vcpu *vcpu) { } Fixes: 118e10cd893d ("LoongArch: KVM: Add LASX (256bit SIMD) support") Signed-off-by: Randy Dunlap Cc: Bibo Mao Cc: Tianrui Zhao Cc: Huacai Chen Cc: WANG Xuerui Cc: kvm@vger.kernel.org Cc: loongarch@lists.linux.dev Cc: Stephen Rothwell --- arch/loongarch/include/asm/kvm_vcpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -- a/arch/loongarch/include/asm/kvm_vcpu.h b/arch/loongarch/include/asm/kvm_vcpu.h --- a/arch/loongarch/include/asm/kvm_vcpu.h +++ b/arch/loongarch/include/asm/kvm_vcpu.h @@ -70,7 +70,7 @@ int kvm_own_lasx(struct kvm_vcpu *vcpu); void kvm_save_lasx(struct loongarch_fpu *fpu); void kvm_restore_lasx(struct loongarch_fpu *fpu); #else -static inline int kvm_own_lasx(struct kvm_vcpu *vcpu) { } +static inline int kvm_own_lasx(struct kvm_vcpu *vcpu) { return -EINVAL; } static inline void kvm_save_lasx(struct loongarch_fpu *fpu) { } static inline void kvm_restore_lasx(struct loongarch_fpu *fpu) { } #endif