From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D17A7C433E2 for ; Wed, 15 Jul 2020 21:24:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B8C592067D for ; Wed, 15 Jul 2020 21:24:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726968AbgGOVYr (ORCPT ); Wed, 15 Jul 2020 17:24:47 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:53619 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726356AbgGOVYq (ORCPT ); Wed, 15 Jul 2020 17:24:46 -0400 X-Originating-IP: 90.65.108.121 Received: from localhost (lfbn-lyo-1-1676-121.w90-65.abo.wanadoo.fr [90.65.108.121]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 43E79E0003; Wed, 15 Jul 2020 21:24:44 +0000 (UTC) Date: Wed, 15 Jul 2020 23:24:43 +0200 From: Alexandre Belloni To: Lee Jones Cc: broonie@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, Radu Pirea , Nicolas Ferre , Ludovic Desroches Subject: Re: [PATCH 12/14] spi: spi-at91-usart: Make use of the defined 'struct of_device_id' Message-ID: <20200715212443.GC23553@piout.net> References: <20200715150632.409077-1-lee.jones@linaro.org> <20200715150632.409077-13-lee.jones@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200715150632.409077-13-lee.jones@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Lee, On 15/07/2020 16:06:30+0100, Lee Jones wrote: > It's there so why not use it. > Is that the correct resolution? Isn't the proper thing to do simply removing at91_usart_spi_dt_ids as the only way it will ever be probed is through drivers/mfd/at91-usart.c and I would think matching the driver name is enough. > Fixes the following W=1 kernel build warning(s): > > drivers/spi/spi-at91-usart.c:684:34: warning: ‘at91_usart_spi_dt_ids’ defined but not used [-Wunused-const-variable=] > 684 | static const struct of_device_id at91_usart_spi_dt_ids[] = { > | ^~~~~~~~~~~~~~~~~~~~~ > > Cc: Radu Pirea > Cc: Nicolas Ferre > Cc: Alexandre Belloni > Cc: Ludovic Desroches > Signed-off-by: Lee Jones > --- > drivers/spi/spi-at91-usart.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/spi/spi-at91-usart.c b/drivers/spi/spi-at91-usart.c > index 88033422a42ae..d47a20be43ccd 100644 > --- a/drivers/spi/spi-at91-usart.c > +++ b/drivers/spi/spi-at91-usart.c > @@ -692,6 +692,7 @@ static struct platform_driver at91_usart_spi_driver = { > .driver = { > .name = "at91_usart_spi", > .pm = &at91_usart_spi_pm_ops, > + .of_match_table = at91_usart_spi_dt_ids, > }, > .probe = at91_usart_spi_probe, > .remove = at91_usart_spi_remove, > -- > 2.25.1 > -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com