All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] irqchip: atmel-aic-common: prevent clobbering of priority when changing IRQ type
       [not found] ` <20150107030922.GF24989@titan.lakedaemon.net>
@ 2015-01-07  9:04   ` Nicolas Ferre
  2015-01-07 12:38     ` Jason Cooper
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Ferre @ 2015-01-07  9:04 UTC (permalink / raw)
  To: linux-arm-kernel

Le 07/01/2015 04:09, Jason Cooper a ?crit :
> atmel maintainers,
> 
> On Tue, Jan 06, 2015 at 06:47:23PM -0800, gavinli at thegavinli.com wrote:
>> From: Gavin Li <git@thegavinli.com>
>>
>> This patch makes the bitmask for AIC_SRCTYPE consistent
>> with that of its valid values, and prevents the priority
>> field at bits 2:0 from being clobbered by an incorrect
>> AND with the AIC_SRCTYPE mask.
>>
>> Signed-off-by: Gavin Li <gavinli@thegavinli.com>
>> ---
>>  drivers/irqchip/irq-atmel-aic-common.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> Please give an Acked-by if this looks good to you.  I'd like to get it
> pushed fairly soon.

Hi Jason,

After a private message with Boris, here is our:
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

It is indeed a pretty important fix.

(I added the linux-arm-kernel mailing-list for the record).

Moreover, can you please add a stable tag like:
Cc: <stable@vger.kernel.org> # 3.17+

Thanks a lot Gavin Li for having spotted this bug!

Bye,

>> diff --git a/drivers/irqchip/irq-atmel-aic-common.c b/drivers/irqchip/irq-atmel-aic-common.c
>> index cc4f9d8..fa22e5b 100644
>> --- a/drivers/irqchip/irq-atmel-aic-common.c
>> +++ b/drivers/irqchip/irq-atmel-aic-common.c
>> @@ -28,7 +28,7 @@
>>  #define AT91_AIC_IRQ_MIN_PRIORITY	0
>>  #define AT91_AIC_IRQ_MAX_PRIORITY	7
>>  
>> -#define AT91_AIC_SRCTYPE		GENMASK(7, 6)
>> +#define AT91_AIC_SRCTYPE		GENMASK(6, 5)
>>  #define AT91_AIC_SRCTYPE_LOW		(0 << 5)
>>  #define AT91_AIC_SRCTYPE_FALLING	(1 << 5)
>>  #define AT91_AIC_SRCTYPE_HIGH		(2 << 5)
>> @@ -74,7 +74,7 @@ int aic_common_set_type(struct irq_data *d, unsigned type, unsigned *val)
>>  		return -EINVAL;
>>  	}
>>  
>> -	*val &= AT91_AIC_SRCTYPE;
>> +	*val &= ~AT91_AIC_SRCTYPE;
>>  	*val |= aic_type;
>>  
>>  	return 0;
>> -- 
>> 2.2.1
>>
> 


-- 
Nicolas Ferre

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] irqchip: atmel-aic-common: prevent clobbering of priority when changing IRQ type
  2015-01-07  9:04   ` [PATCH] irqchip: atmel-aic-common: prevent clobbering of priority when changing IRQ type Nicolas Ferre
@ 2015-01-07 12:38     ` Jason Cooper
  0 siblings, 0 replies; 4+ messages in thread
From: Jason Cooper @ 2015-01-07 12:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 07, 2015 at 10:04:11AM +0100, Nicolas Ferre wrote:
> Le 07/01/2015 04:09, Jason Cooper a ?crit :
> > atmel maintainers,
> > 
> > On Tue, Jan 06, 2015 at 06:47:23PM -0800, gavinli at thegavinli.com wrote:
> >> From: Gavin Li <git@thegavinli.com>
> >>
> >> This patch makes the bitmask for AIC_SRCTYPE consistent
> >> with that of its valid values, and prevents the priority
> >> field at bits 2:0 from being clobbered by an incorrect
> >> AND with the AIC_SRCTYPE mask.
> >>
> >> Signed-off-by: Gavin Li <gavinli@thegavinli.com>
> >> ---
> >>  drivers/irqchip/irq-atmel-aic-common.c | 4 ++--
> >>  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > Please give an Acked-by if this looks good to you.  I'd like to get it
> > pushed fairly soon.
> 
> Hi Jason,
> 
> After a private message with Boris, here is our:
> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> 
> It is indeed a pretty important fix.
> 
> (I added the linux-arm-kernel mailing-list for the record).

:)  oops.  I completely missed that it was originally (and this version)
off-list.  Gavin, in the future, please include the mailinglist when
sending.

> Moreover, can you please add a stable tag like:
> Cc: <stable@vger.kernel.org> # 3.17+

Will do.

thx,

Jason.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] irqchip: atmel-aic-common: prevent clobbering of priority when changing IRQ type
       [not found] <1420598843-8409-1-git-send-email-gavinli@thegavinli.com>
@ 2015-01-07 12:51   ` Jason Cooper
  2015-01-07 12:51   ` Jason Cooper
  1 sibling, 0 replies; 4+ messages in thread
From: Jason Cooper @ 2015-01-07 12:51 UTC (permalink / raw)
  To: linux-arm-kernel

Gavin,

On Tue, Jan 06, 2015 at 06:47:23PM -0800, gavinli at thegavinli.com wrote:
> From: Gavin Li <git@thegavinli.com>
> 
> This patch makes the bitmask for AIC_SRCTYPE consistent
> with that of its valid values, and prevents the priority
> field at bits 2:0 from being clobbered by an incorrect
> AND with the AIC_SRCTYPE mask.
> 
> Signed-off-by: Gavin Li <gavinli@thegavinli.com>
> ---
>  drivers/irqchip/irq-atmel-aic-common.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Well done.  For a first patch this is really good.  The only thing you
missed was who/which MLs to Cc.  In the future, you can use
./scripts/get_maintainer.pl to find this info.

Applied to irqchip/urgent with Acks from the atmel maintainers and Cc'd
to stable for v3.17+

This will be in linux-next tonight if Stephen builds one.

thx,

Jason.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] irqchip: atmel-aic-common: prevent clobbering of priority when changing IRQ type
@ 2015-01-07 12:51   ` Jason Cooper
  0 siblings, 0 replies; 4+ messages in thread
From: Jason Cooper @ 2015-01-07 12:51 UTC (permalink / raw)
  To: gavinli
  Cc: tglx, linux, nicolas.ferre, plagnioj, Gavin Li, Linux ARM Kernel,
	linux-kernel

Gavin,

On Tue, Jan 06, 2015 at 06:47:23PM -0800, gavinli@thegavinli.com wrote:
> From: Gavin Li <git@thegavinli.com>
> 
> This patch makes the bitmask for AIC_SRCTYPE consistent
> with that of its valid values, and prevents the priority
> field at bits 2:0 from being clobbered by an incorrect
> AND with the AIC_SRCTYPE mask.
> 
> Signed-off-by: Gavin Li <gavinli@thegavinli.com>
> ---
>  drivers/irqchip/irq-atmel-aic-common.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Well done.  For a first patch this is really good.  The only thing you
missed was who/which MLs to Cc.  In the future, you can use
./scripts/get_maintainer.pl to find this info.

Applied to irqchip/urgent with Acks from the atmel maintainers and Cc'd
to stable for v3.17+

This will be in linux-next tonight if Stephen builds one.

thx,

Jason.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-01-07 12:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1420598843-8409-1-git-send-email-gavinli@thegavinli.com>
     [not found] ` <20150107030922.GF24989@titan.lakedaemon.net>
2015-01-07  9:04   ` [PATCH] irqchip: atmel-aic-common: prevent clobbering of priority when changing IRQ type Nicolas Ferre
2015-01-07 12:38     ` Jason Cooper
2015-01-07 12:51 ` Jason Cooper
2015-01-07 12:51   ` Jason Cooper

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.