Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5045975imu; Wed, 19 Dec 2018 04:50:16 -0800 (PST) X-Google-Smtp-Source: AFSGD/X3H38R+yqI6fS571yp2hNKPUBcMT7otlqbRIFK9PR1c14vN0UkxDVrahisafGMRPfqgBqG X-Received: by 2002:a62:2702:: with SMTP id n2mr20871940pfn.29.1545223816774; Wed, 19 Dec 2018 04:50:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545223816; cv=none; d=google.com; s=arc-20160816; b=Ys2PhQAk1mBR07fAi5AIvaPdpWGVS0Eil5ZuOqlqKJpgOOV+tkpXgGdD/An5bU6Uoe 0fj/FdFxWsp/Dl0BuTRizY2RGd4jaYTD4z24oG7AKLZeKCayNdbYBrImDM3HFo8HQjoI cF6JZYC9K5/Ac5c2NuAf6PRIkgq6vZXdE2pqdBtg3E/WqECeja7gb0ELJZmgWzraEP6J 9hfakKSlBENHLqNpocNRUsuUOuGVsPpZ2nx7nzZr00BTDXVlSgJoWcxlEIQjqalA+LDG 2zq2d1TWRGSbUZMja8x8FnZez0K+y6Q4Z/2mRnK8sUyy1N/Wfha/9OFZ5KqJAreY5e/F pNTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=vBUW3M3No/JfnV99guKaxxX4PVe9qle7PMGiGJZIpY8=; b=nPePKsr6grI7jmerfgEVZwgxEIaro+qqHcvIzegOcXw+dKJbiPhtk637OSYFnju7Rq KwlTXh9dKS61Pk2w8kV/5rdIxBF4e0EkLgomyyDrxhyf+2HzBYpG0PPMMV8lwXbsxZjc 4u1hptUu+09yhc0WVb28EgGvL1Ae1Kke/zIRVdNd3o+mY6aA6xuK535MspVEnNGJCDrk +uvGW3bi4BAJCDo8GArfSVRWz0tU76OD2SU0RU9fJW0w4inXEPg2hTklXWVB+8y4W4pp jDRw1YtpWNj/1TmEm+A7oDopVivOKhQSzOnzuHDwY5TE4NFYRZKBETHKiMQh/AT4pnDH tEAw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n67si16286301pfk.34.2018.12.19.04.50.01; Wed, 19 Dec 2018 04:50:16 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729468AbeLSLvm (ORCPT + 99 others); Wed, 19 Dec 2018 06:51:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:65036 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729431AbeLSLve (ORCPT ); Wed, 19 Dec 2018 06:51:34 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6F1FA58E49; Wed, 19 Dec 2018 11:51:33 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-174.ams2.redhat.com [10.36.117.174]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0AFE45D6A9; Wed, 19 Dec 2018 11:51:33 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 4BD794CC90; Wed, 19 Dec 2018 12:51:29 +0100 (CET) From: Gerd Hoffmann To: dri-devel@lists.freedesktop.org, David Airlie Cc: Gerd Hoffmann , David Airlie , virtualization@lists.linux-foundation.org (open list:DRM DRIVER FOR BOCHS VIRTUAL GPU), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 10/14] drm/bochs: drop unused gpu_addr arg from bochs_bo_pin() Date: Wed, 19 Dec 2018 12:51:23 +0100 Message-Id: <20181219115127.31359-11-kraxel@redhat.com> In-Reply-To: <20181219115127.31359-1-kraxel@redhat.com> References: <20181219115127.31359-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 19 Dec 2018 11:51:33 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It's always NULL, so just remove it. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs.h | 2 +- drivers/gpu/drm/bochs/bochs_fbdev.c | 2 +- drivers/gpu/drm/bochs/bochs_kms.c | 2 +- drivers/gpu/drm/bochs/bochs_mm.c | 11 +---------- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/bochs/bochs.h b/drivers/gpu/drm/bochs/bochs.h index 4dc1b6384e..d0d474e06f 100644 --- a/drivers/gpu/drm/bochs/bochs.h +++ b/drivers/gpu/drm/bochs/bochs.h @@ -142,7 +142,7 @@ int bochs_dumb_create(struct drm_file *file, struct drm_device *dev, int bochs_dumb_mmap_offset(struct drm_file *file, struct drm_device *dev, uint32_t handle, uint64_t *offset); -int bochs_bo_pin(struct bochs_bo *bo, u32 pl_flag, u64 *gpu_addr); +int bochs_bo_pin(struct bochs_bo *bo, u32 pl_flag); int bochs_bo_unpin(struct bochs_bo *bo); /* bochs_kms.c */ diff --git a/drivers/gpu/drm/bochs/bochs_fbdev.c b/drivers/gpu/drm/bochs/bochs_fbdev.c index d9f3d42999..92feb817ff 100644 --- a/drivers/gpu/drm/bochs/bochs_fbdev.c +++ b/drivers/gpu/drm/bochs/bochs_fbdev.c @@ -81,7 +81,7 @@ static int bochsfb_create(struct drm_fb_helper *helper, if (ret) return ret; - ret = bochs_bo_pin(bo, TTM_PL_FLAG_VRAM, NULL); + ret = bochs_bo_pin(bo, TTM_PL_FLAG_VRAM); if (ret) { DRM_ERROR("failed to pin fbcon\n"); ttm_bo_unreserve(&bo->bo); diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c index 85dd268fa1..a1a0129f3e 100644 --- a/drivers/gpu/drm/bochs/bochs_kms.c +++ b/drivers/gpu/drm/bochs/bochs_kms.c @@ -96,7 +96,7 @@ static int bochs_plane_prepare_fb(struct drm_plane *plane, if (!new_state->fb) return 0; bo = gem_to_bochs_bo(new_state->fb->obj[0]); - return bochs_bo_pin(bo, TTM_PL_FLAG_VRAM, NULL); + return bochs_bo_pin(bo, TTM_PL_FLAG_VRAM); } static void bochs_plane_cleanup_fb(struct drm_plane *plane, diff --git a/drivers/gpu/drm/bochs/bochs_mm.c b/drivers/gpu/drm/bochs/bochs_mm.c index 0980411e41..5a0e092847 100644 --- a/drivers/gpu/drm/bochs/bochs_mm.c +++ b/drivers/gpu/drm/bochs/bochs_mm.c @@ -210,20 +210,13 @@ static void bochs_ttm_placement(struct bochs_bo *bo, int domain) bo->placement.num_busy_placement = c; } -static inline u64 bochs_bo_gpu_offset(struct bochs_bo *bo) -{ - return bo->bo.offset; -} - -int bochs_bo_pin(struct bochs_bo *bo, u32 pl_flag, u64 *gpu_addr) +int bochs_bo_pin(struct bochs_bo *bo, u32 pl_flag) { struct ttm_operation_ctx ctx = { false, false }; int i, ret; if (bo->pin_count) { bo->pin_count++; - if (gpu_addr) - *gpu_addr = bochs_bo_gpu_offset(bo); return 0; } @@ -235,8 +228,6 @@ int bochs_bo_pin(struct bochs_bo *bo, u32 pl_flag, u64 *gpu_addr) return ret; bo->pin_count = 1; - if (gpu_addr) - *gpu_addr = bochs_bo_gpu_offset(bo); return 0; } -- 2.9.3