From patchwork Fri May 11 15:05:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Martin X-Patchwork-Id: 135546 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp989693lji; Fri, 11 May 2018 08:07:45 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqCI0IhQMtpL3d3MOVdKmhkVsTshExItNQU3gLeDWiuuv+/ZRf22WBshJqOQEr/FP+bi729 X-Received: by 2002:a62:4cca:: with SMTP id e71-v6mr5813921pfj.171.1526051265379; Fri, 11 May 2018 08:07:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526051265; cv=none; d=google.com; s=arc-20160816; b=yI4yxX4cN8DZlU7PY4JdGP8f4DXYHJPi2KazSxzhPaVhzBgOpYgGlVDaai3wdufmec Rsyyxtiuosr/sN0nwOQFbcEZkGw6BnX/+T/8n1bxlL5r49T5sOqZd795RAQqHC500B91 8CZqpdgyZUnyX2WeMJRR6trcElc3yHuiJ2Hf8sUnkv3xoqf+Zd9j28YrLkNDo/Tbffna 8OVKe7Wk4q37dBCWCDjHFu0iz5SEwrI36Ba0jkT5YHNRi9rtIdzGRRsqkx/QLFcI55I5 kMRld40P6Btx2tLbWjTB0uU+DfEfTjZRw9nveai/3kSj6iLp09g2bXQhNK2RCZUdh7FE mbJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=uos9N+/+gTbmX8esVvytXfTPR/k6nSOERv1pPyrGpvI=; b=CQXBogU6ewaFGBR1yN/68twJ8qEQDZaQssAgx6e8+RHB8EBIXX4NpY+ZLtSQywJnxs Q0sDbipLfR9OlBixzQFhrj2xVdYMjGTePeknE1TgaTbeKuhnj3Oc5VOhn628ts08SO7N or6kPaIWXyXNEvYoejYKtqTmRlR9TkvUQtfNs9fIUjsVNuaUJQw03Ag/JvWdzf9Nvq0g e6FxYkZktj8/sq2gmvJGa8hS8mjy0oi3Xsy9ebVPzQOn7ss66Qs8YrwPix1hBiD2EyNV RMXhPCw0ULk9kCiZP8jdVbhklZFc4P6b388blTLneZv7XEXWTdqv2175lKrkiq9aYWc+ a4ug== 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 s14-v6si2670766pgf.640.2018.05.11.08.07.45; Fri, 11 May 2018 08:07:45 -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; 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 S1753601AbeEKPHm (ORCPT + 29 others); Fri, 11 May 2018 11:07:42 -0400 Received: from foss.arm.com ([217.140.101.70]:43220 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753423AbeEKPGB (ORCPT ); Fri, 11 May 2018 11:06:01 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A74CC16A0; Fri, 11 May 2018 08:06:01 -0700 (PDT) Received: from e103592.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 9622E3F23C; Fri, 11 May 2018 08:05:59 -0700 (PDT) From: Dave Martin To: linux-kernel@vger.kernel.org Cc: Ralf Baechle , James Hogan , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , "David S. Miller" , Ingo Molnar , Peter Zijlstra , Steven Rostedt , Oleg Nesterov , linux-arch@vger.kernel.org Subject: [PATCH REPOST 4/5] powerpc: Use update_thread_flag() Date: Fri, 11 May 2018 16:05:03 +0100 Message-Id: <1526051104-15995-5-git-send-email-Dave.Martin@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1526051104-15995-1-git-send-email-Dave.Martin@arm.com> References: <1526051104-15995-1-git-send-email-Dave.Martin@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch uses the new update_thread_flag() helper to simplify a couple of if () set; else clear; constructs. No functional change. Signed-off-by: Dave Martin Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman --- arch/powerpc/include/asm/elf.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) -- 2.1.4 Acked-by: Michael Ellerman diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h index 548d9a4..136c9b1 100644 --- a/arch/powerpc/include/asm/elf.h +++ b/arch/powerpc/include/asm/elf.h @@ -88,14 +88,8 @@ typedef elf_vrregset_t elf_fpxregset_t; #ifdef __powerpc64__ # define SET_PERSONALITY(ex) \ do { \ - if (((ex).e_flags & 0x3) == 2) \ - set_thread_flag(TIF_ELF2ABI); \ - else \ - clear_thread_flag(TIF_ELF2ABI); \ - if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \ - set_thread_flag(TIF_32BIT); \ - else \ - clear_thread_flag(TIF_32BIT); \ + update_thread_flag(TIF_ELF2ABI, ((ex).e_flags & 0x3) == 2); \ + update_thread_flag(TIF_32BIT, (ex).e_ident[EI_CLASS] == ELFCLASS32); \ if (personality(current->personality) != PER_LINUX32) \ set_personality(PER_LINUX | \ (current->personality & (~PER_MASK))); \