From mboxrd@z Thu Jan 1 00:00:00 1970 From: Denys Vlasenko Subject: Re: [PATCH 4/5] aic7xxx: teach aicasm to not emit unused debug code/data Date: Sat, 3 May 2008 10:40:10 +0200 Message-ID: <200805031040.10730.vda.linux@googlemail.com> References: <200804250432.16943.vda.linux@googlemail.com> <48157A34.1080600@suse.de> <200804281025.22724.vda.linux@googlemail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: Received: from fg-out-1718.google.com ([72.14.220.155]:54745 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757322AbYECIl3 (ORCPT ); Sat, 3 May 2008 04:41:29 -0400 Received: by fg-out-1718.google.com with SMTP id 19so1236050fgg.17 for ; Sat, 03 May 2008 01:41:27 -0700 (PDT) In-Reply-To: <200804281025.22724.vda.linux@googlemail.com> Content-Disposition: inline Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: Hannes Reinecke Cc: linux-scsi@vger.kernel.org, Andrew Morton On Monday 28 April 2008 10:25, Denys Vlasenko wrote: > > But now we're facing another problem: Those symbols > > referenced from the sequencer code only will in most > > cases _not_ be printed via the autogenerated _print > > functions. > > > > So what we really need to do here to do this properly > > is to write a preprocessor, which checks the _used_ > > *_print() functions in the source code and generates > > the aic7*xx_reg_print.c file on the fly. And remove > > this code from aicasm entirely. > > I agree that this would be the proper solution in a sense > that it would autodetect and generate only what is needed. > > > But this really might be considered a bit of an > > overkill. > > Since this is an ad-hoc system, instead of spending time > on more difficult system which does this detection > we can simply manually instruct aicasm to not generate > *_print() functions which won't be ever called by the driver. > > Basically this would be a respin of my patch #4. > After you introduced reference counts, I will need > to add much smaller number of "dont_generate_debug_code" > fields than before. > > Are you ok with this in principle? Ping... -- vda