From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751736AbaLCRaP (ORCPT ); Wed, 3 Dec 2014 12:30:15 -0500 Received: from cantor2.suse.de ([195.135.220.15]:35307 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751587AbaLCRaK (ORCPT ); Wed, 3 Dec 2014 12:30:10 -0500 Date: Wed, 03 Dec 2014 18:30:08 +0100 Message-ID: From: Takashi Iwai To: Joe Perches Cc: SF Markus Elfring , Jaroslav Kysela , alsa-devel@alsa-project.org, LKML , kernel-janitors@vger.kernel.org, Julia Lawall Subject: Re: ALSA: ctxfi: Delete an unnecessary check before kfree() In-Reply-To: <1417626888.2902.13.camel@perches.com> References: <5307CAA2.8060406@users.sourceforge.net> <530A086E.8010901@users.sourceforge.net> <530A72AA.3000601@users.sourceforge.net> <530B5FB6.6010207@users.sourceforge.net> <530C5E18.1020800@users.sourceforge.net> <530CD2C4.4050903@users.sourceforge.net> <530CF8FF.8080600@users.sourceforge.net> <530DD06F.4090703@users.sourceforge.net> <5317A59D.4@users.sourceforge.net> <547E2612.6010304@users.sourceforge.net> <547EF64B.1080403@users.sourceforge.net> <1417626888.2902.13.camel@perches.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.4 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Wed, 03 Dec 2014 09:14:48 -0800, Joe Perches wrote: > > On Wed, 2014-12-03 at 13:41 +0100, Takashi Iwai wrote: > > At Wed, 03 Dec 2014 12:38:51 +0100, > > SF Markus Elfring wrote: > > > > > > >> Deletion of an unnecessary check before the function call "kfree" > > > >> One function call less in get_daio_rsc() after error detection > > > > > > > > In these cases, the changes aren't so straightforward, and they don't > > > > improve the readability. > > > > > > How do you prefer to improve the affected source code here? > > > > Don't touch then. There are no bugs to fix there. > > Takashi, what did you think of this? > https://lkml.org/lkml/2014/12/2/771 > > Just unnecessary? Well, this one looks more consistent. But honestly speaking, it's rather a matter of taste. So I'm not so much inclined to merge the stuff, too, sorry. If it's proven to reduce the compiled size, etc, I'll happily apply it, though. FWIW, what wasn't good in the original patch was to break the balance. It removed only the check for dai, and not for dao. One would wonder why there is a check only for one. It could be two simple kfree() calls instead. But then this won't be an improvement, as it gets one more function call, which is more expensive than a conditional. Takashi