From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941010AbcLVMbW (ORCPT ); Thu, 22 Dec 2016 07:31:22 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:59047 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934159AbcLVMa6 (ORCPT ); Thu, 22 Dec 2016 07:30:58 -0500 X-IronPort-AV: E=Sophos;i="5.33,388,1477954800"; d="scan'208";a="251191796" Date: Thu, 22 Dec 2016 13:29:57 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Guenter Roeck cc: cocci@systeme.lip6.fr, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Converting DEVICE_ATTR to DEVICE_ATTR_{RO,RW,WO} and changing function names at the same time In-Reply-To: <20161221214425.GA2315@roeck-us.net> Message-ID: References: <0bcce41c-88ce-09a0-2ddd-5ba2e406d482@roeck-us.net> <20161221162926.GB6188@roeck-us.net> <20161221214425.GA2315@roeck-us.net> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 21 Dec 2016, Guenter Roeck wrote: > Hi Julia, > > On Wed, Dec 21, 2016 at 08:39:38PM +0100, Julia Lawall wrote: > > > > > > On Wed, 21 Dec 2016, Guenter Roeck wrote: > > > > > Hi Julia, > > > > > > On Wed, Dec 21, 2016 at 03:05:37PM +0100, Julia Lawall wrote: > > > > A solution is below: the semantic patch, an explanation of the semantic > > > > patch, and the results. I have only tried to compile the results (make > > > > drivers/hwmon/). Two affected files were not considered for compilation: > > > > > > > > drivers/hwmon/vexpress-hwmon.o > > > > drivers/hwmon/jz4740-hwmon.o > > I compile tested those two patches. If possible please drop vexpress-hwmon.c > from the patch series; the changes in that file don't add any value. > > I compile tested all files, and reviewed the patch. It all looks good. > Please submit the series. > > Again, thanks a lot for your help! I have sent the patches. I adjusted the semantic patch so that the indentation of function parameters/arguments would only change if the length of the function name changes. Do you think this could be of more general interest in the Linux kernel? Since the semantic patch works pretty well, I could add it to the scripts/coccinelle directory? Previously, however, I got some negative feedback about this change, because people felt that the new names hid the actual behavior, so I didn't pursue it. julia