From patchwork Thu Apr 19 10:58:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Martin X-Patchwork-Id: 133747 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp490319ljf; Thu, 19 Apr 2018 03:59:07 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/2yfzE2+knbtAzur3U5dQrHk6NCc/3rqQpFsR5yUh0rooWsWB6E6F535zXUDOYMNhYeduo X-Received: by 2002:a17:902:207:: with SMTP id 7-v6mr5670226plc.261.1524135546937; Thu, 19 Apr 2018 03:59:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524135546; cv=none; d=google.com; s=arc-20160816; b=irg25K3RNIJ1HUYo5TiJoUmoSLyVCuY2ILc5dsWmzEASkhSoWBCmwjNIV1twldQuOc Ab92pp27bnsO35R8r56msjTbjwpy7mlM8x1P4SXxht6sFCnL0siRdVtio3iSH7Shfcr8 Lmzzt5VHegecoDkXByh8Fri88NWuo3ypNHt3J4OAAvTUmnHJKL0UdyF2IlCL58FPgO+a HjRdkFJyzrrUS/0L1jKyNlMdD79WSJQyDyKtlPim0l0tt02SYOjWUiYy8rf2wzXCnAQu NW7q+fb1Y9uxR4T0fjPw6VUFSdLh5zXH2Yz1AAVzE5mcLSGgDh7ZcfH7ExhQb/3tDWRC nswQ== 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=hIqb4CvguZn4U5rLc6F8lKH1t8d2R8mtWtp9p21dhkM=; b=cBxzV/tYL3zQzdqkQFlsZTkUHHVlIUzc09Pkq7ORnqisozduHjw3T3xxgKT5WlDv4Q PejEaMFEkMnFQPWwB5DnieKmKTfDS8Tmb7IcjRd1xZzvrLg1PMiR7zy+2jq33vBupZko Whs32jgCtlOVGeFcAN7vrWD1orUYg+OgG1uJmyeb5olVjyky1I5te4uk0InVtibmN/RF dqqjZKWjp3TpxYRGjfXMDII7m9V33LvK7LQuZyt5pcS6xtfeb6mtpiFNq8TbCqEnPKs0 q8IfXrbXw+3B/hcAkma6tV+fz/oL4WBkVEMDSMWy3h3yY6lx+1ssaA0Or+awIwPx5gsI WHgA== 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 135si3021331pfc.21.2018.04.19.03.59.06; Thu, 19 Apr 2018 03:59:06 -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 S1752658AbeDSK7E (ORCPT + 29 others); Thu, 19 Apr 2018 06:59:04 -0400 Received: from foss.arm.com ([217.140.101.70]:35862 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752605AbeDSK7A (ORCPT ); Thu, 19 Apr 2018 06:59:00 -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 613F115B2; Thu, 19 Apr 2018 03:59:00 -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 D962A3F59D; Thu, 19 Apr 2018 03:58:57 -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, Russell King Subject: [RFC PATCH 2/6] ARM: Use update_thread_flag() Date: Thu, 19 Apr 2018 11:58:44 +0100 Message-Id: <1524135528-28561-3-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 an if () set; else clear; construct. No functional change. Signed-off-by: Dave Martin Cc: Russell King --- arch/arm/kernel/elf.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) -- 2.1.4 diff --git a/arch/arm/kernel/elf.c b/arch/arm/kernel/elf.c index 1824229..aade393 100644 --- a/arch/arm/kernel/elf.c +++ b/arch/arm/kernel/elf.c @@ -68,12 +68,9 @@ void elf_set_personality(const struct elf32_hdr *x) * binary is EABI or softfloat (and thus, guaranteed not to use * FPA instructions.) */ - if (elf_hwcap & HWCAP_IWMMXT && - eflags & (EF_ARM_EABI_MASK | EF_ARM_SOFT_FLOAT)) { - set_thread_flag(TIF_USING_IWMMXT); - } else { - clear_thread_flag(TIF_USING_IWMMXT); - } + update_thread_flag(TIF_USING_IWMMXT, + elf_hwcap & HWCAP_IWMMXT && + eflags & (EF_ARM_EABI_MASK | EF_ARM_SOFT_FLOAT)); } EXPORT_SYMBOL(elf_set_personality);