Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2af10a81 authored by Brian King's avatar Brian King Committed by Jeff Garzik
Browse files

[PATCH] libata: ata_scsi_ioctl cleanup



In preparation for SAS, kill some unnecessary code in ata_scsi_ioctl
to find the ATA port and device given the scsi_device. Neither local
is used in the function.

Signed-off-by: default avatarBrian King <brking@us.ibm.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent eb3f0f9c
Loading
Loading
Loading
Loading
+0 −13
Original line number Original line Diff line number Diff line
@@ -267,20 +267,8 @@ int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg)


int ata_scsi_ioctl(struct scsi_device *scsidev, int cmd, void __user *arg)
int ata_scsi_ioctl(struct scsi_device *scsidev, int cmd, void __user *arg)
{
{
	struct ata_port *ap;
	struct ata_device *dev;
	int val = -EINVAL, rc = -EINVAL;
	int val = -EINVAL, rc = -EINVAL;


	ap = (struct ata_port *) &scsidev->host->hostdata[0];
	if (!ap)
		goto out;

	dev = ata_scsi_find_dev(ap, scsidev);
	if (!dev) {
		rc = -ENODEV;
		goto out;
	}

	switch (cmd) {
	switch (cmd) {
	case ATA_IOC_GET_IO32:
	case ATA_IOC_GET_IO32:
		val = 0;
		val = 0;
@@ -309,7 +297,6 @@ int ata_scsi_ioctl(struct scsi_device *scsidev, int cmd, void __user *arg)
		break;
		break;
	}
	}


out:
	return rc;
	return rc;
}
}