Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S264704AbUFGNSL (ORCPT ); Mon, 7 Jun 2004 09:18:11 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264720AbUFGNP1 (ORCPT ); Mon, 7 Jun 2004 09:15:27 -0400 Received: from cantor.suse.de ([195.135.220.2]:44438 "EHLO Cantor.suse.de") by vger.kernel.org with ESMTP id S264697AbUFGNKF (ORCPT ); Mon, 7 Jun 2004 09:10:05 -0400 Date: Mon, 07 Jun 2004 15:10:04 +0200 Message-ID: From: Takashi Iwai To: Linus Torvalds Cc: viro@parcelfarce.linux.theplanet.co.uk, linux-kernel@vger.kernel.org, perex@suse.cz Subject: Re: [RFC] ASLA design, depth of code review and lack thereof In-Reply-To: References: <20040604230819.GR12308@parcelfarce.linux.theplanet.co.uk> User-Agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 MULE XEmacs/21.4 (patch 13) (Rational FORTRAN) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1426 Lines: 47 At Fri, 4 Jun 2004 16:29:20 -0700 (PDT), Linus Torvalds wrote: > > > > On Sat, 5 Jun 2004 viro@parcelfarce.linux.theplanet.co.uk wrote: > > > > > > case SNDRV_PCM_FORMAT_FLOAT_BE: > > { > > union { > > float f; > > u_int32_t i; > > } u; > > u.f = 0.0; > > #ifdef SNDRV_LITTLE_ENDIAN > > return bswap_32(u.i); > > #else > > return u.i; > > #endif > > So what I wonder about is why anybody does something like this in the > first place? > > Any IEEE format architecture will make 0.0 be all-zeroes, last I saw. In > fact, any architecture (IEEE or not) where that isn't true will have > serious problems with floating point values in bss (hint: the bss isn't > initialzed to 0.0, it's initialized to the bit pattern 0). > > So what the above boils dow to is a very very strange way of writing > > return 0; > > and it has absolutely _zero_ to do with "little-endian" or anything else > for that matter. Yes, fully agreed. We'll fix the code around this. -- Takashi Iwai ALSA Developer - www.alsa-project.org - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/