Re: [PATCH v4 11/23] nvme-pci: convert to using dma_map_sgtable()

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

 



>   static blk_status_t nvme_pci_setup_sgls(struct nvme_dev *dev,
> -		struct request *req, struct nvme_rw_command *cmd, int entries)
> +		struct request *req, struct nvme_rw_command *cmd)
>   {
>   	struct nvme_iod *iod = blk_mq_rq_to_pdu(req);
>   	struct dma_pool *pool;
>   	struct nvme_sgl_desc *sg_list;
> -	struct scatterlist *sg = iod->sg;
> +	struct scatterlist *sg = iod->sgt.sgl;
> +	int entries = iod->sgt.nents;

I don't see use of newly added entries variable anywhere in
nvme_pci_setup_sgls(), what am I missing ?

Also, type of entries variable should be unsigned int to match
the iod->sgt.nents.

>   	dma_addr_t sgl_dma;
>   	int i = 0;
>   
> @@ -848,7 +838,7 @@ static blk_status_t nvme_map_data(struct nvme_dev *dev, struct request *req,
>   {
>   	struct nvme_iod *iod = blk_mq_rq_to_pdu(req);
>   	blk_status_t ret = BLK_STS_RESOURCE;
> -	int nr_mapped;
> +	int rc;
>   
>   	if (blk_rq_nr_phys_segments(req) == 1) {
>   		struct bio_vec bv = req_bvec(req);




[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