From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B85EC433FE for ; Thu, 4 Nov 2021 14:39:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 279C2611EE for ; Thu, 4 Nov 2021 14:39:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 279C2611EE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id B37B96B0072; Thu, 4 Nov 2021 10:39:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AE6376B0073; Thu, 4 Nov 2021 10:39:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9D515940007; Thu, 4 Nov 2021 10:39:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0071.hostedemail.com [216.40.44.71]) by kanga.kvack.org (Postfix) with ESMTP id 917016B0072 for ; Thu, 4 Nov 2021 10:39:40 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 4B67E180CA82B for ; Thu, 4 Nov 2021 14:39:40 +0000 (UTC) X-FDA: 78771506520.03.447CF19 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf15.hostedemail.com (Postfix) with ESMTP id 729A8D00009B for ; Thu, 4 Nov 2021 14:39:29 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id D8A1E61221 for ; Thu, 4 Nov 2021 14:39:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636036778; bh=ai31fzAbWj8pRoJ/nZTLZdrdlF+TK/pOzNP3mcZ4RTg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=RFkeXZlcGamv5Vouh/DNZEIfWGdikJbn8FzthkiGorj38Q/sYSkBwH/YxVUFwyzG0 N403HxVcAIYijcNd/7tde2Cu1+0rl1wsvsmEHWWgfvbcS/gJL0MoVJYpBDNxK5H2dr PgdQSwYSIV8z9q+IICwKIm0hraqkaLWPa0ExAQRF93QYSgDhTHcZ2nzk9pV7y6+NKs AblsJGVgndF2xMY4JBIz/QCuKwn8zxSAOEfxj4NVSb31TLSHvvktiuNxhlgoNx/z1q m986JpGCXD/++Vm+OSg5xFxQKXgZeOyajTlIu8uoUDkbM/xEz9CPdkUS18akrWPQoK 9poFEAtOYfPmw== Received: by mail-wm1-f49.google.com with SMTP id b184-20020a1c1bc1000000b0033140bf8dd5so4424533wmb.5 for ; Thu, 04 Nov 2021 07:39:38 -0700 (PDT) X-Gm-Message-State: AOAM531ZM0LhzIVMMNz5gClk8uFvb8Gb9CfpU3aXXMrBFmjJNmQRQbhV n2DWpsWSr2NzNfSh7/9r4Ri+ixoKZHP4AyzlKrc= X-Google-Smtp-Source: ABdhPJyVqn+aJE8IHgch7AdIuqESKhXTx5L0KXCRWKzrMD9FeGcqtI0O3CVdwxGSSN1H/T8sxxoFdNTY3m6sp/KZdy0= X-Received: by 2002:a05:600c:2107:: with SMTP id u7mr3532339wml.82.1636036777247; Thu, 04 Nov 2021 07:39:37 -0700 (PDT) MIME-Version: 1.0 References: <20211104133549.1150058-1-arnd@kernel.org> In-Reply-To: From: Arnd Bergmann Date: Thu, 4 Nov 2021 15:39:21 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] mm: vmap: avoid -Wsequence-point warning To: Matthew Wilcox Cc: Andrew Morton , Arnd Bergmann , "Uladzislau Rezki (Sony)" , Stephen Rothwell , Nicholas Piggin , Michal Hocko , "Paul E. McKenney" , Chen Wandun , David Hildenbrand , Linux-MM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=RFkeXZlc; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf15.hostedemail.com: domain of arnd@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=arnd@kernel.org X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 729A8D00009B X-Stat-Signature: 7jagna8k8knkj315t3oy6aqznnxe467r X-HE-Tag: 1636036769-659943 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Nov 4, 2021 at 2:57 PM Matthew Wilcox wrote: > On Thu, Nov 04, 2021 at 02:35:40PM +0100, Arnd Bergmann wrote: > > > > This only appeared in one randconfig build so far, and I don't know > > what caused it, but moving the index increment out of the expression > > at least addresses the warning. > > Would that randconfig include CONFIG_ARM64_PA_BITS_52? > > #define __phys_to_pte_val(phys) (((phys) | ((phys) >> 36)) & PTE_ADDR_MASK) > > because that's going to double-increment idx. Or single increment. > Or whatever else the compiler feels like doing. Ok, got it. I've got a new patch turning that into an inline function now, which seems like a more reliable fix. I still don't see why the warning only showed up now, as both the caller and the definition of __phys_to_pte_val() are not that new, and I've been testing with gcc-11 for a while now. Arnd