Re: [PATCH] Clean up magic numbers in i2c_parport.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Christopher,

> This small patch gets rid of some magic numbers in the i2c parport
> drivers, specifically wrt the control and status handling, using the
> symbols already defined in parport.h
> 
> The patch produces the same binary objects for i2c-parport.c and
> i2c-parport-simple.c as before.

> --- linux-2.6.16/drivers/i2c/busses/i2c-parport.h	2006-03-19 21:53:29.000000000 -0800
> +++ linux-2.6.16.i2c/drivers/i2c/busses/i2c-parport.h	2006-03-22 23:51:08.000000000 -0800
> (...)
> +#define LINEOP_DATA(val_, inverted_) \
> +   { .val=(val_), .port = DATA, .inverted=(inverted_) }
> +
> +#define LINEOP_STATUS(val_, inverted_) \
> +   { .val=(val_), .port = STAT, .inverted=(inverted_) }
> +
> +#define LINEOP_CONTROL(val_, inverted_) \
> +   { .val=(val_), .port = CTRL, .inverted=(inverted_) }
> +

Beeuh. These macros don't really help. They actually make the lines
longer! I'm not taking this change, sorry.

Other than that, I am fine with your patch. Not that I really see the
benefit, but it others do, why not. Can you please respin the patch
without the additional macros?

Thanks,
-- 
Jean Delvare
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux