Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756354AbcCBAwA (ORCPT ); Tue, 1 Mar 2016 19:52:00 -0500 Received: from mail333.us4.mandrillapp.com ([205.201.137.77]:48096 "EHLO mail333.us4.mandrillapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755343AbcCAX4e (ORCPT ); Tue, 1 Mar 2016 18:56:34 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=linuxfoundation.org; b=b90zvAO9tMLJ/qFC7B4R7/EUHUixFC5j0jsDK1P8E+phcA3zBir9yip4M6lLPqg47x1NDqygNmpC LHW/h/Har0M2U02kbfuTFR71F/oydVf/D0t1Z/Noscb3r8uFZe/4RSPU1QLHbp70F8rHenOCF0y3 2DIhTb8t9fUN92zdu2A=; From: Greg Kroah-Hartman Subject: [PATCH 4.4 128/342] irqchip/atmel-aic: Fix wrong bit operation for IRQ priority X-Mailer: git-send-email 2.7.2 To: Cc: Greg Kroah-Hartman , , Milo Kim , Boris Brezillon , Jason Cooper , Marc Zyngier , Ludovic Desroches , Nicholas Ferre , Thomas Gleixner Message-Id: <20160301234532.082706769@linuxfoundation.org> In-Reply-To: <20160301234527.990448862@linuxfoundation.org> References: <20160301234527.990448862@linuxfoundation.org> X-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com X-Report-Abuse: You can also report abuse here: http://mandrillapp.com/contact/abuse?id=30481620.a9e4915c650844379bb3d1d89cbe24fb X-Mandrill-User: md_30481620 Date: Tue, 01 Mar 2016 23:54:32 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1532 Lines: 45 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Milo Kim commit 49f34134aea74f19ca016f055d25ee55ec359dee upstream. Atmel AIC has common structure for SMR (Source Mode Register). bit[6:5] Interrupt source type bit[2:0] Priority level Other bits are unused. To update new priority value, bit[2:0] should be cleared first and then new priority level can be written. However, aic_common_set_priority() helper clears source type bits instead of priority bits. This patch fixes wrong mask bit operation. Fixes: b1479ebb7720 "irqchip: atmel-aic: Add atmel AIC/AIC5 drivers" Signed-off-by: Milo Kim Acked-by: Boris Brezillon Cc: Jason Cooper Cc: Marc Zyngier Cc: Ludovic Desroches Cc: Nicholas Ferre Link: http://lkml.kernel.org/r/1452669592-3401-2-git-send-email-milo.kim@ti.com Signed-off-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman --- drivers/irqchip/irq-atmel-aic-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/irqchip/irq-atmel-aic-common.c +++ b/drivers/irqchip/irq-atmel-aic-common.c @@ -86,7 +86,7 @@ int aic_common_set_priority(int priority priority > AT91_AIC_IRQ_MAX_PRIORITY) return -EINVAL; - *val &= AT91_AIC_PRIOR; + *val &= ~AT91_AIC_PRIOR; *val |= priority; return 0;