From patchwork Tue Jun 4 04:43:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 165690 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp5347201ili; Mon, 3 Jun 2019 21:43:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqzFeoJ3HeBpZyxorsum6ftV7pzC7uYHU4+qQpQ8od0zAWW25Vk1wb0+2gGOaEmMtflH5lyq X-Received: by 2002:a65:6551:: with SMTP id a17mr30398255pgw.1.1559623431645; Mon, 03 Jun 2019 21:43:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559623431; cv=none; d=google.com; s=arc-20160816; b=nLGMVxbg2ZCNKzhD2IZANQ2Xx9H8zIOv44nx1wv1AGQR1qeIM86CnZe+l8mCp/vFfN YHF1JrKghr0+Sf9ceNS3m1ecF5rsPQtwvSYFuoPecW3Zq5U0DFgejiN4B8OxwwMaDZ8E acImhLZBk2XASPf9GgfUPMaNhRoJdInZk2/fkjJEW5VQoG24zxsjLOym81Hp0AmnT+Sh U+EOWowHNuKgICKWQZrq27r+wfxEg8Fi+LlU63uwaToVZkhOcKMbJvYCWBliw7iJ0In0 6jcm6psMMU9g3L8GjigvVyFpzkJayDYfZKKR8tjLueLbSGiksQVH7X3uxSKqVFbCQDFw gv2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=zkepnFRWjo+2i9EzIxBtZYocaRmAxYlop81Nj4rH8DI=; b=jv2g8J8YZ1HTjFplPglSB9zLoVfAja3mNpUR9Sr5N0sarj/z1KKgaZM4imBq4o+W7X Qqb+u/G5WwmrJTiW8xgdww5r8xodc9BCPIc17qKumu/NgQgBDiZIhuyyKcFbyUQCTUIv hwcPbRMETloHTov2+871Xi3CCBSo+GsDggXB6puY+A5zqmHcSm1Fwz2uyhFcvxEEUs6/ DcJ+fFL7mS9d3NeRVYRWdxFAlVY4K5vgJoggC45Tj8c4Eg8A4zeeaFYN97X/SDHjimnR FYt6JJVVkixrDVl5GhdNeqqhthg6HltMqrCFKb2SptZKV5iI3OuTHpifue3EQdlIEI+N nJ7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J8sz4rTe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3si21868512pgq.254.2019.06.03.21.43.51; Mon, 03 Jun 2019 21:43:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J8sz4rTe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726528AbfFDEns (ORCPT + 30 others); Tue, 4 Jun 2019 00:43:48 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:36595 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726136AbfFDEns (ORCPT ); Tue, 4 Jun 2019 00:43:48 -0400 Received: by mail-pg1-f194.google.com with SMTP id a3so2178858pgb.3 for ; Mon, 03 Jun 2019 21:43:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zkepnFRWjo+2i9EzIxBtZYocaRmAxYlop81Nj4rH8DI=; b=J8sz4rTevobviVKwm+dLsHY0zZAT9dT0y9oQKyafTlFYIXFXc0sZ/DS6ZSOiJpH4ci KWIWCxBwVCaPaC6geJvwYMf++4HvY7OTCHRLscuRijfmR+cSNydwyg5D7V0LxdI+LGJj VoIsuIUSlisSzGAnZPF1DUqV6SKLx89VTa4WQfp3wugLav54sY7mHjBqxF+0JGokf+x5 vAXrGc2v1k5D8fJriujqAgW3MBU+vh7xu/kdqnI+obXgP0yWUAbhuhkTIFIKQ3sLgrpa LHfdBBRDqAXOzJ4d5JHexjtnNKCmImiX9N+T5AaQoeIXuM7pSq+BGNA0pB/V9nTjcFod Ax6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zkepnFRWjo+2i9EzIxBtZYocaRmAxYlop81Nj4rH8DI=; b=N044i4gf734Y9q5wqLRmKz8T5ek4WOibCn80gZlG8snLGLDvvbBeuyoVCRSBhLBEq0 JOmXTABP8NuQHWNurn/6JUPImNONNW0prw8u7RdOFdkQv68nHze2ZJm2kRvCSPUGiPtC NhNGm7GFAEkjHOPdfS1pb2ygojyO8qACgsoiXYvrk+cVqOIw8n4SFclP7PA/BjnNY89O FvvCLvcsUd/xDp61h8po8Nfws+xBK2AgVBuvp6I77hrb+tC9RH5IZC07XYadpkMlfpvj v2btmIAPJYQKIb7FS6Nms2y54MVe8BgF9bVSNS25VwNyvGMFBQ5sXwS81PUND3QBW0fd OpHQ== X-Gm-Message-State: APjAAAXqYM9V0Av4TAuJ1NJAEQQ+4V8+xg/bW8FJ231VlB7Euocdu9Ez CFhMziD52Al++juxcKe2c4i1OA== X-Received: by 2002:a17:90a:ff03:: with SMTP id ce3mr34487977pjb.81.1559623427427; Mon, 03 Jun 2019 21:43:47 -0700 (PDT) Received: from localhost ([122.172.66.84]) by smtp.gmail.com with ESMTPSA id q17sm24195389pfq.74.2019.06.03.21.43.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Jun 2019 21:43:46 -0700 (PDT) From: Viresh Kumar To: Dave Martin , Marc Zyngier , James Morse , Julien Thierry , Suzuki K Pouloze , Catalin Marinas , Will Deacon Cc: Viresh Kumar , Vincent Guittot , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org Subject: [PATCH] KVM: arm64: Drop 'const' from argument of vq_present() Date: Tue, 4 Jun 2019 10:13:19 +0530 Message-Id: <699121e5c938c6f4b7b14a7e2648fa15af590a4a.1559623368.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.21.0.rc0.269.g1a574e7a288b MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We currently get following compilation warning: arch/arm64/kvm/guest.c: In function 'set_sve_vls': arch/arm64/kvm/guest.c:262:18: warning: passing argument 1 of 'vq_present' from incompatible pointer type arch/arm64/kvm/guest.c:212:13: note: expected 'const u64 (* const)[8]' but argument is of type 'u64 (*)[8]' The argument can't be const, as it is copied at runtime using copy_from_user(). Drop const from the prototype of vq_present(). Fixes: 9033bba4b535 ("KVM: arm64/sve: Add pseudo-register for the guest's vector lengths") Signed-off-by: Viresh Kumar --- arch/arm64/kvm/guest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.21.0.rc0.269.g1a574e7a288b diff --git a/arch/arm64/kvm/guest.c b/arch/arm64/kvm/guest.c index 3ae2f82fca46..78f5a4f45e0a 100644 --- a/arch/arm64/kvm/guest.c +++ b/arch/arm64/kvm/guest.c @@ -209,7 +209,7 @@ static int set_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) #define vq_mask(vq) ((u64)1 << ((vq) - SVE_VQ_MIN) % 64) static bool vq_present( - const u64 (*const vqs)[KVM_ARM64_SVE_VLS_WORDS], + u64 (*const vqs)[KVM_ARM64_SVE_VLS_WORDS], unsigned int vq) { return (*vqs)[vq_word(vq)] & vq_mask(vq);