From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 25 Jan 2018 17:58:02 +0100 From: Greg KH To: richard.gong@linux.intel.com Cc: arnd@arndb.de, linux-kernel@vger.kernel.org, richard.gong@intel.com Subject: Re: [PATCHv1] driver: misc: add Intel Stratix10 service layer driver Message-ID: <20180125165802.GD21640@kroah.com> References: <1516898344-20020-1-git-send-email-richard.gong@linux.intel.com> <1516898344-20020-2-git-send-email-richard.gong@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1516898344-20020-2-git-send-email-richard.gong@linux.intel.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-Mailing-List: linux-kernel@vger.kernel.org List-ID: On Thu, Jan 25, 2018 at 10:39:04AM -0600, richard.gong@linux.intel.com wrote: > +static LIST_HEAD(svc_cons); > +static LIST_HEAD(svc_private_mem); > +static DEFINE_MUTEX(svc_mutex); > + > +svc_invoke_fn *invoke_fn; A global variable for a single .c file? No. > + > +struct intel_svc_chan *request_svc_channel_byname( > + struct intel_svc_client *client, const char *name) > +{ > + struct device *dev = client->dev; > + struct intel_svc_controller *controller; > + struct intel_svc_chan *chan; > + unsigned long flag; > + int i; > + > + chan = ERR_PTR(-EPROBE_DEFER); > + controller = list_first_entry(&svc_cons, > + struct intel_svc_controller, node); > + for (i = 0; i < SVC_MAX_CHANNEL; i++) { > + if (!strcmp(controller->chans[i].name, name)) { > + chan = &controller->chans[i]; > + break; > + } > + } > + > + if (chan->scl || !try_module_get(controller->dev->driver->owner)) { > + dev_dbg(dev, "%s: svc not free\n", __func__); > + return ERR_PTR(-EBUSY); > + } > + > + spin_lock_irqsave(&chan->lock, flag); > + chan->scl = client; > + spin_unlock_irqrestore(&chan->lock, flag); > + > + return chan; > +} > +EXPORT_SYMBOL_GPL(request_svc_channel_byname); Exporting functions with no users? No. Please fix up and make this stand-alone. Or, if you are going to have framework that others use, then submit those others at the same time. I'm stopping reviewing here, sorry. Please fix up and resend. Also, please get some signed-off-by: from some internal Intel people. Don't rely on me to do this type of work when you have lots of good people inside that could have told you all of this already. Without other developer's sign-offs, I'm not going to look at future submissions, sorry. thanks, greg k-h