Kernel Newbies archive on lore.kernel.org
 help / color / Atom feed
From: Greg KH <greg@kroah.com>
To: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>,
	kernelnewbies@kernelnewbies.org
Subject: Re: [PATCH] staging: rtl8192u: specify printk's KERN_<LEVEL> in ieee80211
Date: Mon, 13 Jan 2020 09:29:53 +0100
Message-ID: <20200113082953.GA2097198@kroah.com> (raw)
In-Reply-To: <20200113050247.GA318164@localhost.localdomain>

On Mon, Jan 13, 2020 at 06:02:47PM +1300, Paulo Miguel Almeida wrote:
> Hi,
> 
> I'm planning to submit this cleanup patch but I would appreciate if some
> of you could consider reviewing it first as this is my first patch.
> 
> Also, when it comes to whom to send it to, this is the list I got so far but
> please let me know if I should either add or exclude anyone from this
> list so that I send this patch to the right people while not spamming others.
> 
> ./scripts/get_maintainer.pl /tmp/0001-staging-rtl8192u-specify-printk-s-KERN_-LEVEL-in-iee.patch 
> Greg Kroah-Hartman <gregkh@linuxfoundation.org> (supporter:STAGING SUBSYSTEM,commit_signer:17/18=94%)
> Puranjay Mohan <puranjay12@gmail.com> (commit_signer:4/18=22%,authored:4/18=22%)
> Stephen Brennan <stephen@brennan.io> (commit_signer:4/18=22%,authored:4/18=22%,added_lines:297/366=81%,removed_lines:388/470=83%)
> Bhanusree Pola <bhanusreemahesh@gmail.com> (commit_signer:3/18=17%,authored:3/18=17%)
> Sanjana Sanikommu <sanjana99reddy99@gmail.com> (commit_signer:2/18=11%,authored:2/18=11%)
> Vatsala Narang <vatsalanarang@gmail.com> (authored:1/18=6%)
> devel@driverdev.osuosl.org (open list:STAGING SUBSYSTEM)
> linux-kernel@vger.kernel.org (open list)

Looks correct.

> The origin commit message follows
> 
> Checkpatch reports 'WARNING: printk() should include KERN_<LEVEL>
> facility level'. Fix this by specifying a relevant KERN_<LEVEL> value
> for each line in which it was missing.
> 
> Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
> ---
>  .../staging/rtl8192u/ieee80211/ieee80211_rx.c | 24 +++++++++----------
>  1 file changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
> index 00fea127bdc3..f38986d74005 100644
> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
> @@ -810,11 +810,11 @@ static u8 parse_subframe(struct sk_buff *skb,
>  			nSubframe_Length = (nSubframe_Length >> 8) + (nSubframe_Length << 8);
>  
>  			if (skb->len < (ETHERNET_HEADER_SIZE + nSubframe_Length)) {
> -				printk("%s: A-MSDU parse error!! pRfd->nTotalSubframe : %d\n",\
> +				printk(KERN_DEBUG "%s: A-MSDU parse error!! pRfd->nTotalSubframe : %d\n",
>  						__func__, rxb->nr_subframes);
> -				printk("%s: A-MSDU parse error!! Subframe Length: %d\n", __func__, nSubframe_Length);
> -				printk("nRemain_Length is %d and nSubframe_Length is : %d\n", skb->len, nSubframe_Length);
> -				printk("The Packet SeqNum is %d\n", SeqNum);
> +				printk(KERN_DEBUG "%s: A-MSDU parse error!! Subframe Length: %d\n", __func__, nSubframe_Length);
> +				printk(KERN_DEBUG "nRemain_Length is %d and nSubframe_Length is : %d\n", skb->len, nSubframe_Length);
> +				printk(KERN_DEBUG "The Packet SeqNum is %d\n", SeqNum);

As this is a driver, you really should be using dev_dbg() for this, or
better yet, netdev_dbg() as I think checkpatch will ask you to do.

Same for all of the other conversions in this file, try using a "better"
thing than printk.

But you are on the right track, nice job.

thanks,

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-13  5:02 Paulo Miguel Almeida
2020-01-13  8:29 ` Greg KH [this message]
2020-01-13  8:53 ` Bjørn Mork
2020-01-15  3:47   ` Paulo Miguel Almeida
2020-01-15  8:17     ` Greg KH

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200113082953.GA2097198@kroah.com \
    --to=greg@kroah.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=paulo.miguel.almeida.rodenas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Kernel Newbies archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kernelnewbies/0 kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ https://lore.kernel.org/kernelnewbies \
		kernelnewbies@kernelnewbies.org
	public-inbox-index kernelnewbies

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernelnewbies.kernelnewbies


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git