All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] staging: greybus: Correct code style issues
@ 2017-10-20  0:06 Frank A. Cancio Bello
  2017-10-20  0:06 ` [PATCH 1/6] staging: greybus: Remove unnecessary blank lines Frank A. Cancio Bello
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Frank A. Cancio Bello @ 2017-10-20  0:06 UTC (permalink / raw)
  To: pablo, Julia.Lawall
  Cc: Johan Hovold, Alex Elder, Greg Kroah-Hartman, outreachy-kernel

This patchset address code style issues with blank lines, aligment,
spacing. Beside it change 'var_name == NULL' by '!var_name' and use
kernel type instead of C99 types.

Frank A. Cancio Bello (6):
  staging: greybus: Remove unnecessary blank lines
  staging: greybus: Fix alignment issues
  staging: greybus: Use u32 instead of uint32_t
  staging: greybus: Add space around ternary operator
  staging: greybus: Move logical operator in previous line
  staging: greybus: Rewrite NULL comparisons

 drivers/staging/greybus/arche-apb-ctrl.c | 37 +++++++++++----------
 drivers/staging/greybus/arche-platform.c | 10 +++---
 drivers/staging/greybus/audio_codec.c    | 23 ++++++-------
 drivers/staging/greybus/audio_codec.h    |  2 +-
 drivers/staging/greybus/audio_module.c   |  4 +--
 drivers/staging/greybus/audio_topology.c | 55 ++++++++++++++++----------------
 drivers/staging/greybus/authentication.c |  2 +-
 drivers/staging/greybus/bootrom.c        | 20 ++++++------
 drivers/staging/greybus/bundle.c         |  2 +-
 drivers/staging/greybus/camera.c         | 16 +++++-----
 drivers/staging/greybus/connection.c     |  4 ---
 drivers/staging/greybus/control.c        |  1 -
 drivers/staging/greybus/core.c           |  2 +-
 13 files changed, 84 insertions(+), 94 deletions(-)

-- 
2.7.4



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/6] staging: greybus: Remove unnecessary blank lines
  2017-10-20  0:06 [PATCH 0/6] staging: greybus: Correct code style issues Frank A. Cancio Bello
@ 2017-10-20  0:06 ` Frank A. Cancio Bello
  2017-10-21 10:09   ` Johan Hovold
  2017-10-20  0:22 ` [PATCH 2/6] staging: greybus: Fix alignment issues Frank A. Cancio Bello
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 9+ messages in thread
From: Frank A. Cancio Bello @ 2017-10-20  0:06 UTC (permalink / raw)
  To: pablo, Julia.Lawall
  Cc: Johan Hovold, Alex Elder, Greg Kroah-Hartman, outreachy-kernel

Remove unnecessary blank lines to reduce file length and address
checkpatch messages:
CHECK: Please don't use multiple blank lines
CHECK: Blank lines aren't necessary before a close brace '}'

Signed-off-by: Frank A. Cancio Bello <frank@generalsoftwareinc.com>
---
 drivers/staging/greybus/arche-apb-ctrl.c | 1 -
 drivers/staging/greybus/audio_codec.c    | 3 ---
 drivers/staging/greybus/audio_topology.c | 1 -
 drivers/staging/greybus/connection.c     | 4 ----
 drivers/staging/greybus/control.c        | 1 -
 5 files changed, 10 deletions(-)

diff --git a/drivers/staging/greybus/arche-apb-ctrl.c b/drivers/staging/greybus/arche-apb-ctrl.c
index 0412f3d..4d75f2e 100644
--- a/drivers/staging/greybus/arche-apb-ctrl.c
+++ b/drivers/staging/greybus/arche-apb-ctrl.c
@@ -21,7 +21,6 @@
 #include <linux/spinlock.h>
 #include "arche_platform.h"
 
-
 static void apb_bootret_deassert(struct device *dev);
 
 struct arche_apb_ctrl_drvdata {
diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c
index a6d01f0..0ce0b8c 100644
--- a/drivers/staging/greybus/audio_codec.c
+++ b/drivers/staging/greybus/audio_codec.c
@@ -588,7 +588,6 @@ static int gbcodec_mute_stream(struct snd_soc_dai *dai, int mute, int stream)
 	struct gbaudio_codec_info *codec = dev_get_drvdata(dai->dev);
 	struct gbaudio_stream_params *params;
 
-
 	dev_dbg(dai->dev, "Mute:%d, Direction:%s\n", mute,
 		stream ? "CAPTURE":"PLAYBACK");
 
@@ -908,7 +907,6 @@ static void gbaudio_codec_clean_data_rx(struct gbaudio_data_connection *data)
 	data->state[1] = GBAUDIO_CODEC_SHUTDOWN;
 }
 
-
 static void gbaudio_codec_cleanup(struct gbaudio_module_info *module)
 {
 	struct gbaudio_data_connection *data;
@@ -924,7 +922,6 @@ static void gbaudio_codec_cleanup(struct gbaudio_module_info *module)
 
 		if (cap_state > GBAUDIO_CODEC_SHUTDOWN)
 			gbaudio_codec_clean_data_rx(data);
-
 	}
 }
 
diff --git a/drivers/staging/greybus/audio_topology.c b/drivers/staging/greybus/audio_topology.c
index 07fac39..be71124 100644
--- a/drivers/staging/greybus/audio_topology.c
+++ b/drivers/staging/greybus/audio_topology.c
@@ -924,7 +924,6 @@ static int gbaudio_tplg_create_wcontrol(struct gbaudio_module_info *gb,
 		break;
 	default:
 		return -EINVAL;
-
 	}
 
 	dev_dbg(gb->dev, "%s:%d DAPM control created, ret:%d\n", ctl->name,
diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c
index 2cf6464..cb96877 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_TIMEOUT	1000
 
-
 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)
 {
diff --git a/drivers/staging/greybus/control.c b/drivers/staging/greybus/control.c
index 5b30be3..590f540 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.7.4



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/6] staging: greybus: Fix alignment issues
  2017-10-20  0:06 [PATCH 0/6] staging: greybus: Correct code style issues Frank A. Cancio Bello
  2017-10-20  0:06 ` [PATCH 1/6] staging: greybus: Remove unnecessary blank lines Frank A. Cancio Bello
@ 2017-10-20  0:22 ` Frank A. Cancio Bello
  2017-10-20  0:22 ` [PATCH 3/6] staging: greybus: Use u32 instead of uint32_t Frank A. Cancio Bello
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Frank A. Cancio Bello @ 2017-10-20  0:22 UTC (permalink / raw)
  To: pablo, Julia.Lawall
  Cc: Johan Hovold, Alex Elder, Greg Kroah-Hartman, outreachy-kernel

Fix alignment to match open parenthesis and comply in with the preferred
coding style for the linux kernel.

The 'checkpatch' message was:
'CHECK: Alignment should match open parenthesis'

Signed-off-by: Frank A. Cancio Bello <frank@generalsoftwareinc.com>
---
 drivers/staging/greybus/arche-apb-ctrl.c | 36 ++++++++++-----------
 drivers/staging/greybus/arche-platform.c | 10 +++---
 drivers/staging/greybus/audio_codec.c    |  6 ++--
 drivers/staging/greybus/audio_codec.h    |  2 +-
 drivers/staging/greybus/audio_module.c   |  4 +--
 drivers/staging/greybus/audio_topology.c | 54 ++++++++++++++++----------------
 drivers/staging/greybus/authentication.c |  2 +-
 drivers/staging/greybus/bootrom.c        | 20 ++++++------
 8 files changed, 67 insertions(+), 67 deletions(-)

diff --git a/drivers/staging/greybus/arche-apb-ctrl.c b/drivers/staging/greybus/arche-apb-ctrl.c
index 4d75f2e..4b03fbc 100644
--- a/drivers/staging/greybus/arche-apb-ctrl.c
+++ b/drivers/staging/greybus/arche-apb-ctrl.c
@@ -72,14 +72,14 @@ static int coldboot_seq(struct platform_device *pdev)
 	int ret;
 
 	if (apb->init_disabled ||
-			apb->state == ARCHE_PLATFORM_STATE_ACTIVE)
+	    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 */
@@ -122,7 +122,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);
@@ -146,7 +146,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);
@@ -174,11 +174,11 @@ static int standby_boot_seq(struct platform_device *pdev)
 	 * 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);
 
 	/*
@@ -203,7 +203,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 */
@@ -297,7 +297,7 @@ static ssize_t state_store(struct device *dev,
 }
 
 static ssize_t state_show(struct device *dev,
-		struct device_attribute *attr, char *buf)
+			  struct device_attribute *attr, char *buf)
 {
 	struct arche_apb_ctrl_drvdata *apb = dev_get_drvdata(dev);
 
@@ -319,7 +319,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;
@@ -331,10 +331,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;
 	}
 
@@ -344,10 +344,10 @@ static int apb_ctrl_get_devtree_data(struct platform_device *pdev,
 		return apb->boot_ret_gpio;
 	}
 	ret = devm_gpio_request_one(dev, apb->boot_ret_gpio,
-			GPIOF_OUT_INIT_LOW, "boot retention");
+				    GPIOF_OUT_INIT_LOW, "boot retention");
 	if (ret) {
 		dev_err(dev, "Failed requesting bootret gpio %d\n",
-				apb->boot_ret_gpio);
+			apb->boot_ret_gpio);
 		return ret;
 	}
 
@@ -358,10 +358,10 @@ static int apb_ctrl_get_devtree_data(struct platform_device *pdev,
 		return apb->pwroff_gpio;
 	}
 	ret = devm_gpio_request_one(dev, apb->pwroff_gpio,
-			GPIOF_IN, "pwroff_n");
+				    GPIOF_IN, "pwroff_n");
 	if (ret) {
 		dev_err(dev, "Failed requesting pwroff_n gpio %d\n",
-				apb->pwroff_gpio);
+			apb->pwroff_gpio);
 		return ret;
 	}
 
@@ -371,10 +371,10 @@ static int apb_ctrl_get_devtree_data(struct platform_device *pdev,
 		dev_warn(dev, "failed to get clock en gpio\n");
 	} else if (gpio_is_valid(apb->clk_en_gpio)) {
 		ret = devm_gpio_request_one(dev, apb->clk_en_gpio,
-				GPIOF_OUT_INIT_LOW, "apb_clk_en");
+					    GPIOF_OUT_INIT_LOW, "apb_clk_en");
 		if (ret) {
 			dev_warn(dev, "Failed requesting APB clock en gpio %d\n",
-					apb->clk_en_gpio);
+				 apb->clk_en_gpio);
 			return ret;
 		}
 	}
@@ -407,7 +407,7 @@ static int apb_ctrl_get_devtree_data(struct platform_device *pdev,
 	apb->spi_en_gpio = of_get_named_gpio(np, "spi-en-gpio", 0);
 	if (apb->spi_en_gpio >= 0) {
 		if (of_property_read_bool(pdev->dev.of_node,
-					"spi-en-active-high"))
+					  "spi-en-active-high"))
 			apb->spi_en_polarity_high = true;
 	}
 
diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
index 21ac92d..791c564 100644
--- a/drivers/staging/greybus/arche-platform.c
+++ b/drivers/staging/greybus/arche-platform.c
@@ -234,7 +234,7 @@ arche_platform_coldboot_seq(struct arche_platform_drvdata *arche_pdata)
 	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;
 	}
 
@@ -270,7 +270,7 @@ arche_platform_fw_flashing_seq(struct arche_platform_drvdata *arche_pdata)
 	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;
 	}
 
@@ -377,7 +377,7 @@ static ssize_t state_store(struct device *dev,
 }
 
 static ssize_t state_show(struct device *dev,
-		struct device_attribute *attr, char *buf)
+			  struct device_attribute *attr, char *buf)
 {
 	struct arche_platform_drvdata *arche_pdata = dev_get_drvdata(dev);
 
@@ -458,7 +458,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;
@@ -526,7 +526,7 @@ static int arche_platform_probe(struct platform_device *pdev)
 				"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;
 	}
 
diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c
index 0ce0b8c..b5e4fe1 100644
--- a/drivers/staging/greybus/audio_codec.c
+++ b/drivers/staging/greybus/audio_codec.c
@@ -568,7 +568,7 @@ static int gbcodec_prepare(struct snd_pcm_substream *substream,
 	if (ret) {
 		mutex_unlock(&codec->lock);
 		dev_err_ratelimited(dai->dev, "set_data_size failed:%d\n",
-				     ret);
+				    ret);
 		return ret;
 	}
 
@@ -827,7 +827,7 @@ int gbaudio_register_module(struct gbaudio_module_info *module)
 					  module->num_dapm_widgets);
 	if (module->controls)
 		snd_soc_add_codec_controls(codec, module->controls,
-				     module->num_controls);
+					   module->num_controls);
 	if (module->dapm_routes)
 		snd_soc_dapm_add_routes(&codec->dapm, module->dapm_routes,
 					module->num_dapm_routes);
@@ -970,7 +970,7 @@ void gbaudio_unregister_module(struct gbaudio_module_info *module)
 		dev_dbg(codec->dev, "Removing %d controls\n",
 			module->num_controls);
 		snd_soc_remove_codec_controls(codec, module->controls,
-					  module->num_controls);
+					      module->num_controls);
 	}
 	if (module->dapm_widgets) {
 		dev_dbg(codec->dev, "Removing %d widgets\n",
diff --git a/drivers/staging/greybus/audio_codec.h b/drivers/staging/greybus/audio_codec.h
index 6fb064c..32aac14 100644
--- a/drivers/staging/greybus/audio_codec.h
+++ b/drivers/staging/greybus/audio_codec.h
@@ -160,7 +160,7 @@ struct gbaudio_module_info {
 };
 
 int gbaudio_tplg_parse_data(struct gbaudio_module_info *module,
-			       struct gb_audio_topology *tplg_data);
+			    struct gb_audio_topology *tplg_data);
 void gbaudio_tplg_release(struct gbaudio_module_info *module);
 
 int gbaudio_module_update(struct gbaudio_codec_info *codec,
diff --git a/drivers/staging/greybus/audio_module.c b/drivers/staging/greybus/audio_module.c
index 094c3be..f424d715 100644
--- a/drivers/staging/greybus/audio_module.c
+++ b/drivers/staging/greybus/audio_module.c
@@ -19,7 +19,7 @@
  */
 
 static int gbaudio_request_jack(struct gbaudio_module_info *module,
-				  struct gb_audio_jack_event_request *req)
+				struct gb_audio_jack_event_request *req)
 {
 	int report;
 	struct snd_jack *jack = module->headset_jack.jack;
@@ -318,7 +318,7 @@ static int gb_audio_probe(struct gb_bundle *bundle,
 	ret = gbaudio_tplg_parse_data(gbmodule, topology);
 	if (ret) {
 		dev_err(dev, "%d:Error while parsing topology data\n",
-			  ret);
+			ret);
 		goto free_topology;
 	}
 	gbmodule->topology = topology;
diff --git a/drivers/staging/greybus/audio_topology.c b/drivers/staging/greybus/audio_topology.c
index be71124..155e70e 100644
--- a/drivers/staging/greybus/audio_topology.c
+++ b/drivers/staging/greybus/audio_topology.c
@@ -159,7 +159,7 @@ static const char **gb_generate_enum_strings(struct gbaudio_module_info *gb,
 }
 
 static int gbcodec_mixer_ctl_info(struct snd_kcontrol *kcontrol,
-		     struct snd_ctl_elem_info *uinfo)
+				  struct snd_ctl_elem_info *uinfo)
 {
 	unsigned int max;
 	const char *name;
@@ -210,7 +210,7 @@ static int gbcodec_mixer_ctl_info(struct snd_kcontrol *kcontrol,
 }
 
 static int gbcodec_mixer_ctl_get(struct snd_kcontrol *kcontrol,
-	struct snd_ctl_elem_value *ucontrol)
+				 struct snd_ctl_elem_value *ucontrol)
 {
 	int ret;
 	struct gb_audio_ctl_elem_info *info;
@@ -272,7 +272,7 @@ static int gbcodec_mixer_ctl_get(struct snd_kcontrol *kcontrol,
 }
 
 static int gbcodec_mixer_ctl_put(struct snd_kcontrol *kcontrol,
-			      struct snd_ctl_elem_value *ucontrol)
+				 struct snd_ctl_elem_value *ucontrol)
 {
 	int ret = 0;
 	struct gb_audio_ctl_elem_info *info;
@@ -348,7 +348,7 @@ static int gbcodec_mixer_ctl_put(struct snd_kcontrol *kcontrol,
  * of DAPM related sequencing, etc.
  */
 static int gbcodec_mixer_dapm_ctl_info(struct snd_kcontrol *kcontrol,
-		     struct snd_ctl_elem_info *uinfo)
+				       struct snd_ctl_elem_info *uinfo)
 {
 	int platform_max, platform_min;
 	struct gbaudio_ctl_pvt *data;
@@ -379,7 +379,7 @@ static int gbcodec_mixer_dapm_ctl_info(struct snd_kcontrol *kcontrol,
 }
 
 static int gbcodec_mixer_dapm_ctl_get(struct snd_kcontrol *kcontrol,
-	struct snd_ctl_elem_value *ucontrol)
+				      struct snd_ctl_elem_value *ucontrol)
 {
 	int ret;
 	struct gb_audio_ctl_elem_info *info;
@@ -428,7 +428,7 @@ static int gbcodec_mixer_dapm_ctl_get(struct snd_kcontrol *kcontrol,
 }
 
 static int gbcodec_mixer_dapm_ctl_put(struct snd_kcontrol *kcontrol,
-			      struct snd_ctl_elem_value *ucontrol)
+				      struct snd_ctl_elem_value *ucontrol)
 {
 	int ret, wi, max, connect;
 	unsigned int mask, val;
@@ -502,7 +502,7 @@ static int gbcodec_mixer_dapm_ctl_put(struct snd_kcontrol *kcontrol,
 	.private_value = (unsigned long)data}
 
 static int gbcodec_event_spk(struct snd_soc_dapm_widget *w,
-					struct snd_kcontrol *k, int event)
+			     struct snd_kcontrol *k, int event)
 {
 	/* Ensure GB speaker is connected */
 
@@ -510,7 +510,7 @@ static int gbcodec_event_spk(struct snd_soc_dapm_widget *w,
 }
 
 static int gbcodec_event_hp(struct snd_soc_dapm_widget *w,
-					struct snd_kcontrol *k, int event)
+			    struct snd_kcontrol *k, int event)
 {
 	/* Ensure GB module supports jack slot */
 
@@ -518,7 +518,7 @@ static int gbcodec_event_hp(struct snd_soc_dapm_widget *w,
 }
 
 static int gbcodec_event_int_mic(struct snd_soc_dapm_widget *w,
-					struct snd_kcontrol *k, int event)
+				 struct snd_kcontrol *k, int event)
 {
 	/* Ensure GB module supports jack slot */
 
@@ -665,7 +665,7 @@ static int gbaudio_tplg_create_enum_kctl(struct gbaudio_module_info *gb,
 
 	/* debug enum info */
 	dev_dbg(gb->dev, "Max:%d, name_length:%d\n", gbe->max,
-		 le16_to_cpu(gb_enum->names_length));
+		le16_to_cpu(gb_enum->names_length));
 	for (i = 0; i < gbe->max; i++)
 		dev_dbg(gb->dev, "src[%d]: %s\n", i, gbe->texts[i]);
 
@@ -885,8 +885,8 @@ static int gbaudio_tplg_create_enum_ctl(struct gbaudio_module_info *gb,
 }
 
 static int gbaudio_tplg_create_mixer_ctl(struct gbaudio_module_info *gb,
-					     struct snd_kcontrol_new *kctl,
-					     struct gb_audio_control *ctl)
+					 struct snd_kcontrol_new *kctl,
+					 struct gb_audio_control *ctl)
 {
 	struct gbaudio_ctl_pvt *ctldata;
 
@@ -906,8 +906,8 @@ static int gbaudio_tplg_create_mixer_ctl(struct gbaudio_module_info *gb,
 }
 
 static int gbaudio_tplg_create_wcontrol(struct gbaudio_module_info *gb,
-					     struct snd_kcontrol_new *kctl,
-					     struct gb_audio_control *ctl)
+					struct snd_kcontrol_new *kctl,
+					struct gb_audio_control *ctl)
 {
 	int ret;
 
@@ -1100,16 +1100,16 @@ static int gbaudio_tplg_create_widget(struct gbaudio_module_info *module,
 	case snd_soc_dapm_mixer:
 		*dw = (struct snd_soc_dapm_widget)
 			SND_SOC_DAPM_MIXER_E(w->name, SND_SOC_NOPM, 0, 0, NULL,
-					   0, gbaudio_widget_event,
-					   SND_SOC_DAPM_PRE_PMU |
-					   SND_SOC_DAPM_POST_PMD);
+					     0, gbaudio_widget_event,
+					     SND_SOC_DAPM_PRE_PMU |
+					     SND_SOC_DAPM_POST_PMD);
 		break;
 	case snd_soc_dapm_mux:
 		*dw = (struct snd_soc_dapm_widget)
 			SND_SOC_DAPM_MUX_E(w->name, SND_SOC_NOPM, 0, 0,
-					 widget_kctls, gbaudio_widget_event,
-					 SND_SOC_DAPM_PRE_PMU |
-					 SND_SOC_DAPM_POST_PMD);
+					   widget_kctls, gbaudio_widget_event,
+					   SND_SOC_DAPM_PRE_PMU |
+					   SND_SOC_DAPM_POST_PMD);
 		break;
 	case snd_soc_dapm_aif_in:
 		*dw = (struct snd_soc_dapm_widget)
@@ -1145,7 +1145,7 @@ static int gbaudio_tplg_create_widget(struct gbaudio_module_info *module,
 }
 
 static int gbaudio_tplg_process_kcontrols(struct gbaudio_module_info *module,
-				   struct gb_audio_control *controls)
+					  struct gb_audio_control *controls)
 {
 	int i, csize, ret;
 	struct snd_kcontrol_new *dapm_kctls;
@@ -1215,7 +1215,7 @@ static int gbaudio_tplg_process_kcontrols(struct gbaudio_module_info *module,
 }
 
 static int gbaudio_tplg_process_widgets(struct gbaudio_module_info *module,
-				   struct gb_audio_widget *widgets)
+					struct gb_audio_widget *widgets)
 {
 	int i, ret, w_size;
 	struct snd_soc_dapm_widget *dapm_widgets;
@@ -1264,7 +1264,7 @@ static int gbaudio_tplg_process_widgets(struct gbaudio_module_info *module,
 }
 
 static int gbaudio_tplg_process_routes(struct gbaudio_module_info *module,
-				   struct gb_audio_route *routes)
+				       struct gb_audio_route *routes)
 {
 	int i, ret;
 	struct snd_soc_dapm_route *dapm_routes;
@@ -1300,8 +1300,8 @@ static int gbaudio_tplg_process_routes(struct gbaudio_module_info *module,
 		}
 		dapm_routes->control =
 			gbaudio_map_controlid(module,
-						      curr->control_id,
-						      curr->index);
+					      curr->control_id,
+					      curr->index);
 		if ((curr->control_id !=  GBAUDIO_INVALID_ID) &&
 		    !dapm_routes->control) {
 			dev_err(module->dev, "%d:%d:%d:%d - Invalid control\n",
@@ -1325,7 +1325,7 @@ static int gbaudio_tplg_process_routes(struct gbaudio_module_info *module,
 }
 
 static int gbaudio_tplg_process_header(struct gbaudio_module_info *module,
-				 struct gb_audio_topology *tplg_data)
+				       struct gb_audio_topology *tplg_data)
 {
 	/* fetch no. of kcontrols, widgets & routes */
 	module->num_controls = tplg_data->num_controls;
@@ -1351,7 +1351,7 @@ static int gbaudio_tplg_process_header(struct gbaudio_module_info *module,
 }
 
 int gbaudio_tplg_parse_data(struct gbaudio_module_info *module,
-			       struct gb_audio_topology *tplg_data)
+			    struct gb_audio_topology *tplg_data)
 {
 	int ret;
 	struct gb_audio_control *controls;
diff --git a/drivers/staging/greybus/authentication.c b/drivers/staging/greybus/authentication.c
index 6c5dcb1..e0d67c2 100644
--- a/drivers/staging/greybus/authentication.c
+++ b/drivers/staging/greybus/authentication.c
@@ -203,7 +203,7 @@ static int cap_release(struct inode *inode, struct file *file)
 }
 
 static int cap_ioctl(struct gb_cap *cap, unsigned int cmd,
-			 void __user *buf)
+		     void __user *buf)
 {
 	struct cap_ioc_get_endpoint_uid endpoint_uid;
 	struct cap_ioc_get_ims_certificate *ims_cert;
diff --git a/drivers/staging/greybus/bootrom.c b/drivers/staging/greybus/bootrom.c
index 06df0ce..befbaf0c 100644
--- a/drivers/staging/greybus/bootrom.c
+++ b/drivers/staging/greybus/bootrom.c
@@ -176,7 +176,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);
@@ -275,7 +275,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;
 	}
@@ -388,15 +388,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;
 	}
 
@@ -404,13 +404,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;
@@ -429,7 +429,7 @@ static int gb_bootrom_probe(struct gb_bundle *bundle,
 		return -ENOMEM;
 
 	connection = gb_connection_create(bundle,
-						le16_to_cpu(cport_desc->id),
+					  le16_to_cpu(cport_desc->id),
 						gb_bootrom_request_handler);
 	if (IS_ERR(connection)) {
 		ret = PTR_ERR(connection);
@@ -467,7 +467,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.7.4



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/6] staging: greybus: Use u32 instead of uint32_t
  2017-10-20  0:06 [PATCH 0/6] staging: greybus: Correct code style issues Frank A. Cancio Bello
  2017-10-20  0:06 ` [PATCH 1/6] staging: greybus: Remove unnecessary blank lines Frank A. Cancio Bello
  2017-10-20  0:22 ` [PATCH 2/6] staging: greybus: Fix alignment issues Frank A. Cancio Bello
@ 2017-10-20  0:22 ` Frank A. Cancio Bello
  2017-10-20  0:23 ` [PATCH 4/6] staging: greybus: Add space around ternary operator Frank A. Cancio Bello
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Frank A. Cancio Bello @ 2017-10-20  0:22 UTC (permalink / raw)
  To: pablo, Julia.Lawall
  Cc: Johan Hovold, Alex Elder, Greg Kroah-Hartman, outreachy-kernel

Use 'u32' kernel types instead of 'uint32_t'.

Detected by checkpatch with the message:
CHECK: Prefer kernel type 'u32' over 'uint32_t'

Signed-off-by: Frank A. Cancio Bello <frank@generalsoftwareinc.com>
---
 drivers/staging/greybus/audio_codec.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c
index b5e4fe1..3b47d51 100644
--- a/drivers/staging/greybus/audio_codec.c
+++ b/drivers/staging/greybus/audio_codec.c
@@ -48,7 +48,7 @@ static int gbaudio_module_enable_tx(struct gbaudio_codec_info *codec,
 	int module_state, ret = 0;
 	u16 data_cport, i2s_port, cportid;
 	u8 sig_bits, channels;
-	uint32_t format, rate;
+	u32 format, rate;
 	struct gbaudio_data_connection *data;
 	struct gbaudio_stream_params *params;
 
@@ -183,7 +183,7 @@ static int gbaudio_module_enable_rx(struct gbaudio_codec_info *codec,
 	int module_state, ret = 0;
 	u16 data_cport, i2s_port, cportid;
 	u8 sig_bits, channels;
-	uint32_t format, rate;
+	u32 format, rate;
 	struct gbaudio_data_connection *data;
 	struct gbaudio_stream_params *params;
 
@@ -413,7 +413,7 @@ static int gbcodec_hw_params(struct snd_pcm_substream *substream,
 {
 	int ret;
 	u8 sig_bits, channels;
-	uint32_t format, rate;
+	u32 format, rate;
 	struct gbaudio_module_info *module;
 	struct gbaudio_data_connection *data;
 	struct gb_bundle *bundle;
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/6] staging: greybus: Add space around ternary operator
  2017-10-20  0:06 [PATCH 0/6] staging: greybus: Correct code style issues Frank A. Cancio Bello
                   ` (2 preceding siblings ...)
  2017-10-20  0:22 ` [PATCH 3/6] staging: greybus: Use u32 instead of uint32_t Frank A. Cancio Bello
@ 2017-10-20  0:23 ` Frank A. Cancio Bello
  2017-10-20  0:24 ` [PATCH 5/6] staging: greybus: Move logical operator in previous line Frank A. Cancio Bello
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Frank A. Cancio Bello @ 2017-10-20  0:23 UTC (permalink / raw)
  To: pablo, Julia.Lawall
  Cc: Johan Hovold, Alex Elder, Greg Kroah-Hartman, outreachy-kernel

Use one space around ternary operator to comply in with the preferred
coding style for the linux kernel. Detected by checkpatch with message:
CHECK: spaces required around that ':' (ctx:VxV)

Signed-off-by: Frank A. Cancio Bello <frank@generalsoftwareinc.com>
---
 drivers/staging/greybus/audio_codec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c
index 3b47d51..003a84a 100644
--- a/drivers/staging/greybus/audio_codec.c
+++ b/drivers/staging/greybus/audio_codec.c
@@ -320,7 +320,7 @@ int gbaudio_module_update(struct gbaudio_codec_info *codec,
 	char intf_name[NAME_SIZE], dir[NAME_SIZE];
 
 	dev_dbg(module->dev, "%s:Module update %s sequence\n", w->name,
-		enable ? "Enable":"Disable");
+		enable ? "Enable" : "Disable");
 
 	if ((w->id != snd_soc_dapm_aif_in) && (w->id != snd_soc_dapm_aif_out)) {
 		dev_dbg(codec->dev, "No action required for %s\n", w->name);
@@ -589,7 +589,7 @@ static int gbcodec_mute_stream(struct snd_soc_dai *dai, int mute, int stream)
 	struct gbaudio_stream_params *params;
 
 	dev_dbg(dai->dev, "Mute:%d, Direction:%s\n", mute,
-		stream ? "CAPTURE":"PLAYBACK");
+		stream ? "CAPTURE" : "PLAYBACK");
 
 	mutex_lock(&codec->lock);
 
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 5/6] staging: greybus: Move logical operator in previous line
  2017-10-20  0:06 [PATCH 0/6] staging: greybus: Correct code style issues Frank A. Cancio Bello
                   ` (3 preceding siblings ...)
  2017-10-20  0:23 ` [PATCH 4/6] staging: greybus: Add space around ternary operator Frank A. Cancio Bello
@ 2017-10-20  0:24 ` Frank A. Cancio Bello
  2017-10-20  0:26 ` [PATCH 6/6] staging: greybus: Rewrite NULL comparisons Frank A. Cancio Bello
  2017-10-21 10:07 ` [PATCH 0/6] staging: greybus: Correct code style issues Johan Hovold
  6 siblings, 0 replies; 9+ messages in thread
From: Frank A. Cancio Bello @ 2017-10-20  0:24 UTC (permalink / raw)
  To: pablo, Julia.Lawall
  Cc: Johan Hovold, Alex Elder, Greg Kroah-Hartman, outreachy-kernel

Reorganize the if condition line so logical continuation fall in the
previous line to meet the preferred coding style for the linux kernel.

Detected by checkpatch with message:
CHECK: Logical continuations should be on the previous line

Signed-off-by: Frank A. Cancio Bello <frank@generalsoftwareinc.com>
---
 drivers/staging/greybus/audio_codec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c
index 003a84a..e940388 100644
--- a/drivers/staging/greybus/audio_codec.c
+++ b/drivers/staging/greybus/audio_codec.c
@@ -842,8 +842,8 @@ int gbaudio_register_module(struct gbaudio_module_info *module)
 		 * from codec->jack_list
 		 */
 		list_for_each_entry(jack, &codec->jack_list, list) {
-			if ((jack == &module->headset_jack)
-			    || (jack == &module->button_jack))
+			if (jack == &module->headset_jack ||
+			    jack == &module->button_jack)
 				snd_device_register(codec->card->snd_card,
 						    jack->jack);
 		}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 6/6] staging: greybus: Rewrite NULL comparisons
  2017-10-20  0:06 [PATCH 0/6] staging: greybus: Correct code style issues Frank A. Cancio Bello
                   ` (4 preceding siblings ...)
  2017-10-20  0:24 ` [PATCH 5/6] staging: greybus: Move logical operator in previous line Frank A. Cancio Bello
