public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Bergh <bergh.jonathan@gmail.com>
To: mchehab@kernel.org
Cc: mcgrof@kernel.org, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Jonathan Bergh <bergh.jonathan@gmail.com>
Subject: [PATCH 4/9] staging: media: av7110: Fix formatting of pointers to meet coding style guidelines
Date: Sun,  3 Mar 2024 20:20:35 +0100	[thread overview]
Message-ID: <20240303192040.8116-5-bergh.jonathan@gmail.com> (raw)
In-Reply-To: <20240303192040.8116-1-bergh.jonathan@gmail.com>

This patch fixes the following code formatting issue:
 * Ensure "foo* bar" is formatted as "foo *bar" as per code style rules

Signed-off-by: Jonathan Bergh <bergh.jonathan@gmail.com>
---
 drivers/staging/media/av7110/sp8870.c | 60 +++++++++++++--------------
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/media/av7110/sp8870.c b/drivers/staging/media/av7110/sp8870.c
index 1f6c02744b6c..5857fc8b0962 100644
--- a/drivers/staging/media/av7110/sp8870.c
+++ b/drivers/staging/media/av7110/sp8870.c
@@ -28,9 +28,9 @@
 
 struct sp8870_state {
 
-	struct i2c_adapter* i2c;
+	struct i2c_adapter *i2c;
 
-	const struct sp8870_config* config;
+	const struct sp8870_config *config;
 
 	struct dvb_frontend frontend;
 
@@ -50,7 +50,7 @@ static int debug;
 /* starting point for firmware in file 'Sc_main.mc' */
 #define SP8870_FIRMWARE_OFFSET 0x0A
 
-static int sp8870_writereg(struct sp8870_state* state, u16 reg, u16 data)
+static int sp8870_writereg(struct sp8870_state *state, u16 reg, u16 data)
 {
 	u8 buf [] = { reg >> 8, reg & 0xff, data >> 8, data & 0xff };
 	struct i2c_msg msg = { .addr = state->config->demod_address, .flags = 0, .buf = buf, .len = 4 };
@@ -64,7 +64,7 @@ static int sp8870_writereg(struct sp8870_state* state, u16 reg, u16 data)
 	return 0;
 }
 
-static int sp8870_readreg(struct sp8870_state* state, u16 reg)
+static int sp8870_readreg(struct sp8870_state *state, u16 reg)
 {
 	int ret;
 	u8 b0 [] = { reg >> 8 , reg & 0xff };
@@ -82,7 +82,7 @@ static int sp8870_readreg(struct sp8870_state* state, u16 reg)
 	return (b1[0] << 8 | b1[1]);
 }
 
-static int sp8870_firmware_upload(struct sp8870_state* state, const struct firmware *fw)
+static int sp8870_firmware_upload(struct sp8870_state *state, const struct firmware *fw)
 {
 	struct i2c_msg msg;
 	const char *fw_buf = fw->data;
@@ -129,7 +129,7 @@ static int sp8870_firmware_upload(struct sp8870_state* state, const struct firmw
 	return 0;
 };
 
-static void sp8870_microcontroller_stop(struct sp8870_state* state)
+static void sp8870_microcontroller_stop(struct sp8870_state *state)
 {
 	sp8870_writereg(state, 0x0F08, 0x000);
 	sp8870_writereg(state, 0x0F09, 0x000);
@@ -138,7 +138,7 @@ static void sp8870_microcontroller_stop(struct sp8870_state* state)
 	sp8870_writereg(state, 0x0F00, 0x000);
 }
 
-static void sp8870_microcontroller_start(struct sp8870_state* state)
+static void sp8870_microcontroller_start(struct sp8870_state *state)
 {
 	sp8870_writereg(state, 0x0F08, 0x000);
 	sp8870_writereg(state, 0x0F09, 0x000);
@@ -150,7 +150,7 @@ static void sp8870_microcontroller_start(struct sp8870_state* state)
 	sp8870_readreg(state, 0x0D01);
 }
 
-static int sp8870_read_data_valid_signal(struct sp8870_state* state)
+static int sp8870_read_data_valid_signal(struct sp8870_state *state)
 {
 	return (sp8870_readreg(state, 0x0D02) > 0);
 }
@@ -226,7 +226,7 @@ static int configure_reg0xc05(struct dtv_frontend_properties *p, u16 *reg0xc05)
 	return 0;
 }
 
-static int sp8870_wake_up(struct sp8870_state* state)
+static int sp8870_wake_up(struct sp8870_state *state)
 {
 	// enable TS output and interface pins
 	return sp8870_writereg(state, 0xC18, 0x00D);
@@ -235,7 +235,7 @@ static int sp8870_wake_up(struct sp8870_state* state)
 static int sp8870_set_frontend_parameters(struct dvb_frontend *fe)
 {
 	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
-	struct sp8870_state* state = fe->demodulator_priv;
+	struct sp8870_state *state = fe->demodulator_priv;
 	int  err;
 	u16 reg0xc05;
 
@@ -291,9 +291,9 @@ static int sp8870_set_frontend_parameters(struct dvb_frontend *fe)
 	return 0;
 }
 
-static int sp8870_init(struct dvb_frontend* fe)
+static int sp8870_init(struct dvb_frontend *fe)
 {
-	struct sp8870_state* state = fe->demodulator_priv;
+	struct sp8870_state *state = fe->demodulator_priv;
 	const struct firmware *fw = NULL;
 
 	sp8870_wake_up(state);
@@ -344,7 +344,7 @@ static int sp8870_init(struct dvb_frontend* fe)
 static int sp8870_read_status(struct dvb_frontend *fe,
 			      enum fe_status *fe_status)
 {
-	struct sp8870_state* state = fe->demodulator_priv;
+	struct sp8870_state *state = fe->demodulator_priv;
 	int status;
 	int signal;
 
@@ -368,9 +368,9 @@ static int sp8870_read_status(struct dvb_frontend *fe,
 	return 0;
 }
 
-static int sp8870_read_ber(struct dvb_frontend* fe, u32 * ber)
+static int sp8870_read_ber(struct dvb_frontend *fe, u32 *ber)
 {
-	struct sp8870_state* state = fe->demodulator_priv;
+	struct sp8870_state *state = fe->demodulator_priv;
 	int ret;
 	u32 tmp;
 
@@ -395,9 +395,9 @@ static int sp8870_read_ber(struct dvb_frontend* fe, u32 * ber)
 	return 0;
 }
 
-static int sp8870_read_signal_strength(struct dvb_frontend* fe,  u16 * signal)
+static int sp8870_read_signal_strength(struct dvb_frontend *fe,  u16 *signal)
 {
-	struct sp8870_state* state = fe->demodulator_priv;
+	struct sp8870_state *state = fe->demodulator_priv;
 	int ret;
 	u16 tmp;
 
@@ -421,9 +421,9 @@ static int sp8870_read_signal_strength(struct dvb_frontend* fe,  u16 * signal)
 	return 0;
 }
 
-static int sp8870_read_uncorrected_blocks(struct dvb_frontend* fe, u32* ublocks)
+static int sp8870_read_uncorrected_blocks(struct dvb_frontend *fe, u32 *ublocks)
 {
-	struct sp8870_state* state = fe->demodulator_priv;
+	struct sp8870_state *state = fe->demodulator_priv;
 	int ret;
 
 	*ublocks = 0;
@@ -453,7 +453,7 @@ static int switches;
 static int sp8870_set_frontend(struct dvb_frontend *fe)
 {
 	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
-	struct sp8870_state* state = fe->demodulator_priv;
+	struct sp8870_state *state = fe->demodulator_priv;
 
 	/*
 	    The firmware of the sp8870 sometimes locks up after setting frontend parameters.
@@ -509,15 +509,15 @@ static int sp8870_set_frontend(struct dvb_frontend *fe)
 	return 0;
 }
 
-static int sp8870_sleep(struct dvb_frontend* fe)
+static int sp8870_sleep(struct dvb_frontend *fe)
 {
-	struct sp8870_state* state = fe->demodulator_priv;
+	struct sp8870_state *state = fe->demodulator_priv;
 
 	// tristate TS output and disable interface pins
 	return sp8870_writereg(state, 0xC18, 0x000);
 }
 
-static int sp8870_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings)
+static int sp8870_get_tune_settings(struct dvb_frontend *fe, struct dvb_frontend_tune_settings *fesettings)
 {
 	fesettings->min_delay_ms = 350;
 	fesettings->step_size = 0;
@@ -525,9 +525,9 @@ static int sp8870_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend
 	return 0;
 }
 
-static int sp8870_i2c_gate_ctrl(struct dvb_frontend* fe, int enable)
+static int sp8870_i2c_gate_ctrl(struct dvb_frontend *fe, int enable)
 {
-	struct sp8870_state* state = fe->demodulator_priv;
+	struct sp8870_state *state = fe->demodulator_priv;
 
 	if (enable)
 		return sp8870_writereg(state, 0x206, 0x001);
@@ -535,18 +535,18 @@ static int sp8870_i2c_gate_ctrl(struct dvb_frontend* fe, int enable)
 		return sp8870_writereg(state, 0x206, 0x000);
 }
 
-static void sp8870_release(struct dvb_frontend* fe)
+static void sp8870_release(struct dvb_frontend *fe)
 {
-	struct sp8870_state* state = fe->demodulator_priv;
+	struct sp8870_state *state = fe->demodulator_priv;
 	kfree(state);
 }
 
 static const struct dvb_frontend_ops sp8870_ops;
 
-struct dvb_frontend* sp8870_attach(const struct sp8870_config* config,
-				   struct i2c_adapter* i2c)
+struct dvb_frontend *sp8870_attach(const struct sp8870_config *config,
+				   struct i2c_adapter *i2c)
 {
-	struct sp8870_state* state = NULL;
+	struct sp8870_state *state = NULL;
 
 	/* allocate memory for the internal state */
 	state = kzalloc(sizeof(struct sp8870_state), GFP_KERNEL);
-- 
2.40.1


  parent reply	other threads:[~2024-03-03 19:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-03 19:20 [PATCH 0/9] staging: media: av7110: These patches address various code style and formatting issues in the av7110 driver Jonathan Bergh
2024-03-03 19:20 ` [PATCH 1/9] staging: media: av7110: Fix formatting problem where trailing statements should be on a new line Jonathan Bergh
2024-03-03 19:20 ` [PATCH 2/9] staging: media: av7110: Remove braces for single line statement blocks Jonathan Bergh
2024-03-03 19:20 ` [PATCH 3/9] staging: media: av7110: Remove spaces between function name and opening parenthesis Jonathan Bergh
2024-03-03 19:20 ` Jonathan Bergh [this message]
2024-03-03 19:20 ` [PATCH 5/9] staging: media: av7110: Fix block comments to meet code style guidelines Jonathan Bergh
2024-03-03 19:20 ` [PATCH 6/9] staging: media: av7110: Remove extra whitespace before opening '['s Jonathan Bergh
2024-03-03 19:20 ` [PATCH 7/9] staging: media: av7110: Remove extra whitespace before ',' Jonathan Bergh
2024-03-03 19:20 ` [PATCH 8/9] staging: media: av7110: Ensure whitespace ahead of opening brace '{' Jonathan Bergh
2024-03-03 19:20 ` [PATCH 9/9] staging: media: av7110: Ensure newline after variable declarations Jonathan Bergh
2024-04-24  9:34 ` [PATCH 0/9] staging: media: av7110: These patches address various code style and formatting issues in the av7110 driver Hans Verkuil

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=20240303192040.8116-5-bergh.jonathan@gmail.com \
    --to=bergh.jonathan@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=mchehab@kernel.org \
    /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