From: kbuild test robot <lkp@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
Alexey Brodkin <abrodkin@synopsys.com>,
kbuild-all@01.org,
DRI Development <dri-devel@lists.freedesktop.org>,
Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH] drm/arcpgu: remove drm_encoder_slave
Date: Sat, 20 Jan 2018 12:17:23 +0800 [thread overview]
Message-ID: <201801201220.dutJnh6N%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180117134347.27582-1-daniel.vetter@ffwll.ch>
Hi Daniel,
I love your patch! Perhaps something to improve:
[auto build test WARNING on drm/drm-next]
[also build test WARNING on v4.15-rc8 next-20180119]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Daniel-Vetter/drm-arcpgu-remove-drm_encoder_slave/20180120-085901
base: git://people.freedesktop.org/~airlied/linux.git drm-next
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/arc/arcpgu_sim.c:116:30: sparse: incorrect type in argument 1 (different base types) @@ expected struct drm_encoder @@ got strustruct drm_encoder @@
drivers/gpu/drm/arc/arcpgu_sim.c:116:30: expected struct drm_encoder
drivers/gpu/drm/arc/arcpgu_sim.c:116:30: got struct drm_mode_object
drivers/gpu/drm/arc/arcpgu_sim.c: In function 'arcpgu_drm_sim_init':
drivers/gpu/drm/arc/arcpgu_sim.c:116:22: error: passing argument 1 of 'drm_encoder_cleanup' from incompatible pointer type
drm_encoder_cleanup(&encoder->base);
^
In file included from include/drm/drm_modeset_helper_vtables.h:33:0,
from include/drm/drm_crtc_helper.h:43,
from drivers/gpu/drm/arc/arcpgu_sim.c:17:
include/drm/drm_encoder.h:232:6: note: expected 'struct drm_encoder but argument is of type 'struct drm_mode_object
void drm_encoder_cleanup(struct drm_encoder
^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +116 drivers/gpu/drm/arc/arcpgu_sim.c
a189d28e Ruud Derwig 2016-06-06 66
a189d28e Ruud Derwig 2016-06-06 67 int arcpgu_drm_sim_init(struct drm_device *drm, struct device_node *np)
a189d28e Ruud Derwig 2016-06-06 68 {
a189d28e Ruud Derwig 2016-06-06 69 struct arcpgu_drm_connector *arcpgu_connector;
70fbd4a0 Daniel Vetter 2018-01-17 70 struct drm_encoder *encoder;
a189d28e Ruud Derwig 2016-06-06 71 struct drm_connector *connector;
a189d28e Ruud Derwig 2016-06-06 72 int ret;
a189d28e Ruud Derwig 2016-06-06 73
a189d28e Ruud Derwig 2016-06-06 74 encoder = devm_kzalloc(drm->dev, sizeof(*encoder), GFP_KERNEL);
a189d28e Ruud Derwig 2016-06-06 75 if (encoder == NULL)
a189d28e Ruud Derwig 2016-06-06 76 return -ENOMEM;
a189d28e Ruud Derwig 2016-06-06 77
70fbd4a0 Daniel Vetter 2018-01-17 78 encoder->possible_crtcs = 1;
70fbd4a0 Daniel Vetter 2018-01-17 79 encoder->possible_clones = 0;
a189d28e Ruud Derwig 2016-06-06 80
70fbd4a0 Daniel Vetter 2018-01-17 81 ret = drm_encoder_init(drm, encoder, &arcpgu_drm_encoder_funcs,
a189d28e Ruud Derwig 2016-06-06 82 DRM_MODE_ENCODER_VIRTUAL, NULL);
a189d28e Ruud Derwig 2016-06-06 83 if (ret)
a189d28e Ruud Derwig 2016-06-06 84 return ret;
a189d28e Ruud Derwig 2016-06-06 85
a189d28e Ruud Derwig 2016-06-06 86 arcpgu_connector = devm_kzalloc(drm->dev, sizeof(*arcpgu_connector),
a189d28e Ruud Derwig 2016-06-06 87 GFP_KERNEL);
a189d28e Ruud Derwig 2016-06-06 88 if (!arcpgu_connector) {
a189d28e Ruud Derwig 2016-06-06 89 ret = -ENOMEM;
a189d28e Ruud Derwig 2016-06-06 90 goto error_encoder_cleanup;
a189d28e Ruud Derwig 2016-06-06 91 }
a189d28e Ruud Derwig 2016-06-06 92
a189d28e Ruud Derwig 2016-06-06 93 connector = &arcpgu_connector->connector;
a189d28e Ruud Derwig 2016-06-06 94 drm_connector_helper_add(connector, &arcpgu_drm_connector_helper_funcs);
a189d28e Ruud Derwig 2016-06-06 95
a189d28e Ruud Derwig 2016-06-06 96 ret = drm_connector_init(drm, connector, &arcpgu_drm_connector_funcs,
a189d28e Ruud Derwig 2016-06-06 97 DRM_MODE_CONNECTOR_VIRTUAL);
a189d28e Ruud Derwig 2016-06-06 98 if (ret < 0) {
a189d28e Ruud Derwig 2016-06-06 99 dev_err(drm->dev, "failed to initialize drm connector\n");
a189d28e Ruud Derwig 2016-06-06 100 goto error_encoder_cleanup;
a189d28e Ruud Derwig 2016-06-06 101 }
a189d28e Ruud Derwig 2016-06-06 102
70fbd4a0 Daniel Vetter 2018-01-17 103 ret = drm_mode_connector_attach_encoder(connector, encoder);
a189d28e Ruud Derwig 2016-06-06 104 if (ret < 0) {
a189d28e Ruud Derwig 2016-06-06 105 dev_err(drm->dev, "could not attach connector to encoder\n");
a189d28e Ruud Derwig 2016-06-06 106 drm_connector_unregister(connector);
a189d28e Ruud Derwig 2016-06-06 107 goto error_connector_cleanup;
a189d28e Ruud Derwig 2016-06-06 108 }
a189d28e Ruud Derwig 2016-06-06 109
a189d28e Ruud Derwig 2016-06-06 110 return 0;
a189d28e Ruud Derwig 2016-06-06 111
a189d28e Ruud Derwig 2016-06-06 112 error_connector_cleanup:
a189d28e Ruud Derwig 2016-06-06 113 drm_connector_cleanup(connector);
a189d28e Ruud Derwig 2016-06-06 114
a189d28e Ruud Derwig 2016-06-06 115 error_encoder_cleanup:
a189d28e Ruud Derwig 2016-06-06 @116 drm_encoder_cleanup(&encoder->base);
:::::: The code at line 116 was first introduced by commit
:::::: a189d28e5edea70f20995547ddc84c79b2f76c03 drm/arcpgu: Make ARC PGU usable on simulation platforms
:::::: TO: Ruud Derwig <rderwig@synopsys.com>
:::::: CC: Alexey Brodkin <abrodkin@synopsys.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2018-01-20 4:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-17 13:43 [PATCH] drm/arcpgu: remove drm_encoder_slave Daniel Vetter
2018-01-17 13:53 ` Daniel Vetter
2018-01-17 14:02 ` Laurent Pinchart
2018-01-17 13:55 ` Alexey Brodkin
2018-01-17 14:03 ` Daniel Vetter
2018-01-17 14:17 ` Daniel Vetter
2018-01-30 9:15 ` Daniel Vetter
2018-01-30 16:44 ` Alexey Brodkin
2018-01-30 17:07 ` Daniel Vetter
2018-01-30 19:06 ` Alexey Brodkin
2018-01-20 1:59 ` kbuild test robot
2018-01-20 4:17 ` kbuild test robot [this message]
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=201801201220.dutJnh6N%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=abrodkin@synopsys.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kbuild-all@01.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.