Skip to contentSkip to conversation

kernel-doc in drivers/base/core.c corrections

PATCH In review Henne 2 participants 3 messages Jul 4, 2006

Subsystems (2)
lore
Share & tools
lore

Henne

author
#0 lore raw

PATCH 1/1 kernel-doc in drivers/base/core.c corrections

From: Henrik Kretzschmar <[email protected]>

Corrects the kerneldocs for device_create() and device_destroy() with an eye on coding style and grammar.

---

drivers/base/core.c +6 -6
@@ -559,9 +559,9 @@
 
 /**
  * device_create - creates a device and registers it with sysfs
- * @cs: pointer to the struct class that this device should be registered to.
- * @parent: pointer to the parent struct device of this new device, if any.
- * @dev: the dev_t for the char device to be added.
+ * @class: pointer to the struct class that this device should be registered to
+ * @parent: pointer to the parent struct device of this new device, if any
+ * @devt: the dev_t for the char device to be added
  * @fmt: string for the class device's name
  *
  * This function can be used by char device classes.  A struct
@@ -620,11 +620,11 @@
 
 /**
  * device_destroy - removes a device that was created with device_create()
- * @class: the pointer to the struct class that this device was registered * with.
- * @dev: the dev_t of the device that was previously registered.
+ * @class: pointer to the struct class that this device was registered with
+ * @devt: the dev_t of the device that was previously registered
  *
  * This call unregisters and cleans up a class device that was created with a
- * call to class_device_create()
+ * call to class_device_create().
  */
 void device_destroy(struct class *class, dev_t devt)
 {

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors

#1 lore raw
Quoted 10 lines · Henne

From: Henrik Kretzschmar <[email protected]>

Corrects the kerneldocs for device_create() and device_destroy() with an eye on coding style and grammar.

---

drivers/base/core.c line 565

Quoted 10 lines
drivers/base/core.c +3 -3
@@ -559,9 +559,9 @@
 
 /**
  * device_create - creates a device and registers it with sysfs
- * @cs: pointer to the struct class that this device should be registered to.
- * @parent: pointer to the parent struct device of this new device, if any.
- * @dev: the dev_t for the char device to be added.
+ * @class: pointer to the struct class that this device should be registered to
+ * @parent: pointer to the parent struct device of this new device, if any
+ * @devt: the dev_t for the char device to be added
  * @fmt: string for the class device's name

fmt should not say "class device's", but just "device's".

Quoted 4 lines
drivers/base/core.c +0 -0
  *
  * This function can be used by char device classes.  A struct
@@ -620,11 +620,11 @@
 

drivers/base/core.c line 627

Quoted 10 lines
drivers/base/core.c +3 -3
 /**
  * device_destroy - removes a device that was created with device_create()
- * @class: the pointer to the struct class that this device was registered * with.
- * @dev: the dev_t of the device that was previously registered.
+ * @class: pointer to the struct class that this device was registered with
+ * @devt: the dev_t of the device that was previously registered
  *
  * This call unregisters and cleans up a class device that was created with a
- * call to class_device_create()
+ * call to class_device_create().

Oops, no, this should say "device_create()", and drop the "class device" and replace it with "device" earlier in the sentance.

That's what I get for cut-and-pasting this stuff, sorry.

Care to try it again?

thanks,

greg k-h
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors

author
#2 lore raw
In reply to Henne

From: Henrik Kretzschmar <[email protected]>

Corrects the kerneldocs for device_create() and device_destroy() with an eye on coding style, grammar and readability.

---

drivers/base/core.c +15 -15
@@ -559,20 +559,20 @@
 
 /**
  * device_create - creates a device and registers it with sysfs
- * @cs: pointer to the struct class that this device should be registered to.
- * @parent: pointer to the parent struct device of this new device, if any.
- * @dev: the dev_t for the char device to be added.
- * @fmt: string for the class device's name
+ * @class: pointer to the struct class that this device should be registered to
+ * @parent: pointer to the parent struct device of this new device, if any
+ * @devt: the dev_t for the char device to be added
+ * @fmt: string for the device's name
  *
- * This function can be used by char device classes.  A struct
- * device will be created in sysfs, registered to the specified
- * class.
+ * This function can be used by char device classes.  A struct device
+ * will be created in sysfs, registered to the specified class.
+ *
  * A "dev" file will be created, showing the dev_t for the device, if
  * the dev_t is not 0,0.
- * If a pointer to a parent struct device is passed in, the newly
- * created struct device will be a child of that device in sysfs.  The
- * pointer to the struct device will be returned from the call.  Any
- * further sysfs files that might be required can be created using this
+ * If a pointer to a parent struct device is passed in, the newly created
+ * struct device will be a child of that device in sysfs.
+ * The pointer to the struct device will be returned from the call.
+ * Any further sysfs files that might be required can be created using this
  * pointer.
  *
  * Note: the struct class passed to this function must have previously
@@ -620,11 +620,11 @@
 
 /**
  * device_destroy - removes a device that was created with device_create()
- * @class: the pointer to the struct class that this device was registered * with.
- * @dev: the dev_t of the device that was previously registered.
+ * @class: pointer to the struct class that this device was registered with
+ * @devt: the dev_t of the device that was previously registered
  *
- * This call unregisters and cleans up a class device that was created with a
- * call to class_device_create()
+ * This call unregisters and cleans up a device that was created with a
+ * call to device_create().
  */
 void device_destroy(struct class *class, dev_t devt)
 {

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors