From patchwork Mon Feb 18 11:00:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 158585 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2346279jaa; Mon, 18 Feb 2019 03:00:58 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ/ZLWzKGxEURM/jJcfx1/7AF6zqrmKHkQSsT8bqmzF0Hd5wcf6lk3a70N+ws0wjcLeRRmo X-Received: by 2002:a63:c948:: with SMTP id y8mr18606379pgg.263.1550487658620; Mon, 18 Feb 2019 03:00:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550487658; cv=none; d=google.com; s=arc-20160816; b=wsszeLV0o1x9FgtzIaHZJu7nLwHsTi9Eb1xNHxVEXPcSbDsCuZHN6xce985HA4QbgG C6RRG88w7f8J5O32/oBw3NmptRhPZ3hXO74JiR5mxbeanJ2gh7BpJ5Y7x1aJR2TqpO49 zyhqxknJFz4G8cnn34FFZTgG4p+IORxNBIn0bdgqu0qWI45ahoaqw3xJdzsUShPO90Fi 0vZ/CHDED0a5MbZTGpQMnL+zOy7Lf2moHtXbd98tNGARb4MrcGu8vzkcDsMoz+GGbQ9v lKGL2Kz8BxhOlQ0UDPGp+bZO7P7ah6SEAgebnFf+yML/eYjLO88jQWOYWYVqGgbi6Twc XjdQ== 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=L+M4m7Q6d5WbVv4iV2+Qj1NKtADofA721rqptMpTGNQ=; b=FmfzT8q84yUh7b7OwqrZMmc4nHr1NiLJ3Ft7+6cj8FvSoes1uZxMURHosxSyeJ20hV 3HTBZQcCbE09xtYcwuVRskFo8LIXPxhANYhF/gLubuRyzGMS2AlyHanMT059eTe9/XB2 tFl4MfEey2MUmF+JSG2daPss4D+SiFu3xpfZEjs3mnyhceCd04oCT5RuEdQcWf9iwhT0 RsKoDW6wcnYHJCk7CGXtXYJMOVEADFaWfi2Znz9R4TG0V6WtGIyHgMa3jaFF3CISNeCl CqW0UN9WpGZEtkCiM16+Q29kcM4pnnBY079PliRmOzTo1XTq1FmLiSzCClA5aLrcKssp pNEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w4ePGW2E; 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 14si8387156pgl.360.2019.02.18.03.00.57; Mon, 18 Feb 2019 03:00:58 -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; dkim=pass header.i=@linaro.org header.s=google header.b=w4ePGW2E; 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 S1730465AbfBRLA4 (ORCPT + 32 others); Mon, 18 Feb 2019 06:00:56 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:35117 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729009AbfBRLAz (ORCPT ); Mon, 18 Feb 2019 06:00:55 -0500 Received: by mail-lf1-f68.google.com with SMTP id v7so11978506lfd.2 for ; Mon, 18 Feb 2019 03:00:54 -0800 (PST) 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=L+M4m7Q6d5WbVv4iV2+Qj1NKtADofA721rqptMpTGNQ=; b=w4ePGW2E2n+/9kZlF29uJmnec2v+5sC5znzIhsgTBJBsQGwPYv6QgmfwOxK5R+kIs+ DK+tfZ6IaMOPFsGYSLF+BfBVPL2Ur8vQfENrcgWCia/hnvtGXGAsQ2yTt2B67EQaoG3/ d4nPwkAwhCqD/wVbTVXmzhn4VZ7ut5WV8DTSztlLiByjI5oxUhNzItYBLqM77PSjcnQ6 +MB6hNq+s4ylEk7T6tOFTZMeTZ19Bdn6Q8DS36dACr6VKZa4cmZwTjfrQo7ZV+Qlk5S2 4LX3uAWPQ8ubCJKYjkhKNtNdwo9f7tSEjllWxWLHhG30shby/e9QXPRCC5f6bDm7EOQE /J1A== 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=L+M4m7Q6d5WbVv4iV2+Qj1NKtADofA721rqptMpTGNQ=; b=MWwuOstcWOQqK3bN3Iw8a9PyoPY3kEK0FEjrUBe2I/oIMVyUcj/MPNcLa4iwuZCFpc 1J8enorgNEEpF1YQhR+SxX4YfyaQzNuRDdfK0KXGeuU8jTl5NMeSt8irXrEv4gK+hJ2X jINacKik6deD+2UU4ew8wi/RUw8wOfRvkxx2rolxMKp2ZVpKrZahcovubcdCh19E1TKK nDP2dfiGd5Knb0rlRxyhEiyw4CmdJ9NltbEyMxhzZcHV8NHmQRiEU84bn/2opDUgUJaW i5nD0zosnPNLyoE+n15iOJc7OmEU2nWiDfEbxLTJfa9F6wGgeVHSdtAxB2/OluEoUgcC aqCA== X-Gm-Message-State: AHQUAuY6mEaXH3cYcYqrytBBqkgt2cJW+hhcpp9ksiHF0T/IBnVEVx/U T9ED88T/8sZ8ddxVlhmM/tEu4w== X-Received: by 2002:ac2:555d:: with SMTP id l29mr13280152lfk.38.1550487653418; Mon, 18 Feb 2019 03:00:53 -0800 (PST) Received: from localhost (c-573670d5.07-21-73746f28.bbcust.telenor.se. [213.112.54.87]) by smtp.gmail.com with ESMTPSA id y30sm3321340ljd.12.2019.02.18.03.00.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Feb 2019 03:00:52 -0800 (PST) From: Anders Roxell To: thierry.reding@gmail.com, airlied@linux.ie, daniel@ffwll.ch, jonathanh@nvidia.com Cc: dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, Anders Roxell Subject: [PATCH] drm/tegra: vic: fix implicit function declaration warning Date: Mon, 18 Feb 2019 12:00:50 +0100 Message-Id: <20190218110050.10589-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_IOMMU_API isn't set the following warnings pops up: drivers/gpu/drm/tegra/vic.c: In function ‘vic_boot’: drivers/gpu/drm/tegra/vic.c:110:31: error: implicit declaration of function ‘dev_iommu_fwspec_get’; did you mean ‘iommu_fwspec_free’? [-Werror=implicit-function-declaration] struct iommu_fwspec *spec = dev_iommu_fwspec_get(vic->dev); ^~~~~~~~~~~~~~~~~~~~ iommu_fwspec_free drivers/gpu/drm/tegra/vic.c:110:31: warning: initialization of ‘struct iommu_fwspec *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] drivers/gpu/drm/tegra/vic.c:117:19: error: ‘struct iommu_fwspec’ has no member named ‘num_ids’ if (spec && spec->num_ids > 0) { ^~ drivers/gpu/drm/tegra/vic.c:118:16: error: ‘struct iommu_fwspec’ has no member named ‘ids’ value = spec->ids[0] & 0xffff; ^~ Rework so that its inside a '#ifdef CONFIG_IOMMU_API' block. Fixes: f3779cb190a5 ("drm/tegra: vic: Support stream ID register programming") Signed-off-by: Anders Roxell --- drivers/gpu/drm/tegra/vic.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.19.2 diff --git a/drivers/gpu/drm/tegra/vic.c b/drivers/gpu/drm/tegra/vic.c index 39bfed9623de..982ce37ecde1 100644 --- a/drivers/gpu/drm/tegra/vic.c +++ b/drivers/gpu/drm/tegra/vic.c @@ -106,6 +106,7 @@ static int vic_boot(struct vic *vic) if (vic->booted) return 0; +#ifdef CONFIG_IOMMU_API if (vic->config->supports_sid) { struct iommu_fwspec *spec = dev_iommu_fwspec_get(vic->dev); u32 value; @@ -121,6 +122,7 @@ static int vic_boot(struct vic *vic) vic_writel(vic, value, VIC_THI_STREAMID1); } } +#endif /* setup clockgating registers */ vic_writel(vic, CG_IDLE_CG_DLY_CNT(4) |