[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1473616576.19464.10.camel@perches.com>
Date: Sun, 11 Sep 2016 10:56:16 -0700
From: Joe Perches <joe@...ches.com>
To: Julia Lawall <Julia.Lawall@...6.fr>,
linux-renesas-soc@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org,
Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
linux-pm@...r.kernel.org, platform-driver-x86@...r.kernel.org,
linux-media@...r.kernel.org, linux-can@...r.kernel.org,
Tatyana Nikolova <tatyana.e.nikolova@...el.com>,
Shiraz Saleem <shiraz.saleem@...el.com>,
Mustafa Ismail <mustafa.ismail@...el.com>,
Chien Tin Tung <chien.tin.tung@...el.com>,
linux-rdma@...r.kernel.org, netdev@...r.kernel.org,
devel@...verdev.osuosl.org, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org, linux-fbdev@...r.kernel.org,
linux-wireless@...r.kernel.org,
Jason Gunthorpe <jgunthorpe@...idianresearch.com>,
tpmdd-devel@...ts.sourceforge.net, linux-scsi@...r.kernel.org,
linux-spi@...r.kernel.org, linux-usb@...r.kernel.org,
linux-acpi@...r.kernel.org
Subject: Re: [PATCH 00/26] constify local structures
On Sun, 2016-09-11 at 15:05 +0200, Julia Lawall wrote:
> Constify local structures.
Thanks Julia.
A few suggestions & questions:
Perhaps the script should go into scripts/coccinelle/
so that future cases could be caught by the robot
and commit message referenced by the patch instances.
Can you please compile the files modified using the
appropriate defconfig/allyesconfig and show the
movement from data to const by using
$ size <object>.new/old
and include that in the changelogs (maybe next time)?
Is it possible for a rule to trace the instances where
an address of a struct or struct member is taken by
locally defined and declared function call where the
callee does not modify any dereferenced object?
ie:
struct foo {
int bar;
char *baz;
};
struct foo qux[] = {
{ 1, "description 1" },
{ 2, "dewcription 2" },
[ n, "etc" ]...,
};
void message(struct foo *msg)
{
printk("%d %s\n", msg->bar, msg->baz);
}
where some code uses
message(qux[index]);
So could a coccinelle script change:
struct foo qux[] = { to const struct foo quz[] = {
and
void message(struct foo *msg) to void message(const struct foo *msg)
Powered by blists - more mailing lists