From patchwork Thu Apr 2 21:59:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 11471621 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3331917EA for ; Thu, 2 Apr 2020 21:59:44 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 19EA3208E0 for ; Thu, 2 Apr 2020 21:59:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 19EA3208E0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=chris-wilson.co.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0638C6E17D; Thu, 2 Apr 2020 21:59:40 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fireflyinternet.com (mail.fireflyinternet.com [109.228.58.192]) by gabe.freedesktop.org (Postfix) with ESMTPS id 015AD6E17D for ; Thu, 2 Apr 2020 21:59:37 +0000 (UTC) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from build.alporthouse.com (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 20781929-1500050 for multiple; Thu, 02 Apr 2020 22:59:26 +0100 From: Chris Wilson To: linux-kernel@vger.kernel.org Subject: [PATCH] drm/legacy: Fix type for drm_local_map.offset Date: Thu, 2 Apr 2020 22:59:26 +0100 Message-Id: <20200402215926.30714-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200402203317.GA34560@ubuntu-m2-xlarge-x86> References: <20200402203317.GA34560@ubuntu-m2-xlarge-x86> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linus Torvalds , Nathan Chancellor , dri-devel@lists.freedesktop.org, Chris Wilson Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" drm_local_map.offset is not only used for resource_size_t but also dma_addr_t which may be of different sizes. Reported-by: Nathan Chancellor Fixes: 8e4ff9b56957 ("drm: Remove the dma_alloc_coherent wrapper for internal usage") Signed-off-by: Chris Wilson Cc: Dave Airlie Cc: Nathan Chancellor Cc: Linus Torvalds Tested-by: Nathan Chancellor # build Reviewed-by: Daniel Vetter --- include/drm/drm_legacy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/drm_legacy.h b/include/drm/drm_legacy.h index dcef3598f49e..aed382c17b26 100644 --- a/include/drm/drm_legacy.h +++ b/include/drm/drm_legacy.h @@ -136,7 +136,7 @@ struct drm_sg_mem { * Kernel side of a mapping */ struct drm_local_map { - resource_size_t offset; /**< Requested physical address (0 for SAREA)*/ + dma_addr_t offset; /**< Requested physical address (0 for SAREA)*/ unsigned long size; /**< Requested physical size (bytes) */ enum drm_map_type type; /**< Type of memory to map */ enum drm_map_flags flags; /**< Flags */