* [PATCH] ptp: Don't print an error if ptp_kvm is not supported
@ 2021-04-20 13:24 Jon Hunter
2021-04-20 14:10 ` Richard Cochran
2021-04-20 16:19 ` Marc Zyngier
0 siblings, 2 replies; 3+ messages in thread
From: Jon Hunter @ 2021-04-20 13:24 UTC (permalink / raw)
To: Richard Cochran
Cc: netdev, linux-kernel, linux-tegra, Jianyong Wu, Marc Zyngier, Jon Hunter
Commit 300bb1fe7671 ("ptp: arm/arm64: Enable ptp_kvm for arm/arm64")
enable ptp_kvm support for ARM platforms and for any ARM platform that
does not support this, the following error message is displayed ...
ERR KERN fail to initialize ptp_kvm
For platforms that do not support ptp_kvm this error is a bit misleading
and so fix this by only printing this message if the error returned by
kvm_arch_ptp_init() is not -EOPNOTSUPP. Note that -EOPNOTSUPP is only
returned by ARM platforms today if ptp_kvm is not supported.
Fixes: 300bb1fe7671 ("ptp: arm/arm64: Enable ptp_kvm for arm/arm64")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
drivers/ptp/ptp_kvm_common.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/ptp/ptp_kvm_common.c b/drivers/ptp/ptp_kvm_common.c
index 721ddcede5e1..fcae32f56f25 100644
--- a/drivers/ptp/ptp_kvm_common.c
+++ b/drivers/ptp/ptp_kvm_common.c
@@ -138,7 +138,8 @@ static int __init ptp_kvm_init(void)
ret = kvm_arch_ptp_init();
if (ret) {
- pr_err("fail to initialize ptp_kvm");
+ if (ret != -EOPNOTSUPP)
+ pr_err("fail to initialize ptp_kvm");
return ret;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ptp: Don't print an error if ptp_kvm is not supported
2021-04-20 13:24 [PATCH] ptp: Don't print an error if ptp_kvm is not supported Jon Hunter
@ 2021-04-20 14:10 ` Richard Cochran
2021-04-20 16:19 ` Marc Zyngier
1 sibling, 0 replies; 3+ messages in thread
From: Richard Cochran @ 2021-04-20 14:10 UTC (permalink / raw)
To: Jon Hunter; +Cc: netdev, linux-kernel, linux-tegra, Jianyong Wu, Marc Zyngier
On Tue, Apr 20, 2021 at 02:24:19PM +0100, Jon Hunter wrote:
> Commit 300bb1fe7671 ("ptp: arm/arm64: Enable ptp_kvm for arm/arm64")
> enable ptp_kvm support for ARM platforms and for any ARM platform that
> does not support this, the following error message is displayed ...
>
> ERR KERN fail to initialize ptp_kvm
>
> For platforms that do not support ptp_kvm this error is a bit misleading
> and so fix this by only printing this message if the error returned by
> kvm_arch_ptp_init() is not -EOPNOTSUPP. Note that -EOPNOTSUPP is only
> returned by ARM platforms today if ptp_kvm is not supported.
>
> Fixes: 300bb1fe7671 ("ptp: arm/arm64: Enable ptp_kvm for arm/arm64")
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ptp: Don't print an error if ptp_kvm is not supported
2021-04-20 13:24 [PATCH] ptp: Don't print an error if ptp_kvm is not supported Jon Hunter
2021-04-20 14:10 ` Richard Cochran
@ 2021-04-20 16:19 ` Marc Zyngier
1 sibling, 0 replies; 3+ messages in thread
From: Marc Zyngier @ 2021-04-20 16:19 UTC (permalink / raw)
To: Jon Hunter, Richard Cochran
Cc: linux-tegra, netdev, linux-kernel, Jianyong Wu
On Tue, 20 Apr 2021 14:24:19 +0100, Jon Hunter wrote:
> Commit 300bb1fe7671 ("ptp: arm/arm64: Enable ptp_kvm for arm/arm64")
> enable ptp_kvm support for ARM platforms and for any ARM platform that
> does not support this, the following error message is displayed ...
>
> ERR KERN fail to initialize ptp_kvm
>
> For platforms that do not support ptp_kvm this error is a bit misleading
> and so fix this by only printing this message if the error returned by
> kvm_arch_ptp_init() is not -EOPNOTSUPP. Note that -EOPNOTSUPP is only
> returned by ARM platforms today if ptp_kvm is not supported.
Applied to kvm-arm64/ptp, thanks!
[1/1] ptp: Don't print an error if ptp_kvm is not supported
commit: a86ed2cfa13c5175eb082c50a644f6bf29ac65cc
Cheers,
M.
--
Without deviation from the norm, progress is not possible.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-04-20 16:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20 13:24 [PATCH] ptp: Don't print an error if ptp_kvm is not supported Jon Hunter
2021-04-20 14:10 ` Richard Cochran
2021-04-20 16:19 ` Marc Zyngier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).