All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tobin C. Harding" <me@tobin.cc>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Wolfram Sang <wsa@the-dreams.de>, driverdev-devel@linuxdriverproject.org
Subject: [PATCH 04/15] staging: ks7010: clean up SDIO header comments
Date: Tue, 18 Apr 2017 10:35:32 +1000	[thread overview]
Message-ID: <1492475743-25189-5-git-send-email-me@tobin.cc> (raw)
In-Reply-To: <1492475743-25189-1-git-send-email-me@tobin.cc>

SDIO header file does not use kernel doc format struct
comments. Adding them aids readability and enables documentation to be
built from the source code. Other comments may be tidied up as we do this.

Add kernel format struct comments. Tidy up comments.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
---
 drivers/staging/ks7010/ks7010_sdio.h | 46 ++++++++++++++++++++++++++----------
 1 file changed, 34 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.h b/drivers/staging/ks7010/ks7010_sdio.h
index 5aa593a..d04fccc 100644
--- a/drivers/staging/ks7010/ks7010_sdio.h
+++ b/drivers/staging/ks7010/ks7010_sdio.h
@@ -76,8 +76,6 @@ enum gen_com_reg_b {
 };
 
 /* Wakeup Register */
-/* #define WAKEUP			0x008104 */
-/* #define WAKEUP_REQ		0x00 */
 #define WAKEUP			0x008018
 #define WAKEUP_REQ		0x5a
 
@@ -87,9 +85,6 @@ enum gen_com_reg_b {
 
 #define KS7010_IRAM_ADDRESS	0x06000000
 
-/*
- * struct define
- */
 struct hw_info_t {
 	struct ks_sdio_card *sdio_card;
 	struct workqueue_struct *ks7010sdio_wq;
@@ -105,35 +100,62 @@ struct ks_sdio_card {
 /* Tx Device struct */
 #define	TX_DEVICE_BUFF_SIZE	1024
 
+/**
+ * struct tx_device_buffer - Queue item for the tx queue.
+ * @sendp: Pointer to the send request data.
+ * @size: Size of @sendp data.
+ * @complete_handler: Function called once data write to device is complete.
+ * @arg1: First argument to @complete_handler.
+ * @arg2: Second argument to @complete_handler.
+ */
 struct tx_device_buffer {
-	unsigned char *sendp;	/* pointer of send req data */
+	unsigned char *sendp;
 	unsigned int size;
 	void (*complete_handler)(struct ks_wlan_private *priv,
 				 struct sk_buff *skb);
 	struct sk_buff *skb;
 };
 
+/**
+ * struct tx_device - Tx buffer queue.
+ * @tx_device_buffer: Queue buffer.
+ * @qhead: Head of tx queue.
+ * @qtail: Tail of tx queue.
+ * @tx_dev_lock: Queue lock.
+ */
 struct tx_device {
 	struct tx_device_buffer tx_dev_buff[TX_DEVICE_BUFF_SIZE];
-	unsigned int qhead;	/* tx buffer queue first pointer */
-	unsigned int qtail;	/* tx buffer queue last pointer */
-	spinlock_t tx_dev_lock;
+	unsigned int qhead;
+	unsigned int qtail;
+	spinlock_t tx_dev_lock;	/* protect access to the queue */
 };
 
 /* Rx Device struct */
 #define	RX_DATA_SIZE	(2 + 2 + 2347 + 1)
 #define	RX_DEVICE_BUFF_SIZE	32
 
+/**
+ * struct rx_device_buffer - Queue item for the rx queue.
+ * @data: rx data.
+ * @size: Size of @data.
+ */
 struct rx_device_buffer {
 	unsigned char data[RX_DATA_SIZE];
 	unsigned int size;
 };
 
+/**
+ * struct rx_device - Rx buffer queue.
+ * @rx_device_buffer: Queue buffer.
+ * @qhead: Head of rx queue.
+ * @qtail: Tail of rx queue.
+ * @rx_dev_lock: Queue lock.
+ */
 struct rx_device {
 	struct rx_device_buffer rx_dev_buff[RX_DEVICE_BUFF_SIZE];
-	unsigned int qhead;	/* rx buffer queue first pointer */
-	unsigned int qtail;	/* rx buffer queue last pointer */
-	spinlock_t rx_dev_lock;
+	unsigned int qhead;
+	unsigned int qtail;
+	spinlock_t rx_dev_lock;	/* protect access to the queue */
 };
 
 #define	ROM_FILE "ks7010sd.rom"
-- 
2.7.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  parent reply	other threads:[~2017-04-18  0:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-18  0:35 [PATCH 00/15] staging: ks7010: refactor SDIO code Tobin C. Harding
2017-04-18  0:35 ` [PATCH 01/15] staging: ks7010: create reg_status_type enum type Tobin C. Harding
2017-04-18  0:35 ` [PATCH 02/15] staging: ks7010: replace defines with enum types Tobin C. Harding
2017-04-18  0:35 ` [PATCH 03/15] staging: ks7010: fix complete_handler Tobin C. Harding
2017-04-18  0:35 ` Tobin C. Harding [this message]
2017-04-18  0:35 ` [PATCH 05/15] staging: ks7010: rename wakeup work struct Tobin C. Harding
2017-04-18  0:35 ` [PATCH 06/15] staging: ks7010: move tasklet_struct to ks_wlan_private Tobin C. Harding
2017-04-18  0:35 ` [PATCH 07/15] staging: ks7010: move hw info into dev private data Tobin C. Harding
2017-04-18  0:35 ` [PATCH 08/15] staging: ks7010: add struct comment to ks_sdio_card Tobin C. Harding
2017-04-18  0:35 ` [PATCH 09/15] staging: ks7010: clean up SDIO source comments Tobin C. Harding
2017-04-18  0:35 ` [PATCH 10/15] staging: ks7010: remove err_ from non-error path label Tobin C. Harding
2017-04-18  0:35 ` [PATCH 11/15] staging: ks7010: fix checkpatch SPACE_BEFORE_TAB Tobin C. Harding
2017-04-18  0:35 ` [PATCH 12/15] staging: ks7010: fix checkpatch LINE_SPACING Tobin C. Harding
2017-04-18  0:35 ` [PATCH 13/15] staging: ks7010: refactor SDIO read/write helpers Tobin C. Harding
2017-04-18  0:35 ` [PATCH 14/15] staging: ks7010: fix checkpatch SPLIT_STRING Tobin C. Harding
2017-04-18  0:35 ` [PATCH 15/15] staging: ks7010: rename SDIO files Tobin C. Harding
2017-04-18 11:47   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1492475743-25189-5-git-send-email-me@tobin.cc \
    --to=me@tobin.cc \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.