From patchwork Fri May 11 15:05:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Martin X-Patchwork-Id: 135543 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp987546lji; Fri, 11 May 2018 08:06:03 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpjOmHNg6mmZDFGTnFurz6Fuxro+RF9Zobw6c5m80OcKgvprp0PVdmFfADGAsLTH9NKI72D X-Received: by 2002:a17:902:7e05:: with SMTP id b5-v6mr5747084plm.230.1526051163655; Fri, 11 May 2018 08:06:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526051163; cv=none; d=google.com; s=arc-20160816; b=ARrmutw/C1tqH8o60Qa6Wng+WZw7pmSvVerCaLJBz3lCpwMdpuZmB/SKUwAGnjp6Ww HbP/39n+W+lUEiL3tMh4Kb1wzLVot4vdHvlJi50qrtMeppR7nuKh3be58SWo69gbK34z iwtIe5qQJ59P2KIwy6NIsW/D1LWQIKVigEH1yNOych7P8qtYuhr5E6GAtRSzXuUj8rV+ PQZAiZK6Hn+V/NxiZMWJTOsAImWYB2axx/qSqAG+DUqReZYLaAzvQxHtEtL3BGFJnm+o CSQZAOPCBQV8D5tExOFlcgZMPQhluPD18IFnTfZVRaMtIBGVvUnI/JXZRAVJYi2YaIcR E14Q== 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=WjACOErfMxWvCTPwvXq+5DsusNo3NPyfhegwd+9d0KWv0Nsqrji17cfvGPHF5ddF/v QJxG2NjdveEVP5JtQ4+j03GoSz4CJq+YZV0qAa/v67ss8Q/MG+btHTzeBVr9Ucc+JNQO FEY56MDg6xJo7wQXKdojZMStAl3GejM+vwN0GqqiwNc6jRrB+TH/JoSOkquyUFnHGbJB 2YVvaL6ZStnWnoD4EvxC7ghUa4IMdl4GuyUPNZSAT4X5f5Sj8TFU/iTBI4rNSJN+VcoP wFO8rpmvofarrbmNe9t9JChRmgg+cLDoRNdwgI+hXzT0OfkL3CG1cA/tLydUB7PTWMXc oq+w== 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 m19-v6si3509995pff.303.2018.05.11.08.06.03; Fri, 11 May 2018 08:06:03 -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 S1753420AbeEKPF7 (ORCPT + 29 others); Fri, 11 May 2018 11:05:59 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:43172 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753145AbeEKPF5 (ORCPT ); Fri, 11 May 2018 11:05:57 -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 2B24B1684; Fri, 11 May 2018 08:05:57 -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 EAD683F23C; Fri, 11 May 2018 08:05:54 -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, Russell King Subject: [PATCH REPOST 2/5] ARM: Use update_thread_flag() Date: Fri, 11 May 2018 16:05:01 +0100 Message-Id: <1526051104-15995-3-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 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);