From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
To: Chunyan Zhang <zhang.chunyan@linaro.org>
Cc: linux-kernel@vger.kernel.org, mathieu.poirier@linaro.org,
zhang.lyra@gmail.com
Subject: Re: [PATCH] drivers: stm: correct the index in master array release
Date: Tue, 09 Feb 2016 12:12:23 +0200 [thread overview]
Message-ID: <87pow6chvc.fsf@ashishki-desk.ger.corp.intel.com> (raw)
In-Reply-To: <1453954889-6290-1-git-send-email-zhang.chunyan@linaro.org>
Chunyan Zhang <zhang.chunyan@linaro.org> writes:
> It would be broken if stm_data->sw_start isn't zero, because that
> stp_master_free() get the 'master' with __stm_master()/stm_master(),
> in which the masterID is the second input parameter minus
> stm_data->sw_start. So freeing STM masters has to start from
> stm_data->sw_start.
No, it won't. stm_master_free() handles nonexistent masters correctly.
It does make sense to shrink the loop in stm_unregister_device() to
avoid going through the [0..sw_start) range, since stm_master() returns
NULL for those, but not for the reasons given in this patch description.
Regards,
--
Alex
next prev parent reply other threads:[~2016-02-09 10:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-28 4:21 Chunyan Zhang
2016-02-09 10:12 ` Alexander Shishkin [this message]
2016-02-14 6:25 ` Chunyan Zhang
2016-02-15 10:34 ` 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=87pow6chvc.fsf@ashishki-desk.ger.corp.intel.com \
--to=alexander.shishkin@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=zhang.chunyan@linaro.org \
--cc=zhang.lyra@gmail.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®