mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Corey Minyard <corey@minyard.net>
To: linux-kernel@vger.kernel.org,
	openipmi-developer@lists.sourceforge.net,
	Rik van Riel <riel@surriel.com>
Cc: "Paul E . McKenney" <paulmck@kernel.org>,
	Breno Leitao <leitao@debian.org>,
	Corey Minyard <corey@minyard.net>,
	Corey Minyard <cminyard@mvista.com>
Subject: [PATCH 02/23] ipmi:msghandler: Rename recv_work to smi_work
Date: Thu, 24 Apr 2025 11:49:39 -0500	[thread overview]
Message-ID: <20250424165020.627193-3-corey@minyard.net> (raw)
In-Reply-To: <20250424165020.627193-1-corey@minyard.net>

It handles both receive and transmit functions, make the name generic.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
---
 drivers/char/ipmi/ipmi_msghandler.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index 77f0f41f2e3d..22813b1598b0 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -41,7 +41,7 @@
 
 static struct ipmi_recv_msg *ipmi_alloc_recv_msg(void);
 static int ipmi_init_msghandler(void);
-static void smi_recv_work(struct work_struct *t);
+static void smi_work(struct work_struct *t);
 static void handle_new_recv_msgs(struct ipmi_smi *intf);
 static void need_waiter(struct ipmi_smi *intf);
 static int handle_one_recv_msg(struct ipmi_smi *intf,
@@ -504,7 +504,7 @@ struct ipmi_smi {
 	spinlock_t       waiting_rcv_msgs_lock;
 	struct list_head waiting_rcv_msgs;
 	atomic_t	 watchdog_pretimeouts_to_deliver;
-	struct work_struct recv_work;
+	struct work_struct smi_work;
 
 	spinlock_t             xmit_msgs_lock;
 	struct list_head       xmit_msgs;
@@ -704,7 +704,7 @@ static void clean_up_interface_data(struct ipmi_smi *intf)
 	struct cmd_rcvr  *rcvr, *rcvr2;
 	struct list_head list;
 
-	cancel_work_sync(&intf->recv_work);
+	cancel_work_sync(&intf->smi_work);
 
 	free_smi_msg_list(&intf->waiting_rcv_msgs);
 	free_recv_msg_list(&intf->waiting_events);
@@ -3602,7 +3602,7 @@ int ipmi_add_smi(struct module         *owner,
 	intf->curr_seq = 0;
 	spin_lock_init(&intf->waiting_rcv_msgs_lock);
 	INIT_LIST_HEAD(&intf->waiting_rcv_msgs);
-	INIT_WORK(&intf->recv_work, smi_recv_work);
+	INIT_WORK(&intf->smi_work, smi_work);
 	atomic_set(&intf->watchdog_pretimeouts_to_deliver, 0);
 	spin_lock_init(&intf->xmit_msgs_lock);
 	INIT_LIST_HEAD(&intf->xmit_msgs);
@@ -4808,10 +4808,10 @@ static void handle_new_recv_msgs(struct ipmi_smi *intf)
 	}
 }
 
-static void smi_recv_work(struct work_struct *t)
+static void smi_work(struct work_struct *t)
 {
 	unsigned long flags = 0; /* keep us warning-free. */
-	struct ipmi_smi *intf = from_work(intf, t, recv_work);
+	struct ipmi_smi *intf = from_work(intf, t, smi_work);
 	int run_to_completion = READ_ONCE(intf->run_to_completion);
 	struct ipmi_smi_msg *newmsg = NULL;
 
@@ -4883,9 +4883,9 @@ void ipmi_smi_msg_received(struct ipmi_smi *intf,
 		spin_unlock_irqrestore(&intf->xmit_msgs_lock, flags);
 
 	if (run_to_completion)
-		smi_recv_work(&intf->recv_work);
+		smi_work(&intf->smi_work);
 	else
-		queue_work(system_bh_wq, &intf->recv_work);
+		queue_work(system_bh_wq, &intf->smi_work);
 }
 EXPORT_SYMBOL(ipmi_smi_msg_received);
 
@@ -4895,7 +4895,7 @@ void ipmi_smi_watchdog_pretimeout(struct ipmi_smi *intf)
 		return;
 
 	atomic_set(&intf->watchdog_pretimeouts_to_deliver, 1);
-	queue_work(system_bh_wq, &intf->recv_work);
+	queue_work(system_bh_wq, &intf->smi_work);
 }
 EXPORT_SYMBOL(ipmi_smi_watchdog_pretimeout);
 
@@ -5064,7 +5064,7 @@ static bool ipmi_timeout_handler(struct ipmi_smi *intf,
 				       flags);
 	}
 
