* [PATCH 1/2] drm/i915: Move default: to the end of the switch
@ 2013-06-05 11:01 Damien Lespiau
2013-06-05 11:01 ` [PATCH 2/2] drm/i915: Fix 'port' typo in comment Damien Lespiau
2013-06-05 11:28 ` [PATCH 1/2] drm/i915: Move default: to the end of the switch Jani Nikula
0 siblings, 2 replies; 4+ messages in thread
From: Damien Lespiau @ 2013-06-05 11:01 UTC (permalink / raw)
To: intel-gfx
As it's usual to do, don't leave it in the middle of valid cases.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
drivers/gpu/drm/i915/i915_irq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 63996aa..a8ef086 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1484,14 +1484,14 @@ static void i915_get_extra_instdone(struct drm_device *dev,
instdone[0] = I915_READ(INSTDONE_I965);
instdone[1] = I915_READ(INSTDONE1);
break;
- default:
- WARN_ONCE(1, "Unsupported platform\n");
case 7:
instdone[0] = I915_READ(GEN7_INSTDONE_1);
instdone[1] = I915_READ(GEN7_SC_INSTDONE);
instdone[2] = I915_READ(GEN7_SAMPLER_INSTDONE);
instdone[3] = I915_READ(GEN7_ROW_INSTDONE);
break;
+ default:
+ WARN_ONCE(1, "Unsupported platform\n");
}
}
--
1.8.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] drm/i915: Fix 'port' typo in comment
2013-06-05 11:01 [PATCH 1/2] drm/i915: Move default: to the end of the switch Damien Lespiau
@ 2013-06-05 11:01 ` Damien Lespiau
2013-06-05 11:28 ` [PATCH 1/2] drm/i915: Move default: to the end of the switch Jani Nikula
1 sibling, 0 replies; 4+ messages in thread
From: Damien Lespiau @ 2013-06-05 11:01 UTC (permalink / raw)
To: intel-gfx
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
drivers/gpu/drm/i915/i915_reg.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 47a9de0..d146993 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -390,7 +390,7 @@
*
* DPIO is VLV only.
*
- * Note: digital port B is DDI0, digital pot C is DDI1
+ * Note: digital port B is DDI0, digital port C is DDI1
*/
#define DPIO_DEVFN 0
#define DPIO_OPCODE_REG_WRITE 1
--
1.8.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] drm/i915: Move default: to the end of the switch
2013-06-05 11:01 [PATCH 1/2] drm/i915: Move default: to the end of the switch Damien Lespiau
2013-06-05 11:01 ` [PATCH 2/2] drm/i915: Fix 'port' typo in comment Damien Lespiau
@ 2013-06-05 11:28 ` Jani Nikula
2013-06-05 12:36 ` Damien Lespiau
1 sibling, 1 reply; 4+ messages in thread
From: Jani Nikula @ 2013-06-05 11:28 UTC (permalink / raw)
To: Damien Lespiau, intel-gfx
On Wed, 05 Jun 2013, Damien Lespiau <damien.lespiau@intel.com> wrote:
> As it's usual to do, don't leave it in the middle of valid cases.
>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
> drivers/gpu/drm/i915/i915_irq.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 63996aa..a8ef086 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -1484,14 +1484,14 @@ static void i915_get_extra_instdone(struct drm_device *dev,
> instdone[0] = I915_READ(INSTDONE_I965);
> instdone[1] = I915_READ(INSTDONE1);
> break;
> - default:
> - WARN_ONCE(1, "Unsupported platform\n");
This is a functional change because of the follow through here. The
commit message should reflect this.
BR,
Jani.
> case 7:
> instdone[0] = I915_READ(GEN7_INSTDONE_1);
> instdone[1] = I915_READ(GEN7_SC_INSTDONE);
> instdone[2] = I915_READ(GEN7_SAMPLER_INSTDONE);
> instdone[3] = I915_READ(GEN7_ROW_INSTDONE);
> break;
> + default:
> + WARN_ONCE(1, "Unsupported platform\n");
> }
> }
>
> --
> 1.8.1.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] drm/i915: Move default: to the end of the switch
2013-06-05 11:28 ` [PATCH 1/2] drm/i915: Move default: to the end of the switch Jani Nikula
@ 2013-06-05 12:36 ` Damien Lespiau
0 siblings, 0 replies; 4+ messages in thread
From: Damien Lespiau @ 2013-06-05 12:36 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
On Wed, Jun 05, 2013 at 02:28:50PM +0300, Jani Nikula wrote:
> On Wed, 05 Jun 2013, Damien Lespiau <damien.lespiau@intel.com> wrote:
> > As it's usual to do, don't leave it in the middle of valid cases.
> >
> > Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> > ---
> > drivers/gpu/drm/i915/i915_irq.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> > index 63996aa..a8ef086 100644
> > --- a/drivers/gpu/drm/i915/i915_irq.c
> > +++ b/drivers/gpu/drm/i915/i915_irq.c
> > @@ -1484,14 +1484,14 @@ static void i915_get_extra_instdone(struct drm_device *dev,
> > instdone[0] = I915_READ(INSTDONE_I965);
> > instdone[1] = I915_READ(INSTDONE1);
> > break;
> > - default:
> > - WARN_ONCE(1, "Unsupported platform\n");
>
> This is a functional change because of the follow through here. The
> commit message should reflect this.
Hum indeed, it was probably intentional, trying to provide a default
behaviour? never mind then (it could do with a comment I guess).
--
Damien
>
> BR,
> Jani.
>
> > case 7:
> > instdone[0] = I915_READ(GEN7_INSTDONE_1);
> > instdone[1] = I915_READ(GEN7_SC_INSTDONE);
> > instdone[2] = I915_READ(GEN7_SAMPLER_INSTDONE);
> > instdone[3] = I915_READ(GEN7_ROW_INSTDONE);
> > break;
> > + default:
> > + WARN_ONCE(1, "Unsupported platform\n");
> > }
> > }
> >
> > --
> > 1.8.1.4
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> --
> Jani Nikula, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-06-05 12:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-05 11:01 [PATCH 1/2] drm/i915: Move default: to the end of the switch Damien Lespiau
2013-06-05 11:01 ` [PATCH 2/2] drm/i915: Fix 'port' typo in comment Damien Lespiau
2013-06-05 11:28 ` [PATCH 1/2] drm/i915: Move default: to the end of the switch Jani Nikula
2013-06-05 12:36 ` Damien Lespiau
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.