Re: [v2 2/5] drm/mediatek: CMDQ reg address of mt8173 is different with mt2701

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jitao,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.1-rc5 next-20190416]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Jitao-Shi/drm-mediatek-move-mipi_dsi_host_register-to-probe/20190417-100619
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=arm 

All warnings (new ones prefixed by >>):

   drivers/gpu//drm/mediatek/mtk_dsi.c: In function 'mtk_dsi_probe':
>> drivers/gpu//drm/mediatek/mtk_dsi.c:1129:19: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     dsi->driver_data = of_id->data;
                      ^

vim +/const +1129 drivers/gpu//drm/mediatek/mtk_dsi.c

  1099	
  1100	static int mtk_dsi_probe(struct platform_device *pdev)
  1101	{
  1102		struct mtk_dsi *dsi;
  1103		struct device *dev = &pdev->dev;
  1104		const struct of_device_id *of_id;
  1105		struct resource *regs;
  1106		int irq_num;
  1107		int comp_id;
  1108		int ret;
  1109	
  1110		dsi = devm_kzalloc(dev, sizeof(*dsi), GFP_KERNEL);
  1111		if (!dsi)
  1112			return -ENOMEM;
  1113	
  1114		dsi->host.ops = &mtk_dsi_ops;
  1115		dsi->host.dev = dev;
  1116		dsi->dev = dev;
  1117		ret = mipi_dsi_host_register(&dsi->host);
  1118		if (ret < 0) {
  1119			dev_err(dev, "failed to register DSI host: %d\n", ret);
  1120			return ret;
  1121		}
  1122	
  1123		ret = drm_of_find_panel_or_bridge(dev->of_node, 0, 0,
  1124						  &dsi->panel, &dsi->bridge);
  1125		if (ret)
  1126			goto err_unregister_host;
  1127	
  1128		of_id = of_match_device(mtk_dsi_of_match, &pdev->dev);
> 1129		dsi->driver_data = of_id->data;
  1130	
  1131		dsi->engine_clk = devm_clk_get(dev, "engine");
  1132		if (IS_ERR(dsi->engine_clk)) {
  1133			ret = PTR_ERR(dsi->engine_clk);
  1134			dev_err(dev, "Failed to get engine clock: %d\n", ret);
  1135			goto err_unregister_host;
  1136		}
  1137	
  1138		dsi->digital_clk = devm_clk_get(dev, "digital");
  1139		if (IS_ERR(dsi->digital_clk)) {
  1140			ret = PTR_ERR(dsi->digital_clk);
  1141			dev_err(dev, "Failed to get digital clock: %d\n", ret);
  1142			goto err_unregister_host;
  1143		}
  1144	
  1145		dsi->hs_clk = devm_clk_get(dev, "hs");
  1146		if (IS_ERR(dsi->hs_clk)) {
  1147			ret = PTR_ERR(dsi->hs_clk);
  1148			dev_err(dev, "Failed to get hs clock: %d\n", ret);
  1149			goto err_unregister_host;
  1150		}
  1151	
  1152		regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
  1153		dsi->regs = devm_ioremap_resource(dev, regs);
  1154		if (IS_ERR(dsi->regs)) {
  1155			ret = PTR_ERR(dsi->regs);
  1156			dev_err(dev, "Failed to ioremap memory: %d\n", ret);
  1157			goto err_unregister_host;
  1158		}
  1159	
  1160		dsi->phy = devm_phy_get(dev, "dphy");
  1161		if (IS_ERR(dsi->phy)) {
  1162			ret = PTR_ERR(dsi->phy);
  1163			dev_err(dev, "Failed to get MIPI-DPHY: %d\n", ret);
  1164			goto err_unregister_host;
  1165		}
  1166	
  1167		comp_id = mtk_ddp_comp_get_id(dev->of_node, MTK_DSI);
  1168		if (comp_id < 0) {
  1169			dev_err(dev, "Failed to identify by alias: %d\n", comp_id);
  1170			ret = comp_id;
  1171			goto err_unregister_host;
  1172		}
  1173	
  1174		ret = mtk_ddp_comp_init(dev, dev->of_node, &dsi->ddp_comp, comp_id,
  1175					&mtk_dsi_funcs);
  1176		if (ret) {
  1177			dev_err(dev, "Failed to initialize component: %d\n", ret);
  1178			goto err_unregister_host;
  1179		}
  1180	
  1181		irq_num = platform_get_irq(pdev, 0);
  1182		if (irq_num < 0) {
  1183			dev_err(&pdev->dev, "failed to get dsi irq_num: %d\n", irq_num);
  1184			ret = irq_num;
  1185			goto err_unregister_host;
  1186		}
  1187	
  1188		irq_set_status_flags(irq_num, IRQ_TYPE_LEVEL_LOW);
  1189		ret = devm_request_irq(&pdev->dev, irq_num, mtk_dsi_irq,
  1190				       IRQF_TRIGGER_LOW, dev_name(&pdev->dev), dsi);
  1191		if (ret) {
  1192			dev_err(&pdev->dev, "failed to request mediatek dsi irq\n");
  1193			goto err_unregister_host;
  1194		}
  1195	
  1196		init_waitqueue_head(&dsi->irq_wait_queue);
  1197	
  1198		platform_set_drvdata(pdev, dsi);
  1199	
  1200		ret = component_add(&pdev->dev, &mtk_dsi_component_ops);
  1201		if (ret) {
  1202			dev_err(&pdev->dev, "failed to add component: %d\n", ret);
  1203			goto err_unregister_host;
  1204		}
  1205	
  1206		return 0;
  1207	
  1208	err_unregister_host:
  1209		mipi_dsi_host_unregister(&dsi->host);
  1210		return ret;
  1211	}
  1212	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux