Re: [bug report] bus: ti-sysc: Implement display subsystem reset quirk

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

 



Hi,

* Dan Carpenter <dan.carpenter@xxxxxxxxxx> [230515 08:28]:
> Hello Tony Lindgren,
> 
> The patch 7324a7a0d5e2: "bus: ti-sysc: Implement display subsystem
> reset quirk" from Feb 24, 2020, leads to the following Smatch static
> checker warning:
> 
> 	drivers/bus/ti-sysc.c:1806 sysc_quirk_dispc()
> 	warn: masking a bool
> 
> drivers/bus/ti-sysc.c
>     1756 static u32 sysc_quirk_dispc(struct sysc *ddata, int dispc_offset,
>     1757                             bool disable)
>     1758 {
...
>     1794         /* DISP_CONTROL */
>     1795         val = sysc_read(ddata, dispc_offset + 0x40);
>     1796         lcd_en = val & lcd_en_mask;
>     1797         digit_en = val & digit_en_mask;
>     1798         if (lcd_en)
>     1799                 irq_mask |= BIT(0);                        /* FRAMEDONE */
>     1800         if (digit_en) {
>     1801                 if (framedonetv_irq)
>     1802                         irq_mask |= BIT(24);                /* FRAMEDONETV */
>     1803                 else
>     1804                         irq_mask |= BIT(2) | BIT(3);        /* EVSYNC bits */
>     1805         }
> --> 1806         if (disable & (lcd_en | digit_en))
> 
> digit_en is BIT(1) so this mask doesn't make sense.  Probably logical
> && and || were intended or && and |?

Thanks for the report, the idea is to reset before disable if lcd or
digit was enabled, so yeah should be if (disable && (lcd_en || digit_en))
since they're bool and not masks. I'll check and add a comment too.

Regards,

Tony



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux