[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1803042153160.2182@hadrien>
Date: Sun, 4 Mar 2018 21:54:04 +0100 (CET)
From: Julia Lawall <julia.lawall@...6.fr>
To: Arushi Singhal <arushisinghal19971997@...il.com>
cc: gregkh@...uxfoundation.org, netdev@...r.kernel.org,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
outreachy-kernel@...glegroups.com
Subject: Re: [Outreachy kernel] [PATCH v2] staging: Replace printk() with
appropriate net_*macro_ratelimited()
On Mon, 5 Mar 2018, Arushi Singhal wrote:
> Replace printk having a log level with the appropriate
> net_*macro_ratelimited.
Why did you choose this function?
> It's better to use actual device name as a prefix in error messages.
What does this message relate to.
> Indentation is also changed, to fix the checkpatch issue.
It would be better to no exceed 80 characters than to follow the
suggestion abotu the argument being to the right of the (.
julia
> Signed-off-by: Arushi Singhal <arushisinghal19971997@...il.com>
> ---
> changes in v2
> *In previous version printk was changed to pr_*macro(), which is used
> in kernel instead of calling printk() directly. And for drivers,
> dev_*macro() or net_*macro_ratelimited() should be used for calling
> printk() directly.
>
> drivers/staging/ipx/af_ipx.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/ipx/af_ipx.c b/drivers/staging/ipx/af_ipx.c
> index d21a9d1..9a96962 100644
> --- a/drivers/staging/ipx/af_ipx.c
> +++ b/drivers/staging/ipx/af_ipx.c
> @@ -744,13 +744,13 @@ static void ipxitf_discover_netnum(struct ipx_interface *intrfc,
> intrfc->if_netnum = cb->ipx_source_net;
> ipxitf_add_local_route(intrfc);
> } else {
> - printk(KERN_WARNING "IPX: Network number collision "
> - "%lx\n %s %s and %s %s\n",
> - (unsigned long) ntohl(cb->ipx_source_net),
> - ipx_device_name(i),
> - ipx_frame_name(i->if_dlink_type),
> - ipx_device_name(intrfc),
> - ipx_frame_name(intrfc->if_dlink_type));
> + net_warn_ratelimited("IPX: Network number collision "
> + "%lx\n %s %s and %s %s\n",
> + (unsigned long) ntohl(cb->ipx_source_net),
> + ipx_device_name(i),
> + ipx_frame_name(i->if_dlink_type),
> + ipx_device_name(intrfc),
> + ipx_frame_name(intrfc->if_dlink_type));
> ipxitf_put(i);
> }
> }
> --
> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@...glegroups.com.
> To post to this group, send email to outreachy-kernel@...glegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20180304204910.GA4840%40seema-Inspiron-15-3567.
> For more options, visit https://groups.google.com/d/optout.
>
Powered by blists - more mailing lists