From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932570AbbCCTEU (ORCPT ); Tue, 3 Mar 2015 14:04:20 -0500 Received: from smtp.domeneshop.no ([194.63.252.55]:57669 "EHLO smtp.domeneshop.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932512AbbCCTER (ORCPT ); Tue, 3 Mar 2015 14:04:17 -0500 Message-ID: <54F605AA.6010702@tronnes.org> Date: Tue, 03 Mar 2015 20:04:10 +0100 From: =?windows-1252?Q?Noralf_Tr=F8nnes?= User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Drew Fustini , Thomas Petazzoni , Greg Kroah-Hartman CC: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Staging: fbtft: move externs to header file References: <20150303101917.GA20306@lappy486> In-Reply-To: <20150303101917.GA20306@lappy486> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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.