[PATCH 03/14] staging: greybus: arche-platform: Fix typo in the comments.
From: Emmanuil Chatzipetru This warning is caught by checkpatch.pl: - CHECK: 'begining' may be misspelled - perhaps 'beginning'? Signed-off-by: Emmanuil Chatzipetru --- drivers/staging/greybus/arche-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c index 338c2d3ee842..19bfce684335 100644 --- a/drivers/staging/greybus/arche-platform.c +++ b/drivers/staging/greybus/arche-platform.c @@ -312,7 +312,7 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid) if (arche_pdata->wake_detect_state == WD_STATE_IDLE) { arche_pdata->wake_detect_start = jiffies; /* -* In the begining, when wake/detect goes low (first time), we assume +* In the beginning, when wake/detect goes low (first time), we assume * it is meant for coldboot and set the flag. If wake/detect line stays low * beyond 30msec, then it is coldboot else fallback to standby boot. */ -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 02/14] staging: greybus: arche-apb-ctrl: Fix open parenthesis alignment.
From: Emmanuil Chatzipetru Fix coding style issue caught by checkpatch.pl related to the following warning: - CHECK: Alignment should match open parenthesis Signed-off-by: Emmanuil Chatzipetru --- drivers/staging/greybus/arche-apb-ctrl.c | 43 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/drivers/staging/greybus/arche-apb-ctrl.c b/drivers/staging/greybus/arche-apb-ctrl.c index c41b52addd25..99d3416bfce3 100644 --- a/drivers/staging/greybus/arche-apb-ctrl.c +++ b/drivers/staging/greybus/arche-apb-ctrl.c @@ -69,15 +69,14 @@ static int coldboot_seq(struct platform_device *pdev) struct arche_apb_ctrl_drvdata *apb = platform_get_drvdata(pdev); int ret; - if (apb->init_disabled || - apb->state == ARCHE_PLATFORM_STATE_ACTIVE) + if (apb->init_disabled || apb->state == ARCHE_PLATFORM_STATE_ACTIVE) return 0; /* Hold APB in reset state */ assert_reset(apb->resetn_gpio); if (apb->state == ARCHE_PLATFORM_STATE_FW_FLASHING && - gpio_is_valid(apb->spi_en_gpio)) + gpio_is_valid(apb->spi_en_gpio)) devm_gpio_free(dev, apb->spi_en_gpio); /* Enable power to APB */ @@ -120,7 +119,7 @@ static int fw_flashing_seq(struct platform_device *pdev) int ret; if (apb->init_disabled || - apb->state == ARCHE_PLATFORM_STATE_FW_FLASHING) + apb->state == ARCHE_PLATFORM_STATE_FW_FLASHING) return 0; ret = regulator_enable(apb->vcore); @@ -144,7 +143,7 @@ static int fw_flashing_seq(struct platform_device *pdev) flags = GPIOF_OUT_INIT_LOW; ret = devm_gpio_request_one(dev, apb->spi_en_gpio, - flags, "apb_spi_en"); + flags, "apb_spi_en"); if (ret) { dev_err(dev, "Failed requesting SPI bus en gpio %d\n", apb->spi_en_gpio); @@ -169,11 +168,11 @@ static int standby_boot_seq(struct platform_device *pdev) /* Even if it is in OFF state, then we do not want to change the state */ if (apb->state == ARCHE_PLATFORM_STATE_STANDBY || - apb->state == ARCHE_PLATFORM_STATE_OFF) + apb->state == ARCHE_PLATFORM_STATE_OFF) return 0; if (apb->state == ARCHE_PLATFORM_STATE_FW_FLASHING && - gpio_is_valid(apb->spi_en_gpio)) + gpio_is_valid(apb->spi_en_gpio)) devm_gpio_free(dev, apb->spi_en_gpio); /* @@ -198,7 +197,7 @@ static void poweroff_seq(struct platform_device *pdev) return; if (apb->state == ARCHE_PLATFORM_STATE_FW_FLASHING && - gpio_is_valid(apb->spi_en_gpio)) + gpio_is_valid(apb->spi_en_gpio)) devm_gpio_free(dev, apb->spi_en_gpio); /* disable the clock */ @@ -252,8 +251,8 @@ void apb_ctrl_poweroff(struct device *dev) poweroff_seq(to_platform_device(dev)); } -static ssize_t state_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t count) +static ssize_t state_store(struct device *dev, struct device_attribute *attr, + const char *buf, size_t count) { struct platform_device *pdev = to_platform_device(dev); struct arche_apb_ctrl_drvdata *apb = platform_get_drvdata(pdev); @@ -298,8 +297,8 @@ static ssize_t state_store(struct device *dev, return ret ? ret : count; } -static ssize_t state_show(struct device *dev, - struct device_attribute *attr, char *buf) +static ssize_t state_show(struct device *dev, struct device_attribute *attr, + char *buf) { struct arche_apb_ctrl_drvdata *apb = dev_get_drvdata(dev); @@ -321,7 +320,7 @@ static ssize_t state_show(struct device *dev, static DEVICE_ATTR_RW(state); static int apb_ctrl_get_devtree_data(struct platform_device *pdev, - struct arche_apb_ctrl_drvdata *apb) +struct arche_apb_ctrl_drvdata *apb) { struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; @@ -333,10 +332,10 @@ static int apb_ctrl_get_devtree_data(struct platform_device *pdev, return apb->resetn_gpio; } ret = devm_gpio_request_one(dev, apb->resetn_gpio, - GPIOF_OUT_INIT_LOW, "apb-reset"); + GPIOF_OUT_INIT_LOW, "apb-reset"); if (ret) { dev_err(dev, "Failed requesting reset gpio %d\n", - apb->resetn_gpio); + apb->resetn_gpio); return ret; } @@ -346,10 +345,10 @@ static int apb_ctrl_get_devtree_data(struct platform_device *pdev, retur
[PATCH 01/14] staging: greybus: arche-apb-ctrl: Remove multiple blank lines.
From: Emmanuil Chatzipetru Fix coding style issue caught by checkpatch.pl related to the following warning: - CHECK: Please don't use multiple blank lines Signed-off-by: Emmanuil Chatzipetru --- drivers/staging/greybus/arche-apb-ctrl.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/greybus/arche-apb-ctrl.c b/drivers/staging/greybus/arche-apb-ctrl.c index 3fda0cd6bb42..c41b52addd25 100644 --- a/drivers/staging/greybus/arche-apb-ctrl.c +++ b/drivers/staging/greybus/arche-apb-ctrl.c @@ -21,7 +21,6 @@ #include #include "arche_platform.h" - struct arche_apb_ctrl_drvdata { /* Control GPIO signals to and from AP <=> AP Bridges */ int resetn_gpio; -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 06/14] staging: greybus: bootrom: Fix line over 80 characters warning.
From: Emmanuil Chatzipetru Fix coding style issue caught by checkpatch.pl related to the following warning: - CHECK: WARNING: line over 80 characters Signed-off-by: Emmanuil Chatzipetru --- drivers/staging/greybus/bootrom.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/greybus/bootrom.c b/drivers/staging/greybus/bootrom.c index 9baf16014d9a..a060bc4c54ad 100644 --- a/drivers/staging/greybus/bootrom.c +++ b/drivers/staging/greybus/bootrom.c @@ -220,7 +220,8 @@ static int gb_bootrom_firmware_size_request(struct gb_operation *op) size_response = op->response->payload; size_response->size = cpu_to_le32(bootrom->fw->size); - dev_dbg(dev, "%s: firmware size %d bytes\n", __func__, size_response->size); + dev_dbg(dev, "%s: firmware size %d bytes\n", + __func__, size_response->size); unlock: mutex_unlock(&bootrom->mutex); @@ -287,8 +288,8 @@ static int gb_bootrom_get_firmware(struct gb_operation *op) firmware_response = op->response->payload; memcpy(firmware_response->data, fw->data + offset, size); - dev_dbg(dev, "responding with firmware (offs = %u, size = %u)\n", offset, - size); + dev_dbg(dev, "responding with firmware (offs = %u, size = %u)\n", + offset, size); unlock: mutex_unlock(&bootrom->mutex); -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 08/14] staging: greybus: camera: Fix NULL comparison to preferred style.
From: Emmanuil Chatzipetru Fix coding style issue caught by checkpatch.pl related to the following warning: - CHECK: Comparison to NULL could be written "!token" Signed-off-by: Emmanuil Chatzipetru --- drivers/staging/greybus/camera.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c index 0c731153a4dc..d1193a1a876b 100644 --- a/drivers/staging/greybus/camera.c +++ b/drivers/staging/greybus/camera.c @@ -919,7 +919,7 @@ static ssize_t gb_camera_debugfs_configure_streams(struct gb_camera *gcam, /* Retrieve number of streams to configure */ token = strsep(&buf, ";"); - if (token == NULL) + if (!token) return -EINVAL; ret = kstrtouint(token, 10, &nstreams); @@ -930,7 +930,7 @@ static ssize_t gb_camera_debugfs_configure_streams(struct gb_camera *gcam, return -EINVAL; token = strsep(&buf, ";"); - if (token == NULL) + if (!token) return -EINVAL; ret = kstrtouint(token, 10, &flags); @@ -947,7 +947,7 @@ static ssize_t gb_camera_debugfs_configure_streams(struct gb_camera *gcam, /* width */ token = strsep(&buf, ";"); - if (token == NULL) { + if (!token) { ret = -EINVAL; goto done; } @@ -957,7 +957,7 @@ static ssize_t gb_camera_debugfs_configure_streams(struct gb_camera *gcam, /* height */ token = strsep(&buf, ";"); - if (token == NULL) + if (!token) goto done; ret = kstrtouint(token, 10, &stream->height); @@ -966,7 +966,7 @@ static ssize_t gb_camera_debugfs_configure_streams(struct gb_camera *gcam, /* Image format code */ token = strsep(&buf, ";"); - if (token == NULL) + if (!token) goto done; ret = kstrtouint(token, 16, &stream->format); @@ -1010,7 +1010,7 @@ static ssize_t gb_camera_debugfs_capture(struct gb_camera *gcam, /* Request id */ token = strsep(&buf, ";"); - if (token == NULL) + if (!token) return -EINVAL; ret = kstrtouint(token, 10, &request_id); if (ret < 0) @@ -1018,7 +1018,7 @@ static ssize_t gb_camera_debugfs_capture(struct gb_camera *gcam, /* Stream mask */ token = strsep(&buf, ";"); - if (token == NULL) + if (!token) return -EINVAL; ret = kstrtouint(token, 16, &streams_mask); if (ret < 0) @@ -1026,7 +1026,7 @@ static ssize_t gb_camera_debugfs_capture(struct gb_camera *gcam, /* number of frames */ token = strsep(&buf, ";"); - if (token == NULL) + if (!token) return -EINVAL; ret = kstrtouint(token, 10, &num_frames); if (ret < 0) -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 10/14] staging: greybus: connection: Remove multiple blank lines
From: Emmanuil Chatzipetru Fix coding style issue caught by checkpatch.pl related to the following warning: - CHECK: Please don't use multiple blank lines Signed-off-by: Emmanuil Chatzipetru --- drivers/staging/greybus/connection.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index e710d431f7b0..560dc8eaa841 100644 --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -12,17 +12,13 @@ #include "greybus.h" #include "greybus_trace.h" - #define GB_CONNECTION_CPORT_QUIESCE_TIMEOUT1000 - static void gb_connection_kref_release(struct kref *kref); - static DEFINE_SPINLOCK(gb_connections_lock); static DEFINE_MUTEX(gb_connection_mutex); - /* Caller holds gb_connection_mutex. */ static bool gb_connection_cport_in_use(struct gb_interface *intf, u16 cport_id) { -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 05/14] staging: greybus: bootrom: Fix open parenthesis alignment.
From: Emmanuil Chatzipetru Fix coding style issue caught by checkpatch.pl related to the following warning: - CHECK: Alignment should match open parenthesis Signed-off-by: Emmanuil Chatzipetru --- drivers/staging/greybus/bootrom.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/greybus/bootrom.c b/drivers/staging/greybus/bootrom.c index 5f90721bcc51..9baf16014d9a 100644 --- a/drivers/staging/greybus/bootrom.c +++ b/drivers/staging/greybus/bootrom.c @@ -175,7 +175,7 @@ static int find_firmware(struct gb_bootrom *bootrom, u8 stage) firmware_name); rc = request_firmware(&bootrom->fw, firmware_name, - &connection->bundle->dev); + &connection->bundle->dev); if (rc) { dev_err(&connection->bundle->dev, "failed to find %s firmware (%d)\n", firmware_name, rc); @@ -272,7 +272,7 @@ static int gb_bootrom_get_firmware(struct gb_operation *op) if (offset >= fw->size || size > fw->size - offset) { dev_warn(dev, "bad firmware request (offs = %u, size = %u)\n", - offset, size); +offset, size); ret = -EINVAL; goto unlock; } @@ -385,15 +385,15 @@ static int gb_bootrom_get_version(struct gb_bootrom *bootrom) sizeof(response)); if (ret) { dev_err(&bundle->dev, - "failed to get protocol version: %d\n", - ret); + "failed to get protocol version: %d\n", + ret); return ret; } if (response.major > request.major) { dev_err(&bundle->dev, - "unsupported major protocol version (%u > %u)\n", - response.major, request.major); + "unsupported major protocol version (%u > %u)\n", + response.major, request.major); return -ENOTSUPP; } @@ -401,13 +401,13 @@ static int gb_bootrom_get_version(struct gb_bootrom *bootrom) bootrom->protocol_minor = response.minor; dev_dbg(&bundle->dev, "%s - %u.%u\n", __func__, response.major, - response.minor); + response.minor); return 0; } static int gb_bootrom_probe(struct gb_bundle *bundle, - const struct greybus_bundle_id *id) + const struct greybus_bundle_id *id) { struct greybus_descriptor_cport *cport_desc; struct gb_connection *connection; @@ -426,8 +426,8 @@ static int gb_bootrom_probe(struct gb_bundle *bundle, return -ENOMEM; connection = gb_connection_create(bundle, - le16_to_cpu(cport_desc->id), - gb_bootrom_request_handler); + le16_to_cpu(cport_desc->id), + gb_bootrom_request_handler); if (IS_ERR(connection)) { ret = PTR_ERR(connection); goto err_free_bootrom; @@ -464,7 +464,7 @@ static int gb_bootrom_probe(struct gb_bundle *bundle, NULL, 0); if (ret) { dev_err(&connection->bundle->dev, - "failed to send AP READY: %d\n", ret); + "failed to send AP READY: %d\n", ret); goto err_cancel_timeout; } -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 11/14] staging: greybus: control: Remove multiple blank lines
From: Emmanuil Chatzipetru Fix coding style issue caught by checkpatch.pl related to the following warning: - CHECK: Please don't use multiple blank lines Signed-off-by: Emmanuil Chatzipetru --- drivers/staging/greybus/control.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/greybus/control.c b/drivers/staging/greybus/control.c index 4716190e740a..2d2ca3397395 100644 --- a/drivers/staging/greybus/control.c +++ b/drivers/staging/greybus/control.c @@ -16,7 +16,6 @@ #define GB_CONTROL_VERSION_MAJOR 0 #define GB_CONTROL_VERSION_MINOR 1 - static int gb_control_get_version(struct gb_control *control) { struct gb_interface *intf = control->connection->intf; -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 13/14] staging: greybus: core: Fix open parenthesis alingment
From: Emmanuil Chatzipetru Fix coding style issue caught by checkpatch.pl related to the following warning: - CHECK: Alignment should match open parenthesis Signed-off-by: Emmanuil Chatzipetru --- drivers/staging/greybus/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c index 1049e9c0edb0..d4df98c83a73 100644 --- a/drivers/staging/greybus/core.c +++ b/drivers/staging/greybus/core.c @@ -29,7 +29,7 @@ int greybus_disabled(void) EXPORT_SYMBOL_GPL(greybus_disabled); static bool greybus_match_one_id(struct gb_bundle *bundle, -const struct greybus_bundle_id *id) +const struct greybus_bundle_id *id) { if ((id->match_flags & GREYBUS_ID_MATCH_VENDOR) && (id->vendor != bundle->intf->vendor_id)) @@ -269,7 +269,7 @@ static int greybus_remove(struct device *dev) } int greybus_register_driver(struct greybus_driver *driver, struct module *owner, - const char *mod_name) + const char *mod_name) { int retval; -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 04/14] staging: greybus: arche-platform: Fix open parenthesis alignment.
From: Emmanuil Chatzipetru Fix coding style issue caught by checkpatch.pl related to the following warning: - CHECK: Alignment should match open parenthesis Signed-off-by: Emmanuil Chatzipetru --- drivers/staging/greybus/arche-platform.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c index 19bfce684335..b0882bb04551 100644 --- a/drivers/staging/greybus/arche-platform.c +++ b/drivers/staging/greybus/arche-platform.c @@ -348,7 +348,7 @@ static int arche_platform_coldboot_seq(struct arche_platform_drvdata *arche_pdat ret = clk_prepare_enable(arche_pdata->svc_ref_clk); if (ret) { dev_err(arche_pdata->dev, "failed to enable svc_ref_clk: %d\n", - ret); + ret); return ret; } @@ -383,7 +383,7 @@ static int arche_platform_fw_flashing_seq(struct arche_platform_drvdata *arche_p ret = clk_prepare_enable(arche_pdata->svc_ref_clk); if (ret) { dev_err(arche_pdata->dev, "failed to enable svc_ref_clk: %d\n", - ret); + ret); return ret; } @@ -424,8 +424,8 @@ static void arche_platform_poweroff_seq(struct arche_platform_drvdata *arche_pda arche_platform_set_state(arche_pdata, ARCHE_PLATFORM_STATE_OFF); } -static ssize_t state_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t count) +static ssize_t state_store(struct device *dev, struct device_attribute *attr, + const char *buf, size_t count) { struct platform_device *pdev = to_platform_device(dev); struct arche_platform_drvdata *arche_pdata = platform_get_drvdata(pdev); @@ -498,8 +498,8 @@ static ssize_t state_store(struct device *dev, return ret ? ret : count; } -static ssize_t state_show(struct device *dev, - struct device_attribute *attr, char *buf) +static ssize_t state_show(struct device *dev, struct device_attribute *attr, + char *buf) { struct arche_platform_drvdata *arche_pdata = dev_get_drvdata(dev); @@ -579,7 +579,7 @@ static int arche_platform_probe(struct platform_device *pdev) return ret; } ret = gpio_direction_output(arche_pdata->svc_reset_gpio, - arche_pdata->is_reset_act_hi); + arche_pdata->is_reset_act_hi); if (ret) { dev_err(dev, "failed to set svc-reset gpio dir:%d\n", ret); return ret; @@ -643,7 +643,7 @@ static int arche_platform_probe(struct platform_device *pdev) ret = devm_gpio_request(dev, arche_pdata->wake_detect_gpio, "wake detect"); if (ret) { dev_err(dev, "Failed requesting wake_detect gpio %d\n", - arche_pdata->wake_detect_gpio); + arche_pdata->wake_detect_gpio); return ret; } -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 09/14] staging: greybus: connection: fix open parenthesis alignment
From: Emmanuil Chatzipetru Fix coding style issue caught by checkpatch.pl related to the following warning: - CHECK: Alignment should match open parenthesis Signed-off-by: Emmanuil Chatzipetru --- drivers/staging/greybus/connection.c | 71 +- drivers/staging/greybus/power_supply.c | 2 +- 2 files changed, 36 insertions(+), 37 deletions(-) diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index 557075147f2d..e710d431f7b0 100644 --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -31,7 +31,7 @@ static bool gb_connection_cport_in_use(struct gb_interface *intf, u16 cport_id) list_for_each_entry(connection, &hd->connections, hd_links) { if (connection->intf == intf && - connection->intf_cport_id == cport_id) + connection->intf_cport_id == cport_id) return true; } @@ -79,7 +79,7 @@ gb_connection_hd_find(struct gb_host_device *hd, u16 cport_id) * received on the bundle. */ void greybus_data_rcvd(struct gb_host_device *hd, u16 cport_id, - u8 *data, size_t length) + u8 *data, size_t length) { struct gb_connection *connection; @@ -118,8 +118,8 @@ static void gb_connection_init_name(struct gb_connection *connection) cport_id = connection->intf_cport_id; } - snprintf(connection->name, sizeof(connection->name), - "%u/%u:%u", hd_cport_id, intf_id, cport_id); + snprintf(connection->name, sizeof(connection->name), "%u/%u:%u", +hd_cport_id, intf_id, cport_id); } /* @@ -147,10 +147,10 @@ static void gb_connection_init_name(struct gb_connection *connection) */ static struct gb_connection * _gb_connection_create(struct gb_host_device *hd, int hd_cport_id, - struct gb_interface *intf, - struct gb_bundle *bundle, int cport_id, - gb_request_handler_t handler, - unsigned long flags) + struct gb_interface *intf, + struct gb_bundle *bundle, int cport_id, + gb_request_handler_t handler, + unsigned long flags) { struct gb_connection *connection; int ret; @@ -231,7 +231,7 @@ _gb_connection_create(struct gb_host_device *hd, int hd_cport_id, struct gb_connection * gb_connection_create_static(struct gb_host_device *hd, u16 hd_cport_id, - gb_request_handler_t handler) + gb_request_handler_t handler) { return _gb_connection_create(hd, hd_cport_id, NULL, NULL, 0, handler, GB_CONNECTION_FLAG_HIGH_PRIO); @@ -247,7 +247,7 @@ gb_connection_create_control(struct gb_interface *intf) struct gb_connection * gb_connection_create(struct gb_bundle *bundle, u16 cport_id, - gb_request_handler_t handler) +gb_request_handler_t handler) { struct gb_interface *intf = bundle->intf; @@ -258,8 +258,8 @@ EXPORT_SYMBOL_GPL(gb_connection_create); struct gb_connection * gb_connection_create_flags(struct gb_bundle *bundle, u16 cport_id, - gb_request_handler_t handler, - unsigned long flags) + gb_request_handler_t handler, + unsigned long flags) { struct gb_interface *intf = bundle->intf; @@ -273,7 +273,7 @@ EXPORT_SYMBOL_GPL(gb_connection_create_flags); struct gb_connection * gb_connection_create_offloaded(struct gb_bundle *bundle, u16 cport_id, - unsigned long flags) + unsigned long flags) { flags |= GB_CONNECTION_FLAG_OFFLOADED; @@ -293,7 +293,7 @@ static int gb_connection_hd_cport_enable(struct gb_connection *connection) connection->flags); if (ret) { dev_err(&hd->dev, "%s: failed to enable host cport: %d\n", - connection->name, ret); + connection->name, ret); return ret; } @@ -311,7 +311,7 @@ static void gb_connection_hd_cport_disable(struct gb_connection *connection) ret = hd->driver->cport_disable(hd, connection->hd_cport_id); if (ret) { dev_err(&hd->dev, "%s: failed to disable host cport: %d\n", - connection->name, ret); + connection->name, ret); } } @@ -326,7 +326,7 @@ static int gb_connection_hd_cport_connected(struct gb_connection *connection) ret = hd->driver->cport_connected(hd, connection->hd_cport_id); if (re
[PATCH 12/14] staging: greybus: control: fix open parenthesis alingment
From: Emmanuil Chatzipetru Fix coding style issue caught by checkpatch.pl related to the following warning: - CHECK: Alignment should match open parenthesis Signed-off-by: Emmanuil Chatzipetru --- drivers/staging/greybus/control.c | 46 +++ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/drivers/staging/greybus/control.c b/drivers/staging/greybus/control.c index 2d2ca3397395..5e3bd969ba31 100644 --- a/drivers/staging/greybus/control.c +++ b/drivers/staging/greybus/control.c @@ -32,15 +32,15 @@ static int gb_control_get_version(struct gb_control *control) sizeof(response)); if (ret) { dev_err(&intf->dev, - "failed to get control-protocol version: %d\n", - ret); + "failed to get control-protocol version: %d\n", + ret); return ret; } if (response.major > request.major) { dev_err(&intf->dev, - "unsupported major control-protocol version (%u > %u)\n", - response.major, request.major); + "unsupported major control-protocol version (%u > %u)\n", + response.major, request.major); return -ENOTSUPP; } @@ -48,13 +48,13 @@ static int gb_control_get_version(struct gb_control *control) control->protocol_minor = response.minor; dev_dbg(&intf->dev, "%s - %u.%u\n", __func__, response.major, - response.minor); + response.minor); return 0; } static int gb_control_get_bundle_version(struct gb_control *control, - struct gb_bundle *bundle) +struct gb_bundle *bundle) { struct gb_interface *intf = control->connection->intf; struct gb_control_bundle_version_request request; @@ -69,8 +69,8 @@ static int gb_control_get_bundle_version(struct gb_control *control, &response, sizeof(response)); if (ret) { dev_err(&intf->dev, - "failed to get bundle %u class version: %d\n", - bundle->id, ret); + "failed to get bundle %u class version: %d\n", + bundle->id, ret); return ret; } @@ -78,7 +78,7 @@ static int gb_control_get_bundle_version(struct gb_control *control, bundle->class_minor = response.minor; dev_dbg(&intf->dev, "%s - %u: %u.%u\n", __func__, bundle->id, - response.major, response.minor); + response.major, response.minor); return 0; } @@ -112,7 +112,7 @@ int gb_control_get_manifest_size_operation(struct gb_interface *intf) NULL, 0, &response, sizeof(response)); if (ret) { dev_err(&connection->intf->dev, - "failed to get manifest size: %d\n", ret); + "failed to get manifest size: %d\n", ret); return ret; } @@ -149,16 +149,16 @@ int gb_control_disconnected_operation(struct gb_control *control, u16 cport_id) } int gb_control_disconnecting_operation(struct gb_control *control, - u16 cport_id) + u16 cport_id) { struct gb_control_disconnecting_request *request; struct gb_operation *operation; int ret; operation = gb_operation_create_core(control->connection, - GB_CONTROL_TYPE_DISCONNECTING, - sizeof(*request), 0, 0, - GFP_KERNEL); +GB_CONTROL_TYPE_DISCONNECTING, +sizeof(*request), 0, 0, +GFP_KERNEL); if (!operation) return -ENOMEM; @@ -168,7 +168,7 @@ int gb_control_disconnecting_operation(struct gb_control *control, ret = gb_operation_request_send_sync(operation); if (ret) { dev_err(&control->dev, "failed to send disconnecting: %d\n", - ret); + ret); } gb_operation_put(operation); @@ -450,7 +450,7 @@ int gb_control_interface_hibernate_abort(struct gb_control *control) } static ssize_t vendor_string_show(struct device *dev, - struct device_attribute *attr, char *buf) + struct device_attribute *attr, char *buf) { struct gb_control *control = to_gb_control(dev); @@ -459,7 +459,7 @@ static ssize_t vendor_string_show(struct device *dev, static
[PATCH 07/14] staging: greybus: camera: Fix open parenthesis alingment.
From: Emmanuil Chatzipetru Fix coding style issue caught by checkpatch.pl related to the following warning: - CHECK: Alignment should match open parenthesis Signed-off-by: Emmanuil Chatzipetru --- drivers/staging/greybus/camera.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c index 0ee291ca2c72..0c731153a4dc 100644 --- a/drivers/staging/greybus/camera.c +++ b/drivers/staging/greybus/camera.c @@ -842,8 +842,8 @@ static int gb_camera_op_configure_streams(void *priv, unsigned int *nstreams, } static int gb_camera_op_capture(void *priv, u32 request_id, - unsigned int streams, unsigned int num_frames, - size_t settings_size, const void *settings) + unsigned int streams, unsigned int num_frames, + size_t settings_size, const void *settings) { struct gb_camera *gcam = priv; @@ -870,7 +870,7 @@ static const struct gb_camera_ops gb_cam_ops = { */ static ssize_t gb_camera_debugfs_capabilities(struct gb_camera *gcam, - char *buf, size_t len) + char *buf, size_t len) { struct gb_camera_debugfs_buffer *buffer = &gcam->debugfs.buffers[GB_CAMERA_DEBUGFS_BUFFER_CAPABILITIES]; @@ -906,7 +906,7 @@ static ssize_t gb_camera_debugfs_capabilities(struct gb_camera *gcam, } static ssize_t gb_camera_debugfs_configure_streams(struct gb_camera *gcam, - char *buf, size_t len) + char *buf, size_t len) { struct gb_camera_debugfs_buffer *buffer = &gcam->debugfs.buffers[GB_CAMERA_DEBUGFS_BUFFER_STREAMS]; @@ -1000,7 +1000,7 @@ static ssize_t gb_camera_debugfs_configure_streams(struct gb_camera *gcam, }; static ssize_t gb_camera_debugfs_capture(struct gb_camera *gcam, - char *buf, size_t len) +char *buf, size_t len) { unsigned int request_id; unsigned int streams_mask; @@ -1041,7 +1041,7 @@ static ssize_t gb_camera_debugfs_capture(struct gb_camera *gcam, } static ssize_t gb_camera_debugfs_flush(struct gb_camera *gcam, - char *buf, size_t len) + char *buf, size_t len) { struct gb_camera_debugfs_buffer *buffer = &gcam->debugfs.buffers[GB_CAMERA_DEBUGFS_BUFFER_FLUSH]; -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 14/14] staging: greybus: core: Fix NULL comparison to preferred style.
From: Emmanuil Chatzipetru Fix coding style issue caught by checkpatch.pl related to the following warning: - CHECK: Comparison to NULL could be written "!id" Signed-off-by: Emmanuil Chatzipetru --- drivers/staging/greybus/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c index d4df98c83a73..5f9412c51dae 100644 --- a/drivers/staging/greybus/core.c +++ b/drivers/staging/greybus/core.c @@ -49,7 +49,7 @@ static bool greybus_match_one_id(struct gb_bundle *bundle, static const struct greybus_bundle_id * greybus_match_id(struct gb_bundle *bundle, const struct greybus_bundle_id *id) { - if (id == NULL) + if (!id) return NULL; for (; id->vendor || id->product || id->class || id->driver_info; -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel