fpga: xilinx-pr-decoupler: Fix unused xlnx_pr_decoupler_of_match warning for !CONFIG_OF
Message ID | 20231012192149.1546368-1-robh@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp1450701vqb; Thu, 12 Oct 2023 12:22:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFyONjuPb0X3geXK1svmqGUXHMLGswJB2HfZj6/8CbSD1BVxW8VdHFbCPGRd9sxRn6r9TgJ X-Received: by 2002:a17:903:22ce:b0:1bb:83ec:832 with SMTP id y14-20020a17090322ce00b001bb83ec0832mr27845391plg.2.1697138541738; Thu, 12 Oct 2023 12:22:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697138541; cv=none; d=google.com; s=arc-20160816; b=PnjSuX/5pWwj3Hpd6Jndic4bBBbiTpmguOhxD7DMXYT96oR6+PI5CMjs/gT76fFL/6 6wqYwh91gNHwf0KPouLrJ9Gg5rc6tMpryKBrwmzwHdXw9kaVX0FXceGhVLvd03Y4ANUy 5PSWcfe6mBIPMmWVWFQ8FY22nP/TCXAlIM6Y9zAL01wlXXqcfcktvdu6UWU7aFLqTWrW QgHUpXo05oPjzDnKE9Fh64WVJaTKTas8prbtLWT0KAdPvgW8L3xZ0ifMLp3+QArMkBn3 pl+XTbKJuaxaRPq/d5xerSk4Izo5Fy8Trl9BOIRrxsZ4/Q1S2jLnWswkE02VzPUR+8sk 0wbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=YifRZNU+dv3M7euSgUX2HbiR3CE8mYzoIwd8RDs3fe8=; fh=PmlCcTfwKQRuiGNF2gCFlHbKk98/p0IPwO0Lrw+ZhG0=; b=mni8FkZRz061bJ0lag5KjtE9u5X4/SY5uWYdjJFu06AZPKhHo1jo+WwLHE3KGqhRW9 Wt2Wyr9AAC/nC4Gqwb5mAAxYwdb2mA315OeiGB5TLuxXAu5X4CqP5GmhmUCKkZJ9+81+ 6xLQNjjgi6S1YCyFUPj4Ps9zqsA3gOXc3iXiXfZMMkHR8GtQ0/mGpC85zarW606zfEH6 5Bt8UercHSpNV87SDPjFvgGRjcdR9KYxnp3Clr0wrXoznPl+u/pIPbegHiI8+qvhtDKG RXutEQ9ykzpeRj5yqZKMR+dGHDIjO1w02tN9+5/sewqICXRo8Vgto0mjfNnKHe6+pL0u BPRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Iz6QB+RK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id v7-20020a170902b7c700b001b86ddfd49bsi2302133plz.6.2023.10.12.12.22.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 12:22:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Iz6QB+RK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id E5C0B825F12C; Thu, 12 Oct 2023 12:22:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1441868AbjJLTWA (ORCPT <rfc822;rua109.linux@gmail.com> + 19 others); Thu, 12 Oct 2023 15:22:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229576AbjJLTV7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 12 Oct 2023 15:21:59 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C57AB7; Thu, 12 Oct 2023 12:21:58 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACF8BC433C8; Thu, 12 Oct 2023 19:21:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697138517; bh=wmAcJHNXIbXS2mL72Nqv5JNfiEX38pTlqswII+cQDeI=; h=From:To:Cc:Subject:Date:From; b=Iz6QB+RKMbsnELvBdNMZG0SFsuTbIWHMTTnVZDSIalACMaPtvi879bZbZwXYfeMGo /XTjW8VC/5kZW2VoeS6Q+G8OWZza5GZpYBy/YZyQhV+CnclGYbjPuVEqax02ZmbhCh jhXvfznEk8pPvBGPs8FlqueqYX5RCi/ULIAv9qBF0+PP0jFPIkyfCu71xRTB2kipv+ 8dJNKcOZOTUzlmMiR6S8QWaiXq+iEfv5c/LFFYvqmXUDFQdgH5p85wwu+Ctk4rHcxk GkWrLd749DW7MQrHoLGYJZHLefVMcwvJAhUPBSSEzQxA6onub4ZRqF6G5Vc3SsXPS9 FRBGxkiIZuEgA== Received: (nullmailer pid 1546513 invoked by uid 1000); Thu, 12 Oct 2023 19:21:55 -0000 From: Rob Herring <robh@kernel.org> To: Moritz Fischer <mdf@kernel.org>, Wu Hao <hao.wu@intel.com>, Xu Yilun <yilun.xu@intel.com>, Tom Rix <trix@redhat.com>, Michal Simek <michal.simek@amd.com> Cc: kernel test robot <lkp@intel.com>, linux-fpga@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] fpga: xilinx-pr-decoupler: Fix unused xlnx_pr_decoupler_of_match warning for !CONFIG_OF Date: Thu, 12 Oct 2023 14:21:48 -0500 Message-ID: <20231012192149.1546368-1-robh@kernel.org> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 12 Oct 2023 12:22:18 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779578743571646901 X-GMAIL-MSGID: 1779578743571646901 |
Series |
fpga: xilinx-pr-decoupler: Fix unused xlnx_pr_decoupler_of_match warning for !CONFIG_OF
|
|
Commit Message
Rob Herring
Oct. 12, 2023, 7:21 p.m. UTC
Commit 8c966aadcc02 ("fpga: Use device_get_match_data()") dropped the
unconditional use of xlnx_pr_decoupler_of_match resulting in this
warning:
drivers/fpga/xilinx-pr-decoupler.c:94:34: warning: unused variable 'xlnx_pr_decoupler_of_match' [-Wunused-const-variable]
The fix is to drop of_match_ptr() which is not necessary because DT is
always used for this driver.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202310100247.Y7BFcalX-lkp@intel.com/
Signed-off-by: Rob Herring <robh@kernel.org>
---
drivers/fpga/xilinx-pr-decoupler.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Thu, Oct 12, 2023 at 02:21:48PM -0500, Rob Herring wrote: > Commit 8c966aadcc02 ("fpga: Use device_get_match_data()") dropped the Hi rob: Unfortunately I re-applied Commit 8c966aadcc02 and the previous commit id is lost. Since the 2 patches are not upstreamed yet, could I just merge them into one? Thanks, Yilun > unconditional use of xlnx_pr_decoupler_of_match resulting in this > warning: > > drivers/fpga/xilinx-pr-decoupler.c:94:34: warning: unused variable 'xlnx_pr_decoupler_of_match' [-Wunused-const-variable] > > The fix is to drop of_match_ptr() which is not necessary because DT is > always used for this driver. > > Reported-by: kernel test robot <lkp@intel.com> > Closes: https://lore.kernel.org/oe-kbuild-all/202310100247.Y7BFcalX-lkp@intel.com/ > Signed-off-by: Rob Herring <robh@kernel.org> > --- > drivers/fpga/xilinx-pr-decoupler.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/fpga/xilinx-pr-decoupler.c b/drivers/fpga/xilinx-pr-decoupler.c > index 0c012d0f616d..68835896f180 100644 > --- a/drivers/fpga/xilinx-pr-decoupler.c > +++ b/drivers/fpga/xilinx-pr-decoupler.c > @@ -167,7 +167,7 @@ static struct platform_driver xlnx_pr_decoupler_driver = { > .remove = xlnx_pr_decoupler_remove, > .driver = { > .name = "xlnx_pr_decoupler", > - .of_match_table = of_match_ptr(xlnx_pr_decoupler_of_match), > + .of_match_table = xlnx_pr_decoupler_of_match, > }, > }; > > -- > 2.42.0 >
On Fri, Oct 13, 2023 at 4:37 AM Xu Yilun <yilun.xu@linux.intel.com> wrote: > > On Thu, Oct 12, 2023 at 02:21:48PM -0500, Rob Herring wrote: > > Commit 8c966aadcc02 ("fpga: Use device_get_match_data()") dropped the > > Hi rob: > > Unfortunately I re-applied Commit 8c966aadcc02 and the previous commit > id is lost. > > Since the 2 patches are not upstreamed yet, could I just merge them into > one? Yes, that's fine. Rob > > Thanks, > Yilun > > > unconditional use of xlnx_pr_decoupler_of_match resulting in this > > warning: > > > > drivers/fpga/xilinx-pr-decoupler.c:94:34: warning: unused variable 'xlnx_pr_decoupler_of_match' [-Wunused-const-variable] > > > > The fix is to drop of_match_ptr() which is not necessary because DT is > > always used for this driver. > > > > Reported-by: kernel test robot <lkp@intel.com> > > Closes: https://lore.kernel.org/oe-kbuild-all/202310100247.Y7BFcalX-lkp@intel.com/ > > Signed-off-by: Rob Herring <robh@kernel.org> > > --- > > drivers/fpga/xilinx-pr-decoupler.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/fpga/xilinx-pr-decoupler.c b/drivers/fpga/xilinx-pr-decoupler.c > > index 0c012d0f616d..68835896f180 100644 > > --- a/drivers/fpga/xilinx-pr-decoupler.c > > +++ b/drivers/fpga/xilinx-pr-decoupler.c > > @@ -167,7 +167,7 @@ static struct platform_driver xlnx_pr_decoupler_driver = { > > .remove = xlnx_pr_decoupler_remove, > > .driver = { > > .name = "xlnx_pr_decoupler", > > - .of_match_table = of_match_ptr(xlnx_pr_decoupler_of_match), > > + .of_match_table = xlnx_pr_decoupler_of_match, > > }, > > }; > > > > -- > > 2.42.0 > >
On Fri, Oct 13, 2023 at 8:15 AM Rob Herring <robh@kernel.org> wrote: > > On Fri, Oct 13, 2023 at 4:37 AM Xu Yilun <yilun.xu@linux.intel.com> wrote: > > > > On Thu, Oct 12, 2023 at 02:21:48PM -0500, Rob Herring wrote: > > > Commit 8c966aadcc02 ("fpga: Use device_get_match_data()") dropped the > > > > Hi rob: > > > > Unfortunately I re-applied Commit 8c966aadcc02 and the previous commit > > id is lost. > > > > Since the 2 patches are not upstreamed yet, could I just merge them into > > one? > > Yes, that's fine. Looks like altera-ps-spi.c also needs the same fix. Do you mind making the same change there? Rob
On Fri, Oct 13, 2023 at 01:36:28PM -0500, Rob Herring wrote: > On Fri, Oct 13, 2023 at 8:15 AM Rob Herring <robh@kernel.org> wrote: > > > > On Fri, Oct 13, 2023 at 4:37 AM Xu Yilun <yilun.xu@linux.intel.com> wrote: > > > > > > On Thu, Oct 12, 2023 at 02:21:48PM -0500, Rob Herring wrote: > > > > Commit 8c966aadcc02 ("fpga: Use device_get_match_data()") dropped the > > > > > > Hi rob: > > > > > > Unfortunately I re-applied Commit 8c966aadcc02 and the previous commit > > > id is lost. > > > > > > Since the 2 patches are not upstreamed yet, could I just merge them into > > > one? > > > > Yes, that's fine. > > Looks like altera-ps-spi.c also needs the same fix. Do you mind making > the same change there? Fixed & applied. Thanks, Yilun > > Rob
Hi Rob, kernel test robot noticed the following build errors: [auto build test ERROR on xilinx-xlnx/master] [also build test ERROR on linus/master v6.6-rc6] [cannot apply to next-20231019] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Rob-Herring/fpga-xilinx-pr-decoupler-Fix-unused-xlnx_pr_decoupler_of_match-warning-for-CONFIG_OF/20231017-112523 base: https://github.com/Xilinx/linux-xlnx master patch link: https://lore.kernel.org/r/20231012192149.1546368-1-robh%40kernel.org patch subject: [PATCH] fpga: xilinx-pr-decoupler: Fix unused xlnx_pr_decoupler_of_match warning for !CONFIG_OF config: parisc-randconfig-002-20231019 (https://download.01.org/0day-ci/archive/20231020/202310200826.9spStghB-lkp@intel.com/config) compiler: hppa-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231020/202310200826.9spStghB-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202310200826.9spStghB-lkp@intel.com/ All errors (new ones prefixed by >>): >> drivers/fpga/xilinx-pr-decoupler.c:179:35: error: 'xlnx_pr_decoupler_of_match' undeclared here (not in a function); did you mean 'xlnx_pr_decoupler_data'? 179 | .of_match_table = xlnx_pr_decoupler_of_match, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | xlnx_pr_decoupler_data vim +179 drivers/fpga/xilinx-pr-decoupler.c 173 174 static struct platform_driver xlnx_pr_decoupler_driver = { 175 .probe = xlnx_pr_decoupler_probe, 176 .remove = xlnx_pr_decoupler_remove, 177 .driver = { 178 .name = "xlnx_pr_decoupler", > 179 .of_match_table = xlnx_pr_decoupler_of_match, 180 }, 181 }; 182
diff --git a/drivers/fpga/xilinx-pr-decoupler.c b/drivers/fpga/xilinx-pr-decoupler.c index 0c012d0f616d..68835896f180 100644 --- a/drivers/fpga/xilinx-pr-decoupler.c +++ b/drivers/fpga/xilinx-pr-decoupler.c @@ -167,7 +167,7 @@ static struct platform_driver xlnx_pr_decoupler_driver = { .remove = xlnx_pr_decoupler_remove, .driver = { .name = "xlnx_pr_decoupler", - .of_match_table = of_match_ptr(xlnx_pr_decoupler_of_match), + .of_match_table = xlnx_pr_decoupler_of_match, }, };