From: Damien Le Moal <dlemoal@kernel.org>
To: Ranjan Kumar <ranjan.kumar@broadcom.com>,
linux-scsi@vger.kernel.org, martin.petersen@oracle.com
Cc: rajsekhar.chundru@broadcom.com, sathya.prakash@broadcom.com,
chandrakanth.patil@broadcom.com, prayas.patel@broadcom.com,
salomondush@google.com
Subject: Re: [PATCH v1 2/7] mpi3mr: Rename log data save helper to reflect threaded/BH context
Date: Mon, 12 Jan 2026 15:13:23 +0100 [thread overview]
Message-ID: <ad1547ce-7a44-4fdc-8bcf-670ce069fe5f@kernel.org> (raw)
In-Reply-To: <20260112081037.74376-3-ranjan.kumar@broadcom.com>
On 1/12/26 09:10, Ranjan Kumar wrote:
> Log data events can be processed from BH and threaded contexts.
> Rename the save helper to document its intended usage and improve
> readability of the event handling flow.
>
> Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com>
> ---
> drivers/scsi/mpi3mr/mpi3mr.h | 2 +-
> drivers/scsi/mpi3mr/mpi3mr_app.c | 4 ++--
> drivers/scsi/mpi3mr/mpi3mr_os.c | 8 +++++++-
> 3 files changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/scsi/mpi3mr/mpi3mr.h b/drivers/scsi/mpi3mr/mpi3mr.h
> index 31d68c151b20..611a51a353c9 100644
> --- a/drivers/scsi/mpi3mr/mpi3mr.h
> +++ b/drivers/scsi/mpi3mr/mpi3mr.h
> @@ -1508,7 +1508,7 @@ void mpi3mr_pel_get_seqnum_complete(struct mpi3mr_ioc *mrioc,
> struct mpi3mr_drv_cmd *drv_cmd);
> int mpi3mr_pel_get_seqnum_post(struct mpi3mr_ioc *mrioc,
> struct mpi3mr_drv_cmd *drv_cmd);
> -void mpi3mr_app_save_logdata(struct mpi3mr_ioc *mrioc, char *event_data,
> +void mpi3mr_app_save_logdata_th(struct mpi3mr_ioc *mrioc, char *event_data,
> u16 event_data_size);
> struct mpi3mr_enclosure_node *mpi3mr_enclosure_find_by_handle(
> struct mpi3mr_ioc *mrioc, u16 handle);
> diff --git a/drivers/scsi/mpi3mr/mpi3mr_app.c b/drivers/scsi/mpi3mr/mpi3mr_app.c
> index 0e5478d62580..37cca0573ddc 100644
> --- a/drivers/scsi/mpi3mr/mpi3mr_app.c
> +++ b/drivers/scsi/mpi3mr/mpi3mr_app.c
> @@ -2920,7 +2920,7 @@ static long mpi3mr_bsg_process_mpt_cmds(struct bsg_job *job)
> }
>
> /**
> - * mpi3mr_app_save_logdata - Save Log Data events
> + * mpi3mr_app_save_logdata_th - Save Log Data events
> * @mrioc: Adapter instance reference
> * @event_data: event data associated with log data event
> * @event_data_size: event data size to copy
> @@ -2932,7 +2932,7 @@ static long mpi3mr_bsg_process_mpt_cmds(struct bsg_job *job)
> *
> * Return:Nothing
> */
> -void mpi3mr_app_save_logdata(struct mpi3mr_ioc *mrioc, char *event_data,
> +void mpi3mr_app_save_logdata_th(struct mpi3mr_ioc *mrioc, char *event_data,
> u16 event_data_size)
> {
> u32 index = mrioc->logdata_buf_idx, sz;
> diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
> index d4ca878d0886..4dbf2f337212 100644
> --- a/drivers/scsi/mpi3mr/mpi3mr_os.c
> +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c
> @@ -1962,7 +1962,7 @@ static void mpi3mr_pcietopochg_evt_bh(struct mpi3mr_ioc *mrioc,
> static void mpi3mr_logdata_evt_bh(struct mpi3mr_ioc *mrioc,
> struct mpi3mr_fwevt *fwevt)
> {
> - mpi3mr_app_save_logdata(mrioc, fwevt->event_data,
> + mpi3mr_app_save_logdata_th(mrioc, fwevt->event_data,
> fwevt->event_data_size);
> }
>
> @@ -3058,6 +3058,12 @@ void mpi3mr_os_handle_events(struct mpi3mr_ioc *mrioc,
> }
> case MPI3_EVENT_DEVICE_INFO_CHANGED:
> case MPI3_EVENT_LOG_DATA:
> + {
The curly brackets are not necessary.
> + sz = event_reply->event_data_length * 4;
> + mpi3mr_app_save_logdata_th(mrioc,
> + (char *)event_reply->event_data, sz);
Do you really need the cast here ?
> + break;
> + }
> case MPI3_EVENT_ENCL_DEVICE_STATUS_CHANGE:
> case MPI3_EVENT_ENCL_DEVICE_ADDED:
> {
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2026-01-12 14:13 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-12 8:10 [PATCH v1 0/7] mpi3mr: Enhancements for mpi3mr Ranjan Kumar
2026-01-12 8:10 ` [PATCH v1 1/7] mpi3mr: Add module parameter to control threaded IRQ polling Ranjan Kumar
2026-01-12 14:14 ` Damien Le Moal
2026-01-13 17:36 ` Ranjan Kumar
2026-01-12 8:10 ` [PATCH v1 2/7] mpi3mr: Rename log data save helper to reflect threaded/BH context Ranjan Kumar
2026-01-12 14:13 ` Damien Le Moal [this message]
2026-01-13 7:27 ` Ranjan Kumar
2026-01-15 8:45 ` Ranjan Kumar
2026-01-12 8:10 ` [PATCH v1 3/7] mpi3mr: Avoid redundant diag-fault resets Ranjan Kumar
2026-01-12 8:10 ` [PATCH v1 4/7] mpi3mr: Use negotiated link rate from DevicePage0 Ranjan Kumar
2026-01-12 14:18 ` Damien Le Moal
2026-01-13 17:46 ` Ranjan Kumar
2026-01-12 16:38 ` kernel test robot
2026-01-12 8:10 ` [PATCH v1 5/7] mpi3mr: Update MPI Headers to revision 39 Ranjan Kumar
2026-01-12 14:21 ` Damien Le Moal
2026-01-13 17:39 ` Ranjan Kumar
2026-01-12 8:10 ` [PATCH v1 6/7] mpi3mr: Record and report controller firmware faults Ranjan Kumar
2026-01-12 14:25 ` Damien Le Moal
2026-01-13 18:28 ` Ranjan Kumar
2026-01-12 8:10 ` [PATCH v1 7/7] mpi3mr: Driver version update to 8.17.0.3.50 Ranjan Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ad1547ce-7a44-4fdc-8bcf-670ce069fe5f@kernel.org \
--to=dlemoal@kernel.org \
--cc=chandrakanth.patil@broadcom.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=prayas.patel@broadcom.com \
--cc=rajsekhar.chundru@broadcom.com \
--cc=ranjan.kumar@broadcom.com \
--cc=salomondush@google.com \
--cc=sathya.prakash@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.