Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp2188494ybm; Thu, 23 May 2019 12:49:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqzkctR5m2xPzXxb7Jm+l+fplJSsW5MvLnmmUJG0a/xZ1+lB7KrgRFWKn7/XuxBY/PVMGV3A X-Received: by 2002:a17:902:b606:: with SMTP id b6mr102664559pls.100.1558640982331; Thu, 23 May 2019 12:49:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558640982; cv=none; d=google.com; s=arc-20160816; b=clKB5TGr7Eiad7PXkER87lq5xfADvxowEGWMxSzWJ397mY+G+RzcgI8Tt8U/cm/eLj +BLFZnyH4jHUDPzYLW2n/SR/ATrgzE01WHr94/OZzVwmBlbGmXOrCSN6AW9fyY3rWzb5 VhSxz4dX0fhGlo54hTB1TUPN1KpMPiSX5cT2DMfoZRnWBCJvZVTma+HTeqIc3SrQ26er ju5jqVNJHCqK3LcPzNJmKKeQldn+N76cY7+P4vtW9Dxleh68oLy53hskFGtTcHpCR6EW Alajyb2/TYpPgztwdI9cN7esbvCB4V074Miz4XC1ggKrJLKEq1J2CfTIs9KcLTVfAnJp bKvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FXF3jaN6Bj36r+OiaDyh8oZ7htxGR+xV/7hLTeDAmR0=; b=iWMr147Do0jZrWsVMRqd6d/f5txsOfpIqun9ttCiOPp2CjYWaXuCFNsTpScfM9llS4 6YOU6ug/p8Gruswc1IT4HsAjJsZe1K4jMhPOH2RNOVnqsngoPN6C01NBjppvU4DdPyId fTokGSLviB4wGtDa2Y/y3O+4jeXW9gDSySJvtXECPMeo9BT7A/d88vQWHrOVUtsJlYcb IPvAUkjCdfIkF222X4Ec++uqE0p4aSOj/m8evGI5/acXW8ytG8cM662KTQz9yXaUjBUA Bb2hhuu5YhpHKdy4Jrb4ErUJ4TzVI+E2+Ee+W1hcYUGTikIyzvvG0QQYy2EJLNGKYez/ gqRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XMsywfiP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ch10si462042plb.207.2019.05.23.12.49.27; Thu, 23 May 2019 12:49:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XMsywfiP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388302AbfEWTLw (ORCPT + 99 others); Thu, 23 May 2019 15:11:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:45352 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388268AbfEWTLu (ORCPT ); Thu, 23 May 2019 15:11:50 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CA4622133D; Thu, 23 May 2019 19:11:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558638710; bh=msRxoN6CqdadNIZaUmmQ0x8HaJiap/CRJsG94dvaHKA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XMsywfiPAcZOrBTsuIK06PvwCpqswhwHwEPyotU/LCrlJcSsIvm1HZ6yM6aKOHR7v rNRb4AsKnU9M5QkDcHJ6y31f7dMsvjsxi2O5Uilx83z1Lv2nFlhU7BTTnPkz1ag5wc FCBGPW3nmGj1qCh6zE1NCRGg/53YOPMJN4quQQq0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Phong Tran , Nick Desaulniers , David Laight , Rob Herring Subject: [PATCH 4.14 19/77] of: fix clang -Wunsequenced for be32_to_cpu() Date: Thu, 23 May 2019 21:05:37 +0200 Message-Id: <20190523181722.930751648@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190523181719.982121681@linuxfoundation.org> References: <20190523181719.982121681@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Phong Tran commit 440868661f36071886ed360d91de83bd67c73b4f upstream. Now, make the loop explicit to avoid clang warning. ./include/linux/of.h:238:37: warning: multiple unsequenced modifications to 'cell' [-Wunsequenced] r = (r << 32) | be32_to_cpu(*(cell++)); ^~ ./include/linux/byteorder/generic.h:95:21: note: expanded from macro 'be32_to_cpu' ^ ./include/uapi/linux/byteorder/little_endian.h:40:59: note: expanded from macro '__be32_to_cpu' ^ ./include/uapi/linux/swab.h:118:21: note: expanded from macro '__swab32' ___constant_swab32(x) : \ ^ ./include/uapi/linux/swab.h:18:12: note: expanded from macro '___constant_swab32' (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \ ^ Signed-off-by: Phong Tran Reported-by: Nick Desaulniers Link: https://github.com/ClangBuiltLinux/linux/issues/460 Suggested-by: David Laight Reviewed-by: Nick Desaulniers Cc: stable@vger.kernel.org [robh: fix up whitespace] Signed-off-by: Rob Herring Signed-off-by: Greg Kroah-Hartman --- include/linux/of.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/include/linux/of.h +++ b/include/linux/of.h @@ -229,8 +229,8 @@ extern struct device_node *of_find_all_n static inline u64 of_read_number(const __be32 *cell, int size) { u64 r = 0; - while (size--) - r = (r << 32) | be32_to_cpu(*(cell++)); + for (; size--; cell++) + r = (r << 32) | be32_to_cpu(*cell); return r; }