kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Solving checkpatch error with lex
Date: Wed, 17 Dec 2014 16:47:27 -0800	[thread overview]
Message-ID: <20141218004727.GB7479@kroah.com> (raw)
In-Reply-To: <15204.1418851455@turing-police.cc.vt.edu>

On Wed, Dec 17, 2014 at 04:24:15PM -0500, Valdis.Kletnieks at vt.edu wrote:
> On Wed, 17 Dec 2014 19:10:24 +0000, karthik nayak said:
> 
> > The only reason I didn't do that is cause the file is too large to
> > manually have a look at, even the diff tends to be very huge.
> 
> [/usr/src/linux-next] grep '//' drivers/staging/rtl8192u/r8192U_dm.c | wc -l
> 373
> 
> And why use lex when sed is up to the task?
> 
>  [/usr/src/linux-next] sed 's?//(.*)$?/* \1 */?' drivers/staging/rtl8192u/r8192U_dm.c >| /tmp/z99
> sed: -e expression #1, char 19: invalid reference \1 on `s' command's RHS
> 1 [/usr/src/linux-next] sed 's?//\(.*\)$?/* \1 */?' drivers/staging/rtl8192u/r8192U_dm.c >| /tmp/z99
> 0 [/usr/src/linux-next] diff -u drivers/staging/rtl8192u/r8192U_dm.c /tmp/z99 | head -20
> --- drivers/staging/rtl8192u/r8192U_dm.c        2014-11-20 16:18:35.941071156 -0500
> +++ /tmp/z99    2014-12-17 16:22:42.831566630 -0500
> @@ -21,9 +21,9 @@
>  #include "r8190_rtl8256.h"
>  #include "r819xU_cmdpkt.h"
>  /*---------------------------Define Local Constant---------------------------*/
> -//
> -// Indicate different AP vendor for IOT issue.
> -//
> +/*  */
> +/*  Indicate different AP vendor for IOT issue. */
> +/*  */
>  static u32 edca_setting_DL[HT_IOT_PEER_MAX] =
>                 { 0x5e4322,     0x5e4322,       0x5e4322,       0x604322,       0xa44f,         0x5ea44f};
>  static u32 edca_setting_UL[HT_IOT_PEER_MAX] =
> @@ -36,11 +36,11 @@
> 
> 
>  /*------------------------Define global variable-----------------------------*/
> -// Debug variable ?
> 0 [/usr/src/linux-next] diff -u drivers/staging/rtl8192u/r8192U_dm.c /tmp/z99 | wc -l
> 1960

What a mess, I'll gladly reject a patch that does this.

Look at that multi-line crud.

ick ick ick, don't run auto-formatting tools just to fix up checkpatch
issues.  If that was all that is needed, I would have done that a long
time ago, that's not the goal here people...

greg k-h

  reply	other threads:[~2014-12-18  0:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-17 18:34 Solving checkpatch error with lex karthik nayak
2014-12-17 18:52 ` Valdis.Kletnieks at vt.edu
2014-12-17 19:07 ` Paul Bolle
2014-12-17 19:10   ` karthik nayak
2014-12-17 19:36     ` Greg KH
2014-12-17 21:24     ` Valdis.Kletnieks at vt.edu
2014-12-18  0:47       ` Greg KH [this message]
2014-12-18  6:07         ` karthik nayak
2014-12-17 19:11   ` Paul Bolle

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=20141218004727.GB7479@kroah.com \
    --to=greg@kroah.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /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;
as well as URLs for NNTP newsgroup(s).