From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751279AbdCOAit (ORCPT ); Tue, 14 Mar 2017 20:38:49 -0400 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:44799 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750853AbdCOAis (ORCPT ); Tue, 14 Mar 2017 20:38:48 -0400 Subject: Re: [PATCH 2/4] misc: ds1682: Add OF device ID table To: Arnd Bergmann References: <20170314151638.23132-1-javier@osg.samsung.com> <20170314151638.23132-3-javier@osg.samsung.com> Cc: Linux Kernel Mailing List , Greg Kroah-Hartman From: Javier Martinez Canillas Message-ID: Date: Tue, 14 Mar 2017 21:38:37 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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