From 409d337e6bd61498696f8ea22f4da48c0b7a245d Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 7 Oct 2021 13:27:59 -0700 Subject: scsi: firewire: sbp2: Call scsi_done() directly Conditional statements are faster than indirect calls. Hence call scsi_done() directly. Link: https://lore.kernel.org/r/20211007202923.2174984-5-bvanassche@acm.org Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen --- drivers/firewire/sbp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/firewire') diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c index 4d5054211550..aeed3f2273e8 100644 --- a/drivers/firewire/sbp2.c +++ b/drivers/firewire/sbp2.c @@ -1375,7 +1375,7 @@ static void complete_command_orb(struct sbp2_orb *base_orb, sbp2_unmap_scatterlist(device->card->device, orb); orb->cmd->result = result; - orb->cmd->scsi_done(orb->cmd); + scsi_done(orb->cmd); } static int sbp2_map_scatterlist(struct sbp2_command_orb *orb, -- cgit v1.2.3-58-ga151 From 5e88e67b6f3b84037c284285442df6e376fcd653 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 12 Oct 2021 16:35:15 -0700 Subject: scsi: firewire: sbp2: Switch to attribute groups struct device supports attribute groups directly but does not support struct device_attribute directly. Hence switch to attribute groups. Link: https://lore.kernel.org/r/20211012233558.4066756-4-bvanassche@acm.org Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen --- drivers/firewire/sbp2.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'drivers/firewire') diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c index aeed3f2273e8..85cd379fd383 100644 --- a/drivers/firewire/sbp2.c +++ b/drivers/firewire/sbp2.c @@ -1578,11 +1578,13 @@ static ssize_t sbp2_sysfs_ieee1394_id_show(struct device *dev, static DEVICE_ATTR(ieee1394_id, S_IRUGO, sbp2_sysfs_ieee1394_id_show, NULL); -static struct device_attribute *sbp2_scsi_sysfs_attrs[] = { - &dev_attr_ieee1394_id, +static struct attribute *sbp2_scsi_sysfs_attrs[] = { + &dev_attr_ieee1394_id.attr, NULL }; +ATTRIBUTE_GROUPS(sbp2_scsi_sysfs); + static struct scsi_host_template scsi_driver_template = { .module = THIS_MODULE, .name = "SBP-2 IEEE-1394", @@ -1595,7 +1597,7 @@ static struct scsi_host_template scsi_driver_template = { .sg_tablesize = SG_ALL, .max_segment_size = SBP2_MAX_SEG_SIZE, .can_queue = 1, - .sdev_attrs = sbp2_scsi_sysfs_attrs, + .sdev_groups = sbp2_scsi_sysfs_groups, }; MODULE_AUTHOR("Kristian Hoegsberg "); -- cgit v1.2.3-58-ga151