firewire: adjust whitespace

Remove space before tab and trailing whitespace.
Unify indentation of goto target labels.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
This commit is contained in:
Stefan Richter 2007-03-04 14:45:18 +01:00
parent 98b6cbe83b
commit 373b2edd86
3 changed files with 26 additions and 28 deletions

View file

@ -145,7 +145,7 @@ fw_unit_uevent(struct device *dev, char **envp, int num_envp,
"MODALIAS=%s", modalias))
return -ENOMEM;
out:
out:
envp[i] = NULL;
return 0;
@ -511,9 +511,9 @@ static void fw_device_init(struct work_struct *work)
return;
error_with_device:
error_with_device:
device_del(&device->device);
error:
error:
cdev_del(&device->cdev);
unregister_chrdev_region(device->device.devt, 1);
put_device(&device->device);

View file

@ -47,7 +47,7 @@ fw_iso_buffer_init(struct fw_iso_buffer *buffer, struct fw_card *card,
buffer->pages[i] = alloc_page(GFP_KERNEL | GFP_DMA32 | __GFP_ZERO);
if (buffer->pages[i] == NULL)
goto out_pages;
address = dma_map_page(card->device, buffer->pages[i],
0, PAGE_SIZE, direction);
if (dma_mapping_error(address)) {

View file

@ -96,9 +96,9 @@ typedef int (*descriptor_callback_t)(struct context *ctx,
struct descriptor *d,
struct descriptor *last);
struct context {
struct fw_ohci *ohci;
struct fw_ohci *ohci;
u32 regs;
struct descriptor *buffer;
dma_addr_t buffer_bus;
size_t buffer_size;
@ -109,10 +109,8 @@ struct context {
descriptor_callback_t callback;
struct tasklet_struct tasklet;
struct tasklet_struct tasklet;
};
struct at_context {
struct fw_ohci *ohci;
@ -434,7 +432,7 @@ ar_context_init(struct ar_context *ctx, struct fw_ohci *ohci, u32 regs)
return 0;
}
static void context_tasklet(unsigned long data)
{
struct context *ctx = (struct context *) data;
@ -1269,7 +1267,7 @@ ohci_enable_phys_dma(struct fw_card *card, int node_id, int generation)
spin_unlock_irqrestore(&ohci->lock, flags);
return retval;
}
static int handle_ir_bufferfill_packet(struct context *context,
struct descriptor *d,
struct descriptor *last)
@ -1324,7 +1322,7 @@ static int handle_it_packet(struct context *context,
{
struct iso_context *ctx =
container_of(context, struct iso_context, context);
if (last->transfer_status == 0)
/* This descriptor isn't done yet, stop iteration. */
return 0;
@ -1352,8 +1350,8 @@ ohci_allocate_iso_context(struct fw_card *card, int type,
list = ohci->it_context_list;
callback = handle_it_packet;
} else {
mask = &ohci->ir_context_mask;
list = ohci->ir_context_list;
mask = &ohci->ir_context_mask;
list = ohci->ir_context_list;
if (header_size > 0)
callback = handle_ir_dualbuffer_packet;
else
@ -1373,11 +1371,11 @@ ohci_allocate_iso_context(struct fw_card *card, int type,
if (index < 0)
return ERR_PTR(-EBUSY);
if (type == FW_ISO_CONTEXT_TRANSMIT)
regs = OHCI1394_IsoXmitContextBase(index);
else
regs = OHCI1394_IsoRcvContextBase(index);
if (type == FW_ISO_CONTEXT_TRANSMIT)
regs = OHCI1394_IsoXmitContextBase(index);
else
regs = OHCI1394_IsoRcvContextBase(index);
ctx = &list[index];
memset(ctx, 0, sizeof *ctx);
ctx->header_length = 0;
@ -1404,7 +1402,7 @@ ohci_allocate_iso_context(struct fw_card *card, int type,
static int ohci_start_iso(struct fw_iso_context *base, s32 cycle)
{
struct iso_context *ctx = container_of(base, struct iso_context, base);
struct iso_context *ctx = container_of(base, struct iso_context, base);
struct fw_ohci *ohci = ctx->context.ohci;
u32 cycle_match = 0, mode;
int index;
@ -1439,7 +1437,7 @@ static int ohci_start_iso(struct fw_iso_context *base, s32 cycle)
static int ohci_stop_iso(struct fw_iso_context *base)
{
struct fw_ohci *ohci = fw_ohci(base->card);
struct iso_context *ctx = container_of(base, struct iso_context, base);
struct iso_context *ctx = container_of(base, struct iso_context, base);
int index;
if (ctx->base.type == FW_ISO_CONTEXT_TRANSMIT) {
@ -1458,7 +1456,7 @@ static int ohci_stop_iso(struct fw_iso_context *base)
static void ohci_free_iso_context(struct fw_iso_context *base)
{
struct fw_ohci *ohci = fw_ohci(base->card);
struct iso_context *ctx = container_of(base, struct iso_context, base);
struct iso_context *ctx = container_of(base, struct iso_context, base);
unsigned long flags;
int index;
@ -1485,7 +1483,7 @@ ohci_queue_iso_transmit(struct fw_iso_context *base,
struct fw_iso_buffer *buffer,
unsigned long payload)
{
struct iso_context *ctx = container_of(base, struct iso_context, base);
struct iso_context *ctx = container_of(base, struct iso_context, base);
struct descriptor *d, *last, *pd;
struct fw_iso_packet *p;
__le32 *header;
@ -1575,7 +1573,7 @@ ohci_queue_iso_transmit(struct fw_iso_context *base,
return 0;
}
static int
setup_wait_descriptor(struct context *ctx)
{
@ -1609,7 +1607,7 @@ ohci_queue_iso_receive_dualbuffer(struct fw_iso_context *base,
dma_addr_t d_bus, page_bus;
u32 z, header_z, length, rest;
int page, offset;
/* FIXME: Cycle lost behavior should be configurable: lose
* packet, retransmit or terminate.. */
@ -1641,7 +1639,7 @@ ohci_queue_iso_receive_dualbuffer(struct fw_iso_context *base,
db->first_req_count = cpu_to_le16(p->header_length);
db->first_res_count = db->first_req_count;
db->first_buffer = cpu_to_le32(d_bus + sizeof *db);
if (offset + rest < PAGE_SIZE)
length = rest;
else
@ -1675,7 +1673,7 @@ ohci_queue_iso_receive_bufferfill(struct fw_iso_context *base,
dma_addr_t d_bus, page_bus;
u32 length, rest;
int page, offset;
page = payload >> PAGE_SHIFT;
offset = payload & ~PAGE_MASK;
rest = packet->payload_length;
@ -1691,7 +1689,7 @@ ohci_queue_iso_receive_bufferfill(struct fw_iso_context *base,
d->control = cpu_to_le16(descriptor_input_more |
descriptor_status |
descriptor_branch_always);
if (offset + rest < PAGE_SIZE)
length = rest;
else