From: Tony Lindgren <tony@atomide.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: linux-omap@vger.kernel.org
Subject: Re: [bug report] bus: ti-sysc: Implement display subsystem reset quirk
Date: Wed, 17 May 2023 09:54:08 +0300 [thread overview]
Message-ID: <20230517065408.GR14287@atomide.com> (raw)
In-Reply-To: <a8ec8a68-9c2c-4076-bf47-09fccce7659f@kili.mountain>
Hi,
* Dan Carpenter <dan.carpenter@linaro.org> [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
prev parent reply other threads:[~2023-05-17 6:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-15 8:28 [bug report] bus: ti-sysc: Implement display subsystem reset quirk Dan Carpenter
2023-05-17 6:54 ` Tony Lindgren [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=20230517065408.GR14287@atomide.com \
--to=tony@atomide.com \
--cc=dan.carpenter@linaro.org \
--cc=linux-omap@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).