Date: Fri, 3 Jun 2016 11:18:31 +0000 (UTC) From: Svatopluk Kraus <skra@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301267 - head/sys/arm/arm Message-ID: <201606031118.u53BIVqc077242@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: skra Date: Fri Jun 3 11:18:30 2016 New Revision: 301267 URL: https://svnweb.freebsd.org/changeset/base/301267 Log: Define irq variable only in the block where used. Modified: head/sys/arm/arm/gic.c Modified: head/sys/arm/arm/gic.c ============================================================================== --- head/sys/arm/arm/gic.c Fri Jun 3 11:05:55 2016 (r301266) +++ head/sys/arm/arm/gic.c Fri Jun 3 11:18:30 2016 (r301267) @@ -1109,12 +1109,10 @@ arm_gic_setup_intr(device_t dev, struct { struct arm_gic_softc *sc = device_get_softc(dev); struct gic_irqsrc *gi = (struct gic_irqsrc *)isrc; - u_int irq; enum intr_trigger trig; enum intr_polarity pol; if ((gi->gi_flags & GI_FLAG_MSI) == GI_FLAG_MSI) { - irq = gi->gi_irq; pol = gi->gi_pol; trig = gi->gi_trig; KASSERT(pol == INTR_POLARITY_HIGH, @@ -1122,14 +1120,13 @@ arm_gic_setup_intr(device_t dev, struct KASSERT(trig == INTR_TRIGGER_EDGE, ("%s: MSI interrupts must be edge triggered", __func__)); } else if (data != NULL) { - /* Get config for resource. */ - if (gic_map_intr(dev, data, &irq, &pol, &trig)) - return (EINVAL); + u_int irq; - if (gi->gi_irq != irq) + /* Get config for resource. */ + if (gic_map_intr(dev, data, &irq, &pol, &trig) || + gi->gi_irq != irq) return (EINVAL); } else { - irq = gi->gi_irq; pol = INTR_POLARITY_CONFORM; trig = INTR_TRIGGER_CONFORM; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606031118.u53BIVqc077242>