From: Krzysztof Kozlowski <krzk@kernel.org>
To: Bartosz Golaszewski <brgl@bgdev.pl>,
Santosh Shilimkar <ssantosh@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH] Revert "memory: ti-aemif: don't needlessly iterate over child nodes"
Date: Sun, 25 Aug 2024 10:28:28 +0200 [thread overview]
Message-ID: <e86d13f6-2a0b-4415-93ff-3a8990f8017e@kernel.org> (raw)
In-Reply-To: <886da76d-f04e-46a6-b854-2148f7f6068d@kernel.org>
On 25/08/2024 10:15, Krzysztof Kozlowski wrote:
> On 24/08/2024 10:02, Bartosz Golaszewski wrote:
>> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>>
>> This reverts commit 23a641d5c2bce4c723fff9118a5d865ee6b9d05a.
>>
>> The first-level children of the aemif node are not the device nodes (ones
>> containing the 'compatible' property) but the chip-select nodes which
>> instead have their own children.
>>
>> of_platform_populate() will skip such nodes so we must indeed iterate
>> over the direct children of the aemif node. The problem here is that we
>> never call of_platform_depopulate() as it takes the root device as
>> argument. We only have an unpopulated chip-select nodes so we will leak
>> these devices if any of the calls to of_platform_populate() fails.
>>
>> I don't have a batter idea right now but my patch was not correct so we
>> need to revert it. While at it: at least use the scoped variant of the
>> OF node iterator. Down the line, we should find a better solution to fix
>> this potential resource leak in error path.
>>
>> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>> ---
>> drivers/memory/ti-aemif.c | 8 +++++---
>> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> I'll drop the original commit, because my upstream (arm/soc) might
> question this.
>
Dropping is non-trivial, so indeed revert.
Best regards,
Krzysztof
next prev parent reply other threads:[~2024-08-25 8:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-24 8:02 [PATCH] Revert "memory: ti-aemif: don't needlessly iterate over child nodes" Bartosz Golaszewski
2024-08-25 8:15 ` Krzysztof Kozlowski
2024-08-25 8:28 ` Krzysztof Kozlowski [this message]
2024-08-25 12:22 ` Krzysztof Kozlowski
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=e86d13f6-2a0b-4415-93ff-3a8990f8017e@kernel.org \
--to=krzk@kernel.org \
--cc=bartosz.golaszewski@linaro.org \
--cc=brgl@bgdev.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=ssantosh@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