From patchwork Thu Nov 6 19:55:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Jarzmik X-Patchwork-Id: 5246601 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 768489F2F1 for ; Thu, 6 Nov 2014 19:58:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 912812011E for ; Thu, 6 Nov 2014 19:58:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5341620103 for ; Thu, 6 Nov 2014 19:58:15 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XmTAB-0007sk-3S; Thu, 06 Nov 2014 19:56:11 +0000 Received: from smtp05.smtpout.orange.fr ([80.12.242.127] helo=smtp.smtpout.orange.fr) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XmTA0-0007pP-VZ for linux-arm-kernel@lists.infradead.org; Thu, 06 Nov 2014 19:56:04 +0000 Received: from beldin ([109.222.82.103]) by mwinf5d10 with ME id CKvb1p00F2DlPNM03KvbAu; Thu, 06 Nov 2014 20:55:38 +0100 X-ME-Helo: beldin X-ME-Date: Thu, 06 Nov 2014 20:55:38 +0100 X-ME-IP: 109.222.82.103 From: Robert Jarzmik To: Daniel Mack Subject: Re: [PATCH] usb: gadget: udc: pxa27x: fix build warning when !OF References: <1415249759-6219-1-git-send-email-balbi@ti.com> <545B196F.2020303@zonque.org> X-URL: http://belgarath.falguerolles.org/ Date: Thu, 06 Nov 2014 20:55:35 +0100 In-Reply-To: <545B196F.2020303@zonque.org> (Daniel Mack's message of "Thu, 06 Nov 2014 07:47:11 +0100") Message-ID: <87ppd0xfwo.fsf@free.fr> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.92 (gnu/linux) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141106_115601_329186_F9E99756 X-CRM114-Status: GOOD ( 12.53 ) X-Spam-Score: -0.0 (/) Cc: Linux ARM Kernel Mailing List , Linux USB Mailing List , haojian.zhuang@gmail.com, Felipe Balbi X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Daniel Mack writes: > On 11/06/2014 05:55 AM, Felipe Balbi wrote: >> in case kernel is built without CONFIG_OF there >> will be a build warning (see below) due to of_match_ptr() >> being defined to NULL. >> >> Because of_match_ptr() is pretty pointless anyway, >> let's just remove it and fix the warning. > > The alternative, of course, would be to wrap the udc_pxa_dt_ids > declaration in IS_ENABLED(CONFIG_OF), but I'm not sure whether it's > worth it. Ah, wasn't the patch named "[PATCH v1] usb: gadget: pxa27x_udc: fix warning in non device-tree build" sent October the 29th fixing this issue (in [1]) ? Cheers. --- Robert [1] Patch From: Robert Jarzmik Subject: [PATCH v1] usb: gadget: pxa27x_udc: fix warning in non device-tree build To: Felipe Balbi Cc: linux-usb@vger.kernel.org, Robert Jarzmik Date: Wed, 29 Oct 2014 21:58:33 +0100 (1 week, 22 hours, 56 minutes ago) Message-Id: <1414616313-8212-1-git-send-email-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.1.0 The recent change bringing device-tree support triggers a warning in a non device-tree build : drivers/usb/gadget/udc/pxa27x_udc.c:2405:28: warning: 'udc_pxa_dt_ids' defined but not used [-Wunused-variable] Fix the warning with a preprocessor condition. Signed-off-by: Robert Jarzmik --- drivers/usb/gadget/udc/pxa27x_udc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c index 69e7b816..9b03fab 100644 --- a/drivers/usb/gadget/udc/pxa27x_udc.c +++ b/drivers/usb/gadget/udc/pxa27x_udc.c @@ -2400,11 +2400,13 @@ static struct pxa_udc memory = { } }; +#if defined(CONFIG_OF) static struct of_device_id udc_pxa_dt_ids[] = { { .compatible = "marvell,pxa270-udc" }, {} }; MODULE_DEVICE_TABLE(of, udc_pxa_dt_ids); +#endif /** * pxa_udc_probe - probes the udc device