[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdXuvrY987eTOmV+Ltaev=LrsDGuuE0+mmjJB7cAr+19ug@mail.gmail.com>
Date: Mon, 12 Sep 2016 15:57:40 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Felipe Balbi <felipe.balbi@...ux.intel.com>
Cc: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
Julia Lawall <julia.lawall@...6.fr>,
Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
Joe Perches <joe@...ches.com>,
"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
Linux PM list <linux-pm@...r.kernel.org>,
platform-driver-x86@...r.kernel.org,
Linux Media Mailing List <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 <linux-rdma@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
driverdevel <devel@...verdev.osuosl.org>,
ALSA Development Mailing List <alsa-devel@...a-project.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Linux Fbdev development list <linux-fbdev@...r.kernel.org>,
linux-wireless <linux-wireless@...r.kernel.org>,
Jason Gunthorpe <jgunthorpe@...idianresearch.com>,
tpmdd-devel@...ts.sourceforge.net,
scsi <linux-scsi@...r.kernel.org>,
linux-spi <linux-spi@...r.kernel.org>,
USB list <linux-usb@...r.kernel.org>,
ACPI Devel Maling List <linux-acpi@...r.kernel.org>
Subject: Re: [PATCH 00/26] constify local structures
On Mon, Sep 12, 2016 at 3:43 PM, Felipe Balbi
<felipe.balbi@...ux.intel.com> wrote:
> Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com> writes:
>> On Mon, Sep 12, 2016 at 10:54:07AM +0200, Julia Lawall wrote:
>>> On Sun, 11 Sep 2016, Jarkko Sakkinen wrote:
>>> > On Sun, Sep 11, 2016 at 03:05:42PM +0200, Julia Lawall wrote:
>>> > > Constify local structures.
>>> > >
>>> > > The semantic patch that makes this change is as follows:
>>> > > (http://coccinelle.lip6.fr/)
>>> >
>>> > Just my two cents but:
>>> >
>>> > 1. You *can* use a static analysis too to find bugs or other issues.
>>> > 2. However, you should manually do the commits and proper commit
>>> > messages to subsystems based on your findings. And I generally think
>>> > that if one contributes code one should also at least smoke test changes
>>> > somehow.
>>> >
>>> > I don't know if I'm alone with my opinion. I just think that one should
>>> > also do the analysis part and not blindly create and submit patches.
>>>
>>> All of the patches are compile tested. And the individual patches are
>>
>> Compile-testing is not testing. If you are not able to test a commit,
>> you should explain why.
>
> Dude, Julia has been doing semantic patching for years already and
> nobody has raised any concerns so far. There's already an expectation
> that Coccinelle *works* and Julia's sematic patches are sound.
+1
> Besides, adding 'const' is something that causes virtually no functional
> changes to the point that build-testing is really all you need. Any
> problems caused by adding 'const' to a definition will be seen by build
> errors or warnings.
Unfortunately in this particular case they could lead to failures that can only
be detected at runtime, when failing o write to a read-only piece of memory,
due to the casting away of the constness of the pointers later.
Fortunately this was detected during code review (doh...).
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists