All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mbim: add an optional TEMP_FAILURE_RETRY macro copy
@ 2019-05-24  1:20 Khem Raj
  2019-05-24 16:57 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Khem Raj @ 2019-05-24  1:20 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 890 bytes --]

Fixes build on musl which does not provide this macro

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 drivers/mbimmodem/mbim-private.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/mbimmodem/mbim-private.h b/drivers/mbimmodem/mbim-private.h
index e159235..51693ea 100644
--- a/drivers/mbimmodem/mbim-private.h
+++ b/drivers/mbimmodem/mbim-private.h
@@ -21,6 +21,15 @@
 
 #define align_len(len, boundary) (((len)+(boundary)-1) & ~((boundary)-1))
 
+#ifndef TEMP_FAILURE_RETRY
+#define TEMP_FAILURE_RETRY(expression) ({     \
+  __typeof(expression) __result;              \
+  do {                                        \
+    __result = (expression);                  \
+  } while (__result == -1 && errno == EINTR); \
+  __result; })
+#endif
+
 enum mbim_control_message {
 	MBIM_OPEN_MSG = 0x1,
 	MBIM_CLOSE_MSG = 0x2,
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mbim: add an optional TEMP_FAILURE_RETRY macro copy
  2019-05-24  1:20 [PATCH] mbim: add an optional TEMP_FAILURE_RETRY macro copy Khem Raj
@ 2019-05-24 16:57 ` Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2019-05-24 16:57 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 501 bytes --]

Hi,

On 05/23/2019 08:20 PM, Khem Raj wrote:
> Fixes build on musl which does not provide this macro
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>

No Signed-off-by for oFono patch submissions please

> ---
>   drivers/mbimmodem/mbim-private.h | 9 +++++++++
>   1 file changed, 9 insertions(+)
> 

I solved this by introducing L_TFR in ell, commit:
8198b3689490eb81fdc7ce42f4ec1ac7321a1e3c

And reworked all use of TFR/TEMP_FAILURE_RETRY to use that instead.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-24 16:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-24  1:20 [PATCH] mbim: add an optional TEMP_FAILURE_RETRY macro copy Khem Raj
2019-05-24 16:57 ` Denis Kenzior

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.