Skip to contentSkip to conversation

Fixes for serial driver

Xenomai-core Applied Jan Kiszka 2 participants 5 messages Oct 14, 2005

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

Hi,

attached are two minor fixes for the serial driver and header: one is cosmetic, the other addresses out-of-memory detection.

Credits go, as usual, to Sebastian. ;)

Jan

rtdm/rtserial.h +1 -1
Index: skins/rtdm/rtserial.h
===================================================================
@@ -113,7 +113,7 @@
 
 /*!
  * @anchor RTSER_xxx_PARITY   @name RTSER_xxx_PARITY
- * Number of parity bits @anchor RTSER_xxx_PARITY
+ * Number of parity bits
  * @{ */
 #define RTSER_NO_PARITY             0x00
 #define RTSER_ODD_PARITY            0x01
16550A/16550A.c +3 -0
Index: drivers/16550A/16550A.c
===================================================================
@@ -568,6 +568,9 @@
                 } else
                     hist_buf =
                         rtdm_malloc(IN_BUFFER_SIZE * sizeof(__u64));
+
+                if (!hist_buf)
+                    return -ENOMEM;
             }
 
             rt_16550_set_config(ctx, config, &hist_buf);
#1 lore raw
Quoted 7 lines · Jan Kiszka

Hi,

attached are two minor fixes for the serial driver and header: one is cosmetic, the other addresses out-of-memory detection.

Credits go, as usual, to Sebastian. ;)

Applied, thanks.

Quoted 41 lines

Jan

------------------------------------------------------------------------

Index: skins/rtdm/rtserial.h
===================================================================

rtdm/rtserial.h +1 -1
@@ -113,7 +113,7 @@
 
 /*!
  * @anchor RTSER_xxx_PARITY   @name RTSER_xxx_PARITY
- * Number of parity bits @anchor RTSER_xxx_PARITY
+ * Number of parity bits
  * @{ */
 #define RTSER_NO_PARITY             0x00
 #define RTSER_ODD_PARITY            0x01

Index: drivers/16550A/16550A.c
===================================================================

16550A/16550A.c +3 -1
@@ -568,6 +568,9 @@
                 } else
                     hist_buf =
                         rtdm_malloc(IN_BUFFER_SIZE * sizeof(__u64));
+
+                if (!hist_buf)
+                    return -ENOMEM;
             }
 
             rt_16550_set_config(ctx, config, &hist_buf);
 
 
------------------------------------------------------------------------

_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core

Signature · 1 line
Philippe.
author
#2 lore raw
Quoted 4 lines · Philippe Gerum
Quoted 2 lines · Jan Kiszka

Hi,

Quoted 8 lines
Quoted 5 lines

attached are two minor fixes for the serial driver and header: one is cosmetic, the other addresses out-of-memory detection.

Credits go, as usual, to Sebastian. ;)

Applied, thanks.

Except for the highly critical, showstopping rtserial.h patch?! ;)

Jan

#3 lore raw
Quoted 10 lines · Jan Kiszka
Quoted 8 lines · Philippe Gerum
Quoted 5 lines · Jan Kiszka

Hi,

attached are two minor fixes for the serial driver and header: one is cosmetic, the other addresses out-of-memory detection.

Quoted 9 lines
Quoted 5 lines
Quoted 2 lines

Credits go, as usual, to Sebastian. ;)

Applied, thanks.

Except for the highly critical, showstopping rtserial.h patch?! ;)

Likely lost it. Resend please?

Signature · 1 line
Philippe.
#4 lore raw
In reply to Jan Kiszka
Quoted 10 lines · Jan Kiszka
Quoted 8 lines · Philippe Gerum
Quoted 5 lines · Jan Kiszka

Hi,

attached are two minor fixes for the serial driver and header: one is cosmetic, the other addresses out-of-memory detection.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Credits go, as usual, to Sebastian. ;)

Applied, thanks.

Except for the highly critical, showstopping rtserial.h patch?! ;)

Mm, ok. The file was just pending commit in my tree. Done now.

Signature · 1 line
Philippe.