* [PATCH] scsi: ibmvscsi: delete the useless casting value returned
@ 2021-03-12 2:18 Wang Qing
2021-03-30 3:54 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Wang Qing @ 2021-03-12 2:18 UTC (permalink / raw)
To: Tyrel Datwyler, Michael Ellerman, Benjamin Herrenschmidt,
Paul Mackerras, James E.J. Bottomley, Martin K. Petersen,
linux-scsi, linuxppc-dev, linux-kernel
Cc: Wang Qing
Fix the following coccicheck warning:
WARNING: casting value returned by memory allocation function is useless.
Signed-off-by: Wang Qing <wangqing@vivo.com>
---
drivers/scsi/ibmvscsi/ibmvscsi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
index 29fcc44..f084ca10
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -717,8 +717,7 @@ static int map_sg_data(struct scsi_cmnd *cmd,
/* get indirect table */
if (!evt_struct->ext_list) {
- evt_struct->ext_list = (struct srp_direct_buf *)
- dma_alloc_coherent(dev,
+ evt_struct->ext_list = dma_alloc_coherent(dev,
SG_ALL * sizeof(struct srp_direct_buf),
&evt_struct->ext_list_token, 0);
if (!evt_struct->ext_list) {
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] scsi: ibmvscsi: delete the useless casting value returned
2021-03-12 2:18 [PATCH] scsi: ibmvscsi: delete the useless casting value returned Wang Qing
@ 2021-03-30 3:54 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2021-03-30 3:54 UTC (permalink / raw)
To: Michael Ellerman, linuxppc-dev, James E.J. Bottomley, Wang Qing,
linux-kernel, Tyrel Datwyler, linux-scsi, Paul Mackerras,
Benjamin Herrenschmidt
Cc: Martin K . Petersen
On Fri, 12 Mar 2021 10:18:53 +0800, Wang Qing wrote:
> Fix the following coccicheck warning:
> WARNING: casting value returned by memory allocation function is useless.
Applied to 5.13/scsi-queue, thanks!
[1/1] scsi: ibmvscsi: delete the useless casting value returned
https://git.kernel.org/mkp/scsi/c/0d556a21a9da
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-30 3:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-12 2:18 [PATCH] scsi: ibmvscsi: delete the useless casting value returned Wang Qing
2021-03-30 3:54 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).