public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Noralf Trønnes" <noralf@tronnes.org>
To: Drew Fustini <pdp7pdp7@gmail.com>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: fbtft: move externs to header file
Date: Tue, 03 Mar 2015 20:04:10 +0100	[thread overview]
Message-ID: <54F605AA.6010702@tronnes.org> (raw)
In-Reply-To: <20150303101917.GA20306@lappy486>


Den 03.03.2015 11:19, skrev Drew Fustini:
> Move extern declartions from fbtft-core.c to fbtft header file. This resovles
> the warning from checkpatch.pl that "externs should be avoided in .c files".
>
> Signed-off-by: Drew Fustini <pdp7pdp7@gmail.com>
> ---
>   drivers/staging/fbtft/fbtft-core.c | 5 -----
>   drivers/staging/fbtft/fbtft.h      | 7 +++++++
>   2 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
> index ac4287f..3422faf 100644
> --- a/drivers/staging/fbtft/fbtft-core.c
> +++ b/drivers/staging/fbtft/fbtft-core.c
> @@ -42,11 +42,6 @@
>   
>   #include "fbtft.h"
>   
> -extern void fbtft_sysfs_init(struct fbtft_par *par);
> -extern void fbtft_sysfs_exit(struct fbtft_par *par);
> -extern void fbtft_expand_debug_value(unsigned long *debug);
> -extern int fbtft_gamma_parse_str(struct fbtft_par *par, unsigned long *curves,
> -						const char *str, int size);
>   
>   static unsigned long debug;
>   module_param(debug, ulong, 0);
> diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
> index 0dbf3f9..9e729e5 100644
> --- a/drivers/staging/fbtft/fbtft.h
> +++ b/drivers/staging/fbtft/fbtft.h
> @@ -277,6 +277,13 @@ extern int fbtft_init_display(struct fbtft_par *par);
>   extern int fbtft_probe_common(struct fbtft_display *display,
>   	struct spi_device *sdev, struct platform_device *pdev);
>   extern int fbtft_remove_common(struct device *dev, struct fb_info *info);
> +extern void fbtft_sysfs_init(struct fbtft_par *par);
> +extern void fbtft_sysfs_exit(struct fbtft_par *par);
> +extern void fbtft_expand_debug_value(unsigned long *debug);
> +extern int fbtft_gamma_parse_str(struct fbtft_par *par, unsigned long *curves,
> +						const char *str, int size);
> +
> +
>   
>   /* fbtft-io.c */
>   extern int fbtft_write_spi(struct fbtft_par *par, void *buf, size_t len);

These functions are defined in fbtft-sysfs.c and internal to the fbtft 
module.
I think it's better to put them in an 'internal.h' file.
The fbtft.h file will eventually live in include/linux/fbtft.h or 
something like that.


Noralf.


  parent reply	other threads:[~2015-03-03 19:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-03 10:19 [PATCH] Staging: fbtft: move externs to header file Drew Fustini
2015-03-03 11:03 ` Sudip Mukherjee
2015-03-03 18:52   ` Drew Fustini
2015-03-03 19:04 ` Noralf Trønnes [this message]
2015-03-04  8:12   ` Drew Fustini

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=54F605AA.6010702@tronnes.org \
    --to=noralf@tronnes.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pdp7pdp7@gmail.com \
    --cc=thomas.petazzoni@free-electrons.com \
    /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