From: "Péter Ujfalusi" <peter.ujfalusi@linux.intel.com>
To: Dan Carpenter <dan.carpenter@linaro.org>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Bard Liao <yung-chuan.liao@linux.intel.com>,
Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
Daniel Baluta <daniel.baluta@nxp.com>,
Kai Vehmanen <kai.vehmanen@linux.intel.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
sound-open-firmware@alsa-project.org,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] ASoC: SOF: Disable pointless writes to debugfs file
Date: Thu, 4 Apr 2024 17:50:55 +0300 [thread overview]
Message-ID: <853f31f7-3616-4412-b153-ee24a7901757@linux.intel.com> (raw)
In-Reply-To: <9d2477cf-25aa-4d12-818f-fdafc9aaa28a@moroto.mountain>
On 04/04/2024 10:38, Dan Carpenter wrote:
> The permissions on this debugfs file are 0444 so it can't be written to.
> And writing to the file hasn't done anything since commit 6e9548cdb30e
> ("ASoC: SOF: Convert the generic IPC flood test into SOF client").
> Delete the write function.
I agree, it is not used anymore and ...
>
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
> ---
> I haven't tested this patch and there is a risk that it breaks some of
> the test scripts. Another option would be to just make it a dummy
> function that does { return count; }. But I thought I would try the
> better option first.
>
> Please review this extra carefully.
>
> sound/soc/sof/debug.c | 19 -------------------
> 1 file changed, 19 deletions(-)
>
> diff --git a/sound/soc/sof/debug.c b/sound/soc/sof/debug.c
> index 7c8aafca8fde..937e51b02a24 100644
> --- a/sound/soc/sof/debug.c
> +++ b/sound/soc/sof/debug.c
> @@ -19,24 +19,6 @@
> #include "sof-priv.h"
> #include "ops.h"
>
> -static ssize_t sof_dfsentry_write(struct file *file, const char __user *buffer,
> - size_t count, loff_t *ppos)
> -{
> - size_t size;
> - char *string;
> - int ret;
> -
> - string = kzalloc(count+1, GFP_KERNEL);
> - if (!string)
> - return -ENOMEM;
> -
> - size = simple_write_to_buffer(string, count, ppos, buffer, count);
> - ret = size;
> -
> - kfree(string);
This was not too constructive ;)
> - return ret;
> -}
> -
> static ssize_t sof_dfsentry_read(struct file *file, char __user *buffer,
> size_t count, loff_t *ppos)
> {
> @@ -126,7 +108,6 @@ static const struct file_operations sof_dfs_fops = {
> .open = simple_open,
> .read = sof_dfsentry_read,
> .llseek = default_llseek,
> - .write = sof_dfsentry_write,
> };
>
> /* create FS entry for debug files that can expose DSP memories, registers */
--
Péter
next prev parent reply other threads:[~2024-04-04 14:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-04 7:38 Dan Carpenter
2024-04-04 14:50 ` Péter Ujfalusi [this message]
2024-04-04 16:58 ` Mark Brown
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=853f31f7-3616-4412-b153-ee24a7901757@linux.intel.com \
--to=peter.ujfalusi@linux.intel.com \
--cc=broonie@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=daniel.baluta@nxp.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=ranjani.sridharan@linux.intel.com \
--cc=sound-open-firmware@alsa-project.org \
--cc=tiwai@suse.com \
--cc=yung-chuan.liao@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
all inboxes | Powered by JetHome®