[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3254d654-8b4f-b533-b65b-d02a6c8dd55d@osg.samsung.com>
Date: Wed, 15 Mar 2017 00:26:05 -0300
From: Javier Martinez Canillas <javier@....samsung.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH 2/4] misc: ds1682: Add OF device ID table
On 03/14/2017 09:38 PM, Javier Martinez Canillas wrote:
> 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@....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
I didn't notice the build warning because I forgot to build with W=1 before
posting, sorry about that.
> without using the macro.
>
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
Powered by blists - more mailing lists