From patchwork Thu Apr 2 15:29:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Stach X-Patchwork-Id: 6149461 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5CB96BF4A6 for ; Thu, 2 Apr 2015 15:31:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 78572203AC for ; Thu, 2 Apr 2015 15:31:38 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 53E67203B4 for ; Thu, 2 Apr 2015 15:31:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 386396EAAD; Thu, 2 Apr 2015 08:31:03 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [92.198.50.35]) by gabe.freedesktop.org (Postfix) with ESMTP id D46286EA44 for ; Thu, 2 Apr 2015 08:30:56 -0700 (PDT) Received: from dude.hi.4.pengutronix.de ([10.1.0.7] helo=dude.pengutronix.de.) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1Ydh56-0005OD-4N; Thu, 02 Apr 2015 17:30:56 +0200 From: Lucas Stach To: dri-devel@lists.freedesktop.org Subject: [PATCH RFC 019/111] staging: etnaviv: fix sparse warnings Date: Thu, 2 Apr 2015 17:29:21 +0200 Message-Id: <1427988653-754-20-git-send-email-l.stach@pengutronix.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1427988653-754-1-git-send-email-l.stach@pengutronix.de> References: <1427988653-754-1-git-send-email-l.stach@pengutronix.de> X-SA-Exim-Connect-IP: 10.1.0.7 X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: dri-devel@lists.freedesktop.org Cc: Russell King , kernel@pengutronix.de X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Russell King .../etnaviv_gem_submit.c:72:37: warning: dereference of noderef expression .../etnaviv_gem_submit.c:364:37: warning: dereference of noderef expression .../etnaviv_gem_submit.c:423:58: warning: dereference of noderef expression .../etnaviv_iommu.c:139:13: warning: symbol 'etnaviv_iommu_iova_to_phys' was not declared. Should it be static? .../etnaviv_iommu.c:156:21: warning: symbol 'etnaviv_iommu_domain_alloc' was not declared. Should it be static? Signed-off-by: Russell King --- drivers/staging/etnaviv/etnaviv_iommu.c | 4 +++- drivers/staging/etnaviv/etnaviv_iommu.h | 1 + include/uapi/drm/etnaviv_drm.h | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/staging/etnaviv/etnaviv_iommu.c b/drivers/staging/etnaviv/etnaviv_iommu.c index d0811fb13363..5841a08f627f 100644 --- a/drivers/staging/etnaviv/etnaviv_iommu.c +++ b/drivers/staging/etnaviv/etnaviv_iommu.c @@ -22,6 +22,7 @@ #include #include "etnaviv_gpu.h" +#include "etnaviv_iommu.h" #include "state_hi.xml.h" #define PT_SIZE SZ_256K @@ -136,7 +137,8 @@ static size_t etnaviv_iommu_unmap(struct iommu_domain *domain, unsigned long iov return 0; } -phys_addr_t etnaviv_iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova) +static phys_addr_t etnaviv_iommu_iova_to_phys(struct iommu_domain *domain, + dma_addr_t iova) { struct etnaviv_iommu_domain *etnaviv_domain = domain->priv; diff --git a/drivers/staging/etnaviv/etnaviv_iommu.h b/drivers/staging/etnaviv/etnaviv_iommu.h index 3103ff3efcbe..c0c359d4f166 100644 --- a/drivers/staging/etnaviv/etnaviv_iommu.h +++ b/drivers/staging/etnaviv/etnaviv_iommu.h @@ -21,5 +21,6 @@ struct etnaviv_gpu; struct iommu_domain *etnaviv_iommu_domain_alloc(struct etnaviv_gpu *gpu); +struct iommu_domain *etnaviv_iommu_v2_domain_alloc(struct etnaviv_gpu *gpu); #endif /* __ETNAVIV_IOMMU_H__ */ diff --git a/include/uapi/drm/etnaviv_drm.h b/include/uapi/drm/etnaviv_drm.h index f7b5ac6f3842..a9f020ed71ea 100644 --- a/include/uapi/drm/etnaviv_drm.h +++ b/include/uapi/drm/etnaviv_drm.h @@ -154,7 +154,7 @@ struct drm_etnaviv_gem_submit_cmd { uint32_t size; /* in, cmdstream size */ uint32_t pad; uint32_t nr_relocs; /* in, number of submit_reloc's */ - uint64_t __user relocs; /* in, ptr to array of submit_reloc's */ + uint64_t relocs; /* in, ptr to array of submit_reloc's */ }; /* Each buffer referenced elsewhere in the cmdstream submit (ie. the @@ -185,8 +185,8 @@ struct drm_etnaviv_gem_submit { uint32_t fence; /* out */ uint32_t nr_bos; /* in, number of submit_bo's */ uint32_t nr_cmds; /* in, number of submit_cmd's */ - uint64_t __user bos; /* in, ptr to array of submit_bo's */ - uint64_t __user cmds; /* in, ptr to array of submit_cmd's */ + uint64_t bos; /* in, ptr to array of submit_bo's */ + uint64_t cmds; /* in, ptr to array of submit_cmd's */ }; /* The normal way to synchronize with the GPU is just to CPU_PREP on