From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kernel.org ([198.145.29.99]:55456 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726728AbfJKPbb (ORCPT ); Fri, 11 Oct 2019 11:31:31 -0400 Date: Fri, 11 Oct 2019 17:31:27 +0200 From: Greg Kroah-Hartman Subject: Re: [PATCH 4/4] export: avoid code duplication in include/linux/export.h Message-ID: <20191011153127.GA1283883@kroah.com> References: <20191010151443.7399-1-maennich@google.com> <20191010151443.7399-5-maennich@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191010151443.7399-5-maennich@google.com> Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: Matthias Maennich Cc: linux-kernel@vger.kernel.org, kernel-team@android.com, Jessica Yu , Masahiro Yamada , Martijn Coenen , Lucas De Marchi , Shaun Ruffell , Will Deacon , linux-kbuild@vger.kernel.org, linux-modules@vger.kernel.org On Thu, Oct 10, 2019 at 04:14:43PM +0100, Matthias Maennich wrote: > Now that the namespace value is not part of the __ksymtab entry name > anymore, we can simplify the implementation of EXPORT_SYMBOL*. By > allowing the empty string "" to represent 'no namespace', we can unify > the implementation and drop a lot redundant code. That increases > readability and maintainability. > > As Masahiro pointed out earlier, > "The drawback of this change is, it grows the code size. When the symbol > has no namespace, sym->namespace was previously NULL, but it is now am > empty string "". So, it increases 1 byte for every no namespace > EXPORT_SYMBOL. A typical kernel configuration has 10K exported symbols, > so it increases 10KB in rough estimation." 10Kb of non-swapable memory isn't good. But if you care about that, you can get it back with the option to compile away any non-used symbols, and that shouldn't be affected by this change, right? That being said, the code is a lot cleaner, so I have no objection to it. Reviewed-by: Greg Kroah-Hartman