@ 2017-10-20  0:26 ` Frank A. Cancio Bello
  2017-10-21 10:07 ` [PATCH 0/6] staging: greybus: Correct code style issues Johan Hovold
  6 siblings, 0 replies; 9+ messages in thread
From: Frank A. Cancio Bello @ 2017-10-20  0:26 UTC (permalink / raw)
  To: pablo, Julia.Lawall
  Cc: Johan Hovold, Alex Elder, Greg Kroah-Hartman, outreachy-kernel

Make NULL comparisons shortest and quicker to read changing
'var_name == NULL' by '!var_name'.

Detected by checkpatch with messages like:
CHECK: Comparison to NULL could be written "!id"

Signed-off-by: Frank A. Cancio Bello <frank@generalsoftwareinc.com>
---
 drivers/staging/greybus/bundle.c |  2 +-
 drivers/staging/greybus/camera.c | 16 ++++++++--------
 drivers/staging/greybus/core.c   |  2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/greybus/bundle.c b/drivers/staging/greybus/bundle.c
index d2ef57d..fc5c186 100644
--- a/drivers/staging/greybus/bundle.c
+++ b/drivers/staging/greybus/bundle.c
@@ -33,7 +33,7 @@ static ssize_t state_show(struct device *dev, struct device_attribute *attr,
 {
 	struct gb_bundle *bundle = to_gb_bundle(dev);
 
-	if (bundle->state == NULL)
+	if (!bundle->state)
 		return sprintf(buf, "\n");
 
 	return sprintf(buf, "%s\n", bundle->state);
diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c
index a64517e..18e58ce 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)
diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c
index ba76190..418cd02 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.7.4



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/6] staging: greybus: Correct code style issues
  2017-10-20  0:06 [PATCH 0/6] staging: greybus: Correct code style issues Frank A. Cancio Bello
                   ` (5 preceding siblings ...)
  2017-10-20  0:26 ` [PATCH 6/6] staging: greybus: Rewrite NULL comparisons Frank A. Cancio Bello
