Re: [PATCH 22/59] Staging: hv: vmbus: Get rid of the unused name field in struct hv_driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 25, 2011 at 09:48:48AM -0700, K. Y. Srinivasan wrote:
> Get rid of the unused "name" field in struct hv_driver.
> 
> Signed-off-by: K. Y. Srinivasan <kys@xxxxxxxxxxxxx>
> Signed-off-by: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
> ---
>  drivers/staging/hv/hyperv.h |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/hv/hyperv.h b/drivers/staging/hv/hyperv.h
> index b8199f4..60ead66 100644
> --- a/drivers/staging/hv/hyperv.h
> +++ b/drivers/staging/hv/hyperv.h
> @@ -802,8 +802,6 @@ struct hv_device_info {
>  
>  /* Base driver object */
>  struct hv_driver {
> -	const char *name;

Wait, why is this unused?  What are you going to use as your name for
the driver in sysfs then?  The module name?

As much as I love seeing things deleted, I really think you need this
field.

Ah, yeah, I see why you think it's unneeded, crud like this in the
drivers:

	drv->driver.name = driver_name;

No vmbus driver should ever have to touch the base struct driver on it's
own at all.  Your vmbus core should properly handle telling the driver
core what the name of the driver is.

As an example, see the __pci_register_driver() function, the first thing
that code does is set the name based on the name of the larger
pci_driver structure passed to it.

Man, if you want something done right, you have to do it yourself, let
me go make these changes so you don't have to do any new work at this
point in time, hopefully your other patches will apply...

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux