Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp2175796ybm; Thu, 23 May 2019 12:36:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxttEWu2Eh+Zav9eaR0Cm8Zr7mmZ+YQDCACP6zPLqt/BOdfROBFXY7cz9RU4v8UiU778u6Q X-Received: by 2002:a17:902:d892:: with SMTP id b18mr56981571plz.216.1558640175287; Thu, 23 May 2019 12:36:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558640175; cv=none; d=google.com; s=arc-20160816; b=gKR2ntaNKCmSujm8XxoVszw5vNWgOBahiKUGM1js8VwMgbj3fozJ1EKorKSFkY2EKp Rukbv1IB6U6+2EdlL9lftAzu0OwnX/IiXlfgdtcEhk9+WXY2gL0BIVUYOmhOX+aNJS6v 0R38f4Zosll3PF3s34EMnJROb0xqTOgA3N8GE7gMkrKFsa6WGXddBYG36ZA47iVyDlwZ c/SqeGhxMP+NipuD4tRpE1hCBgusS3zeIQeZ4tLo3FeWIZAO1C5idZaxcS6FbIPW7twX 6y2ZS1JF31IjXuCjLvAlKMUbJwx+4PJCwhT9H7oKE9fD6Ge6cZ770v5GxyTRbEHYc22E nl3A== 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=Vg052UcxZtA+IzAYo4Rm6mXJutpLKND0mxmPoWy9ldI=; b=fz6WRjnZKu5q1xscKeUGY9ughczh2+9IKvmZJ2DwN6Y8HG9odLuwZnwIi/LY/mwoEW a4J5LelS2UFKJ7HVIXRYBpHM0l2kStCbjRjlrhNio6PAKZ4g+1shqUyUVEQFQ8yvne5y DsACdD1VfiDf0Bld8m+CImz6OJoNldxn/9jb2J6bWYZj79JPH6xs4vu9zsm5Dler2ycv hZh5KwYPErNws4JjuXi57Uq1WN0YgCMgQcrEe9kGKnBtbKnJVgno1ngb0SLzsZYrGqyk rveSeOtxXEbmJcGyKfVTb0M9lwyjislFzW9LWavJq/H3sglSHned3pjTMiDvWKvfpg4x tQtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="fvYlB/MV"; 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 v19si441612plo.413.2019.05.23.12.36.00; Thu, 23 May 2019 12:36:15 -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="fvYlB/MV"; 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 S2391771AbfEWT2V (ORCPT + 99 others); Thu, 23 May 2019 15:28:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:40784 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391750AbfEWT2O (ORCPT ); Thu, 23 May 2019 15:28:14 -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 885712133D; Thu, 23 May 2019 19:28:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558639694; bh=Tug76pgDYIbZKlAuIYBUdQn50+xAQzKdh/iY3Kfv408=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fvYlB/MVplMPIwHuKEf9QVWH/pd8sm1E3x4c5mkrXcMlpHAxxz83QYNktVoPjgxHW pUDTaTVlnq7gfp21+4o8LK+f6AKAuhtBd8YD+c2XNzU+gKOeqVL0MwdtY4gEWsNzHW FxsrbVEDcO69Urwa252W09Vi2lMFRBk49bmrEs8A= 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 5.1 044/122] of: fix clang -Wunsequenced for be32_to_cpu() Date: Thu, 23 May 2019 21:06:06 +0200 Message-Id: <20190523181710.537484242@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190523181705.091418060@linuxfoundation.org> References: <20190523181705.091418060@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 @@ -234,8 +234,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; }