rename variables with clear names.
%s/rbufs/rx_bufs/
%s/sbufs/tx_bufs/
%s/last_sbuf/last_tx_buf/

Signed-off-by: Tanmay Shah <[email protected]>
---
 drivers/rpmsg/virtio_rpmsg_bus.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c
index 5ae15111fb4f..773547479d15 100644
--- a/drivers/rpmsg/virtio_rpmsg_bus.c
+++ b/drivers/rpmsg/virtio_rpmsg_bus.c
@@ -35,13 +35,13 @@
  * @vdev:      the virtio device
  * @rvq:       rx virtqueue
  * @svq:       tx virtqueue
- * @rbufs:     kernel address of rx buffers
- * @sbufs:     kernel address of tx buffers
- * @num_bufs:  total number of buffers for rx and tx
+ * @rx_bufs:   kernel address of rx buffers
+ * @tx_bufs:   kernel address of tx buffers
+ * @num_bufs:   total number of buffers for rx and tx
  * @buf_size:   size of one rx or tx buffer
- * @last_sbuf: index of last tx buffer used
+ * @last_tx_buf: index of last tx buffer used
  * @bufs_dma:  dma base addr of the buffers
- * @tx_lock:   protects svq and sbufs, to allow concurrent senders.
+ * @tx_lock:   protects svq and tx_bufs, to allow concurrent senders.
  *             sending a message might require waking up a dozing remote
  *             processor, which involves sleeping, hence the mutex.
  * @endpoints: idr of local endpoints, allows fast retrieval
@@ -55,10 +55,10 @@
 struct virtproc_info {
        struct virtio_device *vdev;
        struct virtqueue *rvq, *svq;
-       void *rbufs, *sbufs;
+       void *rx_bufs, *tx_bufs;
        unsigned int num_bufs;
        unsigned int buf_size;
-       int last_sbuf;
+       int last_tx_buf;
        dma_addr_t bufs_dma;
        struct mutex tx_lock;
        struct idr endpoints;
@@ -444,8 +444,8 @@ static void *get_a_tx_buf(struct virtproc_info *vrp)
         * either pick the next unused tx buffer
         * (half of our buffers are used for sending messages)
         */
-       if (vrp->last_sbuf < vrp->num_bufs / 2)
-               ret = vrp->sbufs + vrp->buf_size * vrp->last_sbuf++;
+       if (vrp->last_tx_buf < vrp->num_bufs / 2)
+               ret = vrp->tx_bufs + vrp->buf_size * vrp->last_tx_buf++;
        /* or recycle a used one */
        else
                ret = virtqueue_get_buf(vrp->svq, &len);
@@ -635,7 +635,7 @@ static __poll_t virtio_rpmsg_poll(struct rpmsg_endpoint 
*ept, struct file *filp,
         *   allocated buffers are used for transmit, hence num_bufs / 2), or,
         * - we ask the virtqueue if there's a buffer available
         */
-       if (vrp->last_sbuf < vrp->num_bufs / 2 ||
+       if (vrp->last_tx_buf < vrp->num_bufs / 2 ||
            !virtqueue_enable_cb(vrp->svq))
                mask |= EPOLLOUT;
 
@@ -873,15 +873,15 @@ static int rpmsg_probe(struct virtio_device *vdev)
                bufs_va, &vrp->bufs_dma);
 
        /* half of the buffers is dedicated for RX */
-       vrp->rbufs = bufs_va;
+       vrp->rx_bufs = bufs_va;
 
        /* and half is dedicated for TX */
-       vrp->sbufs = bufs_va + total_buf_space / 2;
+       vrp->tx_bufs = bufs_va + total_buf_space / 2;
 
        /* set up the receive buffers */
        for (i = 0; i < vrp->num_bufs / 2; i++) {
                struct scatterlist sg;
-               void *cpu_addr = vrp->rbufs + i * vrp->buf_size;
+               void *cpu_addr = vrp->rx_bufs + i * vrp->buf_size;
 
                rpmsg_sg_init(&sg, cpu_addr, vrp->buf_size);
 
@@ -980,7 +980,7 @@ static void rpmsg_remove(struct virtio_device *vdev)
        vdev->config->del_vqs(vrp->vdev);
 
        dma_free_coherent(vdev->dev.parent, total_buf_space,
-                         vrp->rbufs, vrp->bufs_dma);
+                         vrp->rx_bufs, vrp->bufs_dma);
 
        kfree(vrp);
 }
-- 
2.34.1


Reply via email to