From: Bo Sun <bo@mboxify.com>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/3] driver: clean up comment formatting and spacing
Date: Fri, 11 Jul 2025 21:43:37 +0800 [thread overview]
Message-ID: <e3e2e6a7b21effc1e4b38b9a8971ce5c@mboxify.com> (raw)
In-Reply-To: <f83fc1bb-0d12-450b-9a16-ca2e3d4678b8@pengutronix.de>
On 2025-07-11 20:39, Ahmad Fatoum wrote:
> Hello Bo,
>
> On 7/11/25 14:27, Bo Sun wrote:
>> - 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>
>
> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>
>> ---
>> 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.
>> - */
>> + */
>
> Would you like to use the occasion to switch this over to kerneldoc
> style? Kerneldoc is much more common in newer barebox code and would
> allow us using the same infrastructure in future.
Sure, will do.
Thanks,
Bo
>
> Cheers,
> Ahmad
>
>> 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.
>>
>>
prev parent reply other threads:[~2025-07-11 13:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-11 12:27 Bo Sun
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 [this message]
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=e3e2e6a7b21effc1e4b38b9a8971ce5c@mboxify.com \
--to=bo@mboxify.com \
--cc=a.fatoum@pengutronix.de \
--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