Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753378AbbGSMUp (ORCPT ); Sun, 19 Jul 2015 08:20:45 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:16675 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753158AbbGSMUo (ORCPT ); Sun, 19 Jul 2015 08:20:44 -0400 Date: Sun, 19 Jul 2015 14:20:14 +0200 From: Sowmini Varadhan To: linux-kernel@vger.kernel.org Cc: akpm@linux-foundation.org, sowmini.varadhan@oracle.com, linux@roeck-us.net, benh@kernel.crashing.org, davem@davemloft.net Subject: [PATCH] iommu-common: Do not use 64 bit constant 0xffffffffffffffffl for computing align_mask Message-ID: <20150719121653.GA30645@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1114 Lines: 34 Using a 64 bit constant generates "warning: integer constant is too large for 'long' type" on 32 bit platforms. Instead use ~0l to get the desired effect. Detected by Andrew Morton who has confirmed that this patch fixes the warning on i386/gcc-4.4.3, i386/gcc-4.4.0 and arm/gcc-4.4.4. Signed-off-by: Sowmini Varadhan --- lib/iommu-common.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/iommu-common.c b/lib/iommu-common.c index df30632..fd1297d 100644 --- a/lib/iommu-common.c +++ b/lib/iommu-common.c @@ -119,7 +119,7 @@ unsigned long iommu_tbl_range_alloc(struct device *dev, unsigned long align_mask = 0; if (align_order > 0) - align_mask = 0xffffffffffffffffl >> (64 - align_order); + align_mask = ~0l >> (64 - align_order); /* Sanity check */ if (unlikely(npages == 0)) { -- 1.7.1 -- 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/