[<prev] [next>] [day] [month] [year] [list]
Message-ID: <457898D1.2090605@s5r6.in-berlin.de>
Date: Thu, 07 Dec 2006 23:42:25 +0100
From: Stefan Richter <stefanr@...6.in-berlin.de>
To: linux1394-devel@...ts.sourceforge.net
CC: David Howells <dhowells@...hat.com>, linux-kernel@...r.kernel.org
Subject: sbp2 workqueue patches
Just for the record: I inserted the following two patches into my local
git tree while preparing the patch queue for Linus and will push them to
linux1394-2.6.git now.
--
Stefan Richter
-=====-=-==- ==-- --===
http://arcgraph.de/sr/
View attachment "218-ieee1394-sbp2-delayed_work-work_struct.patch" of type "text/plain" (3404 bytes)
>From ec9b7e1044d718723d16390179abc6d4c8d9b0a1 Mon Sep 17 00:00:00 2001
From: Stefan Richter <stefanr@...6.in-berlin.de>
Date: Thu, 7 Dec 2006 23:23:25 +0100
Subject: [PATCH] ieee1394: sbp2: code formatting around work_struct stuff
Merge is finished, can bring the code in readable style again.
Signed-off-by: Stefan Richter <stefanr@...6.in-berlin.de>
---
drivers/ieee1394/sbp2.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index ffcd9e4..e68b80b 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -458,17 +458,20 @@ static void sbp2util_notify_fetch_agent(
static void sbp2util_write_orb_pointer(struct work_struct *work)
{
+ struct sbp2_lu *lu = container_of(work, struct sbp2_lu, protocol_work);
quadlet_t data[2];
- data[0] = ORB_SET_NODE_ID((container_of(work, struct sbp2_lu, protocol_work))->hi->host->node_id);
- data[1] = (container_of(work, struct sbp2_lu, protocol_work))->last_orb_dma;
+ data[0] = ORB_SET_NODE_ID(lu->hi->host->node_id);
+ data[1] = lu->last_orb_dma;
sbp2util_cpu_to_be32_buffer(data, 8);
- sbp2util_notify_fetch_agent(container_of(work, struct sbp2_lu, protocol_work), SBP2_ORB_POINTER_OFFSET, data, 8);
+ sbp2util_notify_fetch_agent(lu, SBP2_ORB_POINTER_OFFSET, data, 8);
}
static void sbp2util_write_doorbell(struct work_struct *work)
{
- sbp2util_notify_fetch_agent(container_of(work, struct sbp2_lu, protocol_work), SBP2_DOORBELL_OFFSET, NULL, 4);
+ struct sbp2_lu *lu = container_of(work, struct sbp2_lu, protocol_work);
+
+ sbp2util_notify_fetch_agent(lu, SBP2_DOORBELL_OFFSET, NULL, 4);
}
static int sbp2util_create_command_orb_pool(struct sbp2_lu *lu)
@@ -1399,7 +1402,7 @@ static int sbp2_agent_reset(struct sbp2_
int retval;
unsigned long flags;
- /* cancel_delayed_work(&lu->protocol_work); */
+ /* flush lu->protocol_work */
if (wait)
flush_scheduled_work();
@@ -1682,8 +1685,7 @@ static void sbp2_link_orb_command(struct
scsi_block_requests(lu->shost);
PREPARE_WORK(&lu->protocol_work,
last_orb ? sbp2util_write_doorbell:
- sbp2util_write_orb_pointer
- /* */);
+ sbp2util_write_orb_pointer);
schedule_work(&lu->protocol_work);
}
}
--
1.4.2.4
Powered by blists - more mailing lists