Thread (22 messages) flat view 22 messages, 5 authors, 2020-10-02

Re: [PATCH 1/2] phy: marvell: comphy: Convert internal SMCC firmware return codes to errno

From: Pali Rohár <pali@kernel.org>
Date: 2020-09-02 17:05:32
Also in: linux-pci, lkml

On Wednesday 02 September 2020 19:00:10 Andrew Lunn wrote:
quoted
quoted
quoted
+	switch (ret) {
+	case SMCCC_RET_SUCCESS:
+		return 0;
+	case SMCCC_RET_NOT_SUPPORTED:
+		return -EOPNOTSUPP;
+	default:
+		return -EINVAL;
+	}
 }
Hi Pali

Maybe this should be a global helper translating SMCCC_RET_* into a
standard errno value?

	 Andrew
Hello Andrew!

Well, I'm not sure if some standard global helper is the correct way for
marvell comphy handler. It returns 0 for success and -1 on error when
handler is not supported.
No, i was meaning just 

switch (ret) {
case SMCCC_RET_SUCCESS:
	return 0;
case SMCCC_RET_NOT_SUPPORTED:
	return -EOPNOTSUPP;
default:
	return -EINVAL;
}
But this is not a complete generic helper. There are more generic SMCC
return codes and generic helper should define and translate all of them.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help