Re: [PATCH 03/23] mpi3mr: pass queue_limits to bsg_setup_queue

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

 



On Thu, Apr 04, 2024 at 09:55:13AM -0700, Bart Van Assche wrote:
> On 4/2/24 06:06, Christoph Hellwig wrote:
>> diff --git a/drivers/scsi/mpi3mr/mpi3mr_app.c b/drivers/scsi/mpi3mr/mpi3mr_app.c
>> index ce5445eb9d0e4e..05e061fc6d3a06 100644
>> --- a/drivers/scsi/mpi3mr/mpi3mr_app.c
>> +++ b/drivers/scsi/mpi3mr/mpi3mr_app.c
>> @@ -1838,6 +1838,10 @@ void mpi3mr_bsg_init(struct mpi3mr_ioc *mrioc)
>>   {
>>   	struct device *bsg_dev = &mrioc->bsg_dev;
>>   	struct device *parent = &mrioc->shost->shost_gendev;
>> +	struct queue_limits lim = {
>> +		.max_hw_sectors		= MPI3MR_MAX_APP_XFER_SECTORS,
>> +		.max_segments		= MPI3MR_MAX_APP_XFER_SEGMENTS,
>> +	};
>
> Can 'lim' be declared 'static const'?

It can't because the queue limit validation can modify it (and thus
none of the pointers in the chain leading to it are marked const)





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux