Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Mar 2006 09:00:12 -0800
From:      Sam Leffler <sam@errno.com>
To:        damien.bergamini@free.fr
Cc:        Anders Nordby <anders@freebsd.org>, flz@freebsd.org, Luigi Rizzo <rizzo@icir.org>, core@freebsd.org, sam@freebsd.org, damien@freebsd.org, freebsd-net@freebsd.org, Max Laier <max@love2party.net>
Subject:   Re: iwi stability when doing large file transfers/backups
Message-ID:  <4407249C.6070201@errno.com>
In-Reply-To: <1141308201.4406fb29ec693@imp7-g19.free.fr>
References:  <20060301193342.GA11086@totem.fix.no> <20060301115655.A50285@xorpc.icir.org> <200603012150.44445.max@love2party.net> <20060301154342.A53213@xorpc.icir.org> <012501c63dcc$4671e590$0300a8c0@COMETE> <20060302024926.B61112@xorpc.icir.org> <009b01c63dec$9262ea10$0300a8c0@COMETE> <20060302052633.B63009@xorpc.icir.org> <1141308201.4406fb29ec693@imp7-g19.free.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
damien.bergamini@free.fr wrote:
> The one who wrote that diff, whoever he is, obviously don't
> understand C code.
> 
> Otherwise, why would he write such nonsense:
> 
> static uint32_t
> iwi_toggle_event(uint32_t r)
> {
> 	r &= ~IWI_RST_STANDBY;
> 	if (r & IWI_RST_GATE_ODMA)
> 		r &= ~IWI_RST_GATE_ODMA;
> 	if (r & IWI_RST_GATE_IDMA)
> 		r &= ~IWI_RST_GATE_IDMA;
> 	if (r & IWI_RST_GATE_ADMA)
> 		r &= ~IWI_RST_GATE_ADMA;
> 	return r;
> }
> 
> when you could just write:
> 
> r &= ~(IWI_RST_STANDBY | IWI_RST_GATE_ODMA |
>        IWI_RST_GATE_IDMA | IWI_RST_GATE_ADMA);
> 
> but he sure knows how to steel code from others and
> violate the GPL by the way:
> 
> From Linux ipw2200-1.1.0 (GPL):
> 
> static u32 ipw_register_toggle(u32 reg)
> {
> 	reg &= ~IPW_START_STANDBY;
> 	if (reg & IPW_GATE_ODMA)
> 		reg &= ~IPW_GATE_ODMA;
> 	if (reg & IPW_GATE_IDMA)
> 		reg &= ~IPW_GATE_IDMA;
> 	if (reg & IPW_GATE_ADMA)
> 		reg &= ~IPW_GATE_ADMA;
> 	return reg;
> }
> 
> ...mmm very similar right?

I'm glad you see ways to improve the code.  As to concerns about GPL 
contamination you are way off base.  Oh and of course I wrote this 
code--as you knew all along.

	Sam






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4407249C.6070201>