From: Vinod Koul <vkoul@kernel.org>
To: Dave Jiang <dave.jiang@intel.com>
Cc: dmaengine@vger.kernel.org, jerry.t.chen@intel.com
Subject: Re: [PATCH] dmaengine: idxd: correct reserved token calculation
Date: Wed, 19 Feb 2020 14:49:37 +0530 [thread overview]
Message-ID: <20200219091937.GF2618@vkoul-mobl> (raw)
In-Reply-To: <158204471889.37789.7749177228265869168.stgit@djiang5-desk3.ch.intel.com>
On 18-02-20, 09:51, Dave Jiang wrote:
> The calcuation for limit of reserved token did not take into account the
> change the user wanted vs the current group reserved token. This causes
> changing of the reserved token to be possible only after we set the value
> of the reserved token back to 0. Fix calculation so we can set a value that
> is non zero for reserved token.
>
> Fixes: c52ca478233c ("dmaengine: idxd: add configuration component of driver")
>
You don't need empty line here
> Reported-by: Jerry Chen <jerry.t.chen@intel.com>
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Applied after removing the empty line, thanks
> ---
> drivers/dma/idxd/sysfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma/idxd/sysfs.c b/drivers/dma/idxd/sysfs.c
> index 298855ca934f..edbfe83325eb 100644
> --- a/drivers/dma/idxd/sysfs.c
> +++ b/drivers/dma/idxd/sysfs.c
> @@ -519,7 +519,7 @@ static ssize_t group_tokens_reserved_store(struct device *dev,
> if (val > idxd->max_tokens)
> return -EINVAL;
>
> - if (val > idxd->nr_tokens)
> + if (val > idxd->nr_tokens + group->tokens_reserved)
> return -EINVAL;
>
> group->tokens_reserved = val;
--
~Vinod
prev parent reply other threads:[~2020-02-19 9:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-18 16:51 [PATCH] dmaengine: idxd: correct reserved token calculation Dave Jiang
2020-02-19 9:19 ` Vinod Koul [this message]
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=20200219091937.GF2618@vkoul-mobl \
--to=vkoul@kernel.org \
--cc=dave.jiang@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=jerry.t.chen@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