Re: [PATCH] scsi_transport_srp: Fix shost to rport translation

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

 



On Fri, 2018-04-13 at 08:11 +0200, Hannes Reinecke wrote:
> On Thu, 12 Apr 2018 13:32:07 -0600
> "Bart Van Assche" <bart.vanassche@xxxxxxx> wrote:
> > +static int find_child_rport(struct device *dev, void *data)
> > +{
> > +	struct device **child = data;
> > +
> > +	if (scsi_is_srp_rport(dev)) {
> > +		WARN_ON_ONCE(*child);
> > +		*child = dev;
> > +	}
> > +	return 0;
> > +}
> > +
> 
> Why not have 'static struct device *find_child_rport() ?

Hello Hannes,

The function device_for_each_child() expects to be passed a int (*)(struct device *,
void *) pointer. Is there perhaps another function for iterating over device children
that accepts a function that returns a pointer?

Thanks,

Bart.







[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