[PATCH] scsi: ufs: Remove unneeded casts from void *

Markus Fuchs posted 1 patch 1 year, 6 months ago
drivers/ufs/core/ufshpb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] scsi: ufs: Remove unneeded casts from void *
Posted by Markus Fuchs 1 year, 6 months ago
The end_io_data member of the "struct request" type has type "void *", so no
cast is necessary.

Signed-off-by: Markus Fuchs <mklntf@gmail.com>
---
 drivers/ufs/core/ufshpb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ufs/core/ufshpb.c b/drivers/ufs/core/ufshpb.c
index a1a7a1175a5a..0ce5063bedc5 100644
--- a/drivers/ufs/core/ufshpb.c
+++ b/drivers/ufs/core/ufshpb.c
@@ -615,14 +615,14 @@ static void ufshpb_activate_subregion(struct ufshpb_lu *hpb,
 
 static void ufshpb_umap_req_compl_fn(struct request *req, blk_status_t error)
 {
-	struct ufshpb_req *umap_req = (struct ufshpb_req *)req->end_io_data;
+	struct ufshpb_req *umap_req = req->end_io_data;
 
 	ufshpb_put_req(umap_req->hpb, umap_req);
 }
 
 static void ufshpb_map_req_compl_fn(struct request *req, blk_status_t error)
 {
-	struct ufshpb_req *map_req = (struct ufshpb_req *) req->end_io_data;
+	struct ufshpb_req *map_req = req->end_io_data;
 	struct ufshpb_lu *hpb = map_req->hpb;
 	struct ufshpb_subregion *srgn;
 	unsigned long flags;
-- 
2.37.3
Re: [PATCH] scsi: ufs: Remove unneeded casts from void *
Posted by Martin K. Petersen 1 year, 5 months ago
Markus,

> The end_io_data member of the "struct request" type has type "void *",
> so no cast is necessary.

Applied to 6.1/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering
Re: [PATCH] scsi: ufs: Remove unneeded casts from void *
Posted by Bart Van Assche 1 year, 6 months ago
On 9/28/22 15:22, Markus Fuchs wrote:
> The end_io_data member of the "struct request" type has type "void *", so no
> cast is necessary.

Reviewed-by: Bart Van Assche <bvanassche@acm.org>