From: Todd Poynor <toddpoynor@gmail.com>
To: Rob Springer <rspringer@google.com>,
John Joseph <jnjoseph@google.com>,
Ben Chan <benchan@chromium.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Dmitry Torokhov <dtor@chromium.org>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Todd Poynor <toddpoynor@google.com>
Subject: [PATCH 10/15] staging: gasket: interrupt: fix function param line continuation style
Date: Tue, 31 Jul 2018 13:24:43 -0700 [thread overview]
Message-ID: <20180731202448.229487-11-toddpoynor@gmail.com> (raw)
In-Reply-To: <20180731202448.229487-1-toddpoynor@gmail.com>
From: Todd Poynor <toddpoynor@google.com>
Fix multi-line alignment formatting to look like:
int ret = long_function_name(device, VARIABLE1, VARIABLE2,
VARIABLE3, VARIABLE4);
Signed-off-by: Todd Poynor <toddpoynor@google.com>
---
drivers/staging/gasket/gasket_interrupt.c | 73 +++++++++++------------
drivers/staging/gasket/gasket_interrupt.h | 19 +++---
2 files changed, 43 insertions(+), 49 deletions(-)
diff --git a/drivers/staging/gasket/gasket_interrupt.c b/drivers/staging/gasket/gasket_interrupt.c
index 3079b59b122b..09c3d0747af6 100644
--- a/drivers/staging/gasket/gasket_interrupt.c
+++ b/drivers/staging/gasket/gasket_interrupt.c
@@ -144,11 +144,10 @@ static void gasket_interrupt_setup(struct gasket_dev *gasket_dev)
}
mask = ~(0xFFFF << pack_shift);
- value = gasket_dev_read_64(
- gasket_dev,
- interrupt_data->interrupt_bar_index,
- interrupt_data->interrupts[i].reg) &
- mask;
+ value = gasket_dev_read_64(gasket_dev,
+ interrupt_data->interrupt_bar_index,
+ interrupt_data->interrupts[i].reg);
+ value &= mask;
value |= interrupt_data->interrupts[i].index
<< pack_shift;
}
@@ -187,8 +186,8 @@ static irqreturn_t gasket_msix_interrupt_handler(int irq, void *dev_id)
return IRQ_HANDLED;
}
-static int gasket_interrupt_msix_init(
- struct gasket_interrupt_data *interrupt_data)
+static int
+gasket_interrupt_msix_init(struct gasket_interrupt_data *interrupt_data)
{
int ret = 1;
int i;
@@ -210,10 +209,9 @@ static int gasket_interrupt_msix_init(
interrupt_data->msix_configured = 1;
for (i = 0; i < interrupt_data->num_interrupts; i++) {
- ret = request_irq(
- interrupt_data->msix_entries[i].vector,
- gasket_msix_interrupt_handler, 0, interrupt_data->name,
- interrupt_data);
+ ret = request_irq(interrupt_data->msix_entries[i].vector,
+ gasket_msix_interrupt_handler, 0,
+ interrupt_data->name, interrupt_data);
if (ret) {
dev_err(&interrupt_data->pci_dev->dev,
@@ -250,25 +248,23 @@ static void force_msix_interrupt_unmasking(struct gasket_dev *gasket_dev)
ulong location = APEX_BAR2_REG_KERNEL_HIB_MSIX_TABLE +
MSIX_MASK_BIT_OFFSET + i * MSIX_VECTOR_SIZE;
u32 mask =
- gasket_dev_read_32(
- gasket_dev,
- gasket_dev->interrupt_data->interrupt_bar_index,
- location);
+ gasket_dev_read_32(gasket_dev,
+ gasket_dev->interrupt_data->interrupt_bar_index,
+ location);
if (!(mask & 1))
continue;
/* Unmask the msix vector (clear 32 bits) */
- gasket_dev_write_32(
- gasket_dev, 0,
- gasket_dev->interrupt_data->interrupt_bar_index,
- location);
+ gasket_dev_write_32(gasket_dev, 0,
+ gasket_dev->interrupt_data->interrupt_bar_index,
+ location);
}
#undef MSIX_VECTOR_SIZE
#undef MSIX_MASK_BIT_OFFSET
#undef APEX_BAR2_REG_KERNEL_HIB_MSIX_TABLE
}
-static ssize_t interrupt_sysfs_show(
- struct device *device, struct device_attribute *attr, char *buf)
+static ssize_t interrupt_sysfs_show(struct device *device,
+ struct device_attribute *attr, char *buf)
{
int i, ret;
ssize_t written = 0, total_written = 0;
@@ -318,22 +314,22 @@ static ssize_t interrupt_sysfs_show(
}
static struct gasket_sysfs_attribute interrupt_sysfs_attrs[] = {
- GASKET_SYSFS_RO(
- interrupt_counts, interrupt_sysfs_show, ATTR_INTERRUPT_COUNTS),
+ GASKET_SYSFS_RO(interrupt_counts, interrupt_sysfs_show,
+ ATTR_INTERRUPT_COUNTS),
GASKET_END_OF_ATTR_ARRAY,
};
-int gasket_interrupt_init(
- struct gasket_dev *gasket_dev, const char *name, int type,
- const struct gasket_interrupt_desc *interrupts,
- int num_interrupts, int pack_width, int bar_index,
- const struct gasket_wire_interrupt_offsets *wire_int_offsets)
+int gasket_interrupt_init(struct gasket_dev *gasket_dev, const char *name,
+ int type,
+ const struct gasket_interrupt_desc *interrupts,
+ int num_interrupts, int pack_width, int bar_index,
+ const struct gasket_wire_interrupt_offsets *wire_int_offsets)
{
int ret;
struct gasket_interrupt_data *interrupt_data;
- interrupt_data = kzalloc(
- sizeof(struct gasket_interrupt_data), GFP_KERNEL);
+ interrupt_data = kzalloc(sizeof(struct gasket_interrupt_data),
+ GFP_KERNEL);
if (!interrupt_data)
return -ENOMEM;
gasket_dev->interrupt_data = interrupt_data;
@@ -402,14 +398,14 @@ int gasket_interrupt_init(
}
gasket_interrupt_setup(gasket_dev);
- gasket_sysfs_create_entries(
- gasket_dev->dev_info.device, interrupt_sysfs_attrs);
+ gasket_sysfs_create_entries(gasket_dev->dev_info.device,
+ interrupt_sysfs_attrs);
return 0;
}
-static void gasket_interrupt_msix_cleanup(
- struct gasket_interrupt_data *interrupt_data)
+static void
+gasket_interrupt_msix_cleanup(struct gasket_interrupt_data *interrupt_data)
{
int i;
@@ -528,9 +524,8 @@ int gasket_interrupt_system_status(struct gasket_dev *gasket_dev)
return GASKET_STATUS_ALIVE;
}
-int gasket_interrupt_set_eventfd(
- struct gasket_interrupt_data *interrupt_data, int interrupt,
- int event_fd)
+int gasket_interrupt_set_eventfd(struct gasket_interrupt_data *interrupt_data,
+ int interrupt, int event_fd)
{
struct eventfd_ctx *ctx = eventfd_ctx_fdget(event_fd);
@@ -544,8 +539,8 @@ int gasket_interrupt_set_eventfd(
return 0;
}
-int gasket_interrupt_clear_eventfd(
- struct gasket_interrupt_data *interrupt_data, int interrupt)
+int gasket_interrupt_clear_eventfd(struct gasket_interrupt_data *interrupt_data,
+ int interrupt)
{
if (interrupt < 0 || interrupt >= interrupt_data->num_interrupts)
return -EINVAL;
diff --git a/drivers/staging/gasket/gasket_interrupt.h b/drivers/staging/gasket/gasket_interrupt.h
index 805fee64569f..835af439e96a 100644
--- a/drivers/staging/gasket/gasket_interrupt.h
+++ b/drivers/staging/gasket/gasket_interrupt.h
@@ -43,11 +43,11 @@ struct gasket_interrupt_data;
* are not possible to set up, but is otherwise OK; that device will report
* status LAMED.)
*/
-int gasket_interrupt_init(
- struct gasket_dev *gasket_dev, const char *name, int type,
- const struct gasket_interrupt_desc *interrupts,
- int num_interrupts, int pack_width, int bar_index,
- const struct gasket_wire_interrupt_offsets *wire_int_offsets);
+int gasket_interrupt_init(struct gasket_dev *gasket_dev, const char *name,
+ int type,
+ const struct gasket_interrupt_desc *interrupts,
+ int num_interrupts, int pack_width, int bar_index,
+ const struct gasket_wire_interrupt_offsets *wire_int_offsets);
/*
* Clean up a device's interrupt structure.
@@ -87,9 +87,8 @@ int gasket_interrupt_reset_counts(struct gasket_dev *gasket_dev);
*
* Returns 0 on success, a negative error code otherwise.
*/
-int gasket_interrupt_set_eventfd(
- struct gasket_interrupt_data *interrupt_data, int interrupt,
- int event_fd);
+int gasket_interrupt_set_eventfd(struct gasket_interrupt_data *interrupt_data,
+ int interrupt, int event_fd);
/*
* Removes an interrupt-eventfd association.
@@ -98,8 +97,8 @@ int gasket_interrupt_set_eventfd(
*
* Removes any eventfd associated with the specified interrupt, if any.
*/
-int gasket_interrupt_clear_eventfd(
- struct gasket_interrupt_data *interrupt_data, int interrupt);
+int gasket_interrupt_clear_eventfd(struct gasket_interrupt_data *interrupt_data,
+ int interrupt);
/*
* The below functions exist for backwards compatibility.
--
2.18.0.345.g5c9ce644c3-goog
next prev parent reply other threads:[~2018-07-31 20:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-31 20:24 [PATCH 00/15] staging: gasket: cleanups continue Todd Poynor
2018-07-31 20:24 ` [PATCH 01/15] staging: gasket: core: remove static function forward declarations Todd Poynor
2018-07-31 20:24 ` [PATCH 02/15] staging: gasket: ioctl: " Todd Poynor
2018-07-31 20:24 ` [PATCH 03/15] staging: gasket: interrupt: " Todd Poynor
2018-07-31 20:24 ` [PATCH 04/15] staging: gasket: pg tbl: " Todd Poynor
2018-07-31 20:24 ` [PATCH 05/15] staging: gasket: TODO: remove entry for static function declarations Todd Poynor
2018-07-31 20:24 ` [PATCH 06/15] staging: gasket: core: fix function param line continuation style Todd Poynor
2018-07-31 20:24 ` [PATCH 07/15] staging: gasket: ioctl: " Todd Poynor
2018-07-31 20:24 ` [PATCH 08/15] staging: gasket: page table: " Todd Poynor
2018-07-31 20:24 ` [PATCH 09/15] staging: gasket: sysfs: " Todd Poynor
2018-07-31 20:24 ` Todd Poynor [this message]
2018-07-31 20:24 ` [PATCH 11/15] staging: gasket: TODO: remove entry for multi-line alignment style Todd Poynor
2018-07-31 20:24 ` [PATCH 12/15] staging: gasket: apex: move driver-private defines out of apex.h Todd Poynor
2018-07-31 20:24 ` [PATCH 13/15] staging: gasket: core: use bool type for ns_capable result Todd Poynor
2018-07-31 20:24 ` [PATCH 14/15] Revert "staging: gasket: page table: hold references to device and pci_dev" Todd Poynor
2018-07-31 20:24 ` [PATCH 15/15] staging: gasket: page table: fix header file include guard symbol Todd Poynor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180731202448.229487-11-toddpoynor@gmail.com \
--to=toddpoynor@gmail.com \
--cc=benchan@chromium.org \
--cc=devel@driverdev.osuosl.org \
--cc=dtor@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=jnjoseph@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rspringer@google.com \
--cc=toddpoynor@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®