* [PATCH v2] scsi: mpi3mr: Fix the type used for pointers to bitmap
@ 2023-05-07 15:23 Christophe JAILLET
2023-05-22 21:40 ` Martin K. Petersen
2023-06-01 0:43 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2023-05-07 15:23 UTC (permalink / raw)
To: Sathya Prakash Veerichetty, Kashyap Desai, Sumit Saxena,
Sreekanth Reddy, James E.J. Bottomley, Martin K. Petersen
Cc: linux-kernel, kernel-janitors, Christophe JAILLET,
mpi3mr-linuxdrv.pdl, linux-scsi
Bitmaps are "unsigned long[]", so better use "unsigned long *" instead of
a plain "void *" when dealing with pointers to bitmaps.
This is more informative.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
v2: Fix some other declaration
---
drivers/scsi/mpi3mr/mpi3mr.h | 8 ++++----
drivers/scsi/mpi3mr/mpi3mr_fw.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/mpi3mr/mpi3mr.h b/drivers/scsi/mpi3mr/mpi3mr.h
index dfe6b87fe288..0afb687402e1 100644
--- a/drivers/scsi/mpi3mr/mpi3mr.h
+++ b/drivers/scsi/mpi3mr/mpi3mr.h
@@ -1133,18 +1133,18 @@ struct mpi3mr_ioc {
u32 chain_buf_count;
struct dma_pool *chain_buf_pool;
struct chain_element *chain_sgl_list;
- void *chain_bitmap;
+ unsigned long *chain_bitmap;
spinlock_t chain_buf_lock;
struct mpi3mr_drv_cmd bsg_cmds;
struct mpi3mr_drv_cmd host_tm_cmds;
struct mpi3mr_drv_cmd dev_rmhs_cmds[MPI3MR_NUM_DEVRMCMD];
struct mpi3mr_drv_cmd evtack_cmds[MPI3MR_NUM_EVTACKCMD];
- void *devrem_bitmap;
+ unsigned long *devrem_bitmap;
u16 dev_handle_bitmap_bits;
- void *removepend_bitmap;
+ unsigned long *removepend_bitmap;
struct list_head delayed_rmhs_list;
- void *evtack_cmds_bitmap;
+ unsigned long *evtack_cmds_bitmap;
struct list_head delayed_evtack_cmds_list;
u32 ts_update_counter;
diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c
index 075fa67e95ee..9b56d13821c6 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_fw.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c
@@ -1134,7 +1134,7 @@ static int mpi3mr_issue_and_process_mur(struct mpi3mr_ioc *mrioc,
static int
mpi3mr_revalidate_factsdata(struct mpi3mr_ioc *mrioc)
{
- void *removepend_bitmap;
+ unsigned long *removepend_bitmap;
if (mrioc->facts.reply_sz > mrioc->reply_sz) {
ioc_err(mrioc,
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2] scsi: mpi3mr: Fix the type used for pointers to bitmap
2023-05-07 15:23 [PATCH v2] scsi: mpi3mr: Fix the type used for pointers to bitmap Christophe JAILLET
@ 2023-05-22 21:40 ` Martin K. Petersen
2023-06-01 0:43 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2023-05-22 21:40 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Sathya Prakash Veerichetty, Kashyap Desai, Sumit Saxena,
Sreekanth Reddy, James E.J. Bottomley, Martin K. Petersen,
linux-kernel, kernel-janitors, mpi3mr-linuxdrv.pdl, linux-scsi
Christophe,
> Bitmaps are "unsigned long[]", so better use "unsigned long *" instead
> of a plain "void *" when dealing with pointers to bitmaps.
Applied to 6.5/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] scsi: mpi3mr: Fix the type used for pointers to bitmap
2023-05-07 15:23 [PATCH v2] scsi: mpi3mr: Fix the type used for pointers to bitmap Christophe JAILLET
2023-05-22 21:40 ` Martin K. Petersen
@ 2023-06-01 0:43 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2023-06-01 0:43 UTC (permalink / raw)
To: Sathya Prakash Veerichetty, Kashyap Desai, Sumit Saxena,
Sreekanth Reddy, James E.J. Bottomley, Christophe JAILLET
Cc: Martin K . Petersen, linux-kernel, kernel-janitors,
mpi3mr-linuxdrv.pdl, linux-scsi
On Sun, 07 May 2023 17:23:49 +0200, Christophe JAILLET wrote:
> Bitmaps are "unsigned long[]", so better use "unsigned long *" instead of
> a plain "void *" when dealing with pointers to bitmaps.
>
> This is more informative.
>
>
Applied to 6.5/scsi-queue, thanks!
[1/1] scsi: mpi3mr: Fix the type used for pointers to bitmap
https://git.kernel.org/mkp/scsi/c/144679dfb584
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-01 0:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-07 15:23 [PATCH v2] scsi: mpi3mr: Fix the type used for pointers to bitmap Christophe JAILLET
2023-05-22 21:40 ` Martin K. Petersen
2023-06-01 0:43 ` 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