On 21/05/2022 00:30, Damien Le Moal wrote:
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index f69b77cbf538..a3ae6345473b 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -225,6 +225,11 @@ int scsi_add_host_with_dma(struct Scsi_Host *shost, struct 
device *dev,
        shost->cmd_per_lun = min_t(int, shost->cmd_per_lun,
                                   shost->can_queue);

Hi Damien,

+       if (dma_dev->dma_mask) {
+               shost->max_sectors = min_t(unsigned int, shost->max_sectors,
+                               dma_opt_mapping_size(dma_dev) >> SECTOR_SHIFT);
+       }
Nit: you could drop the curly brackets here.

Some people prefer this style - multi-line statements have curly brackets, while single-line statements conform to the official coding style (and don't use brackets).

I'll just stick with what we have unless there is a consensus to change.

Thanks,
John


+
        error = scsi_init_sense_cache(shost);
        if (error)
                goto fail;

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to