Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2662301lqp; Mon, 25 Mar 2024 06:04:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX5Yc/mdH7/AS/9kf0+1noTacm55jT/bmKLDE354NO1Xl/eeE/uNijUWAdjVaBrD/MohwVR+VIKqeaEmIGSlUENbiME9AOjmnQTnCPu1g== X-Google-Smtp-Source: AGHT+IH6DcrjRVNQioDNmAJGSa9hbexKxfAc5eC4q3LmElnlw58WzeJ8PhbvmVC/HiNnPcj72Gg9 X-Received: by 2002:a19:911e:0:b0:513:d46d:9300 with SMTP id t30-20020a19911e000000b00513d46d9300mr4214874lfd.53.1711371888548; Mon, 25 Mar 2024 06:04:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711371888; cv=pass; d=google.com; s=arc-20160816; b=F8oYOEboMqJoTNijxBjBIG28HuyaR7Ss1HsDSwe8EWohra3pX+uGIOvvlIF+Rqbcpw O62jcx+em4IP1h2huQDnhLe6v8MXZRPri+q7mz97LzOtatnxbx9YcVAoOqozoEiHvTmA fY7afK4fjKLMqxpRZEW2GFGw58uJ6MGseruEDjQ5DJ6Na1111DZluP1lJF2WMAoogUz3 iedVhH16n6bpwTQ++do2BMcMYgvWtLCeKiG6e/oYRqrNX83r22JhL+RPlkTjED29vK4I WNbJjhO+0PY3qsfIfxXWjI17qOt9uo9ENC+OuySRps169s08SGSyr/TNUX1mBbq4DApu tlZg== ARC-Message-Signature: i=2; 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; bh=Qh1Rw5b7dYul0XzG+PAmQcSk3LfANqJ+xFtn4k5EgQk=; fh=swW/1SD4lCoe7aFJx2BOKuPFcOAnl6ChVHIMjsMLMbc=; b=WZJl/gpPlPGa57HkEuJIyOXword8gMtzfjOUoN/w7D37M/aBfGyPHCob56cspOABF1 Z2je4wT9WY+1BYnaHnJGXpF+Py/PmAuzwY84W7T61N1CzatRl+rp08e68DP9Sct+Yo2Z BbQgfHcskCMiaCNSDgmwdTTWYn7A7z2gD+wuLkSiBp3ZdSzLBw98+URsUKx4W29iAZgF M8ddmuaBTL0ZDtbKOBBr0PHGZkdUweh8ogu2MRAb30iaN1+pn4pMQMM8R0Cim7m32wP8 YtFLbrMJaoU10CW3xdmOaYIiGh3PML8mOc1fAmwdiGNzU/758au1x36tAH0SwoQa281b JThA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=nfschina.com); spf=pass (google.com: domain of linux-kernel+bounces-116572-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116572-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g13-20020a056402090d00b00568b49bb9c7si2526188edz.343.2024.03.25.06.04.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 06:04:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-116572-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=nfschina.com); spf=pass (google.com: domain of linux-kernel+bounces-116572-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116572-linux.lists.archive=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 431391F3AF52 for ; Mon, 25 Mar 2024 13:04:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D4D713D248; Mon, 25 Mar 2024 08:47:13 +0000 (UTC) Received: from mail.nfschina.com (unknown [42.101.60.195]) by smtp.subspace.kernel.org (Postfix) with SMTP id 23457157475; Mon, 25 Mar 2024 06:32:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=42.101.60.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711348383; cv=none; b=M1WzJHQ1QONwKU/S1bFkgDrCXU+K1D9SjHUKAiziFkJNcJSeNXJLPz5iH1+PQweShRsUJ00LfXK4mgKjm//1rFggFf9Lks2EvoYpQb3QT9iNVGdjjhMpnLvHdaXDwuNVVOWlqK8c9K8QYkjG9kIJIYkpoQY2fEsW/YG/zEVLXIQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711348383; c=relaxed/simple; bh=OckePRxIwMwlzlvfeeZnYH2Mn9sWTcwL/alzK8BGPnc=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=U9CuX7hQ/cCA4nMGXlgq0PrRvGoOl9Tqm1Njbl8OD+1qNd9V7EWVSe4F0kp4U3fawwK0ocVcLz4iS4jN2WDmmgnLcyZ+wMK8K675QZMYRVFjpUGVnbo0s+471Yr938yze6hlvkE+AIUOj9IkGMaCRg8Evf/IICPBHM2MmREB/Uo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com; spf=pass smtp.mailfrom=nfschina.com; arc=none smtp.client-ip=42.101.60.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nfschina.com Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPSA id E650A6029A552; Mon, 25 Mar 2024 14:32:37 +0800 (CST) X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui To: Felix.Kuehling@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch Cc: Su Hui , Philip.Yang@amd.com, alex.sierra@amd.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] drm/amdkfd: return negative error code in svm_ioctl() Date: Mon, 25 Mar 2024 14:31:49 +0800 Message-Id: <20240325063148.3950639-1-suhui@nfschina.com> X-Mailer: git-send-email 2.30.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit svm_ioctl() should return negative error code in default case. Fixes: 42de677f7999 ("drm/amdkfd: register svm range") Signed-off-by: Su Hui --- Ps: When I try to compile this file, there is a error : drivers/gpu/drm/amd/amdkfd/kfd_migrate.c:28:10: fatal error: amdgpu_sync.h: No such file or directory. Maybe there are some steps I missed or this place need to be corrected? drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c index f0f7f48af413..41c376f3fd27 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c @@ -4147,7 +4147,7 @@ svm_ioctl(struct kfd_process *p, enum kfd_ioctl_svm_op op, uint64_t start, r = svm_range_get_attr(p, mm, start, size, nattrs, attrs); break; default: - r = EINVAL; + r = -EINVAL; break; } -- 2.30.2