linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Joe Perches <joe@perches.com>
Cc: Fengguang Wu <fengguang.wu@intel.com>, linux-kernel@vger.kernel.org
Subject: Re: constification and cocci / kernel build test robot ?
Date: Sun, 28 Aug 2016 11:40:58 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.10.1608281131020.3321@hadrien> (raw)
In-Reply-To: <1472325098.26978.14.camel@perches.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1732 bytes --]



On Sat, 27 Aug 2016, Joe Perches wrote:

> On Sat, 2016-08-27 at 20:59 +0200, Julia Lawall wrote:
> >  Make sure (of/i2c/platform)_device_id tables are NULL terminated
> > Generated by: scripts/coccinelle/misc/of_table.cocci
>
> Along the same lines, I submitted a manually generated
> patch to add const to some of these structs.
>
> https://lkml.org/lkml/2016/8/26/494
>
> Could cocci and/or the kbuild test robot check for structs
> that could or should be const?

Possibly.  I have sent a lot of patches to constify things, but I used gcc
to verify that the constification was OK.  I could also just send you a
list of the structures that I have constified, or better yet a list of the
structures that are currently always const in the kernel, and you could
perhaps just add them all to checkpatch.  Many of them are not used very
often.  If it would be better to only check for structures that are eg
referenced at least some number of times, or in some number of files, or
in more than one leaf subdirectory, all of that would be possible.

There are also now the "read only after init" annotations that we could be
encouraging people to add.  Kees Cook talked about this at the security
summit last week.  There is thus a need to be sure that things are
annotated as __init that should be as well.

julia


>
>
> > Please take the patch only if it's a positive warning. Thanks!
> []
> > +++ b/drivers/thermal/intel_bxt_pmic_thermal.c
> > @@ -281,6 +281,7 @@ static struct platform_device_id pmic_th
> >                 .name = "bxt_wcove_thermal",
> >                 .driver_data = (kernel_ulong_t)&bxtwc_thermal_data,
> >         },
> > +       {},
> >  };
> >
> >  static struct platform_driver pmic_thermal_driver = {
>

  reply	other threads:[~2016-08-28  9:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-27 18:59 [PATCH] thermal: fix of_table.cocci warnings Julia Lawall
2016-08-27 19:11 ` constification and cocci / kernel build test robot ? Joe Perches
2016-08-28  9:40   ` Julia Lawall [this message]
2016-08-28 13:13   ` Julia Lawall
2016-08-28 17:39     ` Joe Perches
2016-08-28 17:43       ` Julia Lawall
2016-08-30 18:50     ` Kees Cook
2016-08-30 19:23       ` Julia Lawall
2016-08-30 22:15         ` Kees Cook
2016-08-31  5:22           ` Julia Lawall
2016-08-31 10:08       ` Mark Rutland
2016-08-31 14:44         ` Kees Cook
2016-08-31 16:41           ` Mark Rutland
2016-09-01 14:10             ` PaX Team
2016-08-29 17:00 ` [PATCH] thermal: fix of_table.cocci warnings Bin Gao

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=alpine.DEB.2.10.1608281131020.3321@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=fengguang.wu@intel.com \
    --cc=joe@perches.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;
as well as URLs for NNTP newsgroup(s).