From: Chunyan Zhang <zhang.chunyan@linaro.org>
To: alexander.shishkin@linux.intel.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH v2 1/2] stm: the number of masters should be (sw_end - sw_start + 1)
Date: Fri, 11 Dec 2015 18:47:59 +0800 [thread overview]
Message-ID: <1449830880-15319-2-git-send-email-zhang.chunyan@linaro.org> (raw)
In-Reply-To: <1449830880-15319-1-git-send-email-zhang.chunyan@linaro.org>
sw_end represents the last software master, sw_start is index of the
first master, so the number of software masters should be
sw_end - sw_start + 1.
Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
---
drivers/hwtracing/stm/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm/core.c
index 7f7bdb3..cb676f2 100644
--- a/drivers/hwtracing/stm/core.c
+++ b/drivers/hwtracing/stm/core.c
@@ -632,7 +632,7 @@ int stm_register_device(struct device *parent, struct stm_data *stm_data,
if (!stm_data->packet || !stm_data->sw_nchannels)
return -EINVAL;
- nmasters = stm_data->sw_end - stm_data->sw_start;
+ nmasters = stm_data->sw_end - stm_data->sw_start + 1;
stm = kzalloc(sizeof(*stm) + nmasters * sizeof(void *), GFP_KERNEL);
if (!stm)
return -ENOMEM;
--
1.9.1
next prev parent reply other threads:[~2015-12-11 10:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-11 10:47 [PATCH v2 0/2] modify the number of masters Chunyan Zhang
2015-12-11 10:47 ` Chunyan Zhang [this message]
2015-12-11 10:48 ` [PATCH v2 2/2] intel_th: the number of masters should be (sw_end - sw_start + 1) Chunyan Zhang
2016-01-28 3:41 ` Chunyan Zhang
2016-01-28 10:16 ` Alexander Shishkin
2016-01-28 10:55 ` Chunyan Zhang
2016-01-29 4:24 ` [PATCH] intel_th: Show a correct number of masters in debug message Chunyan Zhang
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=1449830880-15319-2-git-send-email-zhang.chunyan@linaro.org \
--to=zhang.chunyan@linaro.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®