From: Greg KH <gregkh@linuxfoundation.org>
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
Date: Thu, 25 Jan 2018 17:58:02 +0100 [thread overview]
Message-ID: <20180125165802.GD21640@kroah.com> (raw)
In-Reply-To: <1516898344-20020-2-git-send-email-richard.gong@linux.intel.com>
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
next prev parent reply other threads:[~2018-01-25 16:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-25 16:39 [PATCHv1] Add Intel Stratix10 service layer driver richard.gong
2018-01-25 16:39 ` [PATCHv1] driver: misc: add " richard.gong
2018-01-25 16:54 ` Greg KH
2018-01-25 16:55 ` Greg KH
2018-01-25 16:58 ` Greg KH [this message]
2018-01-25 23:27 ` Randy Dunlap
2018-01-25 16:53 ` [PATCHv1] Add " Greg KH
2018-01-30 2:08 ` Richard Gong
2018-01-30 7:41 ` Greg KH
2018-02-22 21:43 ` Alan Tull
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180125165802.GD21640@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=richard.gong@intel.com \
--cc=richard.gong@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox