lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <5DB475451BAA174CB158B5E897FC1525D8B304C4@MBS07.vivotek.tw>
Date:   Wed, 10 Nov 2021 08:52:05 +0000
From:   <Michael.Wu@...ics.com>
To:     <joe@...ches.com>, <apw@...onical.com>
CC:     <dwaipayanray1@...il.com>, <lukas.bulwahn@...il.com>,
        <linux-kernel@...r.kernel.org>
Subject: RE: checkpatch warns a symbolic link has not a newline

Hi Joe,

The following is a demonstrated patch which creates a symbolic link
pointing to a existed file.

diff --git a/tools/gpio/dummy.h b/tools/gpio/dummy.h
new file mode 120000
index 000000000000..ace4df60bac6
--- /dev/null
+++ b/tools/gpio/dummy.h
@@ -0,0 +1 @@
+gpio-utils.h
\ No newline at end of file

tools/gpio/dummy.h is created by command 'ln -s gpio-utils.h dummy.h'.
scripts/checkpatch.pl returned a warning likes that:

WARNING: adding a line without newline at end of file
#22: FILE: tools/gpio/dummy.h:1:
+gpio-utils.h

command 'ln -s' creates a symbolic link which has no newline at end of
file. For a symbolic link created by 'ln -s' always get the warning.

If symbolic links are allowed, it should not be warned, is it?

Best Regards,
Michael Wu

> -----Original Message-----
> From: Joe Perches [mailto:joe@...ches.com]
> Sent: Wednesday, November 10, 2021 4:09 PM
> To: Michael.Wu(吳忠益)
> Subject: Re: checkpatch warns a symbolic link has not a newline
> 
> On Wed, 2021-11-10 at 06:39 +0000, Michael.Wu@...ics.com wrote:
> > Hi Andy & Joe,
> >
> > I have a commit that contains a newly created symbolic link pointing to a
> certain file. I used ./scripts/checkpatch.pl to check this commit and then I got a
> WARNING: adding a line without newline at end of file. The symbolic link was
> created by ln -s.
> >
> > I'm confused why it returned such a warning. Is the content of the patch not
> allowed to contain symbolic links? If it is allowed, I think checkpatch.pl can
> make some improvements, so that symbolic links will not be treated a
> warnings because of missing newline at end of file.
> >
> > Best Regards,
> > Michael Wu
> 
> Send me an email that contains the patch that produces this message please.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