@ 2017-10-21 10:07 ` Johan Hovold
  6 siblings, 0 replies; 9+ messages in thread
From: Johan Hovold @ 2017-10-21 10:07 UTC (permalink / raw)
  To: Frank A. Cancio Bello
  Cc: pablo, Julia.Lawall, Johan Hovold, Alex Elder,
	Greg Kroah-Hartman, outreachy-kernel

On Thu, Oct 19, 2017 at 08:06:22PM -0400, Frank A. Cancio Bello wrote:
> This patchset address code style issues with blank lines, aligment,
> spacing. Beside it change 'var_name == NULL' by '!var_name' and use
> kernel type instead of C99 types.

Thanks for the clean ups. Some of these are good, some fall in category
of style choices that are really up to the author of the code to decide
on (e.g. using double newlines as a separator in a source file).

Either way, you need to send these also to the public lists.
scripts/get_maintainer.pl will tell you which (you don't need to CC lkml
unless you prefer).

Thanks,
Johan

> Frank A. Cancio Bello (6):
>   staging: greybus: Remove unnecessary blank lines
>   staging: greybus: Fix alignment issues
>   staging: greybus: Use u32 instead of uint32_t
>   staging: greybus: Add space around ternary operator
>   staging: greybus: Move logical operator in previous line
>   staging: greybus: Rewrite NULL comparisons
> 
>  drivers/staging/greybus/arche-apb-ctrl.c | 37 +++++++++++----------
>  drivers/staging/greybus/arche-platform.c | 10 +++---
>  drivers/staging/greybus/audio_codec.c    | 23 ++++++-------
>  drivers/staging/greybus/audio_codec.h    |  2 +-
>  drivers/staging/greybus/audio_module.c   |  4 +--
>  drivers/staging/greybus/audio_topology.c | 55 ++++++++++++++++----------------
>  drivers/staging/greybus/authentication.c |  2 +-
>  drivers/staging/greybus/bootrom.c        | 20 ++++++------
>  drivers/staging/greybus/bundle.c         |  2 +-
>  drivers/staging/greybus/camera.c         | 16 +++++-----
>  drivers/staging/greybus/connection.c     |  4 ---
>  drivers/staging/greybus/control.c        |  1 -
>  drivers/staging/greybus/core.c           |  2 +-
>  13 files changed, 84 insertions(+), 94 deletions(-)


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/6] staging: greybus: Remove unnecessary blank lines
  2017-10-20  0:06 ` [PATCH 1/6] staging: greybus: Remove unnecessary blank lines Frank A. Cancio Bello
