mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Prasad Pandit <pj.pandit@yahoo.in>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Joe Perches <joe@perches.com>,
	Dwaipayan Ray <dwaipayanray1@gmail.com>,
	Lukas Bulwahn <lukas.bulwahn@gmail.com>,
	Dan Carpenter <dan.carpenter@linaro.org>,
	Andy Whitcroft <apw@canonical.com>
Subject: Re: [PATCH] checkpatch: error if file terminates without a new-line
Date: Tue, 16 Apr 2024 10:48:27 +0200	[thread overview]
Message-ID: <2024041627-overgrown-ripping-2348@gregkh> (raw)
In-Reply-To: <1568855168.5949322.1713251087824@mail.yahoo.com>

On Tue, Apr 16, 2024 at 07:04:47AM +0000, Prasad Pandit wrote:
> [+linux-kernel]
> 
> On Saturday, 30 March, 2024 at 09:09:12 am IST, Prasad Pandit <ppandit@redhat.com> wrote: 

Why are these lines in a changelog of a patch to submit?  That's not
going to work :(

I suggest taking some time and talking to some other kernel developers
in red hat as to how to submit changes, that will make things much
easier.

> From: Prasad Pandit <pjp@fedoraproject.org>
> 
> Add check to flag an error if a patch terminates a file
> without a new line (\n) character.
> 
> Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
> Signed-off-by: Prasad Pandit <pjp@fedoraproject.org>

Also, I see 3 different emails for you here, none of which match, pick
one for kernel development and stick with it?

> ---
> scripts/checkpatch.pl | 7 +++++++
> 1 file changed, 7 insertions(+)
> 
> -> https://lore.kernel.org/all/CAE8KmOxG=3sWKpeB5fdWTK-SCipS=JyDE-_DNgY--DtoSQZ0Qw@mail.gmail.com/T/#t
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 9c4c4a61bc83..df34c0709410 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2795,6 +2795,13 @@ sub process {
>             $is_patch = 1;
>         }
> 
> +# check if patch terminates file without a new line (\n)
> +        if ($line =~ /^\\ No newline at end of file$/
> +            and $rawlines[$linenr - 2] =~ /^\+.*$/) {
> +            ERROR("NOEOL_FILE",
> +                  "patch terminates file without a new line (\\n).");
> +        }

Why is this a problem?  files without a new line should not cause
problems with a compiler, right?  You don't have a justification for why
this change needs to be checked for anywhere.

thanks,

greg k-h

  reply	other threads:[~2024-04-16  8:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240330033858.3272184-1-ppandit@redhat.com>
2024-04-16  7:04 ` Prasad Pandit
2024-04-16  8:48   ` Greg KH [this message]
2024-04-16  8:59     ` Dan Carpenter
2024-04-16  9:55       ` Joe Perches
2024-04-17  6:36         ` Prasad Pandit

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=2024041627-overgrown-ripping-2348@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=apw@canonical.com \
    --cc=dan.carpenter@linaro.org \
    --cc=dwaipayanray1@gmail.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --cc=pj.pandit@yahoo.in \
    /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

all inboxes | Powered by JetHome®