All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] staging: rtl8192u: remove split in user-visible string
@ 2023-02-23 19:35 ` Leonid Pershin
  0 siblings, 0 replies; 5+ messages in thread
From: Leonid Pershin @ 2023-02-23 19:35 UTC (permalink / raw)
  Cc: Leonid Pershin, Greg Kroah-Hartman, Dan Carpenter, Tong Zhang,
	Rebecca Mckeever, Deepak R Varma, linux-staging, linux-kernel

According to coding style, user-visible strings in printk()
function calls cannot be split across multiple lines.
Issue found with checkpatch.pl.

Signed-off-by: Leonid Pershin <leonid.pershin@gmail.com>
---
Changes in v2:
  - Replace printk(KERN_DEBUG...) with pr_debug()

 drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
index 9bfd24ad46b6..c378bdff453b 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
@@ -72,16 +72,14 @@ static void *ieee80211_tkip_init(int key_idx)
 
 	priv->tx_tfm_michael = crypto_alloc_shash("michael_mic", 0, 0);
 	if (IS_ERR(priv->tx_tfm_michael)) {
-		printk(KERN_DEBUG "ieee80211_crypt_tkip: could not allocate "
-				"crypto API michael_mic\n");
+		pr_debug("ieee80211_crypt_tkip: could not allocate crypto API michael_mic\n");
 		priv->tx_tfm_michael = NULL;
 		goto fail;
 	}
 
 	priv->rx_tfm_michael = crypto_alloc_shash("michael_mic", 0, 0);
 	if (IS_ERR(priv->rx_tfm_michael)) {
-		printk(KERN_DEBUG "ieee80211_crypt_tkip: could not allocate "
-				"crypto API michael_mic\n");
+		pr_debug("ieee80211_crypt_tkip: could not allocate crypto API michael_mic\n");
 		priv->rx_tfm_michael = NULL;
 		goto fail;
 	}
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2] staging: rtl8192u: remove split in user-visible string
@ 2023-02-23 19:35 ` Leonid Pershin
  0 siblings, 0 replies; 5+ messages in thread
From: Leonid Pershin @ 2023-02-23 19:35 UTC (permalink / raw)
  Cc: Leonid Pershin, Greg Kroah-Hartman, Dan Carpenter, Tong Zhang,
	Rebecca Mckeever, Deepak R Varma, linux-staging, linux-kernel

According to coding style, user-visible strings in printk()
function calls cannot be split across multiple lines.
Issue found with checkpatch.pl.

Signed-off-by: Leonid Pershin <leonid.pershin@gmail.com>
---
Changes in v2:
  - Replace printk(KERN_DEBUG...) with pr_debug()

 drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
index 9bfd24ad46b6..c378bdff453b 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
@@ -72,16 +72,14 @@ static void *ieee80211_tkip_init(int key_idx)
 
 	priv->tx_tfm_michael = crypto_alloc_shash("michael_mic", 0, 0);
 	if (IS_ERR(priv->tx_tfm_michael)) {
-		printk(KERN_DEBUG "ieee80211_crypt_tkip: could not allocate "
-				"crypto API michael_mic\n");
+		pr_debug("ieee80211_crypt_tkip: could not allocate crypto API michael_mic\n");
 		priv->tx_tfm_michael = NULL;
 		goto fail;
 	}
 
 	priv->rx_tfm_michael = crypto_alloc_shash("michael_mic", 0, 0);
 	if (IS_ERR(priv->rx_tfm_michael)) {
-		printk(KERN_DEBUG "ieee80211_crypt_tkip: could not allocate "
-				"crypto API michael_mic\n");
+		pr_debug("ieee80211_crypt_tkip: could not allocate crypto API michael_mic\n");
 		priv->rx_tfm_michael = NULL;
 		goto fail;
 	}
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] staging: rtl8192u: remove split in user-visible string
  2023-02-23 19:35 ` Leonid Pershin
  (?)
@ 2023-02-24  4:57 ` Deepak R Varma
       [not found]   ` <CABa+115WFC0cJ+-L_rNHy3YPOVuVMxgVDidyCLoNE4xYhsRxZg@mail.gmail.com>
  -1 siblings, 1 reply; 5+ messages in thread
From: Deepak R Varma @ 2023-02-24  4:57 UTC (permalink / raw)
  To: Leonid Pershin
  Cc: Greg Kroah-Hartman, Dan Carpenter, Tong Zhang, Rebecca Mckeever,
	linux-staging, linux-kernel

On Thu, Feb 23, 2023 at 10:35:57PM +0300, Leonid Pershin wrote:
> According to coding style, user-visible strings in printk()
> function calls cannot be split across multiple lines.
> Issue found with checkpatch.pl.
> 
> Signed-off-by: Leonid Pershin <leonid.pershin@gmail.com>
> ---
> Changes in v2:
>   - Replace printk(KERN_DEBUG...) with pr_debug()

Hello Leonid,
I was not able to trace the v1 of this patch. Did that have a different subject?

Thank you,
Deepak.

> 
>  drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] staging: rtl8192u: remove split in user-visible string
       [not found]   ` <CABa+115WFC0cJ+-L_rNHy3YPOVuVMxgVDidyCLoNE4xYhsRxZg@mail.gmail.com>
