Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1609762
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] Staging: fbtft: Fix checkpatch warning |
| Date | 2017-03-27 14:10 +0200 |
| Message-ID | <tpBDc-7On-13@gated-at.bofh.it> (permalink) |
| References | <toton-7Is-43@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Mar 24, 2017 at 03:02:45PM +0600, Anar Adilova wrote:
> This patch fixes the checkpatch.pl warning:
>
> EXPORT_SYMBOL(foo); should immediately follow its function/variable.
>
> The EXPORT_SYMBOL statements are placed inside if blocks, after both function implementations.
>
Please always wrap your changelog text at 72 columns.
> Signed-off-by: Anar Adilova <anaradilovab@gmail.com>
> ---
> drivers/staging/fbtft/fbtft-core.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
> index b742ee7..d2e3e8d 100644
> --- a/drivers/staging/fbtft/fbtft-core.c
> +++ b/drivers/staging/fbtft/fbtft-core.c
> @@ -284,6 +284,7 @@ void fbtft_unregister_backlight(struct fbtft_par *par)
> par->info->bl_dev = NULL;
> }
> }
> +EXPORT_SYMBOL(fbtft_unregister_backlight);
>
> static const struct backlight_ops fbtft_bl_ops = {
> .get_brightness = fbtft_backlight_get_brightness,
> @@ -321,12 +322,13 @@ void fbtft_register_backlight(struct fbtft_par *par)
> if (!par->fbtftops.unregister_backlight)
> par->fbtftops.unregister_backlight = fbtft_unregister_backlight;
> }
> +EXPORT_SYMBOL(fbtft_register_backlight);
> #else
> void fbtft_register_backlight(struct fbtft_par *par) { };
> -void fbtft_unregister_backlight(struct fbtft_par *par) { };
> -#endif
> EXPORT_SYMBOL(fbtft_register_backlight);
> +void fbtft_unregister_backlight(struct fbtft_par *par) { };
> EXPORT_SYMBOL(fbtft_unregister_backlight);
> +#endif
No, the original code here is "nicer" in that you don't have duplicate
declarations like your change added.
You can ignore the checkpatch warning here.
thanks,
greg k-h
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] Staging: fbtft: Fix checkpatch warning Anar Adilova <anaradilovab@gmail.com> - 2017-03-24 10:10 +0100 Re: [PATCH] Staging: fbtft: Fix checkpatch warning Greg KH <gregkh@linuxfoundation.org> - 2017-03-27 14:10 +0200
csiph-web