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: <ADE657CA350FB648AAC2C43247A983F001F39DEE70F6@AUSP01VMBX24.collaborationhost.net>
Date:	Fri, 28 Oct 2011 18:02:22 -0500
From:	H Hartley Sweeten <hartleys@...ionengravers.com>
To:	"K. Y. Srinivasan" <kys@...rosoft.com>,
	"gregkh@...e.de" <gregkh@...e.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
	"virtualization@...ts.osdl.org" <virtualization@...ts.osdl.org>,
	"ohering@...e.com" <ohering@...e.com>,
	"joe@...ches.com" <joe@...ches.com>,
	"dmitry.torokhov@...il.com" <dmitry.torokhov@...il.com>,
	"jkosina@...e.cz" <jkosina@...e.cz>
Subject: RE: [PATCH 3/3] Staging: hv: mousevsc: Use the KBUILD_MODNAME macro

On Friday, October 28, 2011 3:11 PM, K. Y. Srinivasan wrote:
> 
> Use the KBUILD_MODNAME macro.
> 
> Signed-off-by: K. Y. Srinivasan <kys@...rosoft.com>
> ---
>  drivers/staging/hv/hv_mouse.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c
> index c22f729..2c2e1b4 100644
> --- a/drivers/staging/hv/hv_mouse.c
> +++ b/drivers/staging/hv/hv_mouse.c
> @@ -578,7 +578,7 @@ static const struct hv_vmbus_device_id id_table[] = {
>  MODULE_DEVICE_TABLE(vmbus, id_table);
>  
>  static struct  hv_driver mousevsc_drv = {
> -	.name = "mousevsc",
> +	.name = KBUILD_MODNAME,
>  	.id_table = id_table,
>  	.probe = mousevsc_probe,
>  	.remove = mousevsc_remove,

It's just my opinion, but I'm not sure this is better.

By changing the name to KBUILD_MODNAME you can no longer grep the source to
find the driver based on it's name:

$ grep -r name * | grep mousevsc
drivers/staging/hv/hv_mouse.c:  .name = "mousevsc",

Also, doesn't this change the name of the driver from "mousevsc" to "hv_mouse"?
Does anything else need modified to handle the name change or is the matching
handled strictly by the id_table?

Regards,
Hartley

--
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