linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denys Vlasenko <vda.linux@googlemail.com>
To: Hannes Reinecke <hare@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 2/3] debloat aic7xxx and aic79xx drivers
Date: Tue, 8 Apr 2008 16:08:43 +0200	[thread overview]
Message-ID: <200804081608.43248.vda.linux@googlemail.com> (raw)
In-Reply-To: <47FB63C2.4030006@suse.de>

On Tuesday 08 April 2008 14:23, Hannes Reinecke wrote:
> > I assume you are talking about this part of a patch:
> > 
> > --- linux-2.6.25-rc6-aic1/drivers/scsi/aic7xxx/aic79xx_reg.h_shipped    2008-03-23 00:43:20.000000000 +0100
> > +++ linux-2.6.25-rc6-aic2/drivers/scsi/aic7xxx/aic79xx_reg.h_shipped    2008-03-23 00:54:59.000000000 +0100
> > @@ -11,23 +11,18 @@ typedef struct ahd_reg_parse_entry {
> >         uint8_t  value;
> >         uint8_t  mask;
> >  } ahd_reg_parse_entry_t;
> > 
> > +#if 0 /* unused */
> > +
> >  #if AIC_DEBUG_REGISTERS
> >  ahd_reg_print_t ahd_mode_ptr_print;
> >  #else
> >  #define ahd_mode_ptr_print(regvalue, cur_col, wrap) \
> >      ahd_print_register(NULL, 0, "MODE_PTR", 0x00, regvalue, cur_col, wrap)
> >  #endif
> > 
> > .....
> > .....
> > 
> Correct.
> 
> > 
> > Let me explain what I am doing here. I am NOT deleting ahd_intstat_print
> > definition, I am moving it below the #endif which terminates big
> > #if 0 /* unused */  block, moving to this place:
> > 
> > 
> > @@ -2377,8 +2043,346 @@ ahd_reg_print_t ahd_scb_disconnected_lis
> >  #define ahd_scb_disconnected_lists_print(regvalue, cur_col, wrap) \
> >      ahd_print_register(NULL, 0, "SCB_DISCONNECTED_LISTS", 0x1b8, regvalue, cur_col, wrap)
> >  #endif
> > 
> > +#endif /* unused */
> > +
> > +#if AIC_DEBUG_REGISTERS
> > +ahd_reg_print_t ahd_intstat_print;
> > +#else
> > +#define ahd_intstat_print(regvalue, cur_col, wrap) \
> > +    ahd_print_register(NULL, 0, "INTSTAT", 0x01, regvalue, cur_col, wrap)
> > +#endif
> > ...
> > ...
> > 
> Hmm.
> 
> > 
> > #if 0 / #endif block ends up containing definitions of 290 functions/macros,
> > none of which is EVER used. I used this script (below) and verified that
> > they are never mentioned anywhere outside of *_shipped files.
> > I also did test builds with and without debug enabled and they build
> > with no problems. No undefined references!
> > 
> Well, still not quite. The point here is that all of the functions in the
> *_shipped files are in fact auto-generated by aicasm, based on the definitions
> in aic79xx.seq and aic79xx.reg. So the *_reg_print.c files contains
> functions for all _defined_ registers, not the actually used ones.
> What we have to do here is to modify aicasm to not print out the
> unused definitions, and copy those (autogenerated) files over to
> the *_shipped files to have them synced properly.
> Hand-patching the *_shipped files is not a good idea.

I do understand this, and I do understnad then _shipped files
are generated. But I failed to find out HOW they are generated.
I don't want to _only_ patch aicasm/* files and skip checking
that my changes work (or at least compile).

Please let me know how to regenerate these _shipped files,
and I will fix it "correctly" by modifying aicasm/* files.
--
vda

  reply	other threads:[~2008-04-08 14:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-23  3:40 [PATCH 0/3] debloat aic7xxx and aic79xx drivers Denys Vlasenko
2008-03-23  3:41 ` [PATCH 1/3] " Denys Vlasenko
2008-03-23  3:42   ` [PATCH 2/3] " Denys Vlasenko
2008-03-23  3:42     ` [PATCH 3/3] " Denys Vlasenko
2008-04-07 10:36       ` Hannes Reinecke
2008-04-07 10:34     ` [PATCH 2/3] " Hannes Reinecke
2008-04-07 18:00       ` Denys Vlasenko
2008-04-08 12:23         ` Hannes Reinecke
2008-04-08 14:08           ` Denys Vlasenko [this message]
2008-04-08 14:54             ` Hannes Reinecke
2008-04-08 15:08               ` Denys Vlasenko
2008-04-14 18:47                 ` Denys Vlasenko
     [not found]                   ` <4804BE68.4000704@suse.de>
2008-04-15 20:10                     ` Denys Vlasenko
2008-04-21  5:10                       ` Denys Vlasenko
2008-04-14 18:46             ` Denys Vlasenko
2008-04-15 14:44               ` Hannes Reinecke
2008-04-07 10:31   ` [PATCH 1/3] " Hannes Reinecke
2008-04-07 18:01     ` Denys Vlasenko
  -- strict thread matches above, loose matches on Subject: below --
2007-10-14 14:58 [PATCH 0/3] " Denys Vlasenko
2007-10-14 15:00 ` [PATCH 1/3] " Denys Vlasenko
2007-10-14 15:01   ` [PATCH 2/3] " Denys Vlasenko
2007-08-31 15:13 [PATCH 0/3] " Denys Vlasenko
2007-08-31 15:15 ` [PATCH 1/3] " Denys Vlasenko
2007-08-31 15:16   ` [PATCH 2/3] " Denys Vlasenko
2007-09-24 10:23     ` Hannes Reinecke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200804081608.43248.vda.linux@googlemail.com \
    --to=vda.linux@googlemail.com \
    --cc=akpm@linux-foundation.org \
    --cc=hare@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).