Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1612230imm; Sat, 29 Sep 2018 00:02:14 -0700 (PDT) X-Google-Smtp-Source: ACcGV62JwL7pfTWFfbz0YDZHRkQfa+F/KwRGllTNkpJ+onf09ezp4mPwPSEmPr80JoFlHh8Mz5at X-Received: by 2002:a62:c186:: with SMTP id i128-v6mr1902343pfg.248.1538204534898; Sat, 29 Sep 2018 00:02:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538204534; cv=none; d=google.com; s=arc-20160816; b=gne012Txn0UR2dikREJpsjQL3821PZJ5AszNZl4H0gfakhAaMQsb8fA4OcRMOAh4y4 42wNh7mUUYIu/q5GewiIbxs3rr5Dtw/vfaodJcoKNlh+krWQXPv8qri5LnA+1ReK2XbY FLfvLqkM2ll4vqaT6uEgMU1xDaInynFWPUbGKoiE0xoZgob6qHhUJS1v7kI95RnWWqHx fDW7czEQmOF5PRo+XWG2UEou7x0wPceDHOzF5cSY5IlhhB2Z8QOl2FTdpAfsIhIMKvBq UA2eyJ4wV/zYYFsUaIQE49B7cloQiw32qCBXn+cBxqvCdqgucL7nKnL9AM7sRkjjhTsL Ok4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=tfEEV39oPa5dhs2mO1FT9kqLxVrb+Iqn+Eq3alP3jS4=; b=S3wPMGARs3dbcQ8aFE1kCjMEUDoklCUDUx1Yhc0/WxDnxzu7q5abqN+H45msTs5JRc FqQpmPtcWn8/uB2hBb4Sa368yJKL7O2eUh90tSjHAg6PpZqZxDZ2P3qtuCb9ZnLWLoUG kLerMwFShHna1P+nfRE+18C1WEnINTK9X/ToUB5Kj8wmaCQjaivMtByh5REV8LtBadc9 HkR/lA1EAOOXktio4uCd2uR1S27xb4lfEDwefqNumEU8n/p3d26AeVaTuftfBxdokJQ+ DuM/NUHKemP4HFLmnVf7HfJ8PUyQ4wM+y29cXWKttP0EDOjpCQQi31SYqnIKFbGLW3a+ U18w== 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 w124-v6si503610pfw.145.2018.09.29.00.01.30; Sat, 29 Sep 2018 00:02:14 -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 S1727585AbeI2N1s (ORCPT + 99 others); Sat, 29 Sep 2018 09:27:48 -0400 Received: from ozlabs.org ([203.11.71.1]:45407 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727418AbeI2N1s (ORCPT ); Sat, 29 Sep 2018 09:27:48 -0400 Received: by ozlabs.org (Postfix, from userid 1011) id 42MfZP5ZPHz9sD0; Sat, 29 Sep 2018 17:00:29 +1000 (AEST) From: Rusty Russell To: Masahiro Yamada , linux-kbuild@vger.kernel.org Cc: Arnd Bergmann , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org, Jessica Yu Subject: Re: [PATCH] modpost: remove leftover symbol prefix handling for module device table In-Reply-To: <1538115715-10078-1-git-send-email-yamada.masahiro@socionext.com> References: <1538115715-10078-1-git-send-email-yamada.masahiro@socionext.com> Date: Sat, 29 Sep 2018 16:30:22 +0930 Message-ID: <87bm8giy9l.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Please send this to the module maintainer (CC'd). Masahiro Yamada writes: > Blackfin and metag were the only architectures that prefix symbols with > an underscore. They were removed by commit 4ba66a976072 ("arch: remove > blackfin port"), commit bb6fb6dfcc17 ("metag: Remove arch/metag/"), > respectively. > > It is no longer necessary to handle part of module device > table symbols. > > Signed-off-by: Masahiro Yamada > --- > > scripts/mod/file2alias.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c > index 7be4369..ba4ebc4 100644 > --- a/scripts/mod/file2alias.c > +++ b/scripts/mod/file2alias.c > @@ -1415,11 +1415,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, > if (ELF_ST_TYPE(sym->st_info) != STT_OBJECT) > return; > > - /* All our symbols are of form __mod____device_table. */ > - name = strstr(symname, "__mod_"); > - if (!name) > + /* All our symbols are of form __mod____device_table. */ > + if (strncmp(symname, "__mod_", strlen("__mod_"))) > return; > - name += strlen("__mod_"); > + name = symname + strlen("__mod_"); > namelen = strlen(name); > if (namelen < strlen("_device_table")) > return; > -- > 2.7.4