From: Arnd Bergmann <arnd@arndb.de>
To: Xinliang Liu <z.liuxinliang@hisilicon.com>,
Rongrong Zou <zourongrong@gmail.com>,
David Airlie <airlied@linux.ie>
Cc: Arnd Bergmann <arnd@arndb.de>,
Xinwei Kong <kong.kongxinwei@hisilicon.com>,
Chen Feng <puck.chen@hisilicon.com>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
Sean Paul <seanpaul@chromium.org>, Jyri Sarha <jsarha@ti.com>,
Gabriel Krisman Bertazi <krisman@collabora.co.uk>,
Russell King <rmk+kernel@armlinux.org.uk>,
Rob Herring <robh@kernel.org>,
Thierry Reding <treding@nvidia.com>, Tom Gundersen <teg@jklm.no>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH] drm/hisilicon: fix build error without fbdev emulation
Date: Tue, 25 Jul 2017 17:33:25 +0200 [thread overview]
Message-ID: <20170725153403.121302-1-arnd@arndb.de> (raw)
We cannot reference priv->fbdev outside of the #ifdef:
drivers/net/virtio_net.c:1881:12: error: 'virtnet_restore_up' defined but not used [-Werror=unused-function]
static int virtnet_restore_up(struct virtio_device *vdev)
drivers/net/virtio_net.c:1859:13: error: 'virtnet_freeze_down' defined but not used [-Werror=unused-function]
static void virtnet_freeze_down(struct virtio_device *vdev)
Since the code is moved into the main probe function now, this
adds another #ifdef.
Fixes: b4dd9f1ffaba ("drm/hisilicon: Remove custom FB helper deferred setup")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
index 1178341c3858..d48102d1a7a4 100644
--- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
+++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
@@ -121,6 +121,7 @@ static int kirin_drm_kms_init(struct drm_device *dev)
/* init kms poll for handling hpd */
drm_kms_helper_poll_init(dev);
+#ifdef CONFIG_DRM_FBDEV_EMULATION
priv->fbdev = drm_fbdev_cma_init(dev, 32,
dev->mode_config.num_connector);
if (IS_ERR(priv->fbdev)) {
@@ -128,11 +129,13 @@ static int kirin_drm_kms_init(struct drm_device *dev)
ret = PTR_ERR(priv->fbdev);
goto err_cleanup_poll;
}
-
+#endif
return 0;
+#ifdef CONFIG_DRM_FBDEV_EMULATION
err_cleanup_poll:
drm_kms_helper_poll_fini(dev);
+#endif
err_unbind_all:
component_unbind_all(dev->dev, dev);
err_dc_cleanup:
--
2.9.0
next reply other threads:[~2017-07-25 15:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-25 15:33 Arnd Bergmann [this message]
2017-07-25 15:53 ` Daniel Vetter
2017-07-25 18:04 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170725153403.121302-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=airlied@linux.ie \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jsarha@ti.com \
--cc=kong.kongxinwei@hisilicon.com \
--cc=krisman@collabora.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=puck.chen@hisilicon.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=robh@kernel.org \
--cc=seanpaul@chromium.org \
--cc=teg@jklm.no \
--cc=treding@nvidia.com \
--cc=z.liuxinliang@hisilicon.com \
--cc=zourongrong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®