public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "J.R. Mauro" <jrm8005@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: Lindent and __user, etc.
Date: Sat, 18 Oct 2008 00:54:31 -0400	[thread overview]
Message-ID: <20081018045431.GA9358@localhost> (raw)
In-Reply-To: <3aaafc130810141027p660efb62p92c586b1c40a5e71@mail.gmail.com>

Here's a patch that outlines the basic idea. Obviously more types should
be added to catch more things that Lindent currently misses if this change seems
beneficial.


Make Lindent aware of sparse annotations and integer declarations

Signed-off by: J.R. Mauro <jrm8005@gmail.com>
--

--- Lindent	2008-10-17 18:16:56.000000000 -0400
+++ Lindent-mod	2008-10-18 00:37:49.000000000 -0400
@@ -1,5 +1,7 @@
 #!/bin/sh
 PARAM="-npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1"
+CHECK="-T __user -T __kernel -T __safe -T __force -T __nocast -T __iomem"
+TYPES="-T s8 -T u8 -T s16 -T u16 -T s32 -T u32 -T s64 -T u64"
 RES=`indent --version`
 V1=`echo $RES | cut -d' ' -f3 | cut -d'.' -f1`
 V2=`echo $RES | cut -d' ' -f3 | cut -d'.' -f2`
@@ -15,4 +17,4 @@ elif [ $V1 -eq 2 ]; then
     fi
   fi
 fi
-indent $PARAM "$@"
+indent $PARAM $CHECK $TYPES "$@"

      reply	other threads:[~2008-10-18  4:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-14 17:27 Lindent and __user, etc J.R. Mauro
2008-10-18  4:54 ` J.R. Mauro [this message]

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=20081018045431.GA9358@localhost \
    --to=jrm8005@gmail.com \
    --cc=linux-kernel@vger.kernel.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