Re: [PATCH] drm/arcpgu: remove drm_encoder_slave

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Daniel,

I love your patch! Yet something to improve:

[auto build test ERROR on drm/drm-next]
[also build test ERROR 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
config: x86_64-randconfig-x008-201802 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   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 [-Werror=incompatible-pointer-types]
     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 *encoder);
         ^~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/drm_encoder_cleanup +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@xxxxxxxxxxxx>
:::::: CC: Alexey Brodkin <abrodkin@xxxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux