unbalanced bracket in driver?

James Bosso jimbobosso at toast.net
Thu Apr 1 01:07:27 UTC 2010

I am not a programmer.  I took a C course back in 1992.

In checking compatibility of an old HP webcam RZ406AA, I came across a
driver written by your kernel team.  It looked like the bracket on
line 1 below is unbalanced.

>  struct sensor_info {
>  	int sensorId;
>  	__u8 I2cAdd;
> @@ -1222,6 +1505,7 @@ static const struct sensor_info sensor_info_data[] = {
>  	{SENSOR_MI1320,     0x80 | 0xc8, 0x00, 0x148c, 0x64, 0x65, 0x01},
>  	{SENSOR_OV7670,     0x80 | 0x21, 0x0a, 0x7673, 0x66, 0x67, 0x05},
>  	{SENSOR_MI1310_SOC, 0x80 | 0x5d, 0x00, 0x143a, 0x24, 0x25, 0x01},
> +	{SENSOR_PO1200,     0x80 | 0x5c, 0x00, 0x1200, 0x67, 0x67, 0x01},
>  };

Note the bracket at the end of the line that starts with @@, which is
balanced by the bracket on the last line, leaving the first bracket
unclosed.  Perhaps it is closed much further down?
Jim Bosso

More information about the kernel-team mailing list