Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1145211imu; Fri, 4 Jan 2019 14:07:47 -0800 (PST) X-Google-Smtp-Source: ALg8bN7MRnrH2wssOKVOKVeYDHaPyfjFpg8dvcdxbkcnonE/zNdeG3LB9oNYRmhhj42DlCy4zCgb X-Received: by 2002:a65:4683:: with SMTP id h3mr2921821pgr.225.1546639667899; Fri, 04 Jan 2019 14:07:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546639667; cv=none; d=google.com; s=arc-20160816; b=w9zFOKRXNDJXSzUD3EvlrxDceBTIUwhsm4R4QM3gbraCyFOpoqOo7jqMEo3/Qp3yxL GoHy5KX7F/2GYY1s8FGYxuOYuGcwxu3pLAnwRPX4KocOpJF28pdtFn/8RwOjtPNLP6LK bHde96yuBECrM0guJKlm75Psv4i3Tb468Ohb7/gzm6/gpBJqQ5J8t+FOVqP3EW90Te9j hutA0wFKmJLYTJy9n+bh6zw/TkAig46DiY8UyvL+0SjJESAAI1VjvDXkemCJO0dV9LXl BEWMaUJKrnmRfVFiSadaviyReR+fHG5dLbCIvgYNifPYEUjxS5ib304F7+Txb9P4HbIv 6u6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:message-id :in-reply-to:subject:cc:to:from:date; bh=A4EJ8jS159NQlYyll5WnAThqf2r6JzCrj3ZoXicZrlI=; b=E8bKKC4bzce+Cfxnd7511h/gOS+KcFQO93l4T9MwAbdh/cN9pIjiYduEFxQXNlaF0E zf0dBiMzhaSTmUliI3BaSpvlUSsQpvPD2wbVt4Vvw2PHWb9lTGujBCIBAP6jsG16IDsO pRT27TEgirKBqSlNT2rEhzRmVMBFk/v81TexWZ46P4k53rhj/eS/Y0mQWo/vvs4YU0hv F3+Ri8V93tQOjjso6muGP8Dtwu+nn0T9tGsIaaSA+eLzoUxH4MczwnTGx+OmuWoQjW8k FihZhok56W1Q744cdo7tmkyJkfJmcRLKSRnR74+e/Yi3rH6B2BIdeD1GSfTeslftd94q zGZg== 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 bb4si2494370plb.322.2019.01.04.14.07.33; Fri, 04 Jan 2019 14:07:47 -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; 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 S1726420AbfADWFN (ORCPT + 99 others); Fri, 4 Jan 2019 17:05:13 -0500 Received: from kvm5.telegraphics.com.au ([98.124.60.144]:43212 "EHLO kvm5.telegraphics.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726105AbfADWFM (ORCPT ); Fri, 4 Jan 2019 17:05:12 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by kvm5.telegraphics.com.au (Postfix) with ESMTP id 3770929D56; Fri, 4 Jan 2019 17:05:09 -0500 (EST) Date: Sat, 5 Jan 2019 09:05:33 +1100 (AEDT) From: Finn Thain To: Christoph Hellwig cc: Arnd Bergmann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v8 05/25] char/nvram: Adopt arch_nvram_ops In-Reply-To: <20190104175639.GA6347@infradead.org> Message-ID: References: <66ed571883695314ace53080df8f6dfb132a8b4d.1545784679.git.fthain@telegraphics.com.au> <20190103080229.GB11147@infradead.org> <20190104175639.GA6347@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 4 Jan 2019, Christoph Hellwig wrote: > On Fri, Jan 04, 2019 at 09:08:13AM +1100, Finn Thain wrote: > > On Thu, 3 Jan 2019, Christoph Hellwig wrote: > > > > > > + > > > > +const struct nvram_ops arch_nvram_ops = { > > > > + .read_byte = nvram_read_byte, > > > > + .write_byte = nvram_write_byte, > > > > + .get_size = nvram_get_size, > > > > +}; > > > > +EXPORT_SYMBOL(arch_nvram_ops); > > > > > > I think something this internal should always be EXPORT_SYMBOL_GPL. > > > > > > > By "internal" do you mean "not involving interests outside of the Linux > > Foundation"? TBH, I don't know who's affected. > > Linux Foundation doesn't matter. > > But as far as I can see you export the struct from arch code > for nvram.ko to use them and no one else, which is clearly internal. > No, arch_nvram_ops is not "internal" in that sense. The struct is used whereever the nvram_* exports are presently used: $ git grep -e "EXPORT_SYMBOL.*nvram" v4.20 ... v4.20:arch/powerpc/kernel/setup_32.c:EXPORT_SYMBOL(nvram_read_byte); v4.20:arch/powerpc/kernel/setup_32.c:EXPORT_SYMBOL(nvram_write_byte); v4.20:arch/powerpc/kernel/setup_32.c:EXPORT_SYMBOL(nvram_get_size); v4.20:arch/powerpc/kernel/setup_32.c:EXPORT_SYMBOL(nvram_sync); v4.20:drivers/char/nvram.c:EXPORT_SYMBOL(__nvram_read_byte); v4.20:drivers/char/nvram.c:EXPORT_SYMBOL(nvram_read_byte); v4.20:drivers/char/nvram.c:EXPORT_SYMBOL(__nvram_write_byte); v4.20:drivers/char/nvram.c:EXPORT_SYMBOL(nvram_write_byte); v4.20:drivers/char/nvram.c:EXPORT_SYMBOL(__nvram_check_checksum); v4.20:drivers/char/nvram.c:EXPORT_SYMBOL(nvram_check_checksum); ... $ git grep -wle "nvram_read_byte|nvram_write_byte|nvram_get_size|nvram_sync|__nvram_read_byte|__nvram_write_byte|__nvram_check_checksum" arch/powerpc/include/asm/machdep.h arch/powerpc/include/asm/nvram.h arch/powerpc/kernel/setup_32.c arch/powerpc/platforms/powermac/nvram.c drivers/char/generic_nvram.c drivers/char/nvram.c drivers/platform/x86/thinkpad_acpi.c drivers/scsi/atari_scsi.c drivers/video/fbdev/controlfb.c drivers/video/fbdev/imsttfb.c drivers/video/fbdev/matrox/matroxfb_base.c drivers/video/fbdev/platinumfb.c drivers/video/fbdev/valkyriefb.c include/linux/nvram.h sound/ppc/awacs.c $ --