From patchwork Thu Nov 14 17:42:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 179456 Delivered-To: patch@linaro.org Received: by 2002:ac9:3c86:0:0:0:0:0 with SMTP id w6csp10954133ocf; Thu, 14 Nov 2019 09:42:39 -0800 (PST) X-Google-Smtp-Source: APXvYqxa2H4zIVFuuSaCwE46opHpw8VR4Bki2b0wYiQubHB7gAlMssq1mdvddCnxOKRXC6dYlFZI X-Received: by 2002:a50:9a85:: with SMTP id p5mr2597440edb.223.1573753358859; Thu, 14 Nov 2019 09:42:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573753358; cv=none; d=google.com; s=arc-20160816; b=sE3XO9Vkju35Nk8FhTnqtGqal48R1GxkDmu0iH+DxgZGVh/haGYAzW8EsYZ4jtSG2/ 2nhdQStUKYhvoXLpTEMTuxQ6wWeDMBZF+dIyZZLUNjdNPOPwEOioDJZLqU25KUKrwxtU CSJGbT124MRTtXGg8US9eOzIHglnSocYuc+3TwWQZ3f6JhSIBPqF6/xecpAZRlkvu7rx xhUVu46G0IJ2jJQWPC9ZIcF524QTKG+iZkn6egCalyenajCXowsdOl4QOBA25xFmgnU+ ykY4dMmZlCccLCNnLeg+o6XhGViq/JNG+ShDzHYNvrOCPDeu1zMRiIL5vvGQrHybMjam B7gQ== 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; bh=hD5s6ssP8dZQZE8/9P7xQCgsdQSDXm2EH1M7tYSApOw=; b=WQ6TnSqHuilNSn+vPBp8mgUTBE/T6HGHgmAxG2rK0ckefOBM5OUvhCIDkwJ6FnqFNp 6E4A//IdtsfldsXyUcXbBTZ0sZLI4E6M0vMqIS+y+Tqm3lNsJ8gIYcVzYlKIdiLvrcks Rjk+m2rCdvOWlwCu5cUeOfFaDRTEgdoUlVqSl9d1dmnQWQRMgwkJYdvdGsNBCp4pYM68 ZXaweHsjr2QYg28C0ntFox53Oiqx/1fQE2fR1UXsidyUxljuTkdg6hjB2Tc314uPyBpB uxurzedyJ3MVFS48hqk0dfz1yWc2J/3X8RlFzfqcBhrzFsj9bi2Y7/wiVP/f/qo6gGLL QVMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ifhmGmVu; 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 y32si5024774ede.209.2019.11.14.09.42.38; Thu, 14 Nov 2019 09:42:38 -0800 (PST) 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=ifhmGmVu; 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 S1726912AbfKNRme (ORCPT + 26 others); Thu, 14 Nov 2019 12:42:34 -0500 Received: from conuserg-09.nifty.com ([210.131.2.76]:64706 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726505AbfKNRmd (ORCPT ); Thu, 14 Nov 2019 12:42:33 -0500 Received: from grover.flets-west.jp (softbank126021098169.bbtec.net [126.21.98.169]) (authenticated) by conuserg-09.nifty.com with ESMTP id xAEHgSo3028428; Fri, 15 Nov 2019 02:42:29 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com xAEHgSo3028428 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1573753350; bh=hD5s6ssP8dZQZE8/9P7xQCgsdQSDXm2EH1M7tYSApOw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ifhmGmVuudFMgB3vHiQXBnrvLtcIZ9Nlh1wHNO67OvAukdevVIYWDCrLXApxix151 2u3oHfKOrB4v320O67MMooe1vhNlxQQk1IYJkv0KdxwrcErvbOUUCjzDX2JoqGsqFh 6Uh1M6PFTxtk/52cMD/U6VOm9X6bfSQMDzCwwG8UNObHPwMU1qkxk9beRKY7WtTDyN hnV968SKvI4xd2PRmrGMtROrBzyU3VJsPrQGouylkSFqhOvjzb3vlH67+s+1Lovr+E IrVHq9owCxQYXCq5w0Bu0bma1/7T+agp7fwDnxzHsd/UbVMUVu+QYR1EqUTIRF1RT2 4eSIYJoe4FtmQ== X-Nifty-SrcIP: [126.21.98.169] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 3/6] modpost: rename handle_modversions() to handle_symbol() Date: Fri, 15 Nov 2019 02:42:23 +0900 Message-Id: <20191114174226.7201-3-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191114174226.7201-1-yamada.masahiro@socionext.com> References: <20191114174226.7201-1-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This function handles not only modversions, but also unresolved symbols, export symbols, etc. Rename it to a more proper function name. While I was here, I also added the 'const' qualifier to *sym. Signed-off-by: Masahiro Yamada --- scripts/mod/modpost.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index d9418c58a8c0..6735ae3da4c2 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -683,8 +683,8 @@ static int ignore_undef_symbol(struct elf_info *info, const char *symname) return 0; } -static void handle_modversions(struct module *mod, struct elf_info *info, - Elf_Sym *sym, const char *symname) +static void handle_symbol(struct module *mod, struct elf_info *info, + const Elf_Sym *sym, const char *symname) { unsigned int crc; enum export export; @@ -2051,7 +2051,7 @@ static void read_symbols(const char *modname) for (sym = info.symtab_start; sym < info.symtab_stop; sym++) { symname = remove_dot(info.strtab + sym->st_name); - handle_modversions(mod, &info, sym, symname); + handle_symbol(mod, &info, sym, symname); handle_moddevtable(mod, &info, sym, symname); }