Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5125104yba; Tue, 30 Apr 2019 09:30:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqx+JbTrn6rO0VIuXn9OMh4Hx/vixF80xCLfsjuNdQgEhm/ccFMBEKay3KEDPrABfkysykS8 X-Received: by 2002:a17:902:2:: with SMTP id 2mr71396762pla.61.1556641859636; Tue, 30 Apr 2019 09:30:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556641859; cv=none; d=google.com; s=arc-20160816; b=ZwT8KMsiNC0Pnj+XMdb85KWr4nM/ctKIPegrgg9liLnFYXewDuWB7vwORZW9csZ16+ ZxaqMksaQrMxp4Z7CfDSOYqkQ0ZfP0gF2Y3dIb1iW+l8e7iaZwS5c93pky/KmqVKkkck xFNUKQ+t4Tc+ZU8VM4lWN+rQ/A7LulDYJyItvI6v8sFHGlDRE1aNqJBbUFKxS6iRknyl zpx4AmZM3c/aKouhEXjC1DXyDwGkGmd5WwLjJl6jCsKkM8PLgNyO45hIsxRwC9Yxc+AL thw/5rf+gCJhhSvjOcNmuLLCRm3vJ/N/g/5pxsLNTN78pGNRj8w3R8odPCJgzEvDnBin ZO0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=M8CMI/W3q+BSC73DTflngmeta3WjHrDaqS1WHzzkYCk=; b=PW2V0qkR5dcYzsXblYYYGeoTjkNsX/SvufyrnkhxcGsViy25oeubhlGy1dvkP8pjM9 JPVcICU3bNWvw9LSOmczmRbuUkmHbkMtJ/rUeooFCn4QQS9W2IxZFlpKUAxtjGefalJu Eie1b4+NGPXKwvWY0QZ8sK4NmWfdL7UX+7aLDJ++PZsnEJz+zFxZ8ePcdzfyEnewddh8 2DExHphaOqfaRHjHTOLF3zlxscDweKDCk3O/xyHaNZrwu9cYOXdgw0gmsPvGToeF0+W/ aKmM2+Z0FBY5mJoXy9DeRsvRmnE4HnpPmf0tyinvgfxyzntm8cQomKEVF2nGjBgPXVBO B0Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=veTmN8Ya; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d18si506853pgi.335.2019.04.30.09.30.42; Tue, 30 Apr 2019 09:30:59 -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=@google.com header.s=20161025 header.b=veTmN8Ya; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726460AbfD3Q3Z (ORCPT + 99 others); Tue, 30 Apr 2019 12:29:25 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:36610 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726028AbfD3Q3Y (ORCPT ); Tue, 30 Apr 2019 12:29:24 -0400 Received: by mail-pf1-f193.google.com with SMTP id v80so2724405pfa.3 for ; Tue, 30 Apr 2019 09:29:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=M8CMI/W3q+BSC73DTflngmeta3WjHrDaqS1WHzzkYCk=; b=veTmN8YaZ3bNLDr94/iiI2YhDH1dk7szUetYQ4x7FThsIr2WCCAOOppzZgcXwaTV1x iaifTKBgUYNlpfmoUIQ58b5TLqg72BgDJLt+5rQEZ+yaJ/agYTsEaMsPgrYrg7mXcRSt UQ7KeXvjLfA5h4yBMrCkQf8zUJ7mVQfqu6zVGrwheBEMBPP0CqYFcKDlqhYZ/DE/9b3Y vQg63MCbKkW5Godw8bKTv6Eqacr8WJVry7H8vHiz2r0nGdoWnOdJ++kq8DWu3FnAAnno 4nEXdiZY0lRja41CnQ/cZFRGDg0Y6g3ltiq0mgXmdOAA7XUN+aKQYpM1RgYMk7d1CKSv SiDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=M8CMI/W3q+BSC73DTflngmeta3WjHrDaqS1WHzzkYCk=; b=PJtzvz2nQmyEPc69pNdErvk1vsMi9q2ILh1AgC33+OPYQKjvoGHaXIt5rxOM1uljtl lpTWf4WrpIafEYXE9aKYHJfCXk7jjm/+3EubpX0ob/8w7rQOVIYKvD164UXjbUsGn9BR vw5GIjdiLQZiGUwvB9u1AGbo5oHKgrhhFW4eS36KQcVNsMEKteJTU+i6Lp51jMThlz5Y qGo1LCECutmAhZ/kzZ9S29ju4tH7A8dpHls5pRB/ZYqZcmzkAY73oosS+O2uRupXd+7O X4ILW+sAMfX3Th/LdQcZWKN3dwWmhgr0SG8DJcx+doDWMTUyPLeDtB3mlNd6enGrsEU9 R3UA== X-Gm-Message-State: APjAAAWs/fChdz3/h9QeKLIhJrbDHqusJxkZYU4CZJnFfECeYLiEvbel F5elC7c0CoZY+fpKKnZ0C1WMzQ3P6QAWl559zoPA4Q== X-Received: by 2002:a63:cc48:: with SMTP id q8mr528012pgi.202.1556641763398; Tue, 30 Apr 2019 09:29:23 -0700 (PDT) MIME-Version: 1.0 References: <46b3e8edf27e4c8f98697f9e7f2117d6@AcuMS.aculab.com> <20190430145624.30470-1-tranmanphong@gmail.com> In-Reply-To: From: Nick Desaulniers Date: Tue, 30 Apr 2019 09:29:12 -0700 Message-ID: Subject: Re: [PATCH V2] of: fix clang -Wunsequenced for be32_to_cpu() To: Phong Tran Cc: robh+dt@kernel.org, Frank Rowand , pantelis.antoniou@konsulko.com, David.Laight@aculab.com, hch@infradead.org, Nathan Chancellor , devicetree@vger.kernel.org, LKML , clang-built-linux Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 30, 2019 at 9:28 AM Nick Desaulniers wrote: > > On Tue, Apr 30, 2019 at 7:58 AM Phong Tran wrote: > > > > 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 > > Thanks for the patch. > Reported-by: Nick Desaulniers > Link: https://github.com/ClangBuiltLinux/linux/issues/460 > Suggested-by: David Laight sent too soon... Reviewed-by: Nick Desaulniers -- Thanks, ~Nick Desaulniers