* [PATCH] scsi: fnic: 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: Satish Kharat, Sesidhar Baddela, Karan Tilak Kumar,
James E.J. Bottomley, Martin K. Petersen, linux-scsi,
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/fnic/fnic_debugfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/fnic/fnic_debugfs.c b/drivers/scsi/fnic/fnic_debugfs.c
index 6c04936..e732650
--- a/drivers/scsi/fnic/fnic_debugfs.c
+++ b/drivers/scsi/fnic/fnic_debugfs.c
@@ -58,8 +58,7 @@ int fnic_debugfs_init(void)
fnic_trace_debugfs_root);
/* Allocate memory to structure */
- fc_trc_flag = (struct fc_trace_flag_type *)
- vmalloc(sizeof(struct fc_trace_flag_type));
+ fc_trc_flag = vmalloc(sizeof(struct fc_trace_flag_type));
if (fc_trc_flag) {
fc_trc_flag->fc_row_file = 0;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] scsi: fnic: delete the useless casting value returned
2021-03-12 2:18 [PATCH] scsi: fnic: 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: Satish Kharat, James E.J. Bottomley, Wang Qing, linux-kernel,
linux-scsi, Karan Tilak Kumar, Sesidhar Baddela
Cc: Martin K . Petersen
On Fri, 12 Mar 2021 10:18:19 +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: fnic: delete the useless casting value returned
https://git.kernel.org/mkp/scsi/c/3ba9f38ed43d
--
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: fnic: delete the useless casting value returned Wang Qing
2021-03-30 3:54 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.