Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53dca511 authored by Stefan Richter's avatar Stefan Richter
Browse files

firewire: remove line breaks before function names



type
    function_name(parameters);

is nice to look at but was not used consistently.

Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
parent 2dbd7d7e
Loading
Loading
Loading
Loading
+25 −43
Original line number Diff line number Diff line
@@ -63,8 +63,7 @@ static int descriptor_count;
#define BIB_CMC			((1) << 30)
#define BIB_IMC			((1) << 31)

static u32 *
generate_config_rom(struct fw_card *card, size_t *config_rom_length)
static u32 *generate_config_rom(struct fw_card *card, size_t *config_rom_length)
{
	struct fw_descriptor *desc;
	static u32 config_rom[256];
@@ -128,8 +127,7 @@ generate_config_rom(struct fw_card *card, size_t *config_rom_length)
	return config_rom;
}

static void
update_config_roms(void)
static void update_config_roms(void)
{
	struct fw_card *card;
	u32 *config_rom;
@@ -141,8 +139,7 @@ update_config_roms(void)
	}
}

int
fw_core_add_descriptor(struct fw_descriptor *desc)
int fw_core_add_descriptor(struct fw_descriptor *desc)
{
	size_t i;

@@ -171,8 +168,7 @@ fw_core_add_descriptor(struct fw_descriptor *desc)
	return 0;
}

