Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1322342
| From | Julian Calaby <julian.calaby@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] staging: rtl8723au: Fixes unnecessary return warning |
| Date | 2016-01-30 13:10 +0100 |
| Message-ID | <qWCvM-2tp-11@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <qWquB-20H-3@gated-at.bofh.it> <qWswq-3pn-13@gated-at.bofh.it> <qWu5b-4Jl-3@gated-at.bofh.it> <qWueR-4Tn-5@gated-at.bofh.it> <qWxFM-7gx-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Bhakti,
On Sat, Jan 30, 2016 at 5:53 PM, Bhakti Priya <bhaktipriya96@gmail.com> wrote:
> Hi,
>
> Thank you for your reply. I've just sent version 2 of the patch with
> the blank lines removed.
> I will be happy to extend checkpatch.pl. As suggested by you, I am
> trying to detect such blank lines in a line removal patch by checking
> if the line above the deleted line was a blank line and the line
> following the deleted line had a closing brace.
> Can you please guide me and let me know if I am headed in the right direction.
As I understand it, the algorithm needs to work like this:
1. For each patch hunk:
2. Filter out all lines that match /^-/
3. Remove the first character (" " or "+")
4. Normalise EOL characters: s/\r\n?/\n/
5. Over the entire hunk, find any case that matches
/({|\n)\s*\n\s*(\n|})/ where \s matches all space characters except
\n.
6. Report the middle line the preceding regular expression matches to the user.
I'm confident I can write it as a shell script, but I don't know
enough Perl to add that test to checkpatch.pl
Thanks,
--
Julian Calaby
Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] staging: rtl8723au: Fixes unnecessary return warning Bhaktipriya Shridhar <bhaktipriya96@gmail.com> - 2016-01-29 18:30 +0100
Re: [PATCH] staging: rtl8723au: Fixes unnecessary return warning Jes Sorensen <Jes.Sorensen@redhat.com> - 2016-01-29 19:10 +0100
Re: [PATCH] staging: rtl8723au: Fixes unnecessary return warning Julian Calaby <julian.calaby@gmail.com> - 2016-01-30 00:20 +0100
Re: [PATCH] staging: rtl8723au: Fixes unnecessary return warning Joe Perches <joe@perches.com> - 2016-01-30 02:30 +0100
Re: [PATCH] staging: rtl8723au: Fixes unnecessary return warning Julian Calaby <julian.calaby@gmail.com> - 2016-01-30 04:10 +0100
Re: [PATCH] staging: rtl8723au: Fixes unnecessary return warning Joe Perches <joe@perches.com> - 2016-01-30 04:20 +0100
Re: [PATCH] staging: rtl8723au: Fixes unnecessary return warning Bhakti Priya <bhaktipriya96@gmail.com> - 2016-01-30 08:00 +0100
Re: [PATCH] staging: rtl8723au: Fixes unnecessary return warning Joe Perches <joe@perches.com> - 2016-01-30 08:30 +0100
Re: [PATCH] staging: rtl8723au: Fixes unnecessary return warning Julian Calaby <julian.calaby@gmail.com> - 2016-01-30 13:10 +0100
Re: [PATCH] staging: rtl8723au: Fixes unnecessary return warning Joe Perches <joe@perches.com> - 2016-01-30 13:20 +0100
Re: [PATCH] staging: rtl8723au: Fixes unnecessary return warning Jes Sorensen <Jes.Sorensen@redhat.com> - 2016-01-31 15:40 +0100
csiph-web