[bootlin/training-materials updates] master: kernel-dma: Rename buf into rx_buf to simplify the DMA instructionsRename buf into rx_buf to simplify the DMA instructions (4efacd5d)

Miquel Raynal miquel.raynal at bootlin.com
Thu Jul 27 19:59:53 CEST 2023


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

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

commit 4efacd5d2d92c1620997e980f2e4b82dc3c631c8
Author: Miquel Raynal <miquel.raynal at bootlin.com>
Date:   Thu Jul 27 19:55:53 2023 +0200

    kernel-dma: Rename buf into rx_buf to simplify the DMA instructionsRename buf into rx_buf to simplify the DMA instructions
    
    Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>


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

4efacd5d2d92c1620997e980f2e4b82dc3c631c8
 labs/kernel-serial-dma/kernel-serial-dma.tex             | 6 +++---
 labs/kernel-serial-interrupt/kernel-serial-interrupt.tex | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/labs/kernel-serial-dma/kernel-serial-dma.tex b/labs/kernel-serial-dma/kernel-serial-dma.tex
index bc483bf6..6b7515db 100644
--- a/labs/kernel-serial-dma/kernel-serial-dma.tex
+++ b/labs/kernel-serial-dma/kernel-serial-dma.tex
@@ -19,9 +19,9 @@ the same kernel, environment and paths!
 \section{Preparing the driver}
 
 We will use DMA in the write path. As we will receive data from
-userspace, we will need a bounce buffer, we can eg. rename \code{buf}
-into \code{rx_buf} and create another buffer of the same size, named
-\code{tx_buf} in our \code{serial_dev} structure.
+userspace, we will need a bounce buffer, so we can create a second
+buffer named \code{tx_buf} of the same size as \code{rx_buf} in our
+\code{serial_dev} structure.
 
 As we will also need the \code{resource} structure with the MMIO physical
 addresses from outside of the \code{->probe()}, it might be relevant to save
diff --git a/labs/kernel-serial-interrupt/kernel-serial-interrupt.tex b/labs/kernel-serial-interrupt/kernel-serial-interrupt.tex
index 8a223232..bdc27530 100644
--- a/labs/kernel-serial-interrupt/kernel-serial-interrupt.tex
+++ b/labs/kernel-serial-interrupt/kernel-serial-interrupt.tex
@@ -99,7 +99,7 @@ struct serial_dev {
         void __iomem *regs;
         struct miscdevice miscdev;
         unsigned int counter
-        char buf[SERIAL_BUFSIZE];
+        char rx_buf[SERIAL_BUFSIZE];
         unsigned int buf_rd;
         unsigned int buf_wr;
 };




More information about the training-materials-updates mailing list