linux-samsung-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-4.11-rc1/drivers/gpu/drm/exynos/exynos5433_drm_decon.c:681: suspicious mask ?
@ 2017-03-06 10:05 ` David Binderman
  2017-03-08  9:01   ` Andrzej Hajda
  2017-03-09  7:34   ` Inki Dae
  0 siblings, 2 replies; 4+ messages in thread
From: David Binderman @ 2017-03-06 10:05 UTC (permalink / raw)
  To: inki.dae, jy0922.shim, sw0312.kim, kyungmin.park, airlied, kgene,
	krzk, javier, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-kernel

Hello there,

linux-4.11-rc1/drivers/gpu/drm/exynos/exynos5433_drm_decon.c:681]: (warning) Result of operator '|' is always true if one operand is non-zero. Did you intend to use '&'?

Source code is

    if (ctx->out_type | I80_HW_TRG) {

Also in the same file:

[drivers/gpu/drm/exynos/exynos5433_drm_decon.c:131]: (style) Same expression on both sides of '|'.

Source code is

       writel(TRIGCON_TE_AUTO_MASK | TRIGCON_SWTRIGEN
               | TRIGCON_TE_AUTO_MASK | TRIGCON_SWTRIGEN,

Regards

David Binderman

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-4.11-rc1/drivers/gpu/drm/exynos/exynos5433_drm_decon.c:681: suspicious mask ?
  2017-03-06 10:05 ` linux-4.11-rc1/drivers/gpu/drm/exynos/exynos5433_drm_decon.c:681: suspicious mask ? David Binderman
@ 2017-03-08  9:01   ` Andrzej Hajda
  2017-03-09  7:34   ` Inki Dae
  1 sibling, 0 replies; 4+ messages in thread
From: Andrzej Hajda @ 2017-03-08  9:01 UTC (permalink / raw)
  To: David Binderman, inki.dae, jy0922.shim, sw0312.kim,
	kyungmin.park, airlied, kgene, krzk, javier, dri-devel,
	linux-arm-kernel, linux-samsung-soc, linux-kernel
  Cc: Dan Carpenter

Hi David, Inki,

Thanks for reporting.