void
fw_core_remove_descriptor(struct fw_descriptor *desc)
void fw_core_remove_descriptor(struct fw_descriptor *desc)
{
	mutex_lock(&card_mutex);

@@ -189,8 +185,7 @@ static const char gap_count_table[] = {
	63, 5, 7, 8, 10, 13, 16, 18, 21, 24, 26, 29, 32, 35, 37, 40
};

void
fw_schedule_bm_work(struct fw_card *card, unsigned long delay)
void fw_schedule_bm_work(struct fw_card *card, unsigned long delay)
{
	int scheduled;

@@ -200,8 +195,7 @@ fw_schedule_bm_work(struct fw_card *card, unsigned long delay)
		fw_card_put(card);
}

static void
fw_card_bm_work(struct work_struct *work)
static void fw_card_bm_work(struct work_struct *work)
{
	struct fw_card *card = container_of(work, struct fw_card, work.work);
	struct fw_device *root_device;
@@ -371,16 +365,15 @@ fw_card_bm_work(struct work_struct *work)
	fw_card_put(card);
}

static void
flush_timer_callback(unsigned long data)
static void flush_timer_callback(unsigned long data)
{
	struct fw_card *card = (struct fw_card *)data;

	fw_flush_transactions(card);
}

void
fw_card_initialize(struct fw_card *card, const struct fw_card_driver *driver,
void fw_card_initialize(struct fw_card *card,
			const struct fw_card_driver *driver,
			struct device *device)
{
	static atomic_t index = ATOMIC_INIT(-1);
@@ -406,8 +399,7 @@ fw_card_initialize(struct fw_card *card, const struct fw_card_driver *driver,
}
EXPORT_SYMBOL(fw_card_initialize);

int
fw_card_add(struct fw_card *card,
int fw_card_add(struct fw_card *card,
		u32 max_receive, u32 link_speed, u64 guid)
{
	u32 *config_rom;
@@ -442,22 +434,19 @@ EXPORT_SYMBOL(fw_card_add);
 * dummy driver just fails all IO.
 */

static int
dummy_enable(struct fw_card *card, u32 *config_rom, size_t length)
static int dummy_enable(struct fw_card *card, u32 *config_rom, size_t length)
{
	BUG();
	return -1;
}

static int
dummy_update_phy_reg(struct fw_card *card, int address,
static int dummy_update_phy_reg(struct fw_card *card, int address,
				int clear_bits, int set_bits)
{
	return -ENODEV;
}

static int
dummy_set_config_rom(struct fw_card *card,
static int dummy_set_config_rom(struct fw_card *card,
				u32 *config_rom, size_t length)
{
	/*
@@ -468,26 +457,22 @@ dummy_set_config_rom(struct fw_card *card,
	return -1;
}

static void
dummy_send_request(struct fw_card *card, struct fw_packet *packet)
static void dummy_send_request(struct fw_card *card, struct fw_packet *packet)
{
	packet->callback(packet, card, -ENODEV);
}

static void
dummy_send_response(struct fw_card *card, struct fw_packet *packet)
static void dummy_send_response(struct fw_card *card, struct fw_packet *packet)
{
	packet->callback(packet, card, -ENODEV);
}

static int
dummy_cancel_packet(struct fw_card *card, struct fw_packet *packet)
static int dummy_cancel_packet(struct fw_card *card, struct fw_packet *packet)
{
	return -ENOENT;
}

static int
dummy_enable_phys_dma(struct fw_card *card,
static int dummy_enable_phys_dma(struct fw_card *card,
				 int node_id, int generation)
{
	return -ENODEV;
@@ -503,16 +488,14 @@ static struct fw_card_driver dummy_driver = {
	.enable_phys_dma = dummy_enable_phys_dma,
};

void
fw_card_release(struct kref *kref)
void fw_card_release(struct kref *kref)
{
	struct fw_card *card = container_of(kref, struct fw_card, kref);

	complete(&card->done);
}

void
fw_core_remove_card(struct fw_card *card)
void fw_core_remove_card(struct fw_card *card)
{
	card->driver->update_phy_reg(card, 4,
				     PHY_LINK_ACTIVE | PHY_CONTENDER, 0);
@@ -536,8 +519,7 @@ fw_core_remove_card(struct fw_card *card)
}
EXPORT_SYMBOL(fw_core_remove_card);

int
fw_core_initiate_bus_reset(struct fw_card *card, int short_reset)
int fw_core_initiate_bus_reset(struct fw_card *card, int short_reset)
{
	int reg = short_reset ? 5 : 1;
	int bit = short_reset ? PHY_BUS_SHORT_RESET : PHY_BUS_RESET;
+37 −51
Original line number Diff line number Diff line
@@ -96,14 +96,12 @@ struct client {
	struct list_head link;
};

static inline void __user *
u64_to_uptr(__u64 value)
static inline void __user *u64_to_uptr(__u64 value)
{
	return (void __user *)(unsigned long)value;
}

static inline __u64
uptr_to_u64(void __user *ptr)
static inline __u64 uptr_to_u64(void __user *ptr)
{
	return (__u64)(unsigned long)ptr;
}
@@ -163,8 +161,8 @@ static void queue_event(struct client *client, struct event *event,
	wake_up_interruptible(&client->wait);
}

static int
dequeue_event(struct client *client, char __user *buffer, size_t count)
static int dequeue_event(struct client *client,
			 char __user *buffer, size_t count)
{
	unsigned long flags;
	struct event *event;
@@ -203,17 +201,15 @@ dequeue_event(struct client *client, char __user *buffer, size_t count)
	return ret;
}

static ssize_t
fw_device_op_read(struct file *file,
		  char __user *buffer, size_t count, loff_t *offset)
static ssize_t fw_device_op_read(struct file *file, char __user *buffer,
				 size_t count, loff_t *offset)
{
	struct client *client = file->private_data;

	return dequeue_event(client, buffer, count);
}

static void
fill_bus_reset_event(struct fw_cdev_event_bus_reset *event,
static void fill_bus_reset_event(struct fw_cdev_event_bus_reset *event,
				 struct client *client)
{
	struct fw_card *card = client->device->card;
@@ -233,8 +229,7 @@ fill_bus_reset_event(struct fw_cdev_event_bus_reset *event,
	spin_unlock_irqrestore(&card->lock, flags);
}

static void
for_each_client(struct fw_device *device,
static void for_each_client(struct fw_device *device,
			    void (*callback)(struct client *client))
{
	struct client *c;
@@ -245,8 +240,7 @@ for_each_client(struct fw_device *device,
	mutex_unlock(&device->client_list_mutex);
}

static void
queue_bus_reset_event(struct client *client)
static void queue_bus_reset_event(struct client *client)
{
	struct bus_reset *bus_reset;

@@ -316,9 +310,8 @@ static int ioctl_get_info(struct client *client, void *buffer)
	return 0;
}

static int
add_client_resource(struct client *client, struct client_resource *resource,
		    gfp_t gfp_mask)
static int add_client_resource(struct client *client,
			       struct client_resource *resource, gfp_t gfp_mask)
{
	unsigned long flags;
	int ret;
@@ -341,8 +334,7 @@ add_client_resource(struct client *client, struct client_resource *resource,
	return ret < 0 ? ret : 0;
}

static int
release_client_resource(struct client *client, u32 handle,
static int release_client_resource(struct client *client, u32 handle,
				   client_resource_release_fn_t release,
				   struct client_resource **resource)
{
@@ -369,8 +361,8 @@ release_client_resource(struct client *client, u32 handle,
	return 0;
}

static void
release_transaction(struct client *client, struct client_resource *resource)
static void release_transaction(struct client *client,
				struct client_resource *resource)
{
	struct response *response =
		container_of(resource, struct response, resource);
@@ -378,8 +370,7 @@ release_transaction(struct client *client, struct client_resource *resource)
	fw_cancel_transaction(client->device->card, &response->transaction);
}

static void
complete_transaction(struct fw_card *card, int rcode,
static void complete_transaction(struct fw_card *card, int rcode,
				 void *payload, size_t length, void *data)
{
	struct response *response = data;
@@ -506,8 +497,8 @@ struct request_event {
	struct fw_cdev_event_request request;
};

static void
release_request(struct client *client, struct client_resource *resource)
static void release_request(struct client *client,
			    struct client_resource *resource)
{
	struct request *request =
		container_of(resource, struct request, resource);
@@ -517,8 +508,7 @@ release_request(struct client *client, struct client_resource *resource)
	kfree(request);
}

static void
handle_request(struct fw_card *card, struct fw_request *r,
static void handle_request(struct fw_card *card, struct fw_request *r,
			   int tcode, int destination, int source,
			   int generation, int speed,
			   unsigned long long offset,
@@ -561,8 +551,7 @@ handle_request(struct fw_card *card, struct fw_request *r,
	fw_send_response(card, r, RCODE_CONFLICT_ERROR);
}

static void
release_address_handler(struct client *client,
static void release_address_handler(struct client *client,
				    struct client_resource *resource)
{
	struct address_handler *handler =
@@ -716,8 +705,7 @@ static int ioctl_remove_descriptor(struct client *client, void *buffer)
				       release_descriptor, NULL);
}

static void
iso_callback(struct fw_iso_context *context, u32 cycle,
static void iso_callback(struct fw_iso_context *context, u32 cycle,
			 size_t header_length, void *header, void *data)
{
	struct client *client = data;
@@ -954,8 +942,8 @@ static int (* const ioctl_handlers[])(struct client *client, void *buffer) = {
	ioctl_get_cycle_timer,
};

static int
dispatch_ioctl(struct client *client, unsigned int cmd, void __user *arg)
static int dispatch_ioctl(struct client *client,
			  unsigned int cmd, void __user *arg)
{
	char buffer[256];
	int ret;
@@ -983,8 +971,7 @@ dispatch_ioctl(struct client *client, unsigned int cmd, void __user *arg)
	return ret;
}

static long
fw_device_op_ioctl(struct file *file,
static long fw_device_op_ioctl(struct file *file,
			       unsigned int cmd, unsigned long arg)
{
	struct client *client = file->private_data;
@@ -996,8 +983,7 @@ fw_device_op_ioctl(struct file *file,
}

#ifdef CONFIG_COMPAT
static long
fw_device_op_compat_ioctl(struct file *file,
static long fw_device_op_compat_ioctl(struct file *file,
				      unsigned int cmd, unsigned long arg)
{
	struct client *client = file->private_data;
+18 −22
Original line number Diff line number Diff line
@@ -134,8 +134,7 @@ static int get_modalias(struct fw_unit *unit, char *buffer, size_t buffer_size)
			vendor, model, specifier_id, version);
}

static int
fw_unit_uevent(struct device *dev, struct kobj_uevent_env *env)
static int fw_unit_uevent(struct device *dev, struct kobj_uevent_env *env)
{
	struct fw_unit *unit = fw_unit(dev);
	char modalias[64];
@@ -193,8 +192,8 @@ struct config_rom_attribute {
	u32 key;
};

static ssize_t
show_immediate(struct device *dev, struct device_attribute *dattr, char *buf)
static ssize_t show_immediate(struct device *dev,
			      struct device_attribute *dattr, char *buf)
{
	struct config_rom_attribute *attr =
		container_of(dattr, struct config_rom_attribute, attr);
@@ -225,8 +224,8 @@ show_immediate(struct device *dev, struct device_attribute *dattr, char *buf)
#define IMMEDIATE_ATTR(name, key)				\
	{ __ATTR(name, S_IRUGO, show_immediate, NULL), key }

static ssize_t
show_text_leaf(struct device *dev, struct device_attribute *dattr, char *buf)
static ssize_t show_text_leaf(struct device *dev,
			      struct device_attribute *dattr, char *buf)
{
	struct config_rom_attribute *attr =
		container_of(dattr, struct config_rom_attribute, attr);
@@ -295,8 +294,7 @@ static struct config_rom_attribute config_rom_attributes[] = {
	TEXT_LEAF_ATTR(hardware_version_name, CSR_HARDWARE_VERSION),
};

static void
init_fw_attribute_group(struct device *dev,
static void init_fw_attribute_group(struct device *dev,
				    struct device_attribute *attrs,
				    struct fw_attribute_group *group)
{
@@ -321,8 +319,7 @@ init_fw_attribute_group(struct device *dev,
	dev->groups = group->groups;
}

static ssize_t
modalias_show(struct device *dev,
static ssize_t modalias_show(struct device *dev,
			     struct device_attribute *attr, char *buf)
{
	struct fw_unit *unit = fw_unit(dev);
@@ -334,8 +331,7 @@ modalias_show(struct device *dev,
	return length + 1;
}

static ssize_t
rom_index_show(struct device *dev,
static ssize_t rom_index_show(struct device *dev,
			      struct device_attribute *attr, char *buf)
{
	struct fw_device *device = fw_device(dev->parent);
@@ -351,8 +347,8 @@ static struct device_attribute fw_unit_attributes[] = {
	__ATTR_NULL,
};

static ssize_t
config_rom_show(struct device *dev, struct device_attribute *attr, char *buf)
static ssize_t config_rom_show(struct device *dev,
			       struct device_attribute *attr, char *buf)
{
	struct fw_device *device = fw_device(dev);
	size_t length;
@@ -365,8 +361,8 @@ config_rom_show(struct device *dev, struct device_attribute *attr, char *buf)
	return length;
}

static ssize_t
guid_show(struct device *dev, struct device_attribute *attr, char *buf)
static ssize_t guid_show(struct device *dev,
			 struct device_attribute *attr, char *buf)
{
	struct fw_device *device = fw_device(dev);
	int ret;
@@ -385,8 +381,8 @@ static struct device_attribute fw_device_attributes[] = {
	__ATTR_NULL,
};

static int
read_rom(struct fw_device *device, int generation, int index, u32 *data)
static int read_rom(struct fw_device *device,
		    int generation, int index, u32 *data)
{
	int rcode;

+1 −2
Original line number Diff line number Diff line
@@ -180,8 +180,7 @@ struct fw_driver {
	const struct fw_device_id *id_table;
};

static inline struct fw_driver *
fw_driver(struct device_driver *drv)
static inline struct fw_driver *fw_driver(struct device_driver *drv)
{
	return container_of(drv, struct fw_driver, driver);
}
+12 −16
Original line number Diff line number Diff line
@@ -28,8 +28,7 @@
#include "fw-topology.h"
#include "fw-device.h"

int
fw_iso_buffer_init(struct fw_iso_buffer *buffer, struct fw_card *card,
int fw_iso_buffer_init(struct fw_iso_buffer *buffer, struct fw_card *card,
		       int page_count, enum dma_data_direction direction)
{
	int i, j;
@@ -105,9 +104,8 @@ void fw_iso_buffer_destroy(struct fw_iso_buffer *buffer,
	buffer->pages = NULL;
}

struct fw_iso_context *
fw_iso_context_create(struct fw_card *card, int type,
		      int channel, int speed, size_t header_size,
struct fw_iso_context *fw_iso_context_create(struct fw_card *card,
		int type, int channel, int speed, size_t header_size,
		fw_iso_callback_t callback, void *callback_data)
{
	struct fw_iso_context *ctx;
@@ -134,14 +132,13 @@ void fw_iso_context_destroy(struct fw_iso_context *ctx)
	card->driver->free_iso_context(ctx);
}

int
fw_iso_context_start(struct fw_iso_context *ctx, int cycle, int sync, int tags)
int fw_iso_context_start(struct fw_iso_context *ctx,
			 int cycle, int sync, int tags)
{
	return ctx->card->driver->start_iso(ctx, cycle, sync, tags);
}

int
fw_iso_context_queue(struct fw_iso_context *ctx,
int fw_iso_context_queue(struct fw_iso_context *ctx,
			 struct fw_iso_packet *packet,
			 struct fw_iso_buffer *buffer,
			 unsigned long payload)
@@ -151,8 +148,7 @@ fw_iso_context_queue(struct fw_iso_context *ctx,
	return card->driver->queue_iso(ctx, packet, buffer, payload);
}

int
fw_iso_context_stop(struct fw_iso_context *ctx)
int fw_iso_context_stop(struct fw_iso_context *ctx)
{
	return ctx->card->driver->stop_iso(ctx);
}
Loading