Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3206069pxx; Mon, 2 Nov 2020 02:58:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJxjIzujrJZblesqQe3ASdQqFhbXuOmLZR0SZhkmpsWiuOcN+me7HupukqrkdH8T0FpHUV/M X-Received: by 2002:a17:906:60c8:: with SMTP id f8mr772306ejk.14.1604314711447; Mon, 02 Nov 2020 02:58:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604314711; cv=none; d=google.com; s=arc-20160816; b=VCtG2AtYRnq006BInBNBcpysVEzIgDkYG1lOWkgL0SCdWdDodQRf/aZQU6QI9D1AHj A8hxLKdMLDF+d0uMKo6d5bDk+UkiCbU/vUudlDS1cB6aFqoixan1aMRrClGUYFNzVeOt ejjdszsvfBIAaVUWiEWZwv/YjIl7Yl0JoBzDriQtfcI1cBtUVsxxHfaUoGqXwM03zvEU w3xLeb0oQc7NyF4hpu/oWDpPTnLQKIW6yzII5Ac1mZGdAoLgFo7kl+q2yDA32Rk3VvKX 52C6DnwDVsqjlsE9IJAl2NOuave6E2FV5lDE4Q3Qw1LLB9rPATXNuyEUQghK7ZykoVDh jY0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=PxsrdjsCFB6FS5D5IqfcFU9kqfyg6X7+kuuGrCBGqa4=; b=alowTi2Ea55L5JpbhSot8H2v4LHKDU02p9U1fKxgvX7hXJkn/tHOzmnE66pSKpF3Sg /ZVEEWMQEX+s3vNzuX933odpVxBaeWrRErFcz4E6FmfZJsJdwQDbHKJQUMiTf29/Aj+L Zlk1DQo0bMgE8GR/dWwqU845zmnOsN1TcdYG+y13ikzWr93rOoUoEVf+RMOOBHgCx+3N SMkxYPhYhOc0LurUshfAaRm4KfgnbUK8ZaYDYL7p5iFnJ+YAW/3MOltpI5vFSQJIA+xh gOCA9znW3/fjaEWhoGChiOL0NFtDrtqAALsc1jq0aqYoxwJCp9CVfbykmJpZA4nznzQN 50tw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n22si9695369ejk.683.2020.11.02.02.58.08; Mon, 02 Nov 2020 02:58:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728400AbgKBKyd (ORCPT + 99 others); Mon, 2 Nov 2020 05:54:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728297AbgKBKyd (ORCPT ); Mon, 2 Nov 2020 05:54:33 -0500 Received: from michel.telenet-ops.be (michel.telenet-ops.be [IPv6:2a02:1800:110:4::f00:18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 968AFC061A04 for ; Mon, 2 Nov 2020 02:54:32 -0800 (PST) Received: from ramsan.of.borg ([84.195.186.194]) by michel.telenet-ops.be with bizsmtp id nNuV2300N4C55Sk06NuVZp; Mon, 02 Nov 2020 11:54:29 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1kZXTp-002Cfi-6h; Mon, 02 Nov 2020 11:54:29 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1kZXTo-0039h3-8a; Mon, 02 Nov 2020 11:54:28 +0100 From: Geert Uytterhoeven To: Christoph Hellwig , Rob Herring , Frank Rowand Cc: Linus Torvalds , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] of: Drop superfluous ULL suffix for ~0 Date: Mon, 2 Nov 2020 11:54:22 +0100 Message-Id: <20201102105422.752202-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is no need to specify a "ULL" suffix for "all bits set": "~0" is sufficient, and works regardless of type. In fact adding the suffix makes the code more fragile. Fixes: 48ab6d5d1f096d6f ("dma-mapping: fix 32-bit overflow with CONFIG_ARM_LPAE=n") Suggested-by: Linus Torvalds Signed-off-by: Geert Uytterhoeven --- drivers/of/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/device.c b/drivers/of/device.c index 3a469c79e6b05de4..aedfaaafd3e7edb7 100644 --- a/drivers/of/device.c +++ b/drivers/of/device.c @@ -112,7 +112,7 @@ int of_dma_configure_id(struct device *dev, struct device_node *np, u64 dma_end = 0; /* Determine the overall bounds of all DMA regions */ - for (dma_start = ~0ULL; r->size; r++) { + for (dma_start = ~0; r->size; r++) { /* Take lower and upper limits */ if (r->dma_start < dma_start) dma_start = r->dma_start; -- 2.25.1