Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754993AbbLKKtN (ORCPT ); Fri, 11 Dec 2015 05:49:13 -0500 Received: from mail-pf0-f177.google.com ([209.85.192.177]:34688 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751271AbbLKKtJ (ORCPT ); Fri, 11 Dec 2015 05:49:09 -0500 X-Greylist: delayed 26467 seconds by postgrey-1.27 at vger.kernel.org; Fri, 11 Dec 2015 05:49:09 EST From: Chunyan Zhang To: alexander.shishkin@linux.intel.com Cc: linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] intel_th: the number of masters should be (sw_end - sw_start + 1) Date: Fri, 11 Dec 2015 18:48:00 +0800 Message-Id: <1449830880-15319-3-git-send-email-zhang.chunyan@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1449830880-15319-1-git-send-email-zhang.chunyan@linaro.org> References: <1449830880-15319-1-git-send-email-zhang.chunyan@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1165 Lines: 30 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 --- drivers/hwtracing/intel_th/sth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwtracing/intel_th/sth.c b/drivers/hwtracing/intel_th/sth.c index 56101c3..28917d7 100644 --- a/drivers/hwtracing/intel_th/sth.c +++ b/drivers/hwtracing/intel_th/sth.c @@ -173,7 +173,7 @@ static int intel_th_sw_init(struct sth_device *sth) sth->stm.sw_start = reg & 0xffff; sth->stm.sw_end = reg >> 16; - sth->sw_nmasters = sth->stm.sw_end - sth->stm.sw_start; + sth->sw_nmasters = sth->stm.sw_end - sth->stm.sw_start + 1; dev_dbg(sth->dev, "sw_start: %x sw_end: %x masters: %x nchannels: %x\n", sth->stm.sw_start, sth->stm.sw_end, sth->sw_nmasters, sth->stm.sw_nchannels); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/