From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A5C4C636CD for ; Sat, 17 Jul 2021 06:13:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 04A036115A for ; Sat, 17 Jul 2021 06:13:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230473AbhGQGPz (ORCPT ); Sat, 17 Jul 2021 02:15:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:41558 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbhGQGPx (ORCPT ); Sat, 17 Jul 2021 02:15:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4B4C56101A; Sat, 17 Jul 2021 06:12:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626502377; bh=8cLLirT0hvzwP0lrOx0mYq7s2nFKexMw23WQLVT2LaA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hco7pen6gNCqtDfle51bfDisW7MKsJ7n/yhJi/ea0Luopx32VeCXVFVzqjXe1fHsv im88Oz/kBkydDPFmD0wThbs3xhZ7b2i6UZFwJBk6c87sOh3hMd7ha2yC9lJ+sZiRyD I44xXq/isGnKo9KsybOIgKXsc0N8UQhHswUeWkm4= Date: Sat, 17 Jul 2021 08:12:52 +0200 From: "gregkh@linuxfoundation.org" To: Dan Williams Cc: "Winiarska, Iwona" , "linux-kernel@vger.kernel.org" , "openbmc@lists.ozlabs.org" , "corbet@lwn.net" , "jason.m.bills@linux.intel.com" , "Lutomirski, Andy" , "linux-hwmon@vger.kernel.org" , "Luck, Tony" , "jae.hyun.yoo@linux.intel.com" , "mchehab@kernel.org" , "andrew@aj.id.au" , "jdelvare@suse.com" , "mingo@redhat.com" , "bp@alien8.de" , "devicetree@vger.kernel.org" , "tglx@linutronix.de" , "linux@roeck-us.net" , "linux-doc@vger.kernel.org" , "linux-aspeed@lists.ozlabs.org" , "robh+dt@kernel.org" , "yazen.ghannam@amd.com" , "joel@jms.id.au" , "linux-arm-kernel@lists.infradead.org" , "andriy.shevchenko@linux.intel.com" , "x86@kernel.org" , "pierre-louis.bossart@linux.intel.com" Subject: Re: [PATCH 06/14] peci: Add core infrastructure Message-ID: References: <20210712220447.957418-1-iwona.winiarska@intel.com> <20210712220447.957418-7-iwona.winiarska@intel.com> <59428599ef7efb2521bd62c49a3bc55c710f29de.camel@intel.com> <6807a14deb52956ad2fe390b1811dd98901a642a.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 16, 2021 at 02:50:04PM -0700, Dan Williams wrote: > On Fri, Jul 16, 2021 at 2:08 PM Winiarska, Iwona > > > > +} > > > > +EXPORT_SYMBOL_NS_GPL(peci_controller_add, PECI); > > > > > > I think it's cleaner to declare symbol namespaces in the Makefile. In > > > this case, add: > > > > > > cflags-y += -DDEFAULT_SYMBOL_NAMESPACE=PECI > > > > > > ...and just use EXPORT_SYMBOL_GPL as normal in the C file. > > > > > > > I kind of prefer the more verbose EXPORT_SYMBOL_NS_GPL - it also > > doesn't "hide" the fact that we're using namespaces (everything is in > > the C file rather than mixed into Makefile), but it's not a strong > > opinion, so sure - I can change this. > > > > Perhaps as a tie breaker, the maintainer you are submitting this to, > Greg, uses the -DDEFAULT_SYMBOL_NAMESPACE scheme in his subsystem, > drivers/usb/. We did that because namespaces were added _after_ the kernel code was already there. For new code like this, the original use of EXPORT_SYMBOL_NS_GPL() is best as it is explicit and obvious. No need to dig around in a Makefile to find out the namespace name. thanks, greg k-h