Commit e88af2f8 authored by Rickard Strandqvist's avatar Rickard Strandqvist Committed by Tejun Heo

ata: libata-core: Remove unused function

Remove the function ata_do_simple_cmd() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.
Signed-off-by: default avatarRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent d537fc0c
...@@ -1751,33 +1751,6 @@ unsigned ata_exec_internal(struct ata_device *dev, ...@@ -1751,33 +1751,6 @@ unsigned ata_exec_internal(struct ata_device *dev,
timeout); timeout);
} }
/**
* ata_do_simple_cmd - execute simple internal command
* @dev: Device to which the command is sent
* @cmd: Opcode to execute
*
* Execute a 'simple' command, that only consists of the opcode
* 'cmd' itself, without filling any other registers
*
* LOCKING:
* Kernel thread context (may sleep).
*
* RETURNS:
* Zero on success, AC_ERR_* mask on failure
*/
unsigned int ata_do_simple_cmd(struct ata_device *dev, u8 cmd)
{
struct ata_taskfile tf;
ata_tf_init(dev, &tf);
tf.command = cmd;
tf.flags |= ATA_TFLAG_DEVICE;
tf.protocol = ATA_PROT_NODATA;
return ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0);
}
/** /**
* ata_pio_need_iordy - check if iordy needed * ata_pio_need_iordy - check if iordy needed
* @adev: ATA device * @adev: ATA device
......
...@@ -76,7 +76,6 @@ extern unsigned ata_exec_internal_sg(struct ata_device *dev, ...@@ -76,7 +76,6 @@ extern unsigned ata_exec_internal_sg(struct ata_device *dev,
struct ata_taskfile *tf, const u8 *cdb, struct ata_taskfile *tf, const u8 *cdb,
int dma_dir, struct scatterlist *sg, int dma_dir, struct scatterlist *sg,
unsigned int n_elem, unsigned long timeout); unsigned int n_elem, unsigned long timeout);
extern unsigned int ata_do_simple_cmd(struct ata_device *dev, u8 cmd);
extern int ata_wait_ready(struct ata_link *link, unsigned long deadline, extern int ata_wait_ready(struct ata_link *link, unsigned long deadline,
int (*check_ready)(struct ata_link *link)); int (*check_ready)(struct ata_link *link));
extern int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class, extern int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment