Re: [PATCH 1/19] add data buffer accessors

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

 



> +int scsi_dma_map(struct device *dev, struct scsi_cmnd *cmd)
> +{
> +	int nseg = 0;
> +
> +	if (cmd->use_sg) {
> +		struct scatterlist *sg =
> +			(struct scatterlist *) cmd->request_buffer;
> +
> +		nseg = dma_map_sg(dev, sg, cmd->use_sg, cmd->sc_data_direction);
> +		if (unlikely(!nseg))
> +			return -ENOMEM;
> +	}
> +	return nseg;
> +}
> +EXPORT_SYMBOL(scsi_dma_map);

As James already said the device argument should not be needed at all.
Also please add kerneldoc comment describing exported functions.

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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