提交 b9549bc6 编写于 作者: S Stefan Richter

firewire: small fw_fill_request cleanup

  - better name for a function argument
  - removal of a local variable which became unnecessary after
    "fully initialize fw_transaction before marking it pending"
Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
上级 e9aeb46c
...@@ -151,7 +151,7 @@ transmit_complete_callback(struct fw_packet *packet, ...@@ -151,7 +151,7 @@ transmit_complete_callback(struct fw_packet *packet,
static void static void
fw_fill_request(struct fw_packet *packet, int tcode, int tlabel, fw_fill_request(struct fw_packet *packet, int tcode, int tlabel,
int node_id, int source_id, int generation, int speed, int destination_id, int source_id, int generation, int speed,
unsigned long long offset, void *payload, size_t length) unsigned long long offset, void *payload, size_t length)
{ {
int ext_tcode; int ext_tcode;
...@@ -166,7 +166,7 @@ fw_fill_request(struct fw_packet *packet, int tcode, int tlabel, ...@@ -166,7 +166,7 @@ fw_fill_request(struct fw_packet *packet, int tcode, int tlabel,
HEADER_RETRY(RETRY_X) | HEADER_RETRY(RETRY_X) |
HEADER_TLABEL(tlabel) | HEADER_TLABEL(tlabel) |
HEADER_TCODE(tcode) | HEADER_TCODE(tcode) |
HEADER_DESTINATION(node_id); HEADER_DESTINATION(destination_id);
packet->header[1] = packet->header[1] =
HEADER_OFFSET_HIGH(offset >> 32) | HEADER_SOURCE(source_id); HEADER_OFFSET_HIGH(offset >> 32) | HEADER_SOURCE(source_id);
packet->header[2] = packet->header[2] =
...@@ -252,7 +252,7 @@ fw_send_request(struct fw_card *card, struct fw_transaction *t, ...@@ -252,7 +252,7 @@ fw_send_request(struct fw_card *card, struct fw_transaction *t,
fw_transaction_callback_t callback, void *callback_data) fw_transaction_callback_t callback, void *callback_data)
{ {
unsigned long flags; unsigned long flags;
int tlabel, source; int tlabel;
/* /*
* Bump the flush timer up 100ms first of all so we * Bump the flush timer up 100ms first of all so we
...@@ -268,7 +268,6 @@ fw_send_request(struct fw_card *card, struct fw_transaction *t, ...@@ -268,7 +268,6 @@ fw_send_request(struct fw_card *card, struct fw_transaction *t,
spin_lock_irqsave(&card->lock, flags); spin_lock_irqsave(&card->lock, flags);
source = card->node_id;
tlabel = card->current_tlabel; tlabel = card->current_tlabel;
if (card->tlabel_mask & (1 << tlabel)) { if (card->tlabel_mask & (1 << tlabel)) {
spin_unlock_irqrestore(&card->lock, flags); spin_unlock_irqrestore(&card->lock, flags);
...@@ -284,9 +283,8 @@ fw_send_request(struct fw_card *card, struct fw_transaction *t, ...@@ -284,9 +283,8 @@ fw_send_request(struct fw_card *card, struct fw_transaction *t,
t->callback = callback; t->callback = callback;
t->callback_data = callback_data; t->callback_data = callback_data;
fw_fill_request(&t->packet, tcode, t->tlabel, fw_fill_request(&t->packet, tcode, t->tlabel, node_id, card->node_id,
node_id, source, generation, generation, speed, offset, payload, length);
speed, offset, payload, length);
t->packet.callback = transmit_complete_callback; t->packet.callback = transmit_complete_callback;
list_add_tail(&t->link, &card->transaction_list); list_add_tail(&t->link, &card->transaction_list);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册