From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NZJxv-0001Yz-0n for mharc-grub-devel@gnu.org; Mon, 25 Jan 2010 03:06:31 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NZJxs-0001Xa-SB for grub-devel@gnu.org; Mon, 25 Jan 2010 03:06:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NZJxo-0001Uq-9V for grub-devel@gnu.org; Mon, 25 Jan 2010 03:06:28 -0500 Received: from [199.232.76.173] (port=39777 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NZJxo-0001Um-5m for grub-devel@gnu.org; Mon, 25 Jan 2010 03:06:24 -0500 Received: from mx20.gnu.org ([199.232.41.8]:45172) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NZJxm-0005O1-Vo for grub-devel@gnu.org; Mon, 25 Jan 2010 03:06:23 -0500 Received: from xvm-190-8.ghst.net ([217.70.190.8] helo=aybabtu.com) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NZJxm-0000HX-G1 for grub-devel@gnu.org; Mon, 25 Jan 2010 03:06:22 -0500 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtp (Exim 4.69) (envelope-from ) id 1NZJxl-0006xk-F8; Mon, 25 Jan 2010 09:06:21 +0100 Received: from rmh by thorin with local (Exim 4.69) (envelope-from ) id 1NZJxk-0003gw-US; Mon, 25 Jan 2010 09:06:20 +0100 Date: Mon, 25 Jan 2010 09:06:20 +0100 From: Robert Millan To: grub-devel@gnu.org Message-ID: <20100125080620.GA14131@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by mx20.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Cc: Christian Franke Subject: On gratuitous modularization X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2010 08:06:29 -0000 Please be careful when adding modules. I see that too often new modules are added without any real need to host this code separately. There are many examples where this happened. I just noticed: commands/hdparm.c: struct grub_disk_ata_pass_through_parms apt; commands/hdparm.c: if (grub_disk_ata_pass_through (disk, &apt)) commands/hdparm.c: struct grub_disk_ata_pass_through_parms apt; commands/hdparm.c: if (grub_disk_ata_pass_through (disk, &apt)) commands/hdparm.c: struct grub_disk_ata_pass_through_parms apt; commands/hdparm.c: if (grub_disk_ata_pass_through (disk, &apt)) commands/hdparm.c: if (! grub_disk_ata_pass_through) disk/ata_pthru.c: struct grub_disk_ata_pass_through_parms *parms) disk/ata_pthru.c: grub_disk_ata_pass_through = grub_ata_pass_through; disk/ata_pthru.c: if (grub_disk_ata_pass_through == grub_ata_pass_through) disk/ata_pthru.c: grub_disk_ata_pass_through = NULL; include/grub/disk.h:struct grub_disk_ata_pass_through_parms include/grub/disk.h:extern grub_err_t (* EXPORT_VAR(grub_disk_ata_pass_through)) (grub_disk_t, include/grub/disk.h: struct grub_disk_ata_pass_through_parms *); kern/disk.c:grub_err_t (* grub_disk_ata_pass_through) (grub_disk_t, kern/disk.c: struct grub_disk_ata_pass_through_parms *); this seems unnecessary. ata_pthru is very small. If it's only used by hdparm, why not just merge it? This also avoids the additional code in kernel. A similar example is aout.mod, which is just a helper for loaders of *BSD kernels. Please also see Okuji's article on this subject: http://grub.enbug.org/OnSplittingModules -- Robert Millan "Be the change you want to see in the world" -- Gandhi