Re: [PATCH 02/81] scsi: core: Declare most SCSI host template pointers const

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

 



On 06/03/2023 16:07, Bart Van Assche wrote:
On 3/6/23 06:29, John Garry wrote:
You wrote that most pointers were now cast as const - which ones were not? From a quick scan they all seem to be const

Hi Garry,

Some SCSI drivers modify one of more members of the SCSI host template. An example can be found in drivers/scsi/pcmcia/nsp_cs.c:

I seemed to get the wrong idea of what you meant in the commit message. When you wrote "Prepare for constifying most SCSI host template pointers", I got the impression that most of the pointers to SCSI host template in the core code were going to be pointers to const. However you really meant that most of the per-driver SCSI host template instances would be const.

Anyway,

Reviewed-by: John Garry <john.g.garry@xxxxxxxxxx>


     sht->name      = data->nspinfo;

Another example from drivers/scsi/bnx2fc/bnx2fc_fcoe.c:

     bnx2fc_shost_template.can_queue = hba->max_outstanding_cmds;

BTW, surely we should be setting shost->can_queue = hba->max_outstanding_cmds after scsi_host_alloc() and not modifying bnx2fc_shost_template, right? The series is already huge, so this stuff would be done separately, I suppose.

Thanks,
John




[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