From: "Heiko Stübner" <heiko@sntech.de>
To: Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Marc Zyngier <maz@kernel.org>, Olof Johansson <olof@lixom.net>,
Chao Wang <D202280639@hust.edu.cn>
Cc: hust-os-kernel-patches@googlegroups.com,
Chao Wang <D202280639@hust.edu.cn>,
Dongliang Mu <dzm91@hust.edu.cn>,
iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu: Fix unwind goto issue
Date: Mon, 17 Apr 2023 10:20:56 +0200 [thread overview]
Message-ID: <6931079.K2JlShyGXD@diego> (raw)
In-Reply-To: <20230417030421.2777-1-D202280639@hust.edu.cn>
Am Montag, 17. April 2023, 05:04:21 CEST schrieb Chao Wang:
> Smatch complains that
> drivers/iommu/rockchip-iommu.c:1306 rk_iommu_probe() warn: missing unwind goto?
>
> The rk_iommu_probe function, after obtaining the irq value through
> platform_get_irq, directly returns an error if the returned value
> is negative, without releasing any resources.
>
> Fix this by adding a new error handling label "err_pm_disable" and
> use a goto statement to redirect to the error handling process. In
> order to preserve the original semantics, set err to the value of irq.
>
> Fixes: 1aa55ca9b14a ("iommu/rockchip: Move irq request past pm_runtime_enable")
> Signed-off-by: Chao Wang <D202280639@hust.edu.cn>
> Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
Looking at the code, that makes a lot of sense.
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
WARNING: multiple messages have this Message-ID (diff)
From: "Heiko Stübner" <heiko@sntech.de>
To: Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Marc Zyngier <maz@kernel.org>, Olof Johansson <olof@lixom.net>,
Chao Wang <D202280639@hust.edu.cn>
Cc: hust-os-kernel-patches@googlegroups.com,
Chao Wang <D202280639@hust.edu.cn>,
Dongliang Mu <dzm91@hust.edu.cn>,
iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu: Fix unwind goto issue
Date: Mon, 17 Apr 2023 10:20:56 +0200 [thread overview]
Message-ID: <6931079.K2JlShyGXD@diego> (raw)
In-Reply-To: <20230417030421.2777-1-D202280639@hust.edu.cn>
Am Montag, 17. April 2023, 05:04:21 CEST schrieb Chao Wang:
> Smatch complains that
> drivers/iommu/rockchip-iommu.c:1306 rk_iommu_probe() warn: missing unwind goto?
>
> The rk_iommu_probe function, after obtaining the irq value through
> platform_get_irq, directly returns an error if the returned value
> is negative, without releasing any resources.
>
> Fix this by adding a new error handling label "err_pm_disable" and
> use a goto statement to redirect to the error handling process. In
> order to preserve the original semantics, set err to the value of irq.
>
> Fixes: 1aa55ca9b14a ("iommu/rockchip: Move irq request past pm_runtime_enable")
> Signed-off-by: Chao Wang <D202280639@hust.edu.cn>
> Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
Looking at the code, that makes a lot of sense.
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
WARNING: multiple messages have this Message-ID (diff)
From: "Heiko Stübner" <heiko@sntech.de>
To: Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Marc Zyngier <maz@kernel.org>, Olof Johansson <olof@lixom.net>,
Chao Wang <D202280639@hust.edu.cn>
Cc: hust-os-kernel-patches@googlegroups.com,
Chao Wang <D202280639@hust.edu.cn>,
Dongliang Mu <dzm91@hust.edu.cn>,
iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu: Fix unwind goto issue
Date: Mon, 17 Apr 2023 10:20:56 +0200 [thread overview]
Message-ID: <6931079.K2JlShyGXD@diego> (raw)
In-Reply-To: <20230417030421.2777-1-D202280639@hust.edu.cn>
Am Montag, 17. April 2023, 05:04:21 CEST schrieb Chao Wang:
> Smatch complains that
> drivers/iommu/rockchip-iommu.c:1306 rk_iommu_probe() warn: missing unwind goto?
>
> The rk_iommu_probe function, after obtaining the irq value through
> platform_get_irq, directly returns an error if the returned value
> is negative, without releasing any resources.
>
> Fix this by adding a new error handling label "err_pm_disable" and
> use a goto statement to redirect to the error handling process. In
> order to preserve the original semantics, set err to the value of irq.
>
> Fixes: 1aa55ca9b14a ("iommu/rockchip: Move irq request past pm_runtime_enable")
> Signed-off-by: Chao Wang <D202280639@hust.edu.cn>
> Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
Looking at the code, that makes a lot of sense.
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-04-17 8:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-17 3:04 [PATCH] iommu: Fix unwind goto issue Chao Wang
2023-04-17 3:04 ` Chao Wang
2023-04-17 3:04 ` Chao Wang
2023-04-17 8:20 ` Heiko Stübner [this message]
2023-04-17 8:20 ` Heiko Stübner
2023-04-17 8:20 ` Heiko Stübner
2023-05-22 15:03 ` Joerg Roedel
2023-05-22 15:03 ` Joerg Roedel
2023-05-22 15:03 ` Joerg Roedel
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=6931079.K2JlShyGXD@diego \
--to=heiko@sntech.de \
--cc=D202280639@hust.edu.cn \
--cc=dzm91@hust.edu.cn \
--cc=hust-os-kernel-patches@googlegroups.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=maz@kernel.org \
--cc=olof@lixom.net \
--cc=robin.murphy@arm.com \
--cc=will@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.