Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1722984 > unrolled thread

[PATCH v2] staging: ks7010: Fix coding style and remove checkpatch.pl warnings.

Started byJonathan Whitaker <jon.b.whitaker@gmail.com>
First post2017-08-30 05:00 +0200
Last post2017-08-31 15:50 +0200
Articles 5 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] staging: ks7010: Fix coding style and remove checkpatch.pl warnings. Jonathan Whitaker <jon.b.whitaker@gmail.com> - 2017-08-30 05:00 +0200
    Re: [PATCH v2] staging: ks7010: Fix coding style and remove  checkpatch.pl warnings. Dan Carpenter <dan.carpenter@oracle.com> - 2017-08-30 12:00 +0200
      [PATCH v3] staging: ks7010: Fix coding style and remove checkpatch.pl warnings. Jonathan Whitaker <jon.b.whitaker@gmail.com> - 2017-08-31 06:30 +0200
        Re: [PATCH v3] staging: ks7010: Fix coding style and remove  checkpatch.pl warnings. Dan Carpenter <dan.carpenter@oracle.com> - 2017-08-31 10:10 +0200
          Re: [PATCH v3] staging: ks7010: Fix coding style and remove  checkpatch.pl warnings. Jonathan Whitaker <jon.b.whitaker@gmail.com> - 2017-08-31 15:50 +0200

#1722984 — [PATCH v2] staging: ks7010: Fix coding style and remove checkpatch.pl warnings.

FromJonathan Whitaker <jon.b.whitaker@gmail.com>
Date2017-08-30 05:00 +0200
Subject[PATCH v2] staging: ks7010: Fix coding style and remove checkpatch.pl warnings.
Message-ID<uk1ot-2B3-3@gated-at.bofh.it>
It is prefered to use '"%s...", __func__ instead of function names for
logging. This commit replaces hardcoded function name strings to the
more preferred '"%s...", __func__' style. These warnings were reported
by checkpatch.pl.

Signed-off-by: Jonathan Whitaker <jon.b.whitaker@gmail.com>

Changes in v2:
  - Wrapped the changelog text to 72 columns.
  - Fixed the commit subject to be more clear.
---
 drivers/staging/ks7010/ks7010_sdio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index 9b28ee1..c0e91c3 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -834,7 +834,7 @@ static int ks7010_sdio_probe(struct sdio_func *func,
 	unsigned char byte;
 	int ret;
 
-	DPRINTK(5, "ks7010_sdio_probe()\n");
+	DPRINTK(5, "%s()\n", __func__);
 
 	priv = NULL;
 	netdev = NULL;
@@ -1008,7 +1008,7 @@ static void ks7010_sdio_remove(struct sdio_func *func)
 	struct ks_sdio_card *card;
 	struct ks_wlan_private *priv;
 
-	DPRINTK(1, "ks7010_sdio_remove()\n");
+	DPRINTK(1, "%s()\n", __func__);
 
 	card = sdio_get_drvdata(func);
 
-- 
2.7.4

[toc] | [next] | [standalone]


#1723179 — Re: [PATCH v2] staging: ks7010: Fix coding style and remove checkpatch.pl warnings.

FromDan Carpenter <dan.carpenter@oracle.com>
Date2017-08-30 12:00 +0200
SubjectRe: [PATCH v2] staging: ks7010: Fix coding style and remove checkpatch.pl warnings.
Message-ID<uk7WW-6Hb-21@gated-at.bofh.it>
In reply to#1722984
On Tue, Aug 29, 2017 at 08:57:34PM -0600, Jonathan Whitaker wrote:
> It is prefered to use '"%s...", __func__ instead of function names for
> logging. This commit replaces hardcoded function name strings to the
> more preferred '"%s...", __func__' style. These warnings were reported
> by checkpatch.pl.
> 
> Signed-off-by: Jonathan Whitaker <jon.b.whitaker@gmail.com>
> 
> Changes in v2:
>   - Wrapped the changelog text to 72 columns.
>   - Fixed the commit subject to be more clear.
> ---

Put the Changelog under the --- cut off line.

>  drivers/staging/ks7010/ks7010_sdio.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
> index 9b28ee1..c0e91c3 100644
> --- a/drivers/staging/ks7010/ks7010_sdio.c
> +++ b/drivers/staging/ks7010/ks7010_sdio.c
> @@ -834,7 +834,7 @@ static int ks7010_sdio_probe(struct sdio_func *func,
>  	unsigned char byte;
>  	int ret;
>  
> -	DPRINTK(5, "ks7010_sdio_probe()\n");
> +	DPRINTK(5, "%s()\n", __func__);

Just delete both the printks.  You can get the same information with
ftrace.

regards,
dan carpenter

[toc] | [prev] | [next] | [standalone]


#1723801 — [PATCH v3] staging: ks7010: Fix coding style and remove checkpatch.pl warnings.

FromJonathan Whitaker <jon.b.whitaker@gmail.com>
Date2017-08-31 06:30 +0200
Subject[PATCH v3] staging: ks7010: Fix coding style and remove checkpatch.pl warnings.
Message-ID<ukph7-TW-3@gated-at.bofh.it>
In reply to#1723179
Removed printk statements for debugging. The same information can be
acquired via ftrace, so these print statements are uneccessary.

Signed-off-by: Jonathan Whitaker <jon.b.whitaker@gmail.com>

---
Changes in v2:
  - Wrapped the changelog text to 72 columns.
  - Fixed the commit subject to be more clear.

Changes in v3:
  - Removed the printk statements altogether. This information is available
    via ftrace.
  - Updated commit message.
---
 drivers/staging/ks7010/ks7010_sdio.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index 9b28ee1..8cfdff1 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -834,8 +834,6 @@ static int ks7010_sdio_probe(struct sdio_func *func,
 	unsigned char byte;
 	int ret;
 
-	DPRINTK(5, "ks7010_sdio_probe()\n");
-
 	priv = NULL;
 	netdev = NULL;
 
@@ -1008,8 +1006,6 @@ static void ks7010_sdio_remove(struct sdio_func *func)
 	struct ks_sdio_card *card;
 	struct ks_wlan_private *priv;
 
-	DPRINTK(1, "ks7010_sdio_remove()\n");
-
 	card = sdio_get_drvdata(func);
 
 	if (!card)
-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1723961 — Re: [PATCH v3] staging: ks7010: Fix coding style and remove checkpatch.pl warnings.

FromDan Carpenter <dan.carpenter@oracle.com>
Date2017-08-31 10:10 +0200
SubjectRe: [PATCH v3] staging: ks7010: Fix coding style and remove checkpatch.pl warnings.
Message-ID<uksI3-38N-37@gated-at.bofh.it>
In reply to#1723801
Thanks!

regards,
dan carpenter

[toc] | [prev] | [next] | [standalone]


#1724244 — Re: [PATCH v3] staging: ks7010: Fix coding style and remove checkpatch.pl warnings.

FromJonathan Whitaker <jon.b.whitaker@gmail.com>
Date2017-08-31 15:50 +0200
SubjectRe: [PATCH v3] staging: ks7010: Fix coding style and remove checkpatch.pl warnings.
Message-ID<uky14-6he-23@gated-at.bofh.it>
In reply to#1723961
Thank you for all of the feedback!

On Thu, Aug 31, 2017 at 2:07 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> Thanks!
>
> regards,
> dan carpenter
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web