From patchwork Thu Apr 19 10:58:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Martin X-Patchwork-Id: 133749 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp490450ljf; Thu, 19 Apr 2018 03:59:19 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+7mwJuirEO/2H/lC3mu2n+p5UoKdnGul3XPNJOAEu6l3iMGK9YgaDK7VeP2gmo6RrE4MCD X-Received: by 2002:a17:902:8e8a:: with SMTP id bg10-v6mr5729988plb.329.1524135558876; Thu, 19 Apr 2018 03:59:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524135558; cv=none; d=google.com; s=arc-20160816; b=1KA0q4HK3CUnpIiNWzphZhbsAwZZAAk+MyV2zRBkTks00W1XVesb0QqUMA0qDo5Kpy ytfrAZNI6NQc4o4poXDrjRczAN0BOoh5bgIlVe31esnP/mg89H37THjk98d7JVlZbkDC XGUmGltW3JjMAe+Vk6l5eQv4KJTDQAz7z5lW/h2rwwZHIW/gwWxl3Qbx9fyWW/5+LU+v X1NlsALqbRXpBCv3ZbOobVQg6plfL9F5bMQpKcymL+zvjSBxDchPbTQ/Vt1fVJFkpih5 efVmALiCdkBv5aRhXCIMtSZIUrE8hWrq1HzUj6l7NjqwKHSnRDQ9OwpYhQFhTIH0iBeD 2Qvw== 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=vGk7iO7T9aZbTVfNIuXdyrzA6O5ipYy0H9+nZmmLb8chq8nUv1xRLkn2APLegCFDLQ bOlM1CfrJ7YghSJukCZR7IrErGGln2jVtrnaFH7/zYsIYx297GibUitAe974QCTmoiuB jTj8bEjjNqGk7cNV4fx1k9mGlnLCsrydlFJ+c+MpoUY4tWe9FreV5VMpxaM6q+IDu4G2 /iLc4knRkwEaLkiAFw6hYEkCLTHj4WdWLSrf7JNIxYqW9ZRgnQo7Kb8V/CAKJ+D2uQus /3roamWEcr/pdh1p21aSM9lJo/79UWVudoJ+0MIpvjtEXnRbJl9L7Io/F/Z0n2YVeNvN 0tkQ== 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 b39-v6si1543565plb.456.2018.04.19.03.59.18; Thu, 19 Apr 2018 03:59:18 -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 S1752766AbeDSK7R (ORCPT + 29 others); Thu, 19 Apr 2018 06:59:17 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:35936 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752670AbeDSK7I (ORCPT ); Thu, 19 Apr 2018 06:59:08 -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 EAA501650; Thu, 19 Apr 2018 03:59:07 -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 936273F59D; Thu, 19 Apr 2018 03:59:05 -0700 (PDT) From: Dave Martin To: linux-kernel@vger.kernel.org Cc: Catalin Marinas , Will Deacon , 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: [RFC PATCH 5/6] powerpc: Use update_thread_flag() Date: Thu, 19 Apr 2018 11:58:47 +0100 Message-Id: <1524135528-28561-6-git-send-email-Dave.Martin@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1524135528-28561-1-git-send-email-Dave.Martin@arm.com> References: <1524135528-28561-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 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))); \