Message ID | 20231227010656.29211-1-rdunlap@infradead.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-11744-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp1181467dyb; Tue, 26 Dec 2023 17:07:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IFWKnKlsgjNNBTghR3rUUr6V035ZAhtPQtfWA3Nznx31cD1W2MtMvDttIOIkgioWYytWkQ3 X-Received: by 2002:a2e:868c:0:b0:2cc:d7a7:8ecb with SMTP id l12-20020a2e868c000000b002ccd7a78ecbmr412155lji.16.1703639248121; Tue, 26 Dec 2023 17:07:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703639248; cv=none; d=google.com; s=arc-20160816; b=ZUgc+zDkDDP/l13umgCh3qD64bg+0DiMmCCtSXdot/cvP2tniumsNIhmMR2HKU3Uv7 5RfU/o3b9zQEzrIRWpa3GILXreox14W5s76Um0nNUfCcjwtsZTIX9zVEZzddxn4MvRyg kOkxB5ht8irGwGYrHZ6eUBrxrPnlBIu4SlUSKD/0i3uEtPnBSRi8T6V3GFIgvjc5bA/z QZLp3AKeqtOapxDWirmDFF97YaMCNpHcxPsSelifZlWU79mysZCR81qfAXmr/b/B1BpB uSNfqDdexGHtHIEqo+hbUp+DYQwIa8pQ+7ynVXoeV0qQ8CqJg0LEjcaMBpZndbHi8QXY q4BA== 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=pko4y6oNxZheE0FGO4R/VelA8CgRyHis94lsEA0EP0HU8iosP5FBF9ZzN+L+sDz7Jm 5em20ouN/Fkii6aQiHxpb7lP5lvuRmKCeaMgGePO9YZ+GZ4LDMfGRLcPc3sFYCzRsfzw S0quaZ43Q3H46jW14XwbAdCiigwo11i5ekC7rGmleMFZSUuubqg/limHBWIDzCp5p47k CJtuB3z1+jkqJcz2vEjX5Uhl/TN+XWaPRAYs/JtL7PwPdVw4ODuOcvW58iVSuZRDpFAA 2got2dn/sSWgmHKK0zJ38DowRBV0+HaeY0n0gci6jKCzUo90esh5UrKgX33mKo9Q1c6c Z7Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=ZrtQ+M1w; spf=pass (google.com: domain of linux-kernel+bounces-11744-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11744-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id n14-20020a50934e000000b00554e922b0absi1944776eda.85.2023.12.26.17.07.27 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 17:07:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11744-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=ZrtQ+M1w; spf=pass (google.com: domain of linux-kernel+bounces-11744-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11744-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 am.mirrors.kernel.org (Postfix) with ESMTPS id B45CA1F22A63 for <ouuuleilei@gmail.com>; Wed, 27 Dec 2023 01:07:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 47A1523B9; Wed, 27 Dec 2023 01:07:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="ZrtQ+M1w" 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 D5CCE1845; Wed, 27 Dec 2023 01:07:01 +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=ZrtQ+M1ws99czu8wJvhoVSUG+y 9/qAAl/X9QyGzNofhUAr6sNsisAS4ViJHdkZZr4WZtSdGzGhLESU4RciRnEP6p982JW382Vl/8gPO wO9jen+eno0k/Pz7XDNf4mrKViYj06MP+J8X6k3/DfNyRV0B8GqlsbHPD6dxF0HKgVtFRXuSXb3ub MtTc5earlL2Rj90YP/DExgqVyHbB9N0ueHcn+KHK6hhL7WAg1fm2MertnO0IJlMgoO8GAl33nUE/i 42dGVFEeEc3SAyMxzcjdP/+IPLcjO8LQGL2UY/OI4f9UdymzKjVLhLgFDUeG7AOKewAl6jWljyIwo Qo1bCGxg==; Received: from [50.53.46.231] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1rIINt-00Djt8-1X; Wed, 27 Dec 2023 01:06:57 +0000 From: Randy Dunlap <rdunlap@infradead.org> To: linux-kernel@vger.kernel.org Cc: Randy Dunlap <rdunlap@infradead.org>, Bibo Mao <maobibo@loongson.cn>, Tianrui Zhao <zhaotianrui@loongson.cn>, Huacai Chen <chenhuacai@loongson.cn>, WANG Xuerui <kernel@xen0n.name>, kvm@vger.kernel.org, loongarch@lists.linux.dev, Stephen Rothwell <sfr@canb.auug.org.au> Subject: [PATCH] LoongArch: KVM: add a return kvm_own_lasx() stub Date: Tue, 26 Dec 2023 17:06:56 -0800 Message-ID: <20231227010656.29211-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786395228439724228 X-GMAIL-MSGID: 1786395228439724228 |
Series |
LoongArch: KVM: add a return kvm_own_lasx() stub
|
|
Commit Message
Randy Dunlap
Dec. 27, 2023, 1:06 a.m. UTC
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 <rdunlap@infradead.org>
Cc: Bibo Mao <maobibo@loongson.cn>
Cc: Tianrui Zhao <zhaotianrui@loongson.cn>
Cc: Huacai Chen <chenhuacai@loongson.cn>
Cc: WANG Xuerui <kernel@xen0n.name>
Cc: kvm@vger.kernel.org
Cc: loongarch@lists.linux.dev
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
---
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