diff mbox series

PCI: acpiphp: Fixed coding style

Message ID 20210301072145.19018-1-chakravarthikulkarni2021@gmail.com
State New
Headers show
Series PCI: acpiphp: Fixed coding style | expand

Commit Message

chakravarthikulkarni March 1, 2021, 7:21 a.m. UTC
In this commit fixed coding style for braces and comments.

Signed-off-by: chakravarthikulkarni <chakravarthikulkarni2021@gmail.com>
---
 drivers/pci/hotplug/acpiphp.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Krzysztof WilczyƄski March 7, 2021, 1:18 a.m. UTC | #1
Hi,

Thank you for sending the patch over.  Few suggestions below.

There seem to be an extra space in the subject line.

> In this commit fixed coding style for braces and comments.


Where these coding style changes suggested by a tool?  For example, was it
something like checkpatch.pl?  If so, then it would be prudent to
mention that the script found these for future reference.

[...]
> -	struct list_head funcs;		/* one slot may have different

> -					   objects (i.e. for each function) */

> +	struct list_head funcs;		/* one slot may have different */

> +					/* objects (i.e. for each function) */

[...]

Above would be a single line commit that has been made to with within
the line length rules, as otherwise the line would be too long.

This is not necessarily something that we ought to fix, see for example:
  https://elixir.bootlin.com/linux/v5.11.3/source/include/linux/pci.h

[...]
> -struct acpiphp_attention_info

> -{

> +struct acpiphp_attention_info {

>  	int (*set_attn)(struct hotplug_slot *slot, u8 status);

>  	int (*get_attn)(struct hotplug_slot *slot, u8 *status);

>  	struct module *owner;

[...]

Nice catch!

Generally, you would also need to your full name when providing your
"Signed-off-by:" following the style that has been widely accepted.  See
git log for how it would normally look like, and also have a look at the
following for some general guidance on how to submit patches:

  https://www.kernel.org/doc/html/latest/process/submitting-patches.html

Krzysztof
Bjorn Helgaas April 16, 2021, 7:35 p.m. UTC | #2
On Mon, Mar 01, 2021 at 12:51:45PM +0530, chakravarthikulkarni wrote:
> In this commit fixed coding style for braces and comments.

> 

> Signed-off-by: chakravarthikulkarni <chakravarthikulkarni2021@gmail.com>


Applied to pci/hotplug for v5.13, thanks!

I dropped the comment change because it's really one comment that
should remain connected, so it doesn't seem like an improvement to me
to add comment start/stop in the middle.

> ---

>  drivers/pci/hotplug/acpiphp.h | 7 +++----

>  1 file changed, 3 insertions(+), 4 deletions(-)

> 

> diff --git a/drivers/pci/hotplug/acpiphp.h b/drivers/pci/hotplug/acpiphp.h

> index a74b274a8c45..e0964600a78f 100644

> --- a/drivers/pci/hotplug/acpiphp.h

> +++ b/drivers/pci/hotplug/acpiphp.h

> @@ -80,8 +80,8 @@ struct acpiphp_bridge {

>  struct acpiphp_slot {

>  	struct list_head node;

>  	struct pci_bus *bus;

> -	struct list_head funcs;		/* one slot may have different

> -					   objects (i.e. for each function) */

> +	struct list_head funcs;		/* one slot may have different */

> +					/* objects (i.e. for each function) */

>  	struct slot *slot;

>  

>  	u8		device;		/* pci device# */

> @@ -148,8 +148,7 @@ static inline struct acpiphp_root_context *to_acpiphp_root_context(struct acpi_h

>   * ACPI has no generic method of setting/getting attention status

>   * this allows for device specific driver registration

>   */

> -struct acpiphp_attention_info

> -{

> +struct acpiphp_attention_info {

>  	int (*set_attn)(struct hotplug_slot *slot, u8 status);

>  	int (*get_attn)(struct hotplug_slot *slot, u8 *status);

>  	struct module *owner;

> -- 

> 2.17.1

>
diff mbox series

Patch

diff --git a/drivers/pci/hotplug/acpiphp.h b/drivers/pci/hotplug/acpiphp.h
index a74b274a8c45..e0964600a78f 100644
--- a/drivers/pci/hotplug/acpiphp.h
+++ b/drivers/pci/hotplug/acpiphp.h
@@ -80,8 +80,8 @@  struct acpiphp_bridge {
 struct acpiphp_slot {
 	struct list_head node;
 	struct pci_bus *bus;
-	struct list_head funcs;		/* one slot may have different
-					   objects (i.e. for each function) */
+	struct list_head funcs;		/* one slot may have different */
+					/* objects (i.e. for each function) */
 	struct slot *slot;
 
 	u8		device;		/* pci device# */
@@ -148,8 +148,7 @@  static inline struct acpiphp_root_context *to_acpiphp_root_context(struct acpi_h
  * ACPI has no generic method of setting/getting attention status
  * this allows for device specific driver registration
  */
-struct acpiphp_attention_info
-{
+struct acpiphp_attention_info {
 	int (*set_attn)(struct hotplug_slot *slot, u8 status);
 	int (*get_attn)(struct hotplug_slot *slot, u8 *status);
 	struct module *owner;