On 06.03.2017 11:05, David Binderman wrote:
> Hello there,
>
> linux-4.11-rc1/drivers/gpu/drm/exynos/exynos5433_drm_decon.c:681]: (warning) Result of operator '|' is always true if one operand is non-zero. Did you intend to use '&'?
>
> Source code is
>
>     if (ctx->out_type | I80_HW_TRG) {
>
> Also in the same file:
>
> [drivers/gpu/drm/exynos/exynos5433_drm_decon.c:131]: (style) Same expression on both sides of '|'.
>
> Source code is
>
>        writel(TRIGCON_TE_AUTO_MASK | TRIGCON_SWTRIGEN
>                | TRIGCON_TE_AUTO_MASK | TRIGCON_SWTRIGEN,

This typo was already reported by:
- Ilia Mirkin, I have uploaded 2nd fixed version of the patch,
apparently the 1st version has been merged [1],
- Dan Carpenter, he posted also the fix[2],
- and now David.

I guess at the moment the best solution is to get Dan's patch.

[1]: https://patchwork.kernel.org/patch/9493177/
[2]: https://patchwork.kernel.org/patch/9571375/

Regards
Andrzej

>
> Regards
>
> David Binderman
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-4.11-rc1/drivers/gpu/drm/exynos/exynos5433_drm_decon.c:681: suspicious mask ?
  2017-03-06 10:05 ` linux-4.11-rc1/drivers/gpu/drm/exynos/exynos5433_drm_decon.c:681: suspicious mask ? David Binderman
  2017-03-08  9:01   ` Andrzej Hajda
@ 2017-03-09  7:34   ` Inki Dae
  2017-03-09  8:29     ` Andrzej Hajda
  1 sibling, 1 reply; 4+ messages in thread
From: Inki Dae @ 2017-03-09  7:34 UTC (permalink / raw)
  To: David Binderman, jy0922.shim, sw0312.kim, kyungmin.park, airlied,
	kgene, krzk, javier, dri-devel, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

Hello David,

Thanks for report.

2017년 03월 06일 19:05에 David Binderman 이(가) 쓴 글:
> Hello there,
> 
> linux-4.11-rc1/drivers/gpu/drm/exynos/exynos5433_drm_decon.c:681]: (warning) Result of operator '|' is always true if one operand is non-zero. Did you intend to use '&'?
> 

Right. this is known issue and below patch fixes this,
http://www.spinics.net/lists/dri-devel/msg132589.html

This patch will go to -fixes.

> Source code is
> 
>     if (ctx->out_type | I80_HW_TRG) {
> 
> Also in the same file:
> 
> [drivers/gpu/drm/exynos/exynos5433_drm_decon.c:131]: (style) Same expression on both sides of '|'.
> 
> Source code is
> 
>        writel(TRIGCON_TE_AUTO_MASK | TRIGCON_SWTRIGEN
>                | TRIGCON_TE_AUTO_MASK | TRIGCON_SWTRIGEN,

In this case, only problem is two flags are set in duplicate. This should be cleaned up. Thanks. :)

> 
> Regards
> 
> David Binderman
> 
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-4.11-rc1/drivers/gpu/drm/exynos/exynos5433_drm_decon.c:681: suspicious mask ?
  2017-03-09  7:34   ` Inki Dae
@ 2017-03-09  8:29     ` Andrzej Hajda
  0 siblings, 0 replies; 4+ messages in thread
From: Andrzej Hajda @ 2017-03-09  8:29 UTC (permalink / raw)
  To: Inki Dae, David Binderman, jy0922.shim, sw0312.kim,
	kyungmin.park, airlied, kgene, krzk, javier, dri-devel,
	linux-arm-kernel, linux-samsung-soc, linux-kernel

On 09.03.2017 08:34, Inki Dae wrote:
> Hello David,
>
> Thanks for report.
>
> 2017년 03월 06일 19:05에 David Binderman 이(가) 쓴 글:
>> Hello there,
>>
>> linux-4.11-rc1/drivers/gpu/drm/exynos/exynos5433_drm_decon.c:681]: (warning) Result of operator '|' is always true if one operand is non-zero. Did you intend to use '&'?
>>
> Right. this is known issue and below patch fixes this,
> http://www.spinics.net/lists/dri-devel/msg132589.html
>
> This patch will go to -fixes.
>
>> Source code is
>>
>>     if (ctx->out_type | I80_HW_TRG) {
>>
>> Also in the same file:
>>
>> [drivers/gpu/drm/exynos/exynos5433_drm_decon.c:131]: (style) Same expression on both sides of '|'.
>>
>> Source code is
>>
>>        writel(TRIGCON_TE_AUTO_MASK | TRIGCON_SWTRIGEN
>>                | TRIGCON_TE_AUTO_MASK | TRIGCON_SWTRIGEN,
> In this case, only problem is two flags are set in duplicate. This should be cleaned up. Thanks. :)

Wrong copy/paste removed two other flags and duplicated these above. It
did not hurt to much as it affects only software trigger which is not
used atm.
Fix sent yesterday [1].

[1]: http://www.spinics.net/lists/dri-devel/msg134877.html

Regards
Andrzej

>
>> Regards
>>
>> David Binderman
>>
>>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-09  8:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20170307005334epcas4p22a43a5c4e8348ec53d8b0fbc58cde358@epcas4p2.samsung.com>
2017-03-06 10:05 ` linux-4.11-rc1/drivers/gpu/drm/exynos/exynos5433_drm_decon.c:681: suspicious mask ? David Binderman
2017-03-08  9:01   ` Andrzej Hajda
2017-03-09  7:34   ` Inki Dae
2017-03-09  8:29     ` Andrzej Hajda

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).