unbalanced bracket in driver?

Geir Ove Myhr gomyhr at gmail.com
Tue Apr 6 12:42:39 BST 2010


On Thu, Apr 1, 2010 at 3:07 AM, James Bosso <jimbobosso at toast.net> wrote:
> 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},
>>  };

James, this is not C code, but a diff between two files in C code. The
line starting with @@ means "at line 1222 in one file and 1505 in the
other, the following difference occurs. The only thing that is changed
here is that the  line with the + is added, the rest is equal in the
two files. Run `man diff` on your computer to get further information
about the output of diff.

Geir Ove



More information about the kernel-team mailing list