All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Anar Adilova <anaradilovab@gmail.com>
Cc: thomas.petazzoni@free-electrons.com, devel@driverdev.osuosl.org,
	outreachy-kernel@googlegroups.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: fbtft: Fix checkpatch warning
Date: Mon, 27 Mar 2017 14:06:28 +0200	[thread overview]
Message-ID: <20170327120628.GA1249@kroah.com> (raw)
In-Reply-To: <20170324090244.mit7ciqsq6t2z35r@anar-Lenovo-Z50-70>

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


  reply	other threads:[~2017-03-27 12:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-24  9:02 [PATCH] Staging: fbtft: Fix checkpatch warning Anar Adilova
2017-03-27 12:06 ` Greg KH [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-09-28  9:59 [PATCH] staging: " Carlos Palminha
2016-09-28 10:05 ` Greg KH
2016-09-28  9:43 Carlos Palminha

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=20170327120628.GA1249@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=anaradilovab@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=outreachy-kernel@googlegroups.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.