From: Tanmay Shah <tanmay.shah@amd.com>
To: Michal Simek <michal.simek@amd.com>,
andersson@kernel.org, mathieu.poirier@linaro.org,
jaswinder.singh@linaro.org, ben.levinsky@amd.com,
shubhrajyoti.datta@amd.com
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-remoteproc@vger.kernel.org
Subject: Re: [PATCH v4 1/5] mailbox: zynqmp: fix counts of child nodes
Date: Thu, 9 Mar 2023 12:30:16 -0800 [thread overview]
Message-ID: <59919b84-d07a-4c62-3f34-febd85176375@amd.com> (raw)
In-Reply-To: <d410d181-a94b-40e3-5c3c-50625fbb0196@amd.com>
On 3/8/23 5:53 AM, Michal Simek wrote:
>
>
> On 2/28/23 22:02, Tanmay Shah wrote:
>> If child mailbox node status is disabled it causes
>> crash in interrupt handler. Fix this by assigning
>> only available child node during driver probe.
>>
>> Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
>> ---
>> drivers/mailbox/zynqmp-ipi-mailbox.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/mailbox/zynqmp-ipi-mailbox.c
>> b/drivers/mailbox/zynqmp-ipi-mailbox.c
>> index 12e004ff1a14..e287ed7a92ce 100644
>> --- a/drivers/mailbox/zynqmp-ipi-mailbox.c
>> +++ b/drivers/mailbox/zynqmp-ipi-mailbox.c
>> @@ -634,7 +634,7 @@ static int zynqmp_ipi_probe(struct
>> platform_device *pdev)
>> struct zynqmp_ipi_mbox *mbox;
>> int num_mboxes, ret = -EINVAL;
>> - num_mboxes = of_get_child_count(np);
>> + num_mboxes = of_get_available_child_count(np);
>> pdata = devm_kzalloc(dev, sizeof(*pdata) + (num_mboxes *
>> sizeof(*mbox)),
>> GFP_KERNEL);
>> if (!pdata)
>
> I think it will be good to also check that num_mboxes is != 0.
Ack, I will fix this in next revision.
>
> M
next prev parent reply other threads:[~2023-03-09 20:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-28 21:02 [PATCH v4 0/5] drivers: remoteproc: xilinx: add mailbox support Tanmay Shah
2023-02-28 21:02 ` [PATCH v4 1/5] mailbox: zynqmp: fix counts of child nodes Tanmay Shah
2023-03-08 11:53 ` Michal Simek
2023-03-09 20:30 ` Tanmay Shah [this message]
2023-02-28 21:02 ` [PATCH v4 2/5] mailbox: zynqmp: fix IPI isr handling Tanmay Shah
2023-03-08 11:56 ` Michal Simek
2023-02-28 21:02 ` [PATCH v4 3/5] mailbox: zynqmp: fix typo in IPI documentation Tanmay Shah
2023-03-08 11:56 ` Michal Simek
2023-02-28 21:02 ` [PATCH v4 4/5] drivers: remoteproc: xilinx: fix carveout names Tanmay Shah
2023-02-28 21:02 ` [PATCH v4 5/5] remoteproc: xilinx: add mailbox channels for rpmsg Tanmay Shah
2023-03-02 23:10 ` Mathieu Poirier
2023-03-03 16:36 ` Tanmay Shah
2023-03-03 18:13 ` Mathieu Poirier
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=59919b84-d07a-4c62-3f34-febd85176375@amd.com \
--to=tanmay.shah@amd.com \
--cc=andersson@kernel.org \
--cc=ben.levinsky@amd.com \
--cc=jaswinder.singh@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=michal.simek@amd.com \
--cc=shubhrajyoti.datta@amd.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®