-	queue_work(system_bh_wq, &intf->recv_work);
+	queue_work(system_bh_wq, &intf->smi_work);
 
 	return need_timer;
 }
-- 
2.43.0


  parent reply	other threads:[~2025-04-24 16:50 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-24 16:49 [PATCH 00/23] ipmi: Remove SRCU and handle the fallout Corey Minyard
2025-04-24 16:49 ` [PATCH 01/23] ipmi:msghandler: Use READ_ONCE on run_to_completion Corey Minyard
2025-04-24 16:49 ` Corey Minyard [this message]
2025-04-24 16:49 ` [PATCH 03/23] ipmi:msghandler: Move timer handling into a work queue Corey Minyard
2025-04-24 16:49 ` [PATCH 04/23] ipmi:msghandler: Deliver user messages in " Corey Minyard
2025-04-24 16:49 ` [PATCH 05/23] ipmi_msghandler: Change the events lock to a mutex Corey Minyard
2025-04-24 16:49 ` [PATCH 06/23] ipmi:msghandler: Use the system_wq, not system_bh_wq Corey Minyard
2025-04-24 16:49 ` [PATCH 07/23] ipmi:msghandler: Remove srcu from the ipmi user structure Corey Minyard
2025-04-24 16:49 ` [PATCH 08/23] ipmi:msghandler: Remove srcu for the ipmi_interfaces list Corey Minyard
2025-04-24 16:49 ` [PATCH 09/23] ipmi:watchdog: Change lock to mutex Corey Minyard
2025-04-24 16:49 ` [PATCH 10/23] ipmi: Add a note about the pretimeout callback Corey Minyard
2025-04-24 16:49 ` [PATCH 11/23] ipmi:msghandler: Remove some user level processing in panic mode Corey Minyard
2025-04-24 16:49 ` [PATCH 12/23] ipmi:msghandler: Fix locking around users and interfaces Corey Minyard
2025-04-24 16:49 ` [PATCH 13/23] ipmi:msghandler: Don't acquire a user refcount for queued messages Corey Minyard
2025-04-24 16:49 ` [PATCH 14/23] ipmi:msghandler: Don't check for shutdown when returning responses Corey Minyard
2025-04-24 16:49 ` [PATCH 15/23] ipmi:msghandler: Remove proc_fs.h Corey Minyard
2025-04-24 16:49 ` [PATCH 16/23] ipmi:msghandler: Shut down lower layer first at unregister Corey Minyard
2025-04-24 16:49 ` [PATCH 17/23] ipmi:msghandler: Add a error return from unhandle LAN cmds Corey Minyard
2025-04-24 16:49 ` [PATCH 18/23] ipmi:si: Rework startup of IPMI devices Corey Minyard
2025-04-24 16:49 ` [PATCH 19/23] ipmi:msghandler: Don't deliver messages to deleted users Corey Minyard
2025-04-24 16:49 ` [PATCH 20/23] ipmi:ssif: Fix a shutdown race Corey Minyard
2025-04-24 16:49 ` [PATCH 21/23] Documentation:ipmi: Remove comments about interrupt level Corey Minyard
2025-04-24 16:49 ` [PATCH 22/23] ipmi:msghandler: Export and fix panic messaging capability Corey Minyard
2025-04-24 16:50 ` [PATCH 23/23] ipmi:watchdog: Use the new interface for panic messages Corey Minyard

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=20250424165020.627193-3-corey@minyard.net \
    --to=corey@minyard.net \
    --cc=cminyard@mvista.com \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    --cc=paulmck@kernel.org \
    --cc=riel@surriel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®