osst: Remove casting the return value which is a void pointer
Subsystems (2)
PATCH 1/3 osst: Remove casting the return value which is a void pointer
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 <[email protected]>
--- drivers/scsi/osst.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/scsi/osst.c +6 -6
@@ -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)
Signature · 1 line
1.7.10.4
PATCH 2/3 ufs: Remove casting the return value which is a void pointer
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 <[email protected]>
--- drivers/scsi/ufs/ufshcd-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ufs/ufshcd-pci.c +1 -1
@@ -117,7 +117,7 @@ static int ufshcd_pci_runtime_idle(struct device *dev)*/ static void ufshcd_pci_shutdown (struct pci_dev *pdev) { -ufshcd_hba_stop ((struct ufs_hba *)pci_get_drvdata (pdev)); +ufshcd_hba_stop (pci_get_drvdata (pdev)); }/**
Signature · 1 line
1.7.10.4
PATCH 3/3 be2iscsi: Remove casting the return value which is a void pointer
In reply to Jingoo HanCasting 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 <[email protected]>
--- drivers/scsi/be2iscsi/be_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/be2iscsi/be_main.c +1 -1
@@ -4836,7 +4836,7 @@ static void beiscsi_shutdown(struct pci_dev *pcidev)struct beiscsi_hba *phba =NULL ; - phba = (struct beiscsi_hba *)pci_get_drvdata (pcidev); + phba =pci_get_drvdata (pcidev);if (!phba) {dev_err (&pcidev->dev,"beiscsi_shutdown called with no phba\n" );return ;
Signature · 1 line
1.7.10.4