All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	intel-gfx@lists.freedesktop.org,
	Lucas De Marchi <lucas.demarchi@intel.com>
Subject: Re: [PATCH v2] drm/i915: Reword warning for missing cases
Date: Tue, 27 Mar 2018 10:37:49 -0700	[thread overview]
Message-ID: <20180327173749.GE5909@intel.com> (raw)
In-Reply-To: <152149569242.3594.1027925971971169044@mail.alporthouse.com>

On Mon, Mar 19, 2018 at 09:41:32PM +0000, Chris Wilson wrote:
> Quoting Lucas De Marchi (2018-03-19 17:37:20)
> > In some places we end up converting switch statements to a series of
> > if/else, particularly when introducing helper functions to handle a
> > group of cases. It's tempting to either leave a wrong warning (since now
> > we don't have a switch case anymore) or to convert to WARN(1, ...),
> > but we can just provide a better message and avoid the doubt when such
> > conversions arrise.
> > 
> > Introducing a warning inside i915_driver_load() just for tests we get:
> > 
> > [ 4535.233717] Missing case (ret == 0)
> > [ 4535.233868] WARNING: CPU: 1 PID: 795 at drivers/gpu/drm/i915/i915_drv.c:1341 i915_driver_load+0x42/0x10e0 [i915]
> > 
> > which is clear enough.
> > 
> > v2: remove __func__ since this is already on the warning.
> > 
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> > Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

pushed to dinq. thanks for patch and reviews.

> -Chris
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-03-27 17:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-13  0:03 [PATCH] drm/i915: Reword warning for missing cases Lucas De Marchi
2018-03-13  0:17 ` Chris Wilson
2018-03-13 13:01   ` Ville Syrjälä
2018-03-13 13:06     ` Chris Wilson
2018-03-13 13:23       ` Ville Syrjälä
2018-03-14 21:59         ` Lucas De Marchi
2018-03-19 17:37           ` [PATCH v2] " Lucas De Marchi
2018-03-19 21:41             ` Chris Wilson
2018-03-27 17:37               ` Rodrigo Vivi [this message]
2018-03-13  0:39 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-03-13  6:15 ` ✓ Fi.CI.IGT: " Patchwork
2018-03-19 18:36 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Reword warning for missing cases (rev2) Patchwork
2018-03-19 21:55   ` Lucas De Marchi
2018-03-19 18:51 ` ✗ Fi.CI.BAT: failure " Patchwork
2018-03-26 18:23 ` ✗ Fi.CI.CHECKPATCH: warning " Patchwork
2018-03-26 18:40 ` ✓ Fi.CI.BAT: success " Patchwork
2018-03-26 19:57 ` ✓ Fi.CI.IGT: " Patchwork

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=20180327173749.GE5909@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.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.