Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1503398
| Path | csiph.com!news.mixmin.net!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Bjorn Andersson <bjorn.andersson@linaro.org> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 4/4] remoteproc: debugfs: Remove state entry which is duplicated is sysfs |
| Date | Wed, 19 Oct 2016 00:20:01 +0200 |
| Message-ID | <stKTL-8nr-3@gated-at.bofh.it> (permalink) |
| References | <stiut-5no-11@gated-at.bofh.it> <stiut-5no-9@gated-at.bofh.it> |
| X-Original-To | Matt Redfearn <matt.redfearn@imgtec.com> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=+6CnTsNSihPOpFli3s9f+EUE2HxF2mlLrSjF3uv///I=; b=EDiG3ErHcDHRdJEwnFVwhPBJ96hAg7pVSxInEOr0DyTthf4SD8PA4vRPQv4L/MBnvO i1v03LJE/VjmVNbPuq6wlJPoFhSx7Q+kTm9fMQubbc6ckQhGqJHkAA2QS+m5ULfpmH9c YzGrG3cWpX0AQZVn5rKulDobrH2pR180Kzyc8= |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+6CnTsNSihPOpFli3s9f+EUE2HxF2mlLrSjF3uv///I=; b=Yorb5NDLGv8qgW4KjVRsqF2LWTqxlWb9FXFLD9/pZrPwNiAnXiDc5TMr0QwJ8wv0nB VA047ssiiRiwMhrNvum8YVptSQGF50FI1wQQ88qjMxT2qEBaQNhaKprWKnDV22evv8WF JgM+Tdjhcy+lZdyh+IQ/sKS/XQLpFiqxbst/7bkxaFWqS3AUbS1GPJKvzyiCZlyDBb1p v/Z8NI/aye6C7dZRzb5yST5IfdYV8K2YwQFSxx6sM+NBQbw0y539tIFUV+EvQbUpDTNm 8unD36QBJN8vfLDbSxIJC3harFb0o9BFd86MoAX57BReU4ctGaK7i2aw2f9JPqFpSxrH YQYg== |
| X-Gm-Message-State | AA6/9Rl6oJPDBPHMwPH1UvhBoXSf5vtT99/ur/UeSZ6c2ptPfBmYSCtK3on3caxS50RWRO6l |
| X-Received | by 10.99.109.75 with SMTP id i72mr3692814pgc.151.1476829034033; Tue, 18 Oct 2016 15:17:14 -0700 (PDT) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.23 (2014-03-12) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 111 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Ohad Ben-Cohen <ohad@wizery.com>, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org |
| X-Original-Date | Tue, 18 Oct 2016 15:17:10 -0700 |
| X-Original-Message-ID | <20161018221710.GC19384@tuxbot> |
| X-Original-References | <1476719341-11651-1-git-send-email-matt.redfearn@imgtec.com> <1476719341-11651-5-git-send-email-matt.redfearn@imgtec.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1503398 |
Show key headers only | View raw
On Mon 17 Oct 08:49 PDT 2016, Matt Redfearn wrote:
> Since there is now an always available state file in sysfs with the same
> function as this one in debugfs, remove the redundant entry.
>
> Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
> ---
>
> Changes in v2: None
>
> drivers/remoteproc/remoteproc_debugfs.c | 71 ---------------------------------
> 1 file changed, 71 deletions(-)
>
> diff --git a/drivers/remoteproc/remoteproc_debugfs.c b/drivers/remoteproc/remoteproc_debugfs.c
> index 374797206c79..1c122e230cec 100644
> --- a/drivers/remoteproc/remoteproc_debugfs.c
> +++ b/drivers/remoteproc/remoteproc_debugfs.c
> @@ -59,75 +59,6 @@ static const struct file_operations trace_rproc_ops = {
> .llseek = generic_file_llseek,
> };
>
> -/*
> - * A state-to-string lookup table, for exposing a human readable state
> - * via debugfs. Always keep in sync with enum rproc_state
> - */
> -static const char * const rproc_state_string[] = {
> - "offline",
> - "suspended",
> - "running",
> - "crashed",
> - "invalid",
> -};
> -
> -/* expose the state of the remote processor via debugfs */
> -static ssize_t rproc_state_read(struct file *filp, char __user *userbuf,
> - size_t count, loff_t *ppos)
> -{
> - struct rproc *rproc = filp->private_data;
> - unsigned int state;
> - char buf[30];
> - int i;
> -
> - state = rproc->state > RPROC_LAST ? RPROC_LAST : rproc->state;
> -
> - i = scnprintf(buf, 30, "%.28s (%d)\n", rproc_state_string[state],
> - rproc->state);
> -
> - return simple_read_from_buffer(userbuf, count, ppos, buf, i);
> -}
> -
> -static ssize_t rproc_state_write(struct file *filp, const char __user *userbuf,
> - size_t count, loff_t *ppos)
> -{
> - struct rproc *rproc = filp->private_data;
> - char buf[10];
> - int ret;
> -
> - if (count > sizeof(buf) || count <= 0)
> - return -EINVAL;
> -
> - ret = copy_from_user(buf, userbuf, count);
> - if (ret)
> - return -EFAULT;
> -
> - if (buf[count - 1] == '\n')
> - buf[count - 1] = '\0';
> -
> - if (!strncmp(buf, "start", count)) {
> - ret = rproc_boot(rproc);
> - if (ret) {
> - dev_err(&rproc->dev, "Boot failed: %d\n", ret);
> - return ret;
> - }
> - } else if (!strncmp(buf, "stop", count)) {
> - rproc_shutdown(rproc);
> - } else {
> - dev_err(&rproc->dev, "Unrecognised option: %s\n", buf);
> - return -EINVAL;
> - }
> -
> - return count;
> -}
> -
> -static const struct file_operations rproc_state_ops = {
> - .read = rproc_state_read,
> - .write = rproc_state_write,
> - .open = simple_open,
> - .llseek = generic_file_llseek,
> -};
> -
> /* expose the name of the remote processor via debugfs */
> static ssize_t rproc_name_read(struct file *filp, char __user *userbuf,
> size_t count, loff_t *ppos)
> @@ -265,8 +196,6 @@ void rproc_create_debug_dir(struct rproc *rproc)
>
> debugfs_create_file("name", 0400, rproc->dbg_dir,
> rproc, &rproc_name_ops);
> - debugfs_create_file("state", 0400, rproc->dbg_dir,
> - rproc, &rproc_state_ops);
> debugfs_create_file("recovery", 0400, rproc->dbg_dir,
> rproc, &rproc_recovery_ops);
> }
> --
> 2.7.4
>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2 4/4] remoteproc: debugfs: Remove state entry which is duplicated is sysfs Matt Redfearn <matt.redfearn@imgtec.com> - 2016-10-17 18:00 +0200 Re: [PATCH v2 4/4] remoteproc: debugfs: Remove state entry which is duplicated is sysfs Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-10-19 00:20 +0200
csiph-web