lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20191201085138.339a850e@kernel.org>
Date:   Sun, 1 Dec 2019 08:51:38 +0100
From:   Mauro Carvalho Chehab <mchehab@...nel.org>
To:     "Daniel W. S. Almeida" <dwlsalmeida@...il.com>
Cc:     gregkh@...uxfoundation.org, rfontana@...hat.com,
        kstewart@...uxfoundation.org, tglx@...utronix.de,
        skhan@...uxfoundation.org,
        linux-kernel-mentees@...ts.linuxfoundation.org,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] media: dvb_dummy_fe: Fix long lines

Em Tue, 12 Nov 2019 11:24:36 -0300
"Daniel W. S. Almeida" <dwlsalmeida@...il.com> escreveu:

> From: "Daniel W. S. Almeida" <dwlsalmeida@...il.com>
> 
> Break long lines into smaller ones to improve readability.
> 
> WARNING: line over 80 characters
> +	memcpy(&state->frontend.ops, &dvb_dummy_fe_ofdm_ops, sizeof(struct dvb_frontend_ops));
> 
> WARNING: line over 80 characters
> +	memcpy(&state->frontend.ops, &dvb_dummy_fe_qpsk_ops, sizeof(struct dvb_frontend_ops));
> WARNING: line over 80 characters
> +	memcpy(&state->frontend.ops, &dvb_dummy_fe_qam_ops, sizeof(struct dvb_frontend_ops));
> 
> WARNING: line over 80 characters
> +				FE_CAN_FEC_4_5 | FE_CAN_FEC_5_6 | FE_CAN_FEC_6_7 |
> 
> WARNING: line over 80 characters
> +				FE_CAN_FEC_7_8 | FE_CAN_FEC_8_9 | FE_CAN_FEC_AUTO |
> 
> WARNING: line over 80 characters
> +				FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_QAM_AUTO |
> 
> WARNING: line over 80 characters
> +		.symbol_rate_min	= (57840000 / 2) / 6
> 
> Suggested-by: Shuah Khan <skhan@...uxfoundation.org>
> Signed-off-by: Daniel W. S. Almeida <dwlsalmeida@...il.com>
> ---
>  drivers/media/dvb-frontends/dvb_dummy_fe.c | 62 ++++++++++++++++------
>  1 file changed, 45 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/media/dvb-frontends/dvb_dummy_fe.c b/drivers/media/dvb-frontends/dvb_dummy_fe.c
> index 4db679cb70ad..f41c1e0dc8eb 100644
> --- a/drivers/media/dvb-frontends/dvb_dummy_fe.c
> +++ b/drivers/media/dvb-frontends/dvb_dummy_fe.c
> @@ -37,7 +37,8 @@ static int dvb_dummy_fe_read_ber(struct dvb_frontend* fe, u32* ber)
>  	return 0;
>  }
>  
> -static int dvb_dummy_fe_read_signal_strength(struct dvb_frontend* fe, u16* strength)
> +static int
> +dvb_dummy_fe_read_signal_strength(struct dvb_frontend* fe, u16* strength)

The pointer references should be, instead:
	struct dvb_frontend *fe

Btw, I think that this patch conflicts with the one you posted previously.
Please don't do that, as it makes harder to apply.

If you have multiple patches touching a file, you should place them into
a patch series, in order to ensure that they can be applied at the right
order.

>  {
>  	*strength = 0;
>  	return 0;
> @@ -102,6 +103,7 @@ static int dvb_dummy_fe_set_voltage(struct dvb_frontend *fe,
>  static void dvb_dummy_fe_release(struct dvb_frontend* fe)
>  {
>  	struct dvb_dummy_fe_state* state = fe->demodulator_priv;
> +
>  	kfree(state);
>  }
>  
> @@ -117,7 +119,10 @@ struct dvb_frontend* dvb_dummy_fe_ofdm_attach(void)
>  		return NULL;
>  
>  	/* create dvb_frontend */
> -	memcpy(&state->frontend.ops, &dvb_dummy_fe_ofdm_ops, sizeof(struct dvb_frontend_ops));
> +	memcpy(&state->frontend.ops,
> +	       &dvb_dummy_fe_ofdm_ops,
> +	       sizeof(struct dvb_frontend_ops));
> +
>  	state->frontend.demodulator_priv = state;
>  	return &state->frontend;
>  }
> @@ -134,7 +139,10 @@ struct dvb_frontend *dvb_dummy_fe_qpsk_attach(void)
>  		return NULL;
>  
>  	/* create dvb_frontend */
> -	memcpy(&state->frontend.ops, &dvb_dummy_fe_qpsk_ops, sizeof(struct dvb_frontend_ops));
> +	memcpy(&state->frontend.ops,
> +	       &dvb_dummy_fe_qpsk_ops,
> +	       sizeof(struct dvb_frontend_ops));
> +
>  	state->frontend.demodulator_priv = state;
>  	return &state->frontend;
>  }
> @@ -151,7 +159,10 @@ struct dvb_frontend *dvb_dummy_fe_qam_attach(void)
>  		return NULL;
>  
>  	/* create dvb_frontend */
> -	memcpy(&state->frontend.ops, &dvb_dummy_fe_qam_ops, sizeof(struct dvb_frontend_ops));
> +	memcpy(&state->frontend.ops,
> +	       &dvb_dummy_fe_qam_ops,
> +	       sizeof(struct dvb_frontend_ops));
> +
>  	state->frontend.demodulator_priv = state;
>  	return &state->frontend;
>  }
> @@ -163,13 +174,21 @@ static const struct dvb_frontend_ops dvb_dummy_fe_ofdm_ops = {
>  		.frequency_min_hz	= 0,
>  		.frequency_max_hz	= 863250 * kHz,
>  		.frequency_stepsize_hz	= 62500,
> -		.caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
> -				FE_CAN_FEC_4_5 | FE_CAN_FEC_5_6 | FE_CAN_FEC_6_7 |
> -				FE_CAN_FEC_7_8 | FE_CAN_FEC_8_9 | FE_CAN_FEC_AUTO |
> -				FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_QAM_AUTO |
> -				FE_CAN_TRANSMISSION_MODE_AUTO |
> -				FE_CAN_GUARD_INTERVAL_AUTO |
> -				FE_CAN_HIERARCHY_AUTO,
> +		.caps = FE_CAN_FEC_1_2 |
> +			FE_CAN_FEC_2_3 |
> +			FE_CAN_FEC_3_4 |
> +			FE_CAN_FEC_4_5 |
> +			FE_CAN_FEC_5_6 |
> +			FE_CAN_FEC_6_7 |
> +			FE_CAN_FEC_7_8 |
> +			FE_CAN_FEC_8_9 |
> +			FE_CAN_FEC_AUTO |
> +			FE_CAN_QAM_16 |
> +			FE_CAN_QAM_64 |
> +			FE_CAN_QAM_AUTO |
> +			FE_CAN_TRANSMISSION_MODE_AUTO |
> +			FE_CAN_GUARD_INTERVAL_AUTO |
> +			FE_CAN_HIERARCHY_AUTO,
>  	},
>  
>  	.release = dvb_dummy_fe_release,
> @@ -194,11 +213,16 @@ static const struct dvb_frontend_ops dvb_dummy_fe_qam_ops = {
>  		.frequency_min_hz	=  51 * MHz,
>  		.frequency_max_hz	= 858 * MHz,
>  		.frequency_stepsize_hz	= 62500,
> -		.symbol_rate_min	= (57840000 / 2) / 64,  /* SACLK/64 == (XIN/2)/64 */
> +		/* symbol_rate_min: SACLK/64 == (XIN/2)/64 */
> +		.symbol_rate_min	= (57840000 / 2) / 64,
>  		.symbol_rate_max	= (57840000 / 2) / 4,   /* SACLK/4 */
> -		.caps = FE_CAN_QAM_16 | FE_CAN_QAM_32 | FE_CAN_QAM_64 |
> -			FE_CAN_QAM_128 | FE_CAN_QAM_256 |
> -			FE_CAN_FEC_AUTO | FE_CAN_INVERSION_AUTO
> +		.caps = FE_CAN_QAM_16 |
> +			FE_CAN_QAM_32 |
> +			FE_CAN_QAM_64 |
> +			FE_CAN_QAM_128 |
> +			FE_CAN_QAM_256 |
> +			FE_CAN_FEC_AUTO |
> +			FE_CAN_INVERSION_AUTO
>  	},
>  
>  	.release = dvb_dummy_fe_release,
> @@ -227,8 +251,12 @@ static const struct dvb_frontend_ops dvb_dummy_fe_qpsk_ops = {
>  		.symbol_rate_min	= 1000000,
>  		.symbol_rate_max	= 45000000,
>  		.caps = FE_CAN_INVERSION_AUTO |
> -			FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
> -			FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
> +			FE_CAN_FEC_1_2 |
> +			FE_CAN_FEC_2_3 |
> +			FE_CAN_FEC_3_4 |
> +			FE_CAN_FEC_5_6 |
> +			FE_CAN_FEC_7_8 |
> +			FE_CAN_FEC_AUTO |
>  			FE_CAN_QPSK
>  	},
>  



Cheers,
Mauro

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