Return-path: Received: from mail-oi0-f68.google.com ([209.85.218.68]:36744 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932235AbcILN5m (ORCPT ); Mon, 12 Sep 2016 09:57:42 -0400 MIME-Version: 1.0 In-Reply-To: <877fah5j35.fsf@linux.intel.com> References: <1473599168-30561-1-git-send-email-Julia.Lawall@lip6.fr> <20160911172105.GB5493@intel.com> <20160912131625.GD957@intel.com> <877fah5j35.fsf@linux.intel.com> From: Geert Uytterhoeven Date: Mon, 12 Sep 2016 15:57:40 +0200 Message-ID: (sfid-20160912_155811_525286_C7DE3CDF) Subject: Re: [PATCH 00/26] constify local structures To: Felipe Balbi Cc: Jarkko Sakkinen , Julia Lawall , Linux-Renesas , Joe Perches , "kernel-janitors@vger.kernel.org" , Sergei Shtylyov , Linux PM list , platform-driver-x86@vger.kernel.org, Linux Media Mailing List , linux-can@vger.kernel.org, Tatyana Nikolova , Shiraz Saleem , Mustafa Ismail , Chien Tin Tung , linux-rdma , "netdev@vger.kernel.org" , driverdevel , ALSA Development Mailing List , "linux-kernel@vger.kernel.org" , Linux Fbdev development list , linux-wireless , Jason Gunthorpe , tpmdd-devel@lists.sourceforge.net, scsi , linux-spi , USB list , ACPI Devel Maling List Content-Type: text/plain; charset=UTF-8 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Mon, Sep 12, 2016 at 3:43 PM, Felipe Balbi wrote: > Jarkko Sakkinen 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@linux-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