All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>,
	"gregkh@suse.de" <gregkh@suse.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
	"virtualization@lists.osdl.org" <virtualization@lists.osdl.org>,
	"ohering@suse.com" <ohering@suse.com>,
	"joe@perches.com" <joe@perches.com>,
	"dmitry.torokhov@gmail.com" <dmitry.torokhov@gmail.com>,
	"jkosina@suse.cz" <jkosina@suse.cz>
Subject: Re: [PATCH 3/3] Staging: hv: mousevsc: Use the KBUILD_MODNAME macro
Date: Sat, 26 Nov 2011 16:59:28 -0800	[thread overview]
Message-ID: <20111127005928.GA19088@kroah.com> (raw)
In-Reply-To: <ADE657CA350FB648AAC2C43247A983F001F39DEE70F6@AUSP01VMBX24.collaborationhost.net>

On Fri, Oct 28, 2011 at 06:02:22PM -0500, H Hartley Sweeten wrote:
> On Friday, October 28, 2011 3:11 PM, K. Y. Srinivasan wrote:
> > 
> > Use the KBUILD_MODNAME macro.
> > 
> > Signed-off-by: K. Y. Srinivasan <kys@microsoft.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:

That's fine.

> $ 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"?

Yes.

> Does anything else need modified to handle the name change or is the matching
> handled strictly by the id_table?

No, this only shows up in sysfs, no other changes needed.

thanks,

greg k-h

  reply	other threads:[~2011-11-27  0:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-28 22:10 [PATCH 0/3] Staging: hv: mousevsc: cleanup the mouse driver K. Y. Srinivasan
2011-10-28 22:11 ` [PATCH 1/3] Staging: hv: mousevsc: Address some style issues K. Y. Srinivasan
2011-10-28 22:11   ` [PATCH 2/3] Staging: hv: mousevsc: Add a check to prevent memory corruption K. Y. Srinivasan
2011-10-28 22:11   ` [PATCH 3/3] Staging: hv: mousevsc: Use the KBUILD_MODNAME macro K. Y. Srinivasan
2011-10-28 23:02     ` H Hartley Sweeten
2011-11-27  0:59       ` Greg KH [this message]
2011-10-29  4:49 ` [PATCH 0/3] Staging: hv: mousevsc: cleanup the mouse driver Greg KH
2011-10-30 16:16   ` KY Srinivasan

Reply instructions:

You may reply publicly 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=20111127005928.GA19088@kroah.com \
    --to=greg@kroah.com \
    --cc=devel@linuxdriverproject.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@suse.de \
    --cc=hartleys@visionengravers.com \
    --cc=jkosina@suse.cz \
    --cc=joe@perches.com \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ohering@suse.com \
    --cc=virtualization@lists.osdl.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.