Hi Nitin,
FYI, the error/warning still remains.
tree:
https://github.com/Freescale/linux-fslc pr/497
head: c5fbcc5588fcc56cc4c1fc9b9788ef051414225f
commit: 1730a5e196055cef89fe50dd63852ebc32cce135 [8447/15263] MLK-25346: net: add
imx-shmem-net driver
config: arc-allyesconfig
(
https://download.01.org/0day-ci/archive/20211124/202111240157.0HXf1B8O-lk...)
compiler: arceb-elf-gcc (GCC) 11.2.0
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
#
https://github.com/Freescale/linux-fslc/commit/1730a5e196055cef89fe50dd63...
git remote add freescale-fslc
https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc pr/497
git checkout 1730a5e196055cef89fe50dd63852ebc32cce135
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/net/imx-shmem-net.c: In function 'mu_enable_reset_irq':
drivers/net/imx-shmem-net.c:993:13: warning: unused variable 'sciErr'
[-Wunused-variable]
993 | int sciErr;
| ^~~~~~
drivers/net/imx-shmem-net.c: In function 'imx_shm_net_probe':
> drivers/net/imx-shmem-net.c:1175:9: error: implicit declaration
of function 'imx_scu_irq_unregister_notifier'; did you mean
'netlink_unregister_notifier'? [-Werror=implicit-function-declaration]
1175 | imx_scu_irq_unregister_notifier(&in->pnotifier);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| netlink_unregister_notifier
At top level:
drivers/net/imx-shmem-net.c:887:12: warning: 'imx_shm_partition_notify' defined
but not used [-Wunused-function]
887 | static int imx_shm_partition_notify(struct notifier_block *nb,
| ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +1175 drivers/net/imx-shmem-net.c
1032
1033 static int imx_shm_net_probe(struct platform_device *pdev)
1034 {
1035 struct net_device *ndev = NULL;
1036 struct imx_shm_net *in;
1037 resource_size_t shmaddr;
1038 resource_size_t shmlen;
1039 char *device_name;
1040 void *shm = NULL;
1041 u32 ivpos;
1042 int ret;
1043
1044 /* check if 1st probe or another attempt after EAGAIN */
1045 if (pdev->dev.driver_data) {
1046 dev_dbg(&pdev->dev, "Retrying connection...\n");
1047 in = netdev_priv(platform_get_drvdata(pdev));
1048 goto retry;
1049 }
1050
1051 if (of_property_read_bool(pdev->dev.of_node, "rxfirst")) {
1052 ivpos = 1;
1053 dev_info(&pdev->dev, "queue position is RX first\n");
1054 } else {
1055 ivpos = 0;
1056 dev_info(&pdev->dev, "queue position is TX first\n");
1057 }
1058
1059 /* get shared coherent memory for buffers */
1060 if (of_reserved_mem_device_init(&pdev->dev)) {
1061 dev_err(&pdev->dev,
1062 "dev doesn't have specific DMA pool.\n");
1063 return -ENOMEM;
1064 }
1065 shmlen = IMX_SHM_NET_DMA_SIZE;
1066 shm = dma_alloc_coherent(&pdev->dev, IMX_SHM_NET_DMA_SIZE,
1067 &shmaddr, GFP_KERNEL);
1068 if (!shm || !shmaddr)
1069 return -ENOMEM;
1070
1071 dev_info(&pdev->dev, "allocated %d bytes in coherent mem @
0x%x\n",
1072 (uint)shmlen, (uint)shmaddr);
1073
1074 device_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s[%s]",
DRV_NAME,
1075 dev_name(&pdev->dev));
1076 if (!device_name) {
1077 ret = -ENOMEM;
1078 goto err_free_dma;
1079 }
1080
1081 ndev = alloc_etherdev(sizeof(*in));
1082 if (!ndev) {
1083 ret = -ENOMEM;
1084 goto err_free_dma;
1085 }
1086 dev_info(&pdev->dev, "allocated ethernet device %s\n",
ndev->name);
1087
1088 platform_set_drvdata(pdev, ndev);
1089 SET_NETDEV_DEV(ndev, &pdev->dev);
1090
1091 /* get struct 'imx_shm_net' stored as private data in ndev */
1092 in = netdev_priv(ndev);
1093
1094 list_add(&in->isn_node, &imx_shm_net_head);
1095
1096 in->shm = shm;
1097 in->shmaddr = shmaddr;
1098 in->shmlen = shmlen;
1099 in->pdev = pdev;
1100 in->regs.ivpos = ivpos;
1101 in->regs.rstate = IMX_SHM_NET_STATE_RESET;
1102 in->remote_message = IMX_SHM_NET_STATE_RESET;
1103 spin_lock_init(&in->tx_free_lock);
1104 spin_lock_init(&in->tx_clean_lock);
1105 mutex_init(&in->state_lock);
1106
1107 /* enable peer's reset notification */
1108 ret = mu_enable_reset_irq(ndev);
1109 if (ret)
1110 goto err_free;
1111
1112 ret = imx_shm_net_calc_qsize(ndev);
1113 if (ret)
1114 goto err_reset_irq;
1115
1116 in->state_wq = alloc_ordered_workqueue(device_name, 0);
1117 if (!in->state_wq) {
1118 ret = -ENOMEM;
1119 goto err_reset_irq;
1120 }
1121
1122 INIT_WORK(&in->state_work, imx_shm_net_state_change);
1123
1124 eth_random_addr(ndev->dev_addr);
1125 ndev->netdev_ops = &imx_shm_net_ops;
1126 ndev->ethtool_ops = &imx_shm_net_ethtool_ops;
1127 ndev->mtu = min_t(u32, IMX_SHM_NET_MTU_DEF, in->qsize / 16);
1128 ndev->hw_features = NETIF_F_HW_CSUM | NETIF_F_SG;
1129 ndev->features = ndev->hw_features;
1130
1131 netif_carrier_off(ndev);
1132 netif_napi_add(ndev, &in->napi, imx_shm_net_poll, NAPI_POLL_WEIGHT);
1133
1134 ret = register_netdev(ndev);
1135 if (ret)
1136 goto err_wq;
1137
1138 /* initialize Mailbox for RX/TX */
1139 ret = imx_shm_xtr_channel_init(in);
1140 if (ret) {
1141 dev_err(&in->pdev->dev, "unable to initialize Mailbox.\n");
1142 /* MU may not be ready yet, need to try later on */
1143 ret = -EPROBE_DEFER;
1144 goto err_unregister;
1145 }
1146 dev_info(&in->pdev->dev,
1147 "Mailbox is ready for cross core communication!\n");
1148
1149 retry:
1150 /* notify reset */
1151 mutex_lock(&in->state_lock);
1152 in->regs.lstate = IMX_SHM_NET_STATE_RESET;
1153 in->message_state = MESS_STATE_NEW;
1154 mutex_unlock(&in->state_lock);
1155
1156 /* only device with queue position TXfirst sends the first message */
1157 if (!ivpos) {
1158 ret = mbox_send_message(in->tx_ch, &in->regs.lstate);
1159 if (ret < 0)
1160 dev_err(&pdev->dev, "%s first message error=%d!\n",
1161 __func__, ret);
1162
1163 dev_dbg(&pdev->dev, "%s sent first message\n", __func__);
1164 }
1165
1166 return 0;
1167
1168 err_unregister:
1169 unregister_netdev(ndev);
1170
1171 err_wq:
1172 destroy_workqueue(in->state_wq);
1173
1174 err_reset_irq:
1175 imx_scu_irq_unregister_notifier(&in->pnotifier);
1176
1177 err_free:
1178 list_del(&in->isn_node);
1179 free_netdev(ndev);
1180
1181 err_free_dma:
1182 dma_free_coherent(&pdev->dev, shmlen, shm, shmaddr);
1183
1184 return ret;
1185 }
1186
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org