* [skn:v5.13/scmi_dt_schema 2/11] drivers/firmware/arm_scpi.c:900:34: warning: unused variable 'shmem_of_match'
@ 2021-06-02 12:34 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-06-02 12:34 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 6419 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git v5.13/scmi_dt_schema
head: dc05ff37a0f4b9e2f5627ede87c6c324396a1148
commit: c02b2082b17d1538f2c6a4b07e79ce96cda7e29f [2/11] firmware: arm_scpi: Add compatibility checks for shmem node
config: x86_64-randconfig-a015-20210602 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project db26cd30b6dd65e88d786e97a1e453af5cd48966)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git/commit/?id=c02b2082b17d1538f2c6a4b07e79ce96cda7e29f
git remote add skn https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git
git fetch --no-tags skn v5.13/scmi_dt_schema
git checkout c02b2082b17d1538f2c6a4b07e79ce96cda7e29f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/firmware/arm_scpi.c:900:34: warning: unused variable 'shmem_of_match' [-Wunused-const-variable]
static const struct of_device_id shmem_of_match[] = {
^
1 warning generated.
vim +/shmem_of_match +900 drivers/firmware/arm_scpi.c
899
> 900 static const struct of_device_id shmem_of_match[] = {
901 { .compatible = "amlogic,meson-gxbb-scp-shmem", },
902 { .compatible = "amlogic,meson-axg-scp-shmem", },
903 { .compatible = "arm,juno-scp-shmem", },
904 { .compatible = "arm,scp-shmem", },
905 { }
906 };
907 static int scpi_probe(struct platform_device *pdev)
908 {
909 int count, idx, ret;
910 struct resource res;
911 struct device *dev = &pdev->dev;
912 struct device_node *np = dev->of_node;
913
914 scpi_info = devm_kzalloc(dev, sizeof(*scpi_info), GFP_KERNEL);
915 if (!scpi_info)
916 return -ENOMEM;
917
918 if (of_match_device(legacy_scpi_of_match, &pdev->dev))
919 scpi_info->is_legacy = true;
920
921 count = of_count_phandle_with_args(np, "mboxes", "#mbox-cells");
922 if (count < 0) {
923 dev_err(dev, "no mboxes property in '%pOF'\n", np);
924 return -ENODEV;
925 }
926
927 scpi_info->channels = devm_kcalloc(dev, count, sizeof(struct scpi_chan),
928 GFP_KERNEL);
929 if (!scpi_info->channels)
930 return -ENOMEM;
931
932 ret = devm_add_action(dev, scpi_free_channels, scpi_info);
933 if (ret)
934 return ret;
935
936 for (; scpi_info->num_chans < count; scpi_info->num_chans++) {
937 resource_size_t size;
938 int idx = scpi_info->num_chans;
939 struct scpi_chan *pchan = scpi_info->channels + idx;
940 struct mbox_client *cl = &pchan->cl;
941 struct device_node *shmem = of_parse_phandle(np, "shmem", idx);
942
943 if (!of_match_node(shmem_of_match, shmem))
944 return -ENXIO;
945
946 ret = of_address_to_resource(shmem, 0, &res);
947 of_node_put(shmem);
948 if (ret) {
949 dev_err(dev, "failed to get SCPI payload mem resource\n");
950 return ret;
951 }
952
953 size = resource_size(&res);
954 pchan->rx_payload = devm_ioremap(dev, res.start, size);
955 if (!pchan->rx_payload) {
956 dev_err(dev, "failed to ioremap SCPI payload\n");
957 return -EADDRNOTAVAIL;
958 }
959 pchan->tx_payload = pchan->rx_payload + (size >> 1);
960
961 cl->dev = dev;
962 cl->rx_callback = scpi_handle_remote_msg;
963 cl->tx_prepare = scpi_tx_prepare;
964 cl->tx_block = true;
965 cl->tx_tout = 20;
966 cl->knows_txdone = false; /* controller can't ack */
967
968 INIT_LIST_HEAD(&pchan->rx_pending);
969 INIT_LIST_HEAD(&pchan->xfers_list);
970 spin_lock_init(&pchan->rx_lock);
971 mutex_init(&pchan->xfers_lock);
972
973 ret = scpi_alloc_xfer_list(dev, pchan);
974 if (!ret) {
975 pchan->chan = mbox_request_channel(cl, idx);
976 if (!IS_ERR(pchan->chan))
977 continue;
978 ret = PTR_ERR(pchan->chan);
979 if (ret != -EPROBE_DEFER)
980 dev_err(dev, "failed to get channel%d err %d\n",
981 idx, ret);
982 }
983 return ret;
984 }
985
986 scpi_info->commands = scpi_std_commands;
987
988 platform_set_drvdata(pdev, scpi_info);
989
990 if (scpi_info->is_legacy) {
991 /* Replace with legacy variants */
992 scpi_ops.clk_set_val = legacy_scpi_clk_set_val;
993 scpi_info->commands = scpi_legacy_commands;
994
995 /* Fill priority bitmap */
996 for (idx = 0; idx < ARRAY_SIZE(legacy_hpriority_cmds); idx++)
997 set_bit(legacy_hpriority_cmds[idx],
998 scpi_info->cmd_priority);
999 }
1000
1001 ret = scpi_init_versions(scpi_info);
1002 if (ret) {
1003 dev_err(dev, "incorrect or no SCP firmware found\n");
1004 return ret;
1005 }
1006
1007 if (scpi_info->is_legacy && !scpi_info->protocol_version &&
1008 !scpi_info->firmware_version)
1009 dev_info(dev, "SCP Protocol legacy pre-1.0 firmware\n");
1010 else
1011 dev_info(dev, "SCP Protocol %lu.%lu Firmware %lu.%lu.%lu version\n",
1012 FIELD_GET(PROTO_REV_MAJOR_MASK,
1013 scpi_info->protocol_version),
1014 FIELD_GET(PROTO_REV_MINOR_MASK,
1015 scpi_info->protocol_version),
1016 FIELD_GET(FW_REV_MAJOR_MASK,
1017 scpi_info->firmware_version),
1018 FIELD_GET(FW_REV_MINOR_MASK,
1019 scpi_info->firmware_version),
1020 FIELD_GET(FW_REV_PATCH_MASK,
1021 scpi_info->firmware_version));
1022 scpi_info->scpi_ops = &scpi_ops;
1023
1024 return devm_of_platform_populate(dev);
1025 }
1026
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 40850 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-02 12:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-02 12:34 [skn:v5.13/scmi_dt_schema 2/11] drivers/firmware/arm_scpi.c:900:34: warning: unused variable 'shmem_of_match' kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.