Re: [PATCH 2/4] Staging: ipack: remove board_name and bus_namefields from struct ipack_device

From: Greg Kroah-Hartman
Date: Fri May 18 2012 - 20:35:31 EST


On Fri, May 18, 2012 at 11:10:06AM +0200, Samuel Iglesias Gonsalvez wrote:
> Removed board_name and bus_name fields from struct ipack_device that are
> completely useless.
>
> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@xxxxxxxxxx>
> ---
> drivers/staging/ipack/bridges/tpci200.c | 20 ++++----------------
> drivers/staging/ipack/bridges/tpci200.h | 8 ++++----
> drivers/staging/ipack/ipack.h | 4 ----
> 3 files changed, 8 insertions(+), 24 deletions(-)

Much nicer, and I'll take this, but why are you doing this:

> @@ -450,7 +448,7 @@ static ssize_t tpci200_show_board(struct device *pdev, char *buf, int slot)
> struct ipack_device *dev = card->slots[slot].dev;
>
> if (dev != NULL)
> - return snprintf(buf, PAGE_SIZE, "%s\n", dev->board_name);
> + return snprintf(buf, PAGE_SIZE, "%s\n", dev_name(&dev->dev));

? That implies that the name isn't already in the path, which it should
be (or at the least, a symlink should be there, so this sysfs file
should not be needed at all, right?)

Also:
> + slot_irq->name = dev_name(&dev->dev);

Why do that? Who needs this name now that we already have it in the
device? Can't that field be removed entirely now also?

thanks,

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