lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <s5hh9xcr68v.wl-tiwai@suse.de>
Date:	Wed, 03 Dec 2014 18:30:08 +0100
From:	Takashi Iwai <tiwai@...e.de>
To:	Joe Perches <joe@...ches.com>
Cc:	SF Markus Elfring <elfring@...rs.sourceforge.net>,
	Jaroslav Kysela <perex@...ex.cz>, alsa-devel@...a-project.org,
	LKML <linux-kernel@...r.kernel.org>,
	kernel-janitors@...r.kernel.org,
	Julia Lawall <julia.lawall@...6.fr>
Subject: Re: ALSA: ctxfi: Delete an unnecessary check before kfree()

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