@ 2023-02-25  9:51     ` Deepak R Varma
  0 siblings, 0 replies; 5+ messages in thread
From: Deepak R Varma @ 2023-02-25  9:51 UTC (permalink / raw)
  To: Леонид
	Першин
  Cc: Greg Kroah-Hartman, Dan Carpenter, Tong Zhang, Rebecca Mckeever,
	linux-staging, linux-kernel

On Fri, Feb 24, 2023 at 10:54:22PM +0300, Леонид Першин wrote:
> On Fri, Feb 24, 2023 at 7:58 AM Deepak R Varma <drv@mailo.com> wrote:
> > Hello Leonid,
> > I was not able to trace the v1 of this patch. Did that have a different
> subject?

The line above broke for me in your response. This could be the email editor
issue on your side.

> >
> > Thank you,
> > Deepak.
> 
> Hello Deepak,
> Sorry, I've sent v1 directly to Greg by mistake. Here it is:

No problem. It is important to record such reasons for the reviewer's awareness.
Also, it is a common practice to give credit to the reviewers by mentioning
their name in the  "Change in vx" section.

Good luck.
Deepak.

> 
> On Wed, Feb 22, 2023 at 02:20:29AM +0300, Leonid Pershin wrote:
> > According to coding style, user-visible strings in printk()
> > function calls cannot be split across multiple lines.
> > Issue found with checkpatch.pl.
> >
> > Signed-off-by: Leonid Pershin <leonid.pershin@gmail.com>
> > ---
> > Changes in v2:
> >   - Replace printk(KERN_DEBUG...) with pr_debug()
> >
> >  drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c | 6 ++----
> >  1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
> b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
> > index 9bfd24ad46b6..c378bdff453b 100644
> > --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
> > +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
> > @@ -72,16 +72,14 @@ static void *ieee80211_tkip_init(int key_idx)
> >
> >       priv->tx_tfm_michael = crypto_alloc_shash("michael_mic", 0, 0);
> >       if (IS_ERR(priv->tx_tfm_michael)) {
> > -             printk(KERN_DEBUG "ieee80211_crypt_tkip: could not allocate
> "
> > -                             "crypto API michael_mic\n");
> > +             pr_debug("ieee80211_crypt_tkip: could not allocate crypto
> API michael_mic\n");
> >               priv->tx_tfm_michael = NULL;
> >               goto fail;
> >       }
> >
> >       priv->rx_tfm_michael = crypto_alloc_shash("michael_mic", 0, 0);
> >       if (IS_ERR(priv->rx_tfm_michael)) {
> > -             printk(KERN_DEBUG "ieee80211_crypt_tkip: could not allocate
> "
> > -                             "crypto API michael_mic\n");
> > +             pr_debug("ieee80211_crypt_tkip: could not allocate crypto
> API michael_mic\n");
> >               priv->rx_tfm_michael = NULL;
> >               goto fail;
> >       }
> > --
> > 2.39.2
> >
> 
> Sincerely,
> Leonid



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] staging: rtl8192u: remove split in user-visible string
  2023-02-23 19:35 ` Leonid Pershin
  (?)
  (?)
@ 2023-03-08 16:53 ` Greg Kroah-Hartman
  -1 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2023-03-08 16:53 UTC (permalink / raw)
  To: Leonid Pershin
  Cc: Dan Carpenter, Tong Zhang, Rebecca Mckeever, Deepak R Varma,
	linux-staging, linux-kernel

On Thu, Feb 23, 2023 at 10:35:57PM +0300, Leonid Pershin wrote:
> According to coding style, user-visible strings in printk()
> function calls cannot be split across multiple lines.
> Issue found with checkpatch.pl.
> 
> Signed-off-by: Leonid Pershin <leonid.pershin@gmail.com>
> ---
> Changes in v2:
>   - Replace printk(KERN_DEBUG...) with pr_debug()

Now you are doing two different things, please only do one thing per
patch.

> 
>  drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
> index 9bfd24ad46b6..c378bdff453b 100644
> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
> @@ -72,16 +72,14 @@ static void *ieee80211_tkip_init(int key_idx)
>  
>  	priv->tx_tfm_michael = crypto_alloc_shash("michael_mic", 0, 0);
>  	if (IS_ERR(priv->tx_tfm_michael)) {
> -		printk(KERN_DEBUG "ieee80211_crypt_tkip: could not allocate "
> -				"crypto API michael_mic\n");
> +		pr_debug("ieee80211_crypt_tkip: could not allocate crypto API michael_mic\n");

Are you sure you need the prefix now that you are using pr_debug()?  And
as this is a driver, why not use the networking debug macros instead?

>  		priv->tx_tfm_michael = NULL;
>  		goto fail;
>  	}
>  
>  	priv->rx_tfm_michael = crypto_alloc_shash("michael_mic", 0, 0);
>  	if (IS_ERR(priv->rx_tfm_michael)) {
> -		printk(KERN_DEBUG "ieee80211_crypt_tkip: could not allocate "
> -				"crypto API michael_mic\n");
> +		pr_debug("ieee80211_crypt_tkip: could not allocate crypto API michael_mic\n");

Same here, do you still need the prefix and why not dev_dbg() or the
network version?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-08 16:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-23 19:35 [PATCH v2] staging: rtl8192u: remove split in user-visible string Leonid Pershin
2023-02-23 19:35 ` Leonid Pershin
2023-02-24  4:57 ` Deepak R Varma
     [not found]   ` <CABa+115WFC0cJ+-L_rNHy3YPOVuVMxgVDidyCLoNE4xYhsRxZg@mail.gmail.com>
2023-02-25  9:51     ` Deepak R Varma
2023-03-08 16:53 ` Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.