Received: by 10.213.65.68 with SMTP id h4csp451518imn; Tue, 13 Mar 2018 09:28:18 -0700 (PDT) X-Google-Smtp-Source: AG47ELvba6keV71vXgxGf8yXlywbBsgrOtjr8mkkynqCgwZcF/vQL8tAuQ+FQT6gccW4o+OEKrt9 X-Received: by 10.98.88.5 with SMTP id m5mr1150629pfb.231.1520958498348; Tue, 13 Mar 2018 09:28:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520958498; cv=none; d=google.com; s=arc-20160816; b=O6CwGTmkGEn/3ViJyanxE5uXNo2t6yU1YJzCDjmfcCELjo6xAiDjFcjWnf+Ag9SzcJ lLaP3xyVwrVrdWOAMI03gP7g6NRIbSVuOLyqNuidK2ICrzU5OAypj59tBCyu0s+7hyHC icJ5MGzPUn8ikYqG+vsjuZ6HHJiVDFjRiGU2FTIbIZQAMX/BFUHgsuVEy9P1cG4Lc3dN 6MmBjxluy0I8tnxeg/hb0fx+ZD8gv2RfB3nB03LNxi7ABbWcxXEoKwADhNUEHxD9vJQq lheP6bX+lryhUvI3glnR5wqmFoiJsh3A22f+iSoDGzHvUI6fmqfrWlgIyn9JS3ywo8DQ Qo5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=7jjI1BQJYiaWvX73Hm+KV+XWvqi0zOueWSban2UrhRU=; b=JsFYw4VMClbbJr/zrW8FKLezUp5bqqrEAIy0u4jpdDo7GYWgeVTbeFpx+WiEyUQqLO m/kUwGnuBWuDhZDD5Eju34LrYL4qJAXUV79eeE8BgBwwhD1h5wsJT0Abl+IXaldu2N7+ 17UN0lQrzuxGCHOeuaz6/vj+8Rt03gJycluslXsPXcW8pl110uAuPEtbQzIo3bwJp7IZ kne9Pk2nSu7NqoKGC9alkDk5xSoMaf36Vug254TJSzCy8y/Ta7pQw3pp+XmFXyXvUnRA 6Ra8+3+H/vkdAnLjuSVoZbfKwBvV++M8lFj45madFYf0brMtuZjsaLa3b+bWh3bBdKIC RGiQ== 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 e30si262441pgn.261.2018.03.13.09.28.04; Tue, 13 Mar 2018 09:28: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 S1753113AbeCMPdw (ORCPT + 99 others); Tue, 13 Mar 2018 11:33:52 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:60850 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933599AbeCMPdt (ORCPT ); Tue, 13 Mar 2018 11:33:49 -0400 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6799CE64; Tue, 13 Mar 2018 15:33:48 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Peter Zijlstra (Intel)" , Thomas Gleixner , Josh Poimboeuf , Andy Lutomirski , Arjan van de Ven , Borislav Petkov , Dan Williams , Dave Hansen , David Woodhouse , Linus Torvalds , Ingo Molnar Subject: [PATCH 4.15 097/146] objtool: Use existing global variables for options Date: Tue, 13 Mar 2018 16:24:24 +0100 Message-Id: <20180313152328.077420804@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180313152320.439085687@linuxfoundation.org> References: <20180313152320.439085687@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Peter Zijlstra commit 43a4525f80534530077683f6472d8971646b0ace upstream. Use the existing global variables instead of passing them around and creating duplicate global variables. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Thomas Gleixner Acked-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Dan Williams Cc: Dave Hansen Cc: David Woodhouse Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Peter Zijlstra Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- tools/objtool/builtin-check.c | 2 +- tools/objtool/builtin-orc.c | 6 +----- tools/objtool/builtin.h | 5 +++++ tools/objtool/check.c | 5 ++--- tools/objtool/check.h | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) --- a/tools/objtool/builtin-check.c +++ b/tools/objtool/builtin-check.c @@ -53,5 +53,5 @@ int cmd_check(int argc, const char **arg objname = argv[0]; - return check(objname, no_fp, no_unreachable, false); + return check(objname, false); } --- a/tools/objtool/builtin-orc.c +++ b/tools/objtool/builtin-orc.c @@ -25,7 +25,6 @@ */ #include -#include #include "builtin.h" #include "check.h" @@ -36,9 +35,6 @@ static const char *orc_usage[] = { NULL, }; -extern const struct option check_options[]; -extern bool no_fp, no_unreachable; - int cmd_orc(int argc, const char **argv) { const char *objname; @@ -54,7 +50,7 @@ int cmd_orc(int argc, const char **argv) objname = argv[0]; - return check(objname, no_fp, no_unreachable, true); + return check(objname, true); } if (!strcmp(argv[0], "dump")) { --- a/tools/objtool/builtin.h +++ b/tools/objtool/builtin.h @@ -17,6 +17,11 @@ #ifndef _BUILTIN_H #define _BUILTIN_H +#include + +extern const struct option check_options[]; +extern bool no_fp, no_unreachable; + extern int cmd_check(int argc, const char **argv); extern int cmd_orc(int argc, const char **argv); --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -18,6 +18,7 @@ #include #include +#include "builtin.h" #include "check.h" #include "elf.h" #include "special.h" @@ -33,7 +34,6 @@ struct alternative { }; const char *objname; -static bool no_fp; struct cfi_state initial_func_cfi; struct instruction *find_insn(struct objtool_file *file, @@ -2021,13 +2021,12 @@ static void cleanup(struct objtool_file elf_close(file->elf); } -int check(const char *_objname, bool _no_fp, bool no_unreachable, bool orc) +int check(const char *_objname, bool orc) { struct objtool_file file; int ret, warnings = 0; objname = _objname; - no_fp = _no_fp; file.elf = elf_open(objname, orc ? O_RDWR : O_RDONLY); if (!file.elf) --- a/tools/objtool/check.h +++ b/tools/objtool/check.h @@ -63,7 +63,7 @@ struct objtool_file { bool ignore_unreachables, c_file, hints; }; -int check(const char *objname, bool no_fp, bool no_unreachable, bool orc); +int check(const char *objname, bool orc); struct instruction *find_insn(struct objtool_file *file, struct section *sec, unsigned long offset);