[bootlin/training-materials updates] master: kernel: serial: interrupts: Use the unsigned type for the buffer offsets (3ff128d8)

Thomas Petazzoni thomas.petazzoni at bootlin.com
Fri Oct 29 10:46:37 CEST 2021


Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/3ff128d817417fc0138ec25432a2284c1215a830

>---------------------------------------------------------------

commit 3ff128d817417fc0138ec25432a2284c1215a830
Author: Miquel Raynal <miquel.raynal at bootlin.com>
Date:   Fri May 7 10:57:07 2021 +0200

    kernel: serial: interrupts: Use the unsigned type for the buffer offsets
    
    These offsets cannot be negative, so declare them as unsigned int.
    
    Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>


>---------------------------------------------------------------

3ff128d817417fc0138ec25432a2284c1215a830
 labs/kernel-serial-interrupt/kernel-serial-interrupt.tex | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/labs/kernel-serial-interrupt/kernel-serial-interrupt.tex b/labs/kernel-serial-interrupt/kernel-serial-interrupt.tex
index 02f37620..3cf58ba8 100644
--- a/labs/kernel-serial-interrupt/kernel-serial-interrupt.tex
+++ b/labs/kernel-serial-interrupt/kernel-serial-interrupt.tex
@@ -109,8 +109,8 @@ struct serial_dev {
         struct miscdevice miscdev;
         int irq;
         char buf[SERIAL_BUFSIZE];
-        int int buf_rd;
-        int buf_wr;
+        unsigned int buf_rd;
+        unsigned int buf_wr;
 };
 \end{verbatim}
 




More information about the training-materials-updates mailing list