From: Mauro Carvalho Chehab <mchehab@kernel.org>
To: "Daniel W. S. Almeida" <dwlsalmeida@gmail.com>
Cc: kstewart@linuxfoundation.org, linux-kernel@vger.kernel.org,
rfontana@redhat.com, tglx@linutronix.de,
linux-kernel-mentees@lists.linuxfoundation.org,
linux-media@vger.kernel.org
Subject: Re: [Linux-kernel-mentees] [PATCH v2] media: dvb_dummy_fe: Fix ERROR: POINTER_LOCATION
Date: Sun, 1 Dec 2019 08:47:28 +0100 [thread overview]
Message-ID: <20191201084728.17387715@kernel.org> (raw)
In-Reply-To: <20191112125014.5604-1-dwlsalmeida@gmail.com>
Em Tue, 12 Nov 2019 09:50:14 -0300
"Daniel W. S. Almeida" <dwlsalmeida@gmail.com> escreveu:
> From: "Daniel W. S. Almeida" <dwlsalmeida@gmail.com>
>
> Change foo* bar to foo *bar to avoid ERROR: POINTER_LOCATION in checkpatch.pl
>
> ERROR: "foo* bar" should be "foo *bar"
> +static int dvb_dummy_fe_read_signal_strength(struct dvb_frontend* fe, u16* strength)
>
> ERROR: "foo* bar" should be "foo *bar"
> +static int dvb_dummy_fe_read_signal_strength(struct dvb_frontend* fe, u16* strength)
>
> ERROR: "foo* bar" should be "foo *bar"
> +static int dvb_dummy_fe_read_snr(struct dvb_frontend* fe, u16* snr)
>
> ERROR: "foo* bar" should be "foo *bar"
> +static int dvb_dummy_fe_read_snr(struct dvb_frontend* fe, u16* snr)
>
> ERROR: "foo* bar" should be "foo *bar"
> +static int dvb_dummy_fe_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
>
> ERROR: "foo* bar" should be "foo *bar"
> +static int dvb_dummy_fe_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
>
> ERROR: "foo* bar" should be "foo *bar"
> +static int dvb_dummy_fe_sleep(struct dvb_frontend* fe)
>
> ERROR: "foo* bar" should be "foo *bar"
> +static int dvb_dummy_fe_init(struct dvb_frontend* fe)
>
> ERROR: "foo* bar" should be "foo *bar"
> +static void dvb_dummy_fe_release(struct dvb_frontend* fe)
>
> ERROR: "foo* bar" should be "foo *bar"
> + struct dvb_dummy_fe_state* state = fe->demodulator_priv;
>
> ERROR: "foo* bar" should be "foo *bar"
> +struct dvb_frontend* dvb_dummy_fe_ofdm_attach(void)
>
> ERROR: "foo* bar" should be "foo *bar"
> + struct dvb_dummy_fe_state* state = NULL;
>
> ERROR: "foo* bar" should be "foo *bar"
> + struct dvb_dummy_fe_state* state = NULL;
>
> ERROR: "foo* bar" should be "foo *bar"
> + struct dvb_dummy_fe_state* state = NULL;
>
> Suggested-by: Shuah Khan <skhan@linuxfoundation.org>
> Signed-off-by: Daniel W. S. Almeida <dwlsalmeida@gmail.com>
>
> ------------------------------------------------------------
> Changes in v2:
>
> -Added checkpatch.pl previous output so it's more clear what
> is being fixed by this patch.
>
> ---
> drivers/media/dvb-frontends/dvb_dummy_fe.c | 24 +++++++++++-----------
> drivers/media/dvb-frontends/dvb_dummy_fe.h | 6 +++---
> 2 files changed, 15 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/media/dvb-frontends/dvb_dummy_fe.c b/drivers/media/dvb-frontends/dvb_dummy_fe.c
> index 4db679cb70ad..8413038aa30b 100644
> --- a/drivers/media/dvb-frontends/dvb_dummy_fe.c
> +++ b/drivers/media/dvb-frontends/dvb_dummy_fe.c
> @@ -31,25 +31,25 @@ static int dvb_dummy_fe_read_status(struct dvb_frontend *fe,
> return 0;
> }
>
> -static int dvb_dummy_fe_read_ber(struct dvb_frontend* fe, u32* ber)
> +static int dvb_dummy_fe_read_ber(struct dvb_frontend *fe, u32 *ber)
> {
> *ber = 0;
> 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)
Line too long. As you're touching on it, please also fix the long line
warning.
> {
> *strength = 0;
> return 0;
> }
>
> -static int dvb_dummy_fe_read_snr(struct dvb_frontend* fe, u16* snr)
> +static int dvb_dummy_fe_read_snr(struct dvb_frontend *fe, u16 *snr)
> {
> *snr = 0;
> return 0;
> }
>
> -static int dvb_dummy_fe_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
> +static int dvb_dummy_fe_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks)
> {
> *ucblocks = 0;
> return 0;
> @@ -77,12 +77,12 @@ static int dvb_dummy_fe_set_frontend(struct dvb_frontend *fe)
> return 0;
> }
>
> -static int dvb_dummy_fe_sleep(struct dvb_frontend* fe)
> +static int dvb_dummy_fe_sleep(struct dvb_frontend *fe)
> {
> return 0;
> }
>
> -static int dvb_dummy_fe_init(struct dvb_frontend* fe)
> +static int dvb_dummy_fe_init(struct dvb_frontend *fe)
> {
> return 0;
> }
> @@ -99,17 +99,17 @@ static int dvb_dummy_fe_set_voltage(struct dvb_frontend *fe,
> return 0;
> }
>
> -static void dvb_dummy_fe_release(struct dvb_frontend* fe)
> +static void dvb_dummy_fe_release(struct dvb_frontend *fe)
> {
> - struct dvb_dummy_fe_state* state = fe->demodulator_priv;
> + struct dvb_dummy_fe_state *state = fe->demodulator_priv;
> kfree(state);
> }
>
> static const struct dvb_frontend_ops dvb_dummy_fe_ofdm_ops;
>
> -struct dvb_frontend* dvb_dummy_fe_ofdm_attach(void)
> +struct dvb_frontend *dvb_dummy_fe_ofdm_attach(void)
> {
> - struct dvb_dummy_fe_state* state = NULL;
> + struct dvb_dummy_fe_state *state = NULL;
>
> /* allocate memory for the internal state */
> state = kzalloc(sizeof(struct dvb_dummy_fe_state), GFP_KERNEL);
> @@ -126,7 +126,7 @@ static const struct dvb_frontend_ops dvb_dummy_fe_qpsk_ops;
>
> struct dvb_frontend *dvb_dummy_fe_qpsk_attach(void)
> {
> - struct dvb_dummy_fe_state* state = NULL;
> + struct dvb_dummy_fe_state *state = NULL;
>
> /* allocate memory for the internal state */
> state = kzalloc(sizeof(struct dvb_dummy_fe_state), GFP_KERNEL);
> @@ -143,7 +143,7 @@ static const struct dvb_frontend_ops dvb_dummy_fe_qam_ops;
>
> struct dvb_frontend *dvb_dummy_fe_qam_attach(void)
> {
> - struct dvb_dummy_fe_state* state = NULL;
> + struct dvb_dummy_fe_state *state = NULL;
>
> /* allocate memory for the internal state */
> state = kzalloc(sizeof(struct dvb_dummy_fe_state), GFP_KERNEL);
> diff --git a/drivers/media/dvb-frontends/dvb_dummy_fe.h b/drivers/media/dvb-frontends/dvb_dummy_fe.h
> index 526fabd7751f..35efe2ce1a88 100644
> --- a/drivers/media/dvb-frontends/dvb_dummy_fe.h
> +++ b/drivers/media/dvb-frontends/dvb_dummy_fe.h
> @@ -12,9 +12,9 @@
> #include <media/dvb_frontend.h>
>
> #if IS_REACHABLE(CONFIG_DVB_DUMMY_FE)
> -extern struct dvb_frontend* dvb_dummy_fe_ofdm_attach(void);
> -extern struct dvb_frontend* dvb_dummy_fe_qpsk_attach(void);
> -extern struct dvb_frontend* dvb_dummy_fe_qam_attach(void);
> +extern struct dvb_frontend *dvb_dummy_fe_ofdm_attach(void);
> +extern struct dvb_frontend *dvb_dummy_fe_qpsk_attach(void);
> +extern struct dvb_frontend *dvb_dummy_fe_qam_attach(void);
Don't keep the "extern" here:
CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#185: FILE: drivers/media/dvb-frontends/dvb_dummy_fe.h:15:
+extern struct dvb_frontend *dvb_dummy_fe_ofdm_attach(void);
CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#186: FILE: drivers/media/dvb-frontends/dvb_dummy_fe.h:16:
+extern struct dvb_frontend *dvb_dummy_fe_qpsk_attach(void);
CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#187: FILE: drivers/media/dvb-frontends/dvb_dummy_fe.h:17:
+extern struct dvb_frontend *dvb_dummy_fe_qam_attach(void);
> #else
> static inline struct dvb_frontend *dvb_dummy_fe_ofdm_attach(void)
> {
Cheers,
Mauro
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
prev parent reply other threads:[~2019-12-01 7:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-12 12:50 [Linux-kernel-mentees] [PATCH v2] media: dvb_dummy_fe: Fix ERROR: POINTER_LOCATION Daniel W. S. Almeida
2019-12-01 7:47 ` Mauro Carvalho Chehab [this message]
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=20191201084728.17387715@kernel.org \
--to=mchehab@kernel.org \
--cc=dwlsalmeida@gmail.com \
--cc=kstewart@linuxfoundation.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=rfontana@redhat.com \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).