[PATCH] hdparm size reduction
Tito
farmatito at tiscali.it
Tue May 2 06:07:56 UTC 2006
On Monday 1 May 2006 21:19, you wrote:
> On Saturday 29 April 2006 3:14 pm, Tito wrote:
> > Hi,
> > this patch applies on top of the last applied patches of Denis
> > and removes some dead code in identify(),
> > some obsolete code in process_dev() and some obsolete functions
> > (no_scsi(), no_xt(), no_scsi_no_xt()) as in latest hdparm6.6.
> >
> > Please apply.
>
> The first two hunks were rejected.
>
> What's the deal with chksum? In the previous code, it was never being set (it
> was only set in the dead code that was never reached), and now it's tested in
> one place where they only care that' it's zero. There's another place that
> we print it and say it's correct, but we never actually _test_ it so how do
> we know...?
Maybe here (in the rejected hunks)?
/* calculate checksum over all bytes */
for(ii = GEN_CONFIG; ii<=INTEGRITY; ii++) {
chksum += val[ii] + (val[ii] >> 8);
}
BTW: identify() could be a candidate for an ATTRIBUTE_NORETURN?
Ciao,
Tito
> > Ciao,
> > Tito
>
> Rob
More information about the busybox
mailing list