diff mbox series

pnp: Clean up errors in pnp.h

Message ID 13c70c43.85d.18ad53580c7.Coremail.chenguohua@jari.cn (mailing list archive)
State Mainlined, archived
Headers show
Series pnp: Clean up errors in pnp.h | expand

Commit Message

chenguohua@jari.cn Sept. 27, 2023, 5:56 a.m. UTC
Fix the following errors reported by checkpatch:

ERROR: "foo * bar" should be "foo *bar"
ERROR: space required after that ';' (ctx:VxV)

Signed-off-by: GuoHua Cheng <chenguohua@jari.cn>
---
 include/linux/pnp.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Rafael J. Wysocki Oct. 3, 2023, 7:21 p.m. UTC | #1
On Wed, Sep 27, 2023 at 8:31 AM <chenguohua@jari.cn> wrote:
>
> Fix the following errors reported by checkpatch:
>
> ERROR: "foo * bar" should be "foo *bar"
> ERROR: space required after that ';' (ctx:VxV)
>
> Signed-off-by: GuoHua Cheng <chenguohua@jari.cn>
> ---
>  include/linux/pnp.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/pnp.h b/include/linux/pnp.h
> index c2a7cfbca713..267fb8a4fb6e 100644
> --- a/include/linux/pnp.h
> +++ b/include/linux/pnp.h
> @@ -291,7 +291,7 @@ static inline void pnp_set_drvdata(struct pnp_dev *pdev, void *data)
>
>  struct pnp_fixup {
>         char id[7];
> -       void (*quirk_function) (struct pnp_dev * dev);  /* fixup function */
> +       void (*quirk_function) (struct pnp_dev *dev);   /* fixup function */
>  };
>
>  /* config parameters */
> @@ -419,8 +419,8 @@ struct pnp_protocol {
>
>         /* protocol specific suspend/resume */
>         bool (*can_wakeup) (struct pnp_dev *dev);
> -       int (*suspend) (struct pnp_dev * dev, pm_message_t state);
> -       int (*resume) (struct pnp_dev * dev);
> +       int (*suspend) (struct pnp_dev *dev, pm_message_t state);
> +       int (*resume) (struct pnp_dev *dev);
>
>         /* used by pnp layer only (look but don't touch) */
>         unsigned char number;   /* protocol number */
> @@ -492,7 +492,7 @@ static inline int pnp_start_dev(struct pnp_dev *dev) { return -ENODEV; }
>  static inline int pnp_stop_dev(struct pnp_dev *dev) { return -ENODEV; }
>  static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; }
>  static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; }
> -static inline int pnp_range_reserved(resource_size_t start, resource_size_t end) { return 0;}
> +static inline int pnp_range_reserved(resource_size_t start, resource_size_t end) { return 0; }
>
>  /* protocol helpers */
>  static inline int pnp_is_active(struct pnp_dev *dev) { return 0; }
> --

Applied as 6.7 material with edited subject and changelog.

That said, checkpatch.pl is for checking patches.  Applying it to the
existing code is questionable and sending patches based on that is
even more so.

Thanks!
diff mbox series

Patch

diff --git a/include/linux/pnp.h b/include/linux/pnp.h
index c2a7cfbca713..267fb8a4fb6e 100644
--- a/include/linux/pnp.h
+++ b/include/linux/pnp.h
@@ -291,7 +291,7 @@  static inline void pnp_set_drvdata(struct pnp_dev *pdev, void *data)
 
 struct pnp_fixup {
 	char id[7];
-	void (*quirk_function) (struct pnp_dev * dev);	/* fixup function */
+	void (*quirk_function) (struct pnp_dev *dev);	/* fixup function */
 };
 
 /* config parameters */
@@ -419,8 +419,8 @@  struct pnp_protocol {
 
 	/* protocol specific suspend/resume */
 	bool (*can_wakeup) (struct pnp_dev *dev);
-	int (*suspend) (struct pnp_dev * dev, pm_message_t state);
-	int (*resume) (struct pnp_dev * dev);
+	int (*suspend) (struct pnp_dev *dev, pm_message_t state);
+	int (*resume) (struct pnp_dev *dev);
 
 	/* used by pnp layer only (look but don't touch) */
 	unsigned char number;	/* protocol number */
@@ -492,7 +492,7 @@  static inline int pnp_start_dev(struct pnp_dev *dev) { return -ENODEV; }
 static inline int pnp_stop_dev(struct pnp_dev *dev) { return -ENODEV; }
 static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; }
 static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; }
-static inline int pnp_range_reserved(resource_size_t start, resource_size_t end) { return 0;}
+static inline int pnp_range_reserved(resource_size_t start, resource_size_t end) { return 0; }
 
 /* protocol helpers */
 static inline int pnp_is_active(struct pnp_dev *dev) { return 0; }