From patchwork Fri Aug 1 16:48:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 4663921 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 60680C0338 for ; Fri, 1 Aug 2014 17:21:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9E9E5201DD for ; Fri, 1 Aug 2014 17:21:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BF5412020E for ; Fri, 1 Aug 2014 17:21:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755597AbaHARVc (ORCPT ); Fri, 1 Aug 2014 13:21:32 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:39901 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755486AbaHARVb (ORCPT ); Fri, 1 Aug 2014 13:21:31 -0400 Received: from 94.197.121.167.threembb.co.uk ([94.197.121.167] helo=finisterre) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XDGWC-0006fL-PH; Fri, 01 Aug 2014 17:21:29 +0000 Received: from broonie by finisterre with local (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1XDG0m-0004Ue-Ni; Fri, 01 Aug 2014 17:48:56 +0100 From: Mark Brown To: Linus Walleij Cc: linux-spi@vger.kernel.org, linaro-kernel@lists.linaro.org, Mark Brown Date: Fri, 1 Aug 2014 17:48:55 +0100 Message-Id: <1406911735-17239-1-git-send-email-broonie@kernel.org> X-Mailer: git-send-email 2.0.0 X-SA-Exim-Connect-IP: 94.197.121.167 X-SA-Exim-Mail-From: broonie@sirena.org.uk X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Subject: [PATCH] spi/pl022: Explicitly truncate large bitmask X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Mark Brown When building on 64 bit architectures the use of bitwise negation generates constants larger than 32 bits which won't fit in u32s used to represent 32 bit register values on the device. Explicitly cast to let the compiler know that the higher bits are not significant and can be discarded. Signed-off-by: Mark Brown Reviewed-by: Linus Walleij --- drivers/spi/spi-pl022.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index 66d2ae2..1189cfd 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c @@ -1417,7 +1417,7 @@ static void do_interrupt_dma_transfer(struct pl022 *pl022) * Default is to enable all interrupts except RX - * this will be enabled once TX is complete */ - u32 irqflags = ENABLE_ALL_INTERRUPTS & ~SSP_IMSC_MASK_RXIM; + u32 irqflags = (u32)(ENABLE_ALL_INTERRUPTS & ~SSP_IMSC_MASK_RXIM); /* Enable target chip, if not already active */ if (!pl022->next_msg_cs_active)