Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760757AbXEQRyF (ORCPT ); Thu, 17 May 2007 13:54:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756373AbXEQRxw (ORCPT ); Thu, 17 May 2007 13:53:52 -0400 Received: from smtp.nokia.com ([131.228.20.171]:46166 "EHLO mgw-ext12.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756312AbXEQRxv convert rfc822-to-8bit (ORCPT ); Thu, 17 May 2007 13:53:51 -0400 Subject: Re: [PATCH] ubi: kill homegrown endian macros From: Artem Bityutskiy Reply-To: dedekind@infradead.org To: Andrew Morton Cc: linux-kernel@vger.kernel.org, Christoph Hellwig In-Reply-To: <20070517102931.6bbbad1a.akpm@linux-foundation.org> References: <20070517143200.GA30850@lst.de> <1179413443.3642.49.camel@sauron> <20070517145653.GA968@lst.de> <1179414590.3642.69.camel@sauron> <20070517102931.6bbbad1a.akpm@linux-foundation.org> Content-Type: text/plain; charset=utf-8 Date: Thu, 17 May 2007 20:46:46 +0300 Message-Id: <1179424006.3642.84.camel@sauron> Mime-Version: 1.0 X-Mailer: Evolution 2.8.3 (2.8.3-2.fc6) Content-Transfer-Encoding: 8BIT X-OriginalArrivalTime: 17 May 2007 17:46:46.0759 (UTC) FILETIME=[56DE5770:01C798AB] X-Nokia-AV: Clean Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1261 Lines: 31 On Thu, 2007-05-17 at 10:29 -0700, Andrew Morton wrote: > umm.. I'd say what you've done in there is an improvement to the exiting > stuff: getting gcc to check it is better than having to use sparse. > > I'd have expected gcc to generate poorer code with your approach but I'm > showing zero text size changes from Christoph's patch (gcc-4.1 and > gcc-3.4.5). > > So I wouldn't be averse to creating a new, generic, kernel-wide alternative > to the existing __be32/__le32/etc code. It is an improvement. > > We could conceivably simply switch the existing stuff to use structs, but > quite a lot of code assumes that cpu_to_foo32(0) == 0 and just does > open-coded assigments of zero. They'd need fixups. Andrew, thanks for answer. I personally do not think this should be applied before we have better __be32 and friends. Thus, if I can do so, I will just sit and wait for your decision - whether you include this patch to -mm or not :-) . -- Best regards, Artem Bityutskiy (Битюцкий Артём) - 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/