[bootlin/training-materials updates] master: linux: serial: Use proper types and fix a copy/paste error (d41236f3)

Miquel Raynal miquel.raynal at bootlin.com
Wed May 5 23:09:20 CEST 2021

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


commit d41236f325f826208a8960a507b6bb9fcc437592
Author: Miquel Raynal <miquel.raynal at bootlin.com>
Date:   Wed May 5 23:06:49 2021 +0200

    linux: serial: Use proper types and fix a copy/paste error
    While at updating the prototypes in the lab book, fix the reg_read() definition
    which should return something anyway.
    Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>


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

diff --git a/labs/kernel-serial-iomem/kernel-serial-iomem.tex b/labs/kernel-serial-iomem/kernel-serial-iomem.tex
index f2bdd3c4..a64ce08b 100644
--- a/labs/kernel-serial-iomem/kernel-serial-iomem.tex
+++ b/labs/kernel-serial-iomem/kernel-serial-iomem.tex
@@ -153,7 +153,7 @@ offset.
 Your prototype should look like:
-static void reg_read(struct serial_dev *serial, int reg);
+static u32 reg_read(struct serial_dev *serial, unsigned int reg);
 In this function, read from a 32 bits register at the base virtual
@@ -170,7 +170,7 @@ the device base virtual address. The following code samples are using
 the \kfunc{writel} convention of passing the value first, then the
 offset. Your prototype should look like:
-static void reg_write(struct serial_dev *serial, int val, int reg);
+static void reg_write(struct serial_dev *serial, u32 val, unsigned int reg);
 In the next sections, we will tell you what register offsets to use

More information about the training-materials-updates mailing list