scsi: libsas: Remove notifier indirection
LLDDs report events to libsas with .notify_port_event and .notify_phy_event callbacks. These callbacks are fixed and so there is no reason why the functions cannot be called directly, so do that. This neatens the code slightly, makes it more obvious, and reduces function pointer usage, which is generally a good thing. Downside is that there are 2x more symbol exports. [a.darwish@linutronix.de: Remove the now unused "sas_ha" local variables] Link: https://lore.kernel.org/r/20210118100955.1761652-3-a.darwish@linutronix.de Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
3f901c81df
commit
121181f3f8
@@ -391,10 +391,6 @@ struct sas_ha_struct {
|
||||
int strict_wide_ports; /* both sas_addr and attached_sas_addr must match
|
||||
* their siblings when forming wide ports */
|
||||
|
||||
/* LLDD calls these to notify the class of an event. */
|
||||
int (*notify_port_event)(struct asd_sas_phy *, enum port_event);
|
||||
int (*notify_phy_event)(struct asd_sas_phy *, enum phy_event);
|
||||
|
||||
void *lldd_ha; /* not touched by sas class code */
|
||||
|
||||
struct list_head eh_done_q; /* complete via scsi_eh_flush_done_q */
|
||||
@@ -706,4 +702,7 @@ struct sas_phy *sas_get_local_phy(struct domain_device *dev);
|
||||
|
||||
int sas_request_addr(struct Scsi_Host *shost, u8 *addr);
|
||||
|
||||
int sas_notify_port_event(struct asd_sas_phy *phy, enum port_event event);
|
||||
int sas_notify_phy_event(struct asd_sas_phy *phy, enum phy_event event);
|
||||
|
||||
#endif /* _SASLIB_H_ */
|
||||
|
||||
Reference in New Issue
Block a user