Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sun, 19 Jan 2003 20:35:15 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sun, 19 Jan 2003 20:35:15 -0500 Received: from 5-116.ctame701-1.telepar.net.br ([200.193.163.116]:58241 "EHLO 5-116.ctame701-1.telepar.net.br") by vger.kernel.org with ESMTP id ; Sun, 19 Jan 2003 20:35:14 -0500 Date: Sun, 19 Jan 2003 23:44:10 -0200 (BRST) From: Rik van Riel X-X-Sender: riel@imladris.surriel.com To: Pavel Machek cc: kernel list , ACPI mailing list , Andrew Grover Subject: Re: Code obfuscation in acpi In-Reply-To: <20030118213134.GA8968@elf.ucw.cz> Message-ID: References: <20030118213134.GA8968@elf.ucw.cz> X-spambait: aardvark@kernelnewbies.org X-spammeplease: aardvark@nl.linux.org 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 On Sat, 18 Jan 2003, Pavel Machek wrote: > #define acpi_driver_data(d) ((d)->driver_data) > > ... very nice for obfuscating code ... This is usually called "abstraction" and allows you to change the data structures (when needed) without breaking all the code. You can learn from this. If swsusp used abstractions it wouldn't need to have to stick its nose into the code and data structures from other subsystems and it might even stop breaking every other release. cheers, Rik -- Bravely reimplemented by the knights who say "NIH". http://www.surriel.com/ http://guru.conectiva.com/ Current spamtrap: october@surriel.com - 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/