ptp: Don't print an error if ptp_kvm is not supported
Jon Hunter
maintainerPATCH 1/1 ptp: Don't print an error if ptp_kvm is not supported
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.
--- drivers/ptp/ptp_kvm_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/ptp/ptp_kvm_common.c +2 -1
@@ -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; }
Signature · 1 line
2.25.1
Quoted 6 lines · Jon Hunter
Commit
300bb1fe7671("ptp: arm/arm64: Enableptp_kvmfor arm/arm64") enableptp_kvmsupport 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
Quoted 7 lines
For platforms that do not support
ptp_kvmthis error is a bit misleading and so fix this by only printing this message if the error returned bykvm_arch_ptp_init()is not-EOPNOTSUPP. Note that-EOPNOTSUPPis only returned by ARM platforms today ifptp_kvmis not supported.Fixes 300bb1fe7671 ("ptp: arm/arm64: Enable ptp_kvm for arm/arm64")Signed-off-by Jon Hunter <[email protected]>
Marc Zyngier
AppliedQuoted 10 lines · Jon Hunter
Commit
300bb1fe7671("ptp: arm/arm64: Enableptp_kvmfor arm/arm64") enableptp_kvmsupport 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_kvmFor platforms that do not support
ptp_kvmthis error is a bit misleading and so fix this by only printing this message if the error returned bykvm_arch_ptp_init()is not-EOPNOTSUPP. Note that-EOPNOTSUPPis only returned by ARM platforms today ifptp_kvmis 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.
Signature · 1 line
Without deviation from the norm, progress is not possible.