mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Bo Sun <bo@mboxify.com>
To: barebox@lists.infradead.org
Subject: [PATCH 1/3] driver: clean up comment formatting and spacing
Date: Fri, 11 Jul 2025 20:27:27 +0800	[thread overview]
Message-ID: <20250711122729.108015-1-bo@mboxify.com> (raw)

- Fixed a missing closing parenthesis in the comment for DEVICE_ID_SINGLE
- Cleaned up indentation and alignment of multi-line comments in struct device
- Removed redundant spaces in function pointer declarations

No functional changes.

Signed-off-by: Bo Sun <bo@mboxify.com>
---
 include/device.h | 18 ++++++++++--------
 include/driver.h |  8 ++++----
 2 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/include/device.h b/include/device.h
index bc3a348e2e..97fa040365 100644
--- a/include/device.h
+++ b/include/device.h
@@ -37,7 +37,7 @@ struct device {
 	/*! This member is used to store device's unique name as
 	 *  obtained by calling dev_id(). Internal field, do not
 	 *  access it directly.
-	  */
+	 */
 	char *unique_name;
 	/*! The id is used to uniquely identify a device in the system. The id
 	 * will show up under /dev/ as the device's name. Usually this is
@@ -58,14 +58,16 @@ struct device {
 		void *priv;
 		void *driver_data;
 	};
-	void *type_data;     /*! In case this device is a specific device, this pointer
-			      * points to the type specific device, i.e. eth_device
-			      */
+	/*! In case this device is a specific device, this pointer
+	 * points to the type specific device, i.e. eth_device
+	 */
+	void *type_data;
+
 	struct driver *driver; /*! The driver for this device */
 
 	struct list_head list;     /* The list of all devices */
-	struct list_head bus_list; /* our bus            */
-	struct list_head children; /* our children            */
+	struct list_head bus_list; /* our bus */
+	struct list_head children; /* our children */
 	struct list_head sibling;
 	struct list_head active;   /* The list of all devices which have a driver */
 
@@ -102,8 +104,8 @@ struct device {
 	 * For devices which take longer to probe this is called
 	 * when the driver should actually detect client devices
 	 */
-	int     (*detect) (struct device *);
-	void	(*rescan) (struct device *);
+	int (*detect)(struct device *);
+	void (*rescan)(struct device *);
 
 	/*
 	 * if a driver probe is deferred, this stores the last error
diff --git a/include/driver.h b/include/driver.h
index dd50a7aa3c..510a32186d 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -36,13 +36,13 @@ struct driver {
 	const char *name;
 
 	struct list_head list;
-	struct list_head bus_list; /* our bus            */
+	struct list_head bus_list; /* our bus */
 
 	/*! Called if an instance of a device is found */
-	int     (*probe) (struct device *);
+	int (*probe)(struct device *);
 
 	/*! Called if an instance of a device is gone. */
-	void     (*remove)(struct device *);
+	void (*remove)(struct device *);
 
 	struct bus_type *bus;
 
@@ -61,7 +61,7 @@ struct driver {
 
 /* dynamically assign the next free id */
 #define DEVICE_ID_DYNAMIC	-2
-/* do not use an id (only one device available */
+/* do not use an id (only one device available) */
 #define DEVICE_ID_SINGLE	-1
 
 /* Register devices and drivers.



             reply	other threads:[~2025-07-11 12:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-11 12:27 Bo Sun [this message]
2025-07-11 12:27 ` [PATCH 2/3] miitool: clarify help text for default behavior and -s option Bo Sun
2025-07-11 12:53   ` Ahmad Fatoum
2025-07-11 12:27 ` [PATCH 3/3] of: base: fix of_match_node function documentation Bo Sun
2025-07-11 12:55   ` Ahmad Fatoum
2025-07-11 12:39 ` [PATCH 1/3] driver: clean up comment formatting and spacing Ahmad Fatoum
2025-07-11 13:43   ` Bo Sun

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=20250711122729.108015-1-bo@mboxify.com \
    --to=bo@mboxify.com \
    --cc=barebox@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox