Re: [bug report] drm/sun4i: Handle DRM_BUS_FLAG_PIXDATA_*EDGE checking if panel is used.

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

 



Hello Dan,

Il 11/10/2018 09:16, Dan Carpenter ha scritto:
This is an unreleased Smatch test because:
1) Some things return error pointers depending on the config.
2) Pointless IS_ERR() checks are quite common.

Look forward for new Smatch, very useful.

I haven't looked at the context to see how to fix this.  My guess is
that ->panel can't be NULL nor error pointer, so the check should be
removed.  But again, I haven't looked at the code.

Thanks for pointing as those 2 bugs are already fixed:
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=49c5c0769a919549d814de52f7aceaa1c86a3fc7
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=548ae867efb1741fa55cedb5e73d7d0e75acd1f2

Btw, when you're mixing error pointers and NULL then normally NULL is a
special kind of success...  Like maybe you want to enable some hardware
if it's there and the function returns error pointers if memory
allocations fail but NULL if the hardware isn't there and isn't
required.

Yes, what you've pointed me helped me a lot to understand it.

Thank you again.

Best regards
--
Giulio Benetti
CTO

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale € 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux