• C
    nvme-pci: use unsigned for io queue depth · 61f3b896
    Chaitanya Kulkarni 提交于
    The NVMe PCIe declares module parameter io_queue_depth as int. Change
    this to u16 as queue depth can never be negative. Now to reflect this
    update module parameter getter function from param_get_int() ->
    param_get_uint() and respective setter function with type of n changed
    from int to u16 with param_set_int() to param_set_ushort(). Finally
    update struct nvme_dev q_depth member to u16 and use u16 in min_t()
    when calculating dev->q_depth in the nvme_pci_enable() (since q_depth is
    now u16) and use unsigned int instead of int when calculating
    dev->tagset.queue_depth as target variable tagset->queue_depth is of type
    unsigned int in nvme_dev_add().
    Signed-off-by: NChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
    Reviewed-by: NSagi Grimberg <sagi@grimberg.me>
    Signed-off-by: NChristoph Hellwig <hch@lst.de>
    61f3b896
pci.c 81.7 KB