All of lore.kernel.org
 help / color / mirror / Atom feed
From: inventsekar@gmail.com (inventsekar)
To: kernelnewbies@lists.kernelnewbies.org
Subject: regarding const variables/structures
Date: Wed, 12 Sep 2018 23:53:57 +0530	[thread overview]
Message-ID: <CAJd9=00zKrFUmaf02-rVMdgc9bb8CBLeodwWin2JGPWuyBj06Q@mail.gmail.com> (raw)
In-Reply-To: <30532.1536774786@turing-police.cc.vt.edu>

Thanks a ton, Valdis.

On Wed 12 Sep, 2018, 11:23 PM , <valdis.kletnieks@vt.edu> wrote:

> On Wed, 12 Sep 2018 22:40:50 +0530, inventsekar said:
>
> > So, please suggest some subsystems or some small puedes of code, where i
> > can "dwell" sometimes and submit my first patch.
>
> 0) subsystems?  Anything under drivers/staging is fair game and certain to
> provide hours of amusement...
>
> 1) Install sparse
> 2) Get yourself a linux-next tree (so you don't submit fixes for already
> fixed stuff)
>
> $ git clone git://
> git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> $ cd linux
> $ git remote add linux-next git://
> git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> $ git fetch linux-next
> $ git fetch --tags linux-next
>
> If you want to update it later, do *not* use 'git pull'. Due to the way
> linux-next is rebased every day, doing that will result in a Lovecraftian
> horror....
>
> $ git remote update
> $ git checkout next-20180911   (or whatever)
>
> 3) (optional)  Add the following patch to the top level Makefile:
>
> diff --git a/Makefile b/Makefile
> index 9e71826f67d7..f28b2ab9c369 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -434,6 +434,7 @@ KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes
> -Wno-trigraphs \
>                    -Werror-implicit-function-declaration \
>                    -Wno-format-security \
>                    -std=gnu89
> +KBUILD_CFLAGS   +=  -Wimplicit-fallthrough=2 -Wvla
>  KBUILD_CPPFLAGS := -D__KERNEL__
>  KBUILD_AFLAGS_KERNEL :=
>  KBUILD_CFLAGS_KERNEL :=
>
> 4) Figure out why I said (3)  (There's an actual reason for that)
>
> 5) Build your kernel, running sparse on the code before compiling with
> extra
> warnings:
>
> $ make C=2 W=1 |& tee build.output
>
> 6) Start looking at the output.  Note however that sparse and gcc
> sometimes throw warnings for perfectly good code, so do *not*
> submit random "shut up warning" patches.  Verify the warning is
> in fact correct, *then* submit the patch.
>
> If you get ambitious, find out what Coverty and Trinity are, and other
> similar
> tools.  If you use Trinity, remember to always mount a scratch monkey. :)
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180912/a5436b7a/attachment.html>

  reply	other threads:[~2018-09-12 18:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-12  6:20 regarding const variables/structures inventsekar
2018-09-12  6:51 ` Greg KH
2018-09-12  7:08 ` Nicholas Mc Guire
2018-09-12 17:10   ` inventsekar
2018-09-12 17:53     ` valdis.kletnieks at vt.edu
2018-09-12 18:23       ` inventsekar [this message]
2018-09-13  9:50         ` Tobin C. Harding
2018-09-14 19:49           ` inventsekar
2018-09-17  7:29             ` Shakthi Kannan
2018-09-18  5:46               ` inventsekar
2018-09-17 15:00             ` valdis.kletnieks at vt.edu
2018-09-13  3:42   ` inventsekar
2018-09-13  6:07     ` Nicholas Mc Guire
2018-09-14 19:52       ` inventsekar
2018-09-14 22:09         ` Kenneth Adam Miller

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='CAJd9=00zKrFUmaf02-rVMdgc9bb8CBLeodwWin2JGPWuyBj06Q@mail.gmail.com' \
    --to=inventsekar@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.