Re: [PATCH 3/4] libfcoe: Add fcoe_sysfs

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

 



On Mon, Mar 12, 2012 at 04:09:31PM -0700, Robert Love wrote:
> +static void fcoe_ctlr_attrs_release(struct device *dev)
> +{
> +	struct fcoe_ctlr_attrs *ctlr = dev_to_ctlr(dev);
> +
> +	put_device(ctlr->dev.parent);
> +	ctlr->dev.parent = NULL;

You should never have to put a reference count on your parent, nor worry
about setting this value to NULL.  Just assign the parent when you
register the device, no need to increment it.

> +#define fcoe_ctlr_id(x)				\
> +	((x)->id)
> +#define fcoe_ctlr_work_q_name(x)		\
> +	((x)->work_q_name)

<snip>

Ick, what are all of these for, please don't do that.

thanks,

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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux