From patchwork Wed May 9 09:50:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 135234 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp5423665lji; Wed, 9 May 2018 02:50:59 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrS+vuwxCOairYidRr/I1jWj460az9PlvKBq+xhdJdMuJISQRLjdZ5rn6Zt9UhbZO40Qysl X-Received: by 2002:a63:9846:: with SMTP id l6-v6mr3707534pgo.217.1525859459504; Wed, 09 May 2018 02:50:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525859459; cv=none; d=google.com; s=arc-20160816; b=m8loSpf+zPElUZZNyEV+urDLfscbScfSPqSz9Iehz3jgupo+XP8ePZ/VZ/KjXIgWyI kiXFZ9gKTzIy+sgecS6kDZG7bzrBJU4v3qG0GlgyKvQmzkWNs3585XK9J+peob155Msx +Y3gIZorGrf8GW3W5orVjq0FWR1q4Xjd90WV+npRbRcta+o4JSDZ0T4dwZ5CacOTKDMU uPT30ehICYp4I8nfac7qg/xRrFm4luJlBH51Do/575NG0/nSu2mv6H9s50bF5LPbNJ7I YHTs4j62bBthc6ckojCWcdTDsNztrPF0NLudJhPVVFYrhSFxjS+s90ULJWhhaHerJsgO O8zw== 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:dkim-signature:dkim-filter :arc-authentication-results; bh=kIlbVj9Rct97c7dFUI0MYQX2njKCjdQopAnqkmOVQP4=; b=mrQ97odmhN2TM/Y4VNKgvcxZG8gs9fDSmKISHg23ZSpqTRPvFSZ8kHidIHveue5jxl eEeuBcOW5uq5uuc35d0rQL1HK9H/kgZDrapD5qSEYAiqBYay0byBOrHNLPWI5MtSAQZO 5+His1xrth4EjDq18S2bgjv7uZ2sFcihOutAsCKBBFMlokwFC+93QUMLDdD8tlqU6mZv isLZuU0MBqRPkMltLh8cNPz0mZzFr+1UgKR9ZRnqDIzx3TjKtTe7yb5HwTIC0WipYkhG jNICO6NtpCbqEd+ZDxU5/BvCKq3ReaI2EfnFH0vASTu59YtrODHjHKEJi2cUQZfJnfsj 3hmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=RHn2pI7v; 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 r9si17702899pfg.247.2018.05.09.02.50.59; Wed, 09 May 2018 02:50:59 -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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=RHn2pI7v; 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 S934531AbeEIJu5 (ORCPT + 29 others); Wed, 9 May 2018 05:50:57 -0400 Received: from conuserg-11.nifty.com ([210.131.2.78]:53966 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934142AbeEIJuw (ORCPT ); Wed, 9 May 2018 05:50:52 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id w499oiPO018127; Wed, 9 May 2018 18:50:46 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com w499oiPO018127 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1525859446; bh=kIlbVj9Rct97c7dFUI0MYQX2njKCjdQopAnqkmOVQP4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RHn2pI7vc8IxQZdJVCPx6CpJUDy7BeS060xA0ua66wWoD+Ww2W4EWrkSB3/mM8K8z 4CFLiHZilEhHHkNiI3Ce6MoFLk/OGUthmOEDwsQlZHy/1JuAYNbEER5jL/sf7eio9n UyUr30qpKgEgER2Qhy8M+QqzWWVPjUVPAxrIA8t1RSFO13aTgQReIq3SBfZK1KsAxn 0IWd+8Bmn06nWD5kzrLlhyl1x2a4zYoCyC9gHtdsQg4qeeQMVGW+I/i3EotPInnAMN tyXqfqUu1B2GJh/yhq+c4KISsz7txSTQeGJn4BGaLPQ5HT5njxNnyhqCwfCYhRT/Hc 1d/oGlDkudxyw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 3/4] modpost: remove redundant is_vmlinux() test Date: Wed, 9 May 2018 18:50:39 +0900 Message-Id: <1525859440-29583-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1525859440-29583-1-git-send-email-yamada.masahiro@socionext.com> References: <1525859440-29583-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The second test of is_vmlinux() is redundant. Signed-off-by: Masahiro Yamada --- scripts/mod/modpost.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.7.4 diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 8606b6c..9e70a6a 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1971,8 +1971,7 @@ static void read_symbols(char *modname) handle_modversions(mod, &info, sym, symname); handle_moddevtable(mod, &info, sym, symname); } - if (!is_vmlinux(modname) || - (is_vmlinux(modname) && vmlinux_section_warnings)) + if (!is_vmlinux(modname) || vmlinux_section_warnings) check_sec_ref(mod, modname, &info); version = get_modinfo(&info, "version");