Skip to contentSkip to conversation

drm: Check in setcrtc if the primary plane supports the fb pixel format

DISCUSSION Dan Carpenter 2 participants 2 messages Mar 10, 2015 – Mar 11, 2015

lore
Share & tools
lore
#0 lore raw

Hello Laurent Pinchart,

The patch eca93e28c256: "drm: Check in setcrtc if the primary plane supports the fb pixel format" from Mar 9, 2015, leads to the following static checker warning:

drivers/gpu/drm/drm_plane_helper.c:360 create_primary_plane()
info: ignoring unreachable code.

drivers/gpu/drm/drm_plane_helper.c
347 static struct drm_plane *create_primary_plane(struct drm_device *dev) 348 {
349 struct drm_plane *primary;
350 int ret;
351
352 primary = kzalloc(sizeof(*primary), GFP_KERNEL);
353 if (primary == NULL) {
354 DRM_DEBUG_KMS("Failed to allocate primary plane\n");

   355                  return NULL;
                        ^^^^^^^^^^^^
   356                  /*
   357                   * Remove the format_default field from drm_plane when dropping
   358                   * this helper.
   359                   */

360 primary->format_default = true;
361 }

regards,
dan carpenter
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

Hi Dan,

(CC'ing Daniel Vetter)

Quoted 20 lines · On Tuesday 10 March 2015 23:30:45 Dan Carpenter wrote:

Hello Laurent Pinchart,

The patch eca93e28c256: "drm: Check in setcrtc if the primary plane supports the fb pixel format" from Mar 9, 2015, leads to the following static checker warning:

drivers/gpu/drm/drm_plane_helper.c:360 create_primary_plane()
info: ignoring unreachable code.

drivers/gpu/drm/drm_plane_helper.c
347 static struct drm_plane *create_primary_plane(struct drm_device

*dev) 348  {
   349          struct drm_plane *primary;
   350          int ret;
   351
   352          primary = kzalloc(sizeof(*primary), GFP_KERNEL);
   353          if (primary == NULL) {
   354                  DRM_DEBUG_KMS("Failed to allocate primary plane\n");
355                  return NULL;
                        ^^^^^^^^^^^^
Quoted 6 lines

356 /*
357 * Remove the format_default field from drm_plane
when dropping 358 * this helper.
359 */

   360                  primary->format_default = true;
   361          }

This looks like a failed conflict resolution. Daniel ?

Signature · 8 lines
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel