From patchwork Fri Feb 22 14:42:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 159032 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1810496jaa; Fri, 22 Feb 2019 06:43:26 -0800 (PST) X-Google-Smtp-Source: AHgI3IYGv36oNkMXscMhEJpjpWk0mCyO9iShd0+/6GSE4370NamS22a7sL9I5Rf/m2AJJsxR5+/D X-Received: by 2002:a17:902:b492:: with SMTP id y18mr4465408plr.175.1550846605667; Fri, 22 Feb 2019 06:43:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550846605; cv=none; d=google.com; s=arc-20160816; b=jwfmt9hMt/zYnVZiAxBg9BRyxt9CdJbLa4/wA1S6nYaxupaPkw1o2nv6K3TGrBaqvb oOMXD2s1f2K8HIDBpAikUSwzs+kRAG/l2Rnu+osDnwacEmK1gVQr6JXX4txu+Z/0cdJT ASIWvQpsxsZTy5veWYwLDjYWW9DuQ+Q4vSBwzPV6pFFNUEJCot3AqalDrpE10x9bW/L+ DEQEOSozQnaHX5e1nuv4z3+i5mDzZ7KY/vJnh+BHR1GCoriCkqNSwcZvszcX4os9dLQI JtxRHMlyeL9gtrJlMBlAk3TPuacKYTEDUPTL/8ZfVzTM3WqumcHd0clDay22GkyoU9Pz 7hHA== 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 :message-id:date:subject:cc:to:from; bh=7e7m3k+PfOnnmJnJl9zd/e7YAn2z/ZWLTxF1EBClZbM=; b=LBsvFNSjG9fVJTLuXYtZNdOOFKk0Ryr5Jmp+jG8DLSXSYY65h1vWZsmCvPBk215cgI Zo42SyPowvR+Z7HuxtClW5ibtA1HVyJgCzT+HHeOtf5QTlbfC/Csl0uolnVdoxaKCxzv +wg2bTPpU/zpySBeyDuibQTfaDrkUVa636lWG2YrSaNajEOFhK5nzkZJIDnjZnpffIun BjGNIf7JGD15jzQQdS6e5+uiAEXM81277RSfFuacfpwldvLDEXcnuRgYVio4flcF7Lgq rfv9rLdTp0e1/Q+DXcK5U65G5Zn+30LR49en7nAcgbSp84o2o7RTGG3VwYrFyriJSaKT wZ+Q== ARC-Authentication-Results: i=1; mx.google.com; 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 v69si1534794pfa.37.2019.02.22.06.43.25; Fri, 22 Feb 2019 06:43:25 -0800 (PST) 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; 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 S1727135AbfBVOnY (ORCPT + 32 others); Fri, 22 Feb 2019 09:43:24 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:51429 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725978AbfBVOnX (ORCPT ); Fri, 22 Feb 2019 09:43:23 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPA (Nemesis) id 1MLA6k-1ggD7c2B8s-00IEXc; Fri, 22 Feb 2019 15:43:10 +0100 From: Arnd Bergmann To: Catalin Marinas , Will Deacon Cc: natechancellor@gmail.com, ndesaulniers@google.com, Arnd Bergmann , Andrey Konovalov , Andrey Ryabinin , Dmitry Vyukov , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] arm64: avoid clang warning about self-assignment Date: Fri, 22 Feb 2019 15:42:23 +0100 Message-Id: <20190222144301.3516708-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:3vMyVhA/NmVqE8rVfJt7N/FIr5UNMdS5rMFHSOEzM3LfFmczuSG EzAhqToaSsNSdgXGQsijk7viVCnMc7EEKtj1uIaDoFTYr8f16BtiaZ/FdzEenc+spaitemW +E61FF0sTXICXZQaJwFD3iiKxXLaNf9E+YwRfuVvxArXKSh09EJfik25dgqHLqzC9Pkhema GiviClDZF+/BliRAHNftg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:pUS0q+W4c4E=:E90vViuwwtsZ9RWcqz+rmP X+CtVWP0w8KbG6uCQiAEFb8tJdRb9yg9x72I8fXOyzTKUzO0ngS6EduS+17FyD3sh7Yqzs8ei 9cNqtjRpaaUtOpoTGSVmTzcqHWBaoyU7XF6vmy2DoCl8hXoB9MHThBVXDnynh+nZPWF4hLCIL KoMQUOCARFPR7ewCyAKlOXD/jB49Miz1HVe1Ktq3s9A8Td04/i+BdfXm71sBLyhLFEVx+vJ+C rfEbz9/9idvSn/gdmiCIo1LQrqawsdT5CLyWmM1KTXBtififY1juoNujhgx/1JWxfdbBoxZcY CVZSttvrLRel0O1BbtRiBRVAzFPxC5Iaq3TKWBGGMKnPosflrx5dHY4hq4jxH+4yQizpiVvYe +1Uxw89GKpIcsbNqJtC+XgytymnUB0GROoXamayNUI2gCCaQFFt5ogiyeHv7HQ59oecG0yzcz unHt4ecf1ynVcQWwDjV5MPYR6zHO20i+pntYYiGnJast5JoimOhxXbuEWL0W4IDO8fuNFVoFa EYQTxYZQ8T+WHlgCghuJW3O4DED8M8WmgljPt6bcs4r07acH26kupzy2k7tJZ1XaMjkSpbbL/ i4jiDys7460v7AGGaAO6zu/Fw4htWneuDzcg4N2nemNL6NdEDXIxPe+X2gCrdUVsLs3tokhq6 LKVC5QcRE5ZhTTb0ke2LIRTPPdd7zR6mPkNfw26E6PSJGN3g8FvCONrgrEpLvd0E3wqux4Eks LrMqSATVcEFs48lJ7QOZGL7TJFyy3oC7jKwZRA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Building a preprocessed source file for arm64 now always produces a warning with clang because of the page_to_virt() macro assigning a variable to itself. Adding a new temporary variable avoids this issue. Fixes: 2813b9c02962 ("kasan, mm, arm64: tag non slab memory allocated via pagealloc") Signed-off-by: Arnd Bergmann --- arch/arm64/include/asm/memory.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.20.0 Reviewed-by: Andrey Konovalov diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h index b01ef0180a03..290195168bb3 100644 --- a/arch/arm64/include/asm/memory.h +++ b/arch/arm64/include/asm/memory.h @@ -312,8 +312,9 @@ static inline void *phys_to_virt(phys_addr_t x) #define page_to_virt(page) ({ \ unsigned long __addr = \ ((__page_to_voff(page)) | PAGE_OFFSET); \ - __addr = __tag_set(__addr, page_kasan_tag(page)); \ - ((void *)__addr); \ + unsigned long __addr_tag = \ + __tag_set(__addr, page_kasan_tag(page)); \ + ((void *)__addr_tag); \ }) #define virt_to_page(vaddr) ((struct page *)((__virt_to_pgoff(vaddr)) | VMEMMAP_START))