svn commit: r237350 - head/sys/dev/puc

Marcel Moolenaar marcel at xcllnt.net
Sat Jun 23 06:03:52 UTC 2012


On Jun 20, 2012, at 8:10 PM, Max Khon wrote:
> 
> Modified: head/sys/dev/puc/puc_cfg.h
> ==============================================================================
> --- head/sys/dev/puc/puc_cfg.h	Thu Jun 21 02:48:49 2012	(r237349)
> +++ head/sys/dev/puc/puc_cfg.h	Thu Jun 21 03:10:48 2012	(r237350)
> @@ -79,7 +79,7 @@ struct puc_cfg {
> 	int8_t		ports;
> 	int8_t		rid;		/* Rid of first port */
> 	int8_t		d_rid;		/* Delta rid of next ports */
> -	int8_t		d_ofs;		/* Delta offset of next ports */
> +	int16_t		d_ofs;		/* Delta offset of next ports */
> 	puc_config_f 	*config_function;
> };

The purpose of the uint8_t is to minimize wastage. For the uncommon
cases there's the config_function. Given that uint8_t has been adequate
for a very long time, I think it's fair to say that the MOXA devices
have an uncommon configuration and that you shouldn't pessimize the
common case by extending the type of d_ofs and as a side-effect add
padding before it *and* after it -- the structure was optimal for both
ILP32 and LP64.

Please revert the above change and handle the uncommonly large offset
by extending the existing moxa configuration file. It's the precedence
that should have been followed anyway.

Thanks,

-- 
Marcel Moolenaar
marcel at xcllnt.net




More information about the svn-src-head mailing list