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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 0D0D5C56202 for ; Wed, 25 Nov 2020 16:49:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 57EAC206D8 for ; Wed, 25 Nov 2020 16:49:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="OcHJ09EG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 57EAC206D8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9936E6B0070; Wed, 25 Nov 2020 11:49:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9441B6B0071; Wed, 25 Nov 2020 11:49:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 834536B0072; Wed, 25 Nov 2020 11:49:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0007.hostedemail.com [216.40.44.7]) by kanga.kvack.org (Postfix) with ESMTP id 6DBE86B0070 for ; Wed, 25 Nov 2020 11:49:43 -0500 (EST) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id C549B363F for ; Wed, 25 Nov 2020 16:49:42 +0000 (UTC) X-FDA: 77523527004.04.alarm67_170400127378 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin04.hostedemail.com (Postfix) with ESMTP id A41CD80104D4 for ; Wed, 25 Nov 2020 16:49:42 +0000 (UTC) X-HE-Tag: alarm67_170400127378 X-Filterd-Recvd-Size: 8373 Received: from mail-oi1-f193.google.com (mail-oi1-f193.google.com [209.85.167.193]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Wed, 25 Nov 2020 16:49:39 +0000 (UTC) Received: by mail-oi1-f193.google.com with SMTP id f11so3525213oij.6 for ; Wed, 25 Nov 2020 08:49:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=QL3akSi7CovK8xFLb4N+FImnomKdcg6vgs9LyNleNVE=; b=OcHJ09EGIDAivRIgljCvTHiVIcq4yQbLYYJoEsxetnFc1Z9X4+JdTWkzivJ9u5+Mod +XBIO2SdnyihIHOFGF12cf/dQ4w5x69eeNMYXN/OqHLcC41RvLFh0syE37/H/J0Jwb/+ Gm+JRx/Dy5vxhT2lv/uW2afo5im7sp8jKZcY1vnRVqlipcvqZnUgsi7LGySP8a0jx5LH swMHjHP3rWeZFNj7XkrxzH9FLCk11fCOD4yQIhWfnbRyXdpQj0dZX6UFsCQ7lkcK5rKp chBIix/5pf6K/TxzhHd+qOedbxXm+LoGRplRsQ6L9GwE7aIlgis/IPg+OhJKxwESMX66 mBUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=QL3akSi7CovK8xFLb4N+FImnomKdcg6vgs9LyNleNVE=; b=rHjTGVSWImQKLDEti27CnvoQFJqztPpqrduAPaFDMIhTW/c8PYdgD0YqL6bhfk4IkC +05Y8N3V3AALiIXciBDudAz+i10eYGmYPa0L9GGAcZJLc4LTuYrpDpro0eo9sWuf0B/B DHEeB80BIcZNyYIfYxr9O+bsphdqdZkIHmgAHp1KMsHJ5ZyG3SQlqgbXXA3yyrH92WD9 fd365vTO8zpv1fk8B/sL7zIH3XIhLDaNvp1qVxq8mihGCIPS4pPlxAlHlKlqE6sHhCZz V9dF0N5YedQPNwC43YEmCXEJrposWYCA93/LIiF7sZu9m+I9cAhhbf+AoLQvps2a7jTG W18w== X-Gm-Message-State: AOAM530M7zk80mitfK+YVGGbO3TDgBsNbiod09tfgH3bQgmpWuxpgXZ3 nfDeK30bPmSswgXBHGuCzhTenA== X-Google-Smtp-Source: ABdhPJwWZANLZngkkDy+IE9KKoGOUmig/2ErpvowYqcPqiGa+lThG7DT0k8GdPMxsAe4UgrGmnVLhg== X-Received: by 2002:aca:c46:: with SMTP id i6mr2833450oiy.82.1606322978980; Wed, 25 Nov 2020 08:49:38 -0800 (PST) Received: from builder.lan (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id m29sm1439194otj.42.2020.11.25.08.49.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Nov 2020 08:49:38 -0800 (PST) Date: Wed, 25 Nov 2020 10:49:36 -0600 From: Bjorn Andersson To: Souptick Joarder Cc: kernel test robot , Alexandre Courbot , kbuild-all@lists.01.org, clang-built-linux@googlegroups.com, Linux Memory Management List , linux-remoteproc@vger.kernel.org Subject: Re: [linux-next:master 2224/7715] drivers/remoteproc/mtk_scp.c:755:37: warning: unused variable 'mt8183_of_data' Message-ID: References: <202011242358.oKOU8SIP-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed 25 Nov 09:24 CST 2020, Souptick Joarder wrote: > On Tue, Nov 24, 2020 at 8:34 PM kernel test robot wrote: > > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > > head: d9137320ac06f526fe3f9a3fdf07a3b14201068a > > commit: b8ba904503311036dfeb758d81ef8d1be37cb8fc [2224/7715] remoteproc/mtk_scp: surround DT device IDs with CONFIG_OF > > config: arm-randconfig-r003-20201124 (attached as .config) > > compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project df9ae5992889560a8f3c6760b54d5051b47c7bf5) > > reproduce (this is a W=1 build): > > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > > chmod +x ~/bin/make.cross > > # install arm cross compiling tool for clang build > > # apt-get install binutils-arm-linux-gnueabi > > # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=b8ba904503311036dfeb758d81ef8d1be37cb8fc > > git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git > > git fetch --no-tags linux-next master > > git checkout b8ba904503311036dfeb758d81ef8d1be37cb8fc > > # save the attached .config to linux build tree > > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm > > > > If you fix the issue, kindly add following tag as appropriate > > Reported-by: kernel test robot > > > > All warnings (new ones prefixed by >>): > > > > >> drivers/remoteproc/mtk_scp.c:755:37: warning: unused variable 'mt8183_of_data' [-Wunused-const-variable] > > static const struct mtk_scp_of_data mt8183_of_data = { > > ^ > > >> drivers/remoteproc/mtk_scp.c:765:37: warning: unused variable 'mt8192_of_data' [-Wunused-const-variable] > > static const struct mtk_scp_of_data mt8192_of_data = { > > ^ > > 2 warnings generated. > > These 2 variables are used when CONFIG_OF is defined and CONFIG_OF is > not enabled > in the attached config file. > > So mt8183_of_data & mt8192_of_data need to move under CONFIG_OF. > > I will post a patch. > We had the same warning on mtk_scp_of_match last week and I merged Alexandre's fix without giving it much thought. Extending the CONFIG_OF guard to also cover the references mtk_scp_of_data would mean that we now have 10 unused functions instead. On the flip-side, there's no harm in just dropping the of_match_ptr() wrapping of mtk_scp_of_match in the definition of mtk_scp_driver and we avoid this whole problem. We "waste" a little bit of memory in the COMPILE_TEST case, but we get compile testing of those functions as well. Regards, Bjorn > > > > > > vim +/mt8183_of_data +755 drivers/remoteproc/mtk_scp.c > > > > 63c13d61eafe460 Erin Lo 2019-11-12 754 > > fd0b6c1ff85a489 Pi-Hsun Shih 2020-09-21 @755 static const struct mtk_scp_of_data mt8183_of_data = { > > fd0b6c1ff85a489 Pi-Hsun Shih 2020-09-21 756 .scp_before_load = mt8183_scp_before_load, > > fd0b6c1ff85a489 Pi-Hsun Shih 2020-09-21 757 .scp_irq_handler = mt8183_scp_irq_handler, > > fd0b6c1ff85a489 Pi-Hsun Shih 2020-09-21 758 .scp_reset_assert = mt8183_scp_reset_assert, > > fd0b6c1ff85a489 Pi-Hsun Shih 2020-09-21 759 .scp_reset_deassert = mt8183_scp_reset_deassert, > > fd0b6c1ff85a489 Pi-Hsun Shih 2020-09-21 760 .scp_stop = mt8183_scp_stop, > > fd0b6c1ff85a489 Pi-Hsun Shih 2020-09-21 761 .host_to_scp_reg = MT8183_HOST_TO_SCP, > > fd0b6c1ff85a489 Pi-Hsun Shih 2020-09-21 762 .host_to_scp_int_bit = MT8183_HOST_IPC_INT_BIT, > > fd0b6c1ff85a489 Pi-Hsun Shih 2020-09-21 763 }; > > fd0b6c1ff85a489 Pi-Hsun Shih 2020-09-21 764 > > fd0b6c1ff85a489 Pi-Hsun Shih 2020-09-21 @765 static const struct mtk_scp_of_data mt8192_of_data = { > > fd0b6c1ff85a489 Pi-Hsun Shih 2020-09-21 766 .scp_before_load = mt8192_scp_before_load, > > fd0b6c1ff85a489 Pi-Hsun Shih 2020-09-21 767 .scp_irq_handler = mt8192_scp_irq_handler, > > fd0b6c1ff85a489 Pi-Hsun Shih 2020-09-21 768 .scp_reset_assert = mt8192_scp_reset_assert, > > fd0b6c1ff85a489 Pi-Hsun Shih 2020-09-21 769 .scp_reset_deassert = mt8192_scp_reset_deassert, > > fd0b6c1ff85a489 Pi-Hsun Shih 2020-09-21 770 .scp_stop = mt8192_scp_stop, > > fd0b6c1ff85a489 Pi-Hsun Shih 2020-09-21 771 .host_to_scp_reg = MT8192_GIPC_IN_SET, > > fd0b6c1ff85a489 Pi-Hsun Shih 2020-09-21 772 .host_to_scp_int_bit = MT8192_HOST_IPC_INT_BIT, > > fd0b6c1ff85a489 Pi-Hsun Shih 2020-09-21 773 }; > > fd0b6c1ff85a489 Pi-Hsun Shih 2020-09-21 774 > > > > :::::: The code at line 755 was first introduced by commit > > :::::: fd0b6c1ff85a489bcf1bcf58af64da1aeffd39f0 remoteproc/mediatek: Add support for mt8192 SCP > > > > :::::: TO: Pi-Hsun Shih > > :::::: CC: Bjorn Andersson > > > > --- > > 0-DAY CI Kernel Test Service, Intel Corporation > > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org