[bootlin/training-materials updates] master: kernel: serial: interrupts: Use the unsigned type for the buffer offsets (1402a020)
Miquel Raynal
miquel.raynal at bootlin.com
Fri May 7 12:01:39 CEST 2021
Repository : https://github.com/bootlin/training-materials
On branch : master
Link : https://github.com/bootlin/training-materials/commit/1402a020ece16ffbe040d62e28773c8e06e410b6
>---------------------------------------------------------------
commit 1402a020ece16ffbe040d62e28773c8e06e410b6
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>
>---------------------------------------------------------------
1402a020ece16ffbe040d62e28773c8e06e410b6
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