drm: bridge: analogix/dp: Fix the possible dead lock in bridge disable time

Dan Carpenter dan.carpenter at oracle.com
Wed Apr 6 19:41:52 UTC 2016


Hello Yakir Yang,

The patch 7b4b7a8db439: "drm: bridge: analogix/dp: Fix the possible
dead lock in bridge disable time" from Feb 15, 2016, leads to the
following static checker warning:

	drivers/gpu/drm/bridge/analogix/analogix_dp_core.c:875 analogix_dp_irq_thread()
	warn: bitwise AND condition is false here

drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
   869  static irqreturn_t analogix_dp_irq_thread(int irq, void *arg)
   870  {
   871          struct analogix_dp_device *dp = arg;
   872          enum dp_irq_type irq_type;
   873  
   874          irq_type = analogix_dp_get_irq_type(dp);
   875          if (irq_type & DP_IRQ_TYPE_HP_CABLE_IN ||
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is never true.  Maybe test_bit() for these?

   876              irq_type & DP_IRQ_TYPE_HP_CABLE_OUT) {
   877                  dev_dbg(dp->dev, "Detected cable status changed!\n");
   878                  if (dp->drm_dev)
   879                          drm_helper_hpd_irq_event(dp->drm_dev);
   880          }
   881  
   882          if (irq_type != DP_IRQ_TYPE_UNKNOWN) {
   883                  analogix_dp_clear_hotplug_interrupts(dp);
   884                  analogix_dp_unmute_hpd_interrupt(dp);
   885          }
   886  
   887          return IRQ_HANDLED;
   888  }

regards,
dan carpenter


More information about the dri-devel mailing list