@ 2017-10-21 10:09   ` Johan Hovold
  0 siblings, 0 replies; 9+ messages in thread
From: Johan Hovold @ 2017-10-21 10:09 UTC (permalink / raw)
  To: Frank A. Cancio Bello
  Cc: pablo, Julia.Lawall, Johan Hovold, Alex Elder,
	Greg Kroah-Hartman, outreachy-kernel

On Thu, Oct 19, 2017 at 08:06:48PM -0400, Frank A. Cancio Bello wrote:
> Remove unnecessary blank lines to reduce file length and address
> checkpatch messages:
> CHECK: Please don't use multiple blank lines
> CHECK: Blank lines aren't necessary before a close brace '}'
> 
> Signed-off-by: Frank A. Cancio Bello <frank@generalsoftwareinc.com>
> ---

> diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c
> index 2cf6464..cb96877 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_TIMEOUT	1000
>  
> -
>  static void gb_connection_kref_release(struct kref *kref);
>  
> -
>  static DEFINE_SPINLOCK(gb_connections_lock);
>  static DEFINE_MUTEX(gb_connection_mutex);
>  
> -

Here double newlines are used to separate and group defines, function
prototypes, and static variables, which is perfectly fine.

Johan


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-10-21 10:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-20  0:06 [PATCH 0/6] staging: greybus: Correct code style issues Frank A. Cancio Bello
2017-10-20  0:06 ` [PATCH 1/6] staging: greybus: Remove unnecessary blank lines Frank A. Cancio Bello
2017-10-21 10:09   ` Johan Hovold
2017-10-20  0:22 ` [PATCH 2/6] staging: greybus: Fix alignment issues Frank A. Cancio Bello
2017-10-20  0:22 ` [PATCH 3/6] staging: greybus: Use u32 instead of uint32_t Frank A. Cancio Bello
2017-10-20  0:23 ` [PATCH 4/6] staging: greybus: Add space around ternary operator Frank A. Cancio Bello
2017-10-20  0:24 ` [PATCH 5/6] staging: greybus: Move logical operator in previous line Frank A. Cancio Bello
2017-10-20  0:26 ` [PATCH 6/6] staging: greybus: Rewrite NULL comparisons Frank A. Cancio Bello
2017-10-21 10:07 ` [PATCH 0/6] staging: greybus: Correct code style issues Johan Hovold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.