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 <gre...@linuxfoundation.org> (supporter:STAGING 
> SUBSYSTEM,commit_signer:17/18=94%)
> Puranjay Mohan <puranja...@gmail.com> 
> (commit_signer:4/18=22%,authored:4/18=22%)
> Stephen Brennan <step...@brennan.io> 
> (commit_signer:4/18=22%,authored:4/18=22%,added_lines:297/366=81%,removed_lines:388/470=83%)
> Bhanusree Pola <bhanusreemah...@gmail.com> 
> (commit_signer:3/18=17%,authored:3/18=17%)
> Sanjana Sanikommu <sanjana99redd...@gmail.com> 
> (commit_signer:2/18=11%,authored:2/18=11%)
> Vatsala Narang <vatsalanar...@gmail.com> (authored:1/18=6%)
> de...@driverdev.osuosl.org (open list:STAGING SUBSYSTEM)
> linux-ker...@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.rode...@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 via email to