Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1202268 > unrolled thread

Re: [4.2-rc1][PATCH] gpio: omap: add missed spin_unlock_irqrestore in omap_gpio_irq_type

Started byTony Lindgren <tony@atomide.com>
First post2015-08-07 05:40 +0200
Last post2015-08-13 14:50 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [4.2-rc1][PATCH] gpio: omap: add missed spin_unlock_irqrestore  in omap_gpio_irq_type Tony Lindgren <tony@atomide.com> - 2015-08-07 05:40 +0200
    Re: [4.2-rc1][PATCH] gpio: omap: add missed spin_unlock_irqrestore  in omap_gpio_irq_type Grygorii Strashko <grygorii.strashko@ti.com> - 2015-08-07 09:40 +0200
      Re: [4.2-rc1][PATCH] gpio: omap: add missed spin_unlock_irqrestore in omap_gpio_irq_type Linus Walleij <linus.walleij@linaro.org> - 2015-08-13 14:50 +0200

#1202268 — Re: [4.2-rc1][PATCH] gpio: omap: add missed spin_unlock_irqrestore in omap_gpio_irq_type

FromTony Lindgren <tony@atomide.com>
Date2015-08-07 05:40 +0200
SubjectRe: [4.2-rc1][PATCH] gpio: omap: add missed spin_unlock_irqrestore in omap_gpio_irq_type
Message-ID<pUGFH-45g-1@gated-at.bofh.it>
* Linus Walleij <linus.walleij@linaro.org> [150716 01:38]:
> On Wed, Jun 24, 2015 at 4:54 PM, Grygorii Strashko
> <grygorii.strashko@ti.com> wrote:
> 
> > From: Grygorii Strashko <grygorii.strashko@linaro.org>
> >
> > Add missed spin_unlock_irqrestore in omap_gpio_irq_type when
> > omap_set_gpio_triggering() is failed.
> >
> > It fixes static checker warning:
> >
> >         drivers/gpio/gpio-omap.c:523 omap_gpio_irq_type()
> >         warn: inconsistent returns 'spin_lock:&bank->lock'.
> >
> > This fixes commit:
> > 1562e4618ded ('gpio: omap: fix error handling in omap_gpio_irq_type')
> >
> > Reported-by: Javier Martinez Canillas <javier@dowhile0.org>
> > Signed-off-by: Grygorii Strashko <grygorii.strashko@linaro.org>
> 
> Patch applied for fixes.

Linus, looks like we now have a new build warning in Linux next
with the fixes and raw_spinlock_t change, so a merge or a commit
is needed. If you prefer a patch, here's one below.

Regards,

Tony

8< ---------------
From: Tony Lindgren <tony@atomide.com>
Date: Thu, 6 Aug 2015 20:32:24 -0700
Subject: [PATCH] gpio: omap: Fix build warning for raw_spinlock_t conversion
 and unlock fix
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Looks like we now have a new build warning in Linux next with fix
977bd8a94c40 ("gpio: omap: add missed spin_unlock_irqrestore in
omap_gpio_irq_type") and raw_spinlock changes done in commit
4dbada2be460 ("gpio: omap: use raw locks for locking"):

drivers/gpio/gpio-omap.c: In function ‘omap_gpio_irq_type’:
drivers/gpio/gpio-omap.c:504:26: warning: passing argument 1 of
‘spin_unlock_irqrestore’ from incompatible pointer type
[-Wincompatible-pointer-types]
   spin_unlock_irqrestore(&bank->lock, flags);
                          ^
In file included from include/linux/seqlock.h:35:0,
                 from include/linux/time.h:5,
                 from include/linux/stat.h:18,
                 from include/linux/module.h:10,
                 from drivers/gpio/gpio-omap.c:16:
include/linux/spinlock.h:370:122: note: expected
‘spinlock_t * {aka struct spinlock *}’ but argument is of type
‘raw_spinlock_t * {aka struct raw_spinlock *}’

Fix the issue with using raw_spinlock_t instead.

Signed-off-by: Tony Lindgren <tony@atomide.com>

--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -501,7 +501,7 @@ static int omap_gpio_irq_type(struct irq_data *d, unsigned type)
 	raw_spin_lock_irqsave(&bank->lock, flags);
 	retval = omap_set_gpio_triggering(bank, offset, type);
 	if (retval) {
-		spin_unlock_irqrestore(&bank->lock, flags);
+		raw_spin_unlock_irqrestore(&bank->lock, flags);
 		goto error;
 	}
 	omap_gpio_init_irq(bank, offset);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1202381

FromGrygorii Strashko <grygorii.strashko@ti.com>
Date2015-08-07 09:40 +0200
Message-ID<pUKpY-1dl-21@gated-at.bofh.it>
In reply to#1202268
Hi Tony,
On 08/07/2015 06:36 AM, Tony Lindgren wrote:
> * Linus Walleij <linus.walleij@linaro.org> [150716 01:38]:
>> On Wed, Jun 24, 2015 at 4:54 PM, Grygorii Strashko
>> <grygorii.strashko@ti.com> wrote:
>>
>>> From: Grygorii Strashko <grygorii.strashko@linaro.org>
>>>
>>> Add missed spin_unlock_irqrestore in omap_gpio_irq_type when
>>> omap_set_gpio_triggering() is failed.
>>>
>>> It fixes static checker warning:
>>>
>>>          drivers/gpio/gpio-omap.c:523 omap_gpio_irq_type()
>>>          warn: inconsistent returns 'spin_lock:&bank->lock'.
>>>
>>> This fixes commit:
>>> 1562e4618ded ('gpio: omap: fix error handling in omap_gpio_irq_type')
>>>
>>> Reported-by: Javier Martinez Canillas <javier@dowhile0.org>
>>> Signed-off-by: Grygorii Strashko <grygorii.strashko@linaro.org>
>>
>> Patch applied for fixes.
>
> Linus, looks like we now have a new build warning in Linux next
> with the fixes and raw_spinlock_t change, so a merge or a commit
> is needed. If you prefer a patch, here's one below.

Yes. It seems merge/rebase issue between fixes & next:
- this patch went through fixes and RAW spinlock conversation
patch through -next, and without merge conflicts.

and patch has been posted already by Axel Lin:
http://www.spinics.net/lists/linux-omap/msg121031.html


>
> 8< ---------------
> From: Tony Lindgren <tony@atomide.com>
> Date: Thu, 6 Aug 2015 20:32:24 -0700
> Subject: [PATCH] gpio: omap: Fix build warning for raw_spinlock_t conversion
>   and unlock fix
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> Looks like we now have a new build warning in Linux next with fix
> 977bd8a94c40 ("gpio: omap: add missed spin_unlock_irqrestore in
> omap_gpio_irq_type") and raw_spinlock changes done in commit
> 4dbada2be460 ("gpio: omap: use raw locks for locking"):
>
> drivers/gpio/gpio-omap.c: In function ‘omap_gpio_irq_type’:
> drivers/gpio/gpio-omap.c:504:26: warning: passing argument 1 of
> ‘spin_unlock_irqrestore’ from incompatible pointer type
> [-Wincompatible-pointer-types]
>     spin_unlock_irqrestore(&bank->lock, flags);
>                            ^
> In file included from include/linux/seqlock.h:35:0,
>                   from include/linux/time.h:5,
>                   from include/linux/stat.h:18,
>                   from include/linux/module.h:10,
>                   from drivers/gpio/gpio-omap.c:16:
> include/linux/spinlock.h:370:122: note: expected
> ‘spinlock_t * {aka struct spinlock *}’ but argument is of type
> ‘raw_spinlock_t * {aka struct raw_spinlock *}’
>
> Fix the issue with using raw_spinlock_t instead.
>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
>
> --- a/drivers/gpio/gpio-omap.c
> +++ b/drivers/gpio/gpio-omap.c
> @@ -501,7 +501,7 @@ static int omap_gpio_irq_type(struct irq_data *d, unsigned type)
>   	raw_spin_lock_irqsave(&bank->lock, flags);
>   	retval = omap_set_gpio_triggering(bank, offset, type);
>   	if (retval) {
> -		spin_unlock_irqrestore(&bank->lock, flags);
> +		raw_spin_unlock_irqrestore(&bank->lock, flags);
>   		goto error;
>   	}
>   	omap_gpio_init_irq(bank, offset);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


-- 
regards,
-grygorii
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1206785 — Re: [4.2-rc1][PATCH] gpio: omap: add missed spin_unlock_irqrestore in omap_gpio_irq_type

FromLinus Walleij <linus.walleij@linaro.org>
Date2015-08-13 14:50 +0200
SubjectRe: [4.2-rc1][PATCH] gpio: omap: add missed spin_unlock_irqrestore in omap_gpio_irq_type
Message-ID<pX07g-3zv-17@gated-at.bofh.it>
In reply to#1202381
On Fri, Aug 7, 2015 at 9:34 AM, Grygorii Strashko
<grygorii.strashko@ti.com> wrote:
> Hi Tony,
> On 08/07/2015 06:36 AM, Tony Lindgren wrote:
>>
>> * Linus Walleij <linus.walleij@linaro.org> [150716 01:38]:
>>>
>>> On Wed, Jun 24, 2015 at 4:54 PM, Grygorii Strashko
>>> <grygorii.strashko@ti.com> wrote:
>>>
>>>> From: Grygorii Strashko <grygorii.strashko@linaro.org>
>>>>
>>>> Add missed spin_unlock_irqrestore in omap_gpio_irq_type when
>>>> omap_set_gpio_triggering() is failed.
>>>>
>>>> It fixes static checker warning:
>>>>
>>>>          drivers/gpio/gpio-omap.c:523 omap_gpio_irq_type()
>>>>          warn: inconsistent returns 'spin_lock:&bank->lock'.
>>>>
>>>> This fixes commit:
>>>> 1562e4618ded ('gpio: omap: fix error handling in omap_gpio_irq_type')
>>>>
>>>> Reported-by: Javier Martinez Canillas <javier@dowhile0.org>
>>>> Signed-off-by: Grygorii Strashko <grygorii.strashko@linaro.org>
>>>
>>>
>>> Patch applied for fixes.
>>
>>
>> Linus, looks like we now have a new build warning in Linux next
>> with the fixes and raw_spinlock_t change, so a merge or a commit
>> is needed. If you prefer a patch, here's one below.
>
>
> Yes. It seems merge/rebase issue between fixes & next:
> - this patch went through fixes and RAW spinlock conversation
> patch through -next, and without merge conflicts.
>
> and patch has been posted already by Axel Lin:
> http://www.spinics.net/lists/linux-omap/msg121031.html

I merged v4.2-rc4 into my devel branch and applied Axel's
patch to fix this mess. Check that it looks OK now...

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web