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