lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87si8m94t8.fsf@frog.home>
Date:	Fri, 17 Jul 2015 17:33:55 +0200
From:	Jakub Sitnicki <jsitnicki@...il.com>
To:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org, devel@...verdev.osuosl.org
Subject: Re: [PATCH 5/6] staging: rtl8188eu: stop using DBG_88E

On Thu, Jul 16, 2015 at 01:28 PM CEST, Sudip Mukherjee <sudipm.mukherjee@...il.com> wrote:
> Stop using DBG_88E which is a custom macro for printing debugging
> messages. Instead start using pr_debug and in the process define
> pr_fmt.

In the end, don't we want to use netdev_dbg() everywhere where we work
with a struct net_device? And use dev_dbg() everywhere where we work
with a struct device (or a struct usb_interface)?

At least that's how I understand commit 8f26b8376faa ("checkpatch:
update suggested printk conversions") description:

    Direct conversion of printk(KERN_<LEVEL>...  to pr_<level> isn't the
    preferred conversion when a struct net_device or struct device is
    available.

Do you think it is worth going straight for netdev_dbg()/dev_dbg() to
avoid redoing it later?

>
> Signed-off-by: Sudip Mukherjee <sudip@...torindia.org>
> ---
>  drivers/staging/rtl8188eu/os_dep/usb_intf.c | 39 +++++++++++++++--------------
>  1 file changed, 20 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
> index 2d75c77..b245e9c 100644
> --- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c
> +++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
> @@ -19,6 +19,7 @@
>   ******************************************************************************/
>  #define _HCI_INTF_C_
>  
> +#define pr_fmt(fmt) "R8188EU: " fmt
>  #include <osdep_service.h>
>  #include <drv_types.h>
>  #include <recv_osdep.h>

If we're going to stay with pr_debug(), using KBUILD_MODNAME seems to be
the convention among drivers when defining pr_fmt():

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

Cheers,
Jakub
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