[PATCH 1/3] [SCSI] osst: Remove casting the return value which is a void pointer

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

 



Casting the return value which is a void pointer is redundant.
The conversion from void pointer to any other pointer type is
guaranteed by the C programming language.

Signed-off-by: Jingoo Han <jg1.han@xxxxxxxxxxx>
---
 drivers/scsi/osst.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c
index 21883a2..a2641bf 100644
--- a/drivers/scsi/osst.c
+++ b/drivers/scsi/osst.c
@@ -5687,7 +5687,7 @@ static void osst_remove_sysfs_files(struct device_driver *sysfs)
 static ssize_t osst_adr_rev_show(struct device *dev,
 				 struct device_attribute *attr, char *buf)
 {
-	struct osst_tape * STp = (struct osst_tape *) dev_get_drvdata (dev);
+	struct osst_tape *STp = dev_get_drvdata(dev);
 	ssize_t l = 0;
 
 	if (STp && STp->header_ok && STp->linux_media)
@@ -5701,7 +5701,7 @@ static ssize_t osst_linux_media_version_show(struct device *dev,
 					     struct device_attribute *attr,
 					     char *buf)
 {
-	struct osst_tape * STp = (struct osst_tape *) dev_get_drvdata (dev);
+	struct osst_tape *STp = dev_get_drvdata(dev);
 	ssize_t l = 0;
 
 	if (STp && STp->header_ok && STp->linux_media)
@@ -5714,7 +5714,7 @@ DEVICE_ATTR(media_version, S_IRUGO, osst_linux_media_version_show, NULL);
 static ssize_t osst_capacity_show(struct device *dev,
 				  struct device_attribute *attr, char *buf)
 {
-	struct osst_tape * STp = (struct osst_tape *) dev_get_drvdata (dev);
+	struct osst_tape *STp = dev_get_drvdata(dev);
 	ssize_t l = 0;
 
 	if (STp && STp->header_ok && STp->linux_media)
@@ -5728,7 +5728,7 @@ static ssize_t osst_first_data_ppos_show(struct device *dev,
 					 struct device_attribute *attr,
 					 char *buf)
 {
-	struct osst_tape * STp = (struct osst_tape *) dev_get_drvdata (dev);
+	struct osst_tape *STp = dev_get_drvdata(dev);
 	ssize_t l = 0;
 
 	if (STp && STp->header_ok && STp->linux_media)
@@ -5742,7 +5742,7 @@ static ssize_t osst_eod_frame_ppos_show(struct device *dev,
 					struct device_attribute *attr,
 					char *buf)
 {
-	struct osst_tape * STp = (struct osst_tape *) dev_get_drvdata (dev);
+	struct osst_tape *STp = dev_get_drvdata(dev);
 	ssize_t l = 0;
 
 	if (STp && STp->header_ok && STp->linux_media)
@@ -5755,7 +5755,7 @@ DEVICE_ATTR(EOD_frame, S_IRUGO, osst_eod_frame_ppos_show, NULL);
 static ssize_t osst_filemark_cnt_show(struct device *dev,
 				      struct device_attribute *attr, char *buf)
 {
-	struct osst_tape * STp = (struct osst_tape *) dev_get_drvdata (dev);
+	struct osst_tape *STp = dev_get_drvdata(dev);
 	ssize_t l = 0;
 
 	if (STp && STp->header_ok && STp->linux_media)
-- 
1.7.10.4


--
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