Re: commas

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

 



2013/8/7 Julia Lawall <julia.lawall@xxxxxxx>:
> There are a number of places where kernel code uses commas, where one
> might normally expect a semicolon.  For example,
>
> drivers/cpufreq/sparc-us2e-cpufreq.c:
>
>                 driver->target = us2e_freq_target;
>                 driver->get = us2e_freq_get;
>                 driver->exit = us2e_freq_cpu_exit;
>                 driver->owner = THIS_MODULE,     <------------- comma here
>                 strcpy(driver->name, "UltraSPARC-IIe");
>
>                 cpufreq_us2e_driver = driver;
>                 ret = cpufreq_register_driver(driver);
>
> Is there any reason for this?  I guess that they are not very harmful, but
> if one happens to write a static checker rule that expects a ;, then this
> code will be overlooked.
Hi Julia,

IMHO, the only reason there's a comma there is because the comma key
is next to the semi-colon on some keyboards :) (the french one for
instance).

Clearly, that was not intended here. I think it should be corrected.

Richard.
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux