From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
stable@vger.kernel.org
Subject: [GIT PULL 5/6] intel_th: Fix user-visible error codes
Date: Tue, 17 Mar 2020 08:22:14 +0200 [thread overview]
Message-ID: <20200317062215.15598-6-alexander.shishkin@linux.intel.com> (raw)
In-Reply-To: <20200317062215.15598-1-alexander.shishkin@linux.intel.com>
There are a few places in the driver that end up returning ENOTSUPP to
the user, replace those with EINVAL.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Fixes: ba82664c134ef ("intel_th: Add Memory Storage Unit driver")
Cc: stable@vger.kernel.org # v4.4+
---
drivers/hwtracing/intel_th/msu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c
index 7ac7dd4d3b1c..f08e9e883710 100644
--- a/drivers/hwtracing/intel_th/msu.c
+++ b/drivers/hwtracing/intel_th/msu.c
@@ -765,7 +765,7 @@ static int msc_configure(struct msc *msc)
lockdep_assert_held(&msc->buf_mutex);
if (msc->mode > MSC_MODE_MULTI)
- return -ENOTSUPP;
+ return -EINVAL;
if (msc->mode == MSC_MODE_MULTI) {
if (msc_win_set_lockout(msc->cur_win, WIN_READY, WIN_INUSE))
@@ -1299,7 +1299,7 @@ static int msc_buffer_alloc(struct msc *msc, unsigned long *nr_pages,
} else if (msc->mode == MSC_MODE_MULTI) {
ret = msc_buffer_multi_alloc(msc, nr_pages, nr_wins);
} else {
- ret = -ENOTSUPP;
+ ret = -EINVAL;
}
if (!ret) {
@@ -1535,7 +1535,7 @@ static ssize_t intel_th_msc_read(struct file *file, char __user *buf,
if (ret >= 0)
*ppos = iter->offset;
} else {
- ret = -ENOTSUPP;
+ ret = -EINVAL;
}
put_count:
--
2.25.1
next prev parent reply other threads:[~2020-03-17 6:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-17 6:22 [GIT PULL 0/6] intel_th/stm class: Updates for v5.7 Alexander Shishkin
2020-03-17 6:22 ` [GIT PULL 1/6] intel_th: Disallow multi mode on devices where it's broken Alexander Shishkin
2020-03-17 6:22 ` [GIT PULL 2/6] stm class: sys-t: Fix the use of time_after() Alexander Shishkin
2020-03-18 10:28 ` Greg Kroah-Hartman
2020-03-17 6:22 ` [GIT PULL 3/6] intel_th: msu: Make stopping the trace optional Alexander Shishkin
2020-03-18 10:30 ` Greg Kroah-Hartman
2020-03-17 6:22 ` [GIT PULL 4/6] intel_th: msu: Fix the unexpected state warning Alexander Shishkin
2020-03-18 10:30 ` Greg Kroah-Hartman
2020-03-17 6:22 ` Alexander Shishkin [this message]
2020-03-18 10:31 ` [GIT PULL 5/6] intel_th: Fix user-visible error codes Greg Kroah-Hartman
2020-03-17 6:22 ` [GIT PULL 6/6] intel_th: pci: Add Elkhart Lake CPU support Alexander Shishkin
2020-03-17 22:30 ` Sasha Levin
2020-03-18 10:31 ` Greg Kroah-Hartman
2020-03-18 10:26 ` [GIT PULL 0/6] intel_th/stm class: Updates for v5.7 Greg Kroah-Hartman
2020-03-19 8:51 ` [PATCH v1] intel_th: msu: Make stopping the trace optional Alexander Shishkin
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=20200317062215.15598-6-alexander.shishkin@linux.intel.com \
--to=alexander.shishkin@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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
Powered by JetHome