Re: [PATCH 16/17] sym53c8xx: Remove pci_dev pointer from sym_shcb

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

 



Matthew Wilcox wrote:
This structure is accessed by the device; the fewer Linux things in it,
the better.  Using the pci_dev pointer from the hostdata requires a lot
of changes:

 - Pass Scsi_Host to a lot of routines which currently take a sym_hcb.
 - Set the Scsi_Host as the pci drvdata (instead of the sym_hcb)

Signed-off-by: Matthew Wilcox <willy@xxxxxxxxxxxxxxx>

Obviously this is a judgement call on your part... but did you at least consider passing sym_hcb for all cases instead?

This is a common driver decisions, and many authors choose to store a pointer to the kernel struct (Scsi_Host in this case) in their adapter private structure, since it is often _far_ more common to pass the driver-private struct in arguments.

It doesn't make much sense to do the additional indirection IFF the majority of the routine actually want the driver-private structure.

I ACK the patch either way...


-
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