From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753881AbbHGDgu (ORCPT ); Thu, 6 Aug 2015 23:36:50 -0400 Received: from muru.com ([72.249.23.125]:42180 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751003AbbHGDgs (ORCPT ); Thu, 6 Aug 2015 23:36:48 -0400 Date: Thu, 6 Aug 2015 20:36:42 -0700 From: Tony Lindgren To: Linus Walleij Cc: Grygorii Strashko , Alexandre Courbot , Sekhar Nori , Javier Martinez Canillas , Linux-OMAP , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Grygorii Strashko , Sebastian Andrzej Siewior Subject: Re: [4.2-rc1][PATCH] gpio: omap: add missed spin_unlock_irqrestore in omap_gpio_irq_type Message-ID: <20150807033642.GI4215@atomide.com> References: <1435157657-17843-1-git-send-email-grygorii.strashko@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Linus Walleij [150716 01:38]: > On Wed, Jun 24, 2015 at 4:54 PM, Grygorii Strashko > wrote: > > > From: Grygorii Strashko > > > > 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 > > Signed-off-by: Grygorii Strashko > > 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 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 --- 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);