lkml.org 
[lkml]   [2017]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/4] misc: ds1682: Add OF device ID table
From
Date
Hello Arnd,

Thanks a lot for your feedback.

On 03/14/2017 05:46 PM, Arnd Bergmann wrote:
> On Tue, Mar 14, 2017 at 4:16 PM, Javier Martinez Canillas
> <javier@osg.samsung.com> wrote:
>
>> +static const struct of_device_id ds1682_of_match[] = {
>> + { .compatible = "dallas,ds1682", },
>> + {}
>> +};
>> +MODULE_DEVICE_TABLE(of, ds1682_of_match);
>> +
>> static struct i2c_driver ds1682_driver = {
>> .driver = {
>> .name = "ds1682",
>> + .of_match_table = of_match_ptr(ds1682_of_match),
>> },
>> .probe = ds1682_probe,
>> .remove = ds1682_remove,
>
> This will cause a warning if CONFIG_OF is disabled, since ds1682_of_match
> becomes unused in this case. Please remove the of_match_ptr() around
> the reference to ds1682_of_match.
>

Right, I tested it when CONFIG_OF is disabled with gcc (GCC) 6.3.1 20161221
and I didn't see any warning. But you are right and I'll re-spin the series
without using the macro.

> Arnd
>

Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America

\
 
 \ /
  Last update: 2017-03-15 01:39    [W:0.162 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site