All of lore.kernel.org
 help / color / mirror / Atom feed
From: Giulio Benetti <giulio.benetti@micronovasrl.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [bug report] drm/sun4i: Handle DRM_BUS_FLAG_PIXDATA_*EDGE checking if panel is used.
Date: Thu, 11 Oct 2018 23:36:19 +0200	[thread overview]
Message-ID: <34a0c29d-919b-8cbd-ed11-1c6a6857dcd1@micronovasrl.com> (raw)
In-Reply-To: <20181011071608.vjnpljudwoxtloz7@mwanda>

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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-10-11 21:36 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-01  9:36 [bug report] drm/sun4i: Handle DRM_BUS_FLAG_PIXDATA_*EDGE checking if panel is used Dan Carpenter
2018-10-02 13:26 ` Giulio Benetti
2018-10-02 14:12   ` Giulio Benetti
2018-10-02 20:40     ` Giulio Benetti
2018-10-11  7:16   ` Dan Carpenter
2018-10-11 21:36     ` Giulio Benetti [this message]
2018-10-02 20:48 ` [PATCH 1/2] drm/sun4i: tcon: fix check of tcon->panel null pointer Giulio Benetti
2018-10-02 20:48   ` Giulio Benetti
2018-10-02 20:49   ` [PATCH 2/2] drm/sun4i: tcon: prevent tcon->panel dereference if null Giulio Benetti
2018-10-02 20:49     ` Giulio Benetti
2018-10-02 21:59 ` [PATCH 1/2] drm/sun4i: tcon: fix check of tcon->panel null pointer Giulio Benetti
2018-10-02 21:59   ` Giulio Benetti
2018-10-02 21:59   ` Giulio Benetti
2018-10-02 21:59   ` [PATCH 2/2] drm/sun4i: tcon: prevent tcon->panel dereference if null Giulio Benetti
2018-10-02 21:59     ` Giulio Benetti
2018-10-03  7:34     ` Chen-Yu Tsai
2018-10-03  7:34       ` Chen-Yu Tsai
2018-10-02 22:00   ` [PATCH 1/2] drm/sun4i: tcon: fix check of tcon->panel null pointer Giulio Benetti
2018-10-02 22:00     ` Giulio Benetti
2018-10-02 22:00     ` Giulio Benetti
2018-10-03  9:43   ` Chen-Yu Tsai
2018-10-03  9:43     ` Chen-Yu Tsai
2018-10-03 12:13     ` Giulio Benetti
2018-10-03 12:13       ` Giulio Benetti
2018-10-03 14:24       ` [PATCH v2 " Giulio Benetti
2018-10-03 14:24         ` Giulio Benetti
2018-10-03 14:24         ` [PATCH v2 2/2] drm/sun4i: tcon: prevent tcon->panel dereference if null Giulio Benetti
2018-10-03 14:24           ` Giulio Benetti
2018-10-03 14:24           ` Giulio Benetti
2018-10-04 19:56           ` Maxime Ripard
2018-10-04 19:56             ` Maxime Ripard
2018-10-04 19:56             ` Maxime Ripard
2018-10-05 21:38             ` Giulio Benetti
2018-10-05 21:38               ` Giulio Benetti
2018-10-05 21:59             ` [PATCH v3 1/2] drm/sun4i: tcon: fix check of tcon->panel null pointer Giulio Benetti
2018-10-05 21:59               ` Giulio Benetti
2018-10-05 21:59               ` Giulio Benetti
2018-10-05 21:59               ` [PATCH v3 2/2] drm/sun4i: tcon: prevent tcon->panel dereference if NULL Giulio Benetti
2018-10-05 21:59                 ` Giulio Benetti
2018-10-08  9:21                 ` Maxime Ripard
2018-10-08  9:21                   ` Maxime Ripard
2018-10-12 10:03                   ` Chen-Yu Tsai
2018-10-12 10:03                     ` Chen-Yu Tsai
2018-11-05 13:23                   ` Icenowy Zheng
2018-11-05 13:23                     ` Icenowy Zheng
2018-11-06 15:57                     ` Maxime Ripard
2018-11-06 15:57                       ` Maxime Ripard
2018-10-04 19:54         ` [PATCH v2 1/2] drm/sun4i: tcon: fix check of tcon->panel null pointer Maxime Ripard
2018-10-04 19:54           ` Maxime Ripard
2018-10-04 19:54           ` Maxime Ripard

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=34a0c29d-919b-8cbd-ed11-1c6a6857dcd1@micronovasrl.com \
    --to=giulio.benetti@micronovasrl.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.