Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 10 Mar 2003 16:19:03 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 10 Mar 2003 16:19:03 -0500 Received: from chaos.analogic.com ([204.178.40.224]:63362 "EHLO chaos.analogic.com") by vger.kernel.org with ESMTP id ; Mon, 10 Mar 2003 16:18:49 -0500 Date: Mon, 10 Mar 2003 16:32:39 -0500 (EST) From: "Richard B. Johnson" Reply-To: root@chaos.analogic.com To: Luben Tuikov cc: LKML Subject: Re: [PATCH] coding style addendum In-Reply-To: <3E6CFC04.7000401@splentec.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1261 Lines: 38 On Mon, 10 Mar 2003, Luben Tuikov wrote: > Someone may find this helpful and descriptive of how kernel code > should be developed. [SNIPPED...] > + Make sure every module/subroutine hides something. This is not correct. Well known example: #include double hypot(double x, double y) { return sqrt((x * x) + (y * y)); } This subroutine hides nothing. It receives input parameters and returns the result of its operations. Such a subroutine is properly implemented and should not be be forced to hide anything. The input parameters are copies, owned by the called function. They can be manipulated like local data and must not be required to be copied into "local data". The return value is also not locally stored and therefore not hidden. Your rule would require the replication of three floating-point variables NotGood(tm). Cheers, Dick Johnson Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips). Why is the government concerned about the lunatic fringe? Think about it. - 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/