All of lore.kernel.org
 help / color / mirror / Atom feed
From: Seung-Woo Kim <sw0312.kim@samsung.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>,
	YoungJun Cho <yj44.cho@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 2/3] drm: move edid null check to the first part of drm_edid_block_valid
Date: Tue, 02 Jul 2013 08:54:56 +0900	[thread overview]
Message-ID: <51D216D0.1020503@samsung.com> (raw)
In-Reply-To: <CAKMK7uF0S3owditi_7X40tc10ya6qsxQdC1iOoAkw4ujrwz9+A@mail.gmail.com>

Hi Daniel,

On 2013년 07월 01일 23:56, Daniel Vetter wrote:
> On Mon, Jul 1, 2013 at 12:21 PM, Chris Wilson <chris@chris-wilson.co.uk> wrote:
>> On Mon, Jul 01, 2013 at 07:06:32PM +0900, Seung-Woo Kim wrote:
>>> If raw_edid is null, it will crash, so checking in bad label is
>>> meaningless.
>>
>> It would be an error on part of the caller, but the defense looks sane.
>> As the function is a bool, I would have preferred it returned
>> true/false, but your patch is correct wrt to the rest of the function.
> 
> If we consider passing a NULL raw_edid here a caller-error, shouldn't
> this be a WARN on top? And I concur on the s/0/false/ bikeshed, return
> 0 could be misleading since for errno returning functions that reads
> as success.

Yes, you are right. WARN_ON() is better because there was no crash until
now. and I will also update all return values as false/true instead of 0/1.

> -Daniel
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
> 

-- 
Seung-Woo Kim
Samsung Software R&D Center
--

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

  reply	other threads:[~2013-07-01 23:54 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-01 10:06 [PATCH 0/3] drm: minor cleanups Seung-Woo Kim
2013-07-01 10:06 ` [PATCH 1/3] drm: fix print format of sequence in trace point Seung-Woo Kim
2013-07-01 10:23   ` Chris Wilson
2013-07-01 10:28     ` Seung-Woo Kim
2013-07-01 10:34       ` Chris Wilson
2013-07-01 10:44         ` [PATCH v2 " Seung-Woo Kim
2013-07-01 10:49           ` Chris Wilson
2013-07-01 10:06 ` [PATCH 2/3] drm: move edid null check to the first part of drm_edid_block_valid Seung-Woo Kim
2013-07-01 10:21   ` Chris Wilson
2013-07-01 14:56     ` Daniel Vetter
2013-07-01 23:54       ` Seung-Woo Kim [this message]
2013-07-02  0:11       ` [PATCH v3 3/3] drm: fix error routines in drm_open_helper Seung-Woo Kim
2013-07-02  0:52       ` [PATCH v2 2/3] drm: add assertion for checking null edid to drm_edid_block_valid Seung-Woo Kim
2013-07-02  8:29         ` Ville Syrjälä
2013-07-02  8:47           ` Seung-Woo Kim
2013-07-02  8:57           ` [PATCH v3 " Seung-Woo Kim
2013-07-02 11:22             ` Chris Wilson
2013-07-02 11:20         ` [PATCH v2 " Chris Wilson
2013-07-01 10:06 ` [PATCH 3/3] drm: fix error routines in drm_open_helper Seung-Woo Kim
2013-07-01 10:18   ` Chris Wilson
2013-07-01 10:49     ` [PATCH v2 " Seung-Woo Kim
2013-07-01 10:57       ` Chris Wilson
2013-07-01 11:14         ` Seung-Woo Kim
2013-07-01 11:52           ` Chris Wilson
2013-07-01 12:02             ` YoungJun Cho
2013-07-02  0:53             ` [PATCH v4 " Seung-Woo Kim
2013-07-02 11:19               ` Chris Wilson

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=51D216D0.1020503@samsung.com \
    --to=sw0312.kim@samsung.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kyungmin.park@samsung.com \
    --cc=yj44.cho@samsung.com \
    /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.