Commit 21cfa72c authored by Todd Poynor's avatar Todd Poynor Committed by Greg Kroah-Hartman

staging: gasket: interrupt: fix function param line continuation style

Fix multi-line alignment formatting to look like:
      int ret = long_function_name(device, VARIABLE1, VARIABLE2,
                                   VARIABLE3, VARIABLE4);
Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 46b77a6b
...@@ -144,11 +144,10 @@ static void gasket_interrupt_setup(struct gasket_dev *gasket_dev) ...@@ -144,11 +144,10 @@ static void gasket_interrupt_setup(struct gasket_dev *gasket_dev)
} }
mask = ~(0xFFFF << pack_shift); mask = ~(0xFFFF << pack_shift);
value = gasket_dev_read_64( value = gasket_dev_read_64(gasket_dev,
gasket_dev,
interrupt_data->interrupt_bar_index, interrupt_data->interrupt_bar_index,
interrupt_data->interrupts[i].reg) & interrupt_data->interrupts[i].reg);
mask; value &= mask;
value |= interrupt_data->interrupts[i].index value |= interrupt_data->interrupts[i].index
<< pack_shift; << pack_shift;
} }
...@@ -187,8 +186,8 @@ static irqreturn_t gasket_msix_interrupt_handler(int irq, void *dev_id) ...@@ -187,8 +186,8 @@ static irqreturn_t gasket_msix_interrupt_handler(int irq, void *dev_id)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
static int gasket_interrupt_msix_init( static int
struct gasket_interrupt_data *interrupt_data) gasket_interrupt_msix_init(struct gasket_interrupt_data *interrupt_data)
{ {
int ret = 1; int ret = 1;
int i; int i;
...@@ -210,10 +209,9 @@ static int gasket_interrupt_msix_init( ...@@ -210,10 +209,9 @@ static int gasket_interrupt_msix_init(
interrupt_data->msix_configured = 1; interrupt_data->msix_configured = 1;
for (i = 0; i < interrupt_data->num_interrupts; i++) { for (i = 0; i < interrupt_data->num_interrupts; i++) {
ret = request_irq( ret = request_irq(interrupt_data->msix_entries[i].vector,
interrupt_data->msix_entries[i].vector, gasket_msix_interrupt_handler, 0,
gasket_msix_interrupt_handler, 0, interrupt_data->name, interrupt_data->name, interrupt_data);
interrupt_data);
if (ret) { if (ret) {
dev_err(&interrupt_data->pci_dev->dev, dev_err(&interrupt_data->pci_dev->dev,
...@@ -250,15 +248,13 @@ static void force_msix_interrupt_unmasking(struct gasket_dev *gasket_dev) ...@@ -250,15 +248,13 @@ static void force_msix_interrupt_unmasking(struct gasket_dev *gasket_dev)
ulong location = APEX_BAR2_REG_KERNEL_HIB_MSIX_TABLE + ulong location = APEX_BAR2_REG_KERNEL_HIB_MSIX_TABLE +
MSIX_MASK_BIT_OFFSET + i * MSIX_VECTOR_SIZE; MSIX_MASK_BIT_OFFSET + i * MSIX_VECTOR_SIZE;
u32 mask = u32 mask =
gasket_dev_read_32( gasket_dev_read_32(gasket_dev,
gasket_dev,
gasket_dev->interrupt_data->interrupt_bar_index, gasket_dev->interrupt_data->interrupt_bar_index,
location); location);
if (!(mask & 1)) if (!(mask & 1))
continue; continue;
/* Unmask the msix vector (clear 32 bits) */ /* Unmask the msix vector (clear 32 bits) */
gasket_dev_write_32( gasket_dev_write_32(gasket_dev, 0,
gasket_dev, 0,
gasket_dev->interrupt_data->interrupt_bar_index, gasket_dev->interrupt_data->interrupt_bar_index,
location); location);
} }
...@@ -267,8 +263,8 @@ static void force_msix_interrupt_unmasking(struct gasket_dev *gasket_dev) ...@@ -267,8 +263,8 @@ static void force_msix_interrupt_unmasking(struct gasket_dev *gasket_dev)
#undef APEX_BAR2_REG_KERNEL_HIB_MSIX_TABLE #undef APEX_BAR2_REG_KERNEL_HIB_MSIX_TABLE
} }
static ssize_t interrupt_sysfs_show( static ssize_t interrupt_sysfs_show(struct device *device,
struct device *device, struct device_attribute *attr, char *buf) struct device_attribute *attr, char *buf)
{ {
int i, ret; int i, ret;
ssize_t written = 0, total_written = 0; ssize_t written = 0, total_written = 0;
...@@ -318,13 +314,13 @@ static ssize_t interrupt_sysfs_show( ...@@ -318,13 +314,13 @@ static ssize_t interrupt_sysfs_show(
} }
static struct gasket_sysfs_attribute interrupt_sysfs_attrs[] = { static struct gasket_sysfs_attribute interrupt_sysfs_attrs[] = {
GASKET_SYSFS_RO( GASKET_SYSFS_RO(interrupt_counts, interrupt_sysfs_show,
interrupt_counts, interrupt_sysfs_show, ATTR_INTERRUPT_COUNTS), ATTR_INTERRUPT_COUNTS),
GASKET_END_OF_ATTR_ARRAY, GASKET_END_OF_ATTR_ARRAY,
}; };
int gasket_interrupt_init( int gasket_interrupt_init(struct gasket_dev *gasket_dev, const char *name,
struct gasket_dev *gasket_dev, const char *name, int type, int type,
const struct gasket_interrupt_desc *interrupts, const struct gasket_interrupt_desc *interrupts,
int num_interrupts, int pack_width, int bar_index, int num_interrupts, int pack_width, int bar_index,
const struct gasket_wire_interrupt_offsets *wire_int_offsets) const struct gasket_wire_interrupt_offsets *wire_int_offsets)
...@@ -332,8 +328,8 @@ int gasket_interrupt_init( ...@@ -332,8 +328,8 @@ int gasket_interrupt_init(
int ret; int ret;
struct gasket_interrupt_data *interrupt_data; struct gasket_interrupt_data *interrupt_data;
interrupt_data = kzalloc( interrupt_data = kzalloc(sizeof(struct gasket_interrupt_data),
sizeof(struct gasket_interrupt_data), GFP_KERNEL); GFP_KERNEL);
if (!interrupt_data) if (!interrupt_data)
return -ENOMEM; return -ENOMEM;
gasket_dev->interrupt_data = interrupt_data; gasket_dev->interrupt_data = interrupt_data;
...@@ -402,14 +398,14 @@ int gasket_interrupt_init( ...@@ -402,14 +398,14 @@ int gasket_interrupt_init(
} }
gasket_interrupt_setup(gasket_dev); gasket_interrupt_setup(gasket_dev);
gasket_sysfs_create_entries( gasket_sysfs_create_entries(gasket_dev->dev_info.device,
gasket_dev->dev_info.device, interrupt_sysfs_attrs); interrupt_sysfs_attrs);
return 0; return 0;
} }
static void gasket_interrupt_msix_cleanup( static void
struct gasket_interrupt_data *interrupt_data) gasket_interrupt_msix_cleanup(struct gasket_interrupt_data *interrupt_data)
{ {
int i; int i;
...@@ -528,9 +524,8 @@ int gasket_interrupt_system_status(struct gasket_dev *gasket_dev) ...@@ -528,9 +524,8 @@ int gasket_interrupt_system_status(struct gasket_dev *gasket_dev)
return GASKET_STATUS_ALIVE; return GASKET_STATUS_ALIVE;
} }
int gasket_interrupt_set_eventfd( int gasket_interrupt_set_eventfd(struct gasket_interrupt_data *interrupt_data,
struct gasket_interrupt_data *interrupt_data, int interrupt, int interrupt, int event_fd)
int event_fd)
{ {
struct eventfd_ctx *ctx = eventfd_ctx_fdget(event_fd); struct eventfd_ctx *ctx = eventfd_ctx_fdget(event_fd);
...@@ -544,8 +539,8 @@ int gasket_interrupt_set_eventfd( ...@@ -544,8 +539,8 @@ int gasket_interrupt_set_eventfd(
return 0; return 0;
} }
int gasket_interrupt_clear_eventfd( int gasket_interrupt_clear_eventfd(struct gasket_interrupt_data *interrupt_data,
struct gasket_interrupt_data *interrupt_data, int interrupt) int interrupt)
{ {
if (interrupt < 0 || interrupt >= interrupt_data->num_interrupts) if (interrupt < 0 || interrupt >= interrupt_data->num_interrupts)
return -EINVAL; return -EINVAL;
......
...@@ -43,8 +43,8 @@ struct gasket_interrupt_data; ...@@ -43,8 +43,8 @@ struct gasket_interrupt_data;
* are not possible to set up, but is otherwise OK; that device will report * are not possible to set up, but is otherwise OK; that device will report
* status LAMED.) * status LAMED.)
*/ */
int gasket_interrupt_init( int gasket_interrupt_init(struct gasket_dev *gasket_dev, const char *name,
struct gasket_dev *gasket_dev, const char *name, int type, int type,
const struct gasket_interrupt_desc *interrupts, const struct gasket_interrupt_desc *interrupts,
int num_interrupts, int pack_width, int bar_index, int num_interrupts, int pack_width, int bar_index,
const struct gasket_wire_interrupt_offsets *wire_int_offsets); const struct gasket_wire_interrupt_offsets *wire_int_offsets);
...@@ -87,9 +87,8 @@ int gasket_interrupt_reset_counts(struct gasket_dev *gasket_dev); ...@@ -87,9 +87,8 @@ int gasket_interrupt_reset_counts(struct gasket_dev *gasket_dev);
* *
* Returns 0 on success, a negative error code otherwise. * Returns 0 on success, a negative error code otherwise.
*/ */
int gasket_interrupt_set_eventfd( int gasket_interrupt_set_eventfd(struct gasket_interrupt_data *interrupt_data,
struct gasket_interrupt_data *interrupt_data, int interrupt, int interrupt, int event_fd);
int event_fd);
/* /*
* Removes an interrupt-eventfd association. * Removes an interrupt-eventfd association.
...@@ -98,8 +97,8 @@ int gasket_interrupt_set_eventfd( ...@@ -98,8 +97,8 @@ int gasket_interrupt_set_eventfd(
* *
* Removes any eventfd associated with the specified interrupt, if any. * Removes any eventfd associated with the specified interrupt, if any.
*/ */
int gasket_interrupt_clear_eventfd( int gasket_interrupt_clear_eventfd(struct gasket_interrupt_data *interrupt_data,
struct gasket_interrupt_data *interrupt_data, int interrupt); int interrupt);
/* /*
* The below functions exist for backwards compatibility. * The below functions exist for backwards compatibility.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment