From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753082AbdK1MdV (ORCPT ); Tue, 28 Nov 2017 07:33:21 -0500 Received: from smtp-1b.atlantis.sk ([80.94.52.26]:39595 "EHLO smtp-1b.atlantis.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752715AbdK1MdT (ORCPT ); Tue, 28 Nov 2017 07:33:19 -0500 From: Ondrej Zary To: alsa-devel@alsa-project.org Subject: Re: [alsa-devel] ALSA: nm256: Fine-tuning for three function implementations Date: Tue, 28 Nov 2017 13:33:14 +0100 User-Agent: KMail/1.9.10 (enterprise35 0.20100827.1168748) Cc: SF Markus Elfring , Takashi Iwai , Arvind Yadav , Takashi Sakamoto , kernel-janitors@vger.kernel.org, LKML References: <2cbef557-5f89-c630-e108-14ef2ce6b41a@users.sourceforge.net> In-Reply-To: <2cbef557-5f89-c630-e108-14ef2ce6b41a@users.sourceforge.net> X-KMail-QuotePrefix: > MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Disposition: inline Message-Id: <201711281333.15131.linux@rainbow-software.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id vASCXdNi008681 On Tuesday 28 November 2017, SF Markus Elfring wrote: > >>>> There is a general source code transformation pattern involved. > >>>> So I find that it is systematic. > >>>> > >>>> But I did not dare to develop a script variant for the semantic patch > >>>> language (Coccinelle software) which can handle all special use cases > >>>> as a few of them are already demonstrated in this tiny patch series. > >>> > >>> Then you're doing everything by hands, > >> > >> I am navigating through possible changes around the pattern > >> “Use common error handling code” mostly manually so far. > >> > >>> and can be wrong > >> > >> Such a possibility remains as usual. > > > > "As usual" doesn't suffice. > > There can be additional means be used to reduce the probability > of undesired side effects. > > > It must be "almost perfect" for such a code refactoring. > > Can you get the impression that the shown transformation patterns were > correctly applied for the source file “sound/pci/nm256/nm256.c”? Have you tested the driver? Probably not. Please don't "improve" working drivers unless you have the hardware to test your changes. Patches like this are known to cause regressions. If the hardware is rare (like the NM256), the regression can hit years later when someone with such HW upgrades distro (e.g. Debian stable). -- Ondrej Zary