From: kernel test robot <lkp@intel.com>
To: Sheetal <sheetal@nvidia.com>, Jon Hunter <jonathanh@nvidia.com>,
Vinod Koul <vkoul@kernel.org>,
Thierry Reding <thierry.reding@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Laxman Dewangan <ldewangan@nvidia.com>,
Frank Li <Frank.Li@kernel.org>, Mohan Kumar <mkumard@nvidia.com>,
dmaengine@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org, Sheetal <sheetal@nvidia.com>
Subject: Re: [PATCH] dmaengine: tegra210-adma: Add error logging on failure paths
Date: Thu, 19 Mar 2026 07:42:28 +0800 [thread overview]
Message-ID: <202603190728.xcKzTcOu-lkp@intel.com> (raw)
In-Reply-To: <20260318073922.1760132-1-sheetal@nvidia.com>
Hi Sheetal,
kernel test robot noticed the following build warnings:
[auto build test WARNING on vkoul-dmaengine/next]
[also build test WARNING on linus/master v7.0-rc4 next-20260318]
[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/Sheetal/dmaengine-tegra210-adma-Add-error-logging-on-failure-paths/20260318-214221
base: https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next
patch link: https://lore.kernel.org/r/20260318073922.1760132-1-sheetal%40nvidia.com
patch subject: [PATCH] dmaengine: tegra210-adma: Add error logging on failure paths
config: i386-buildonly-randconfig-001-20260319 (https://download.01.org/0day-ci/archive/20260319/202603190728.xcKzTcOu-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260319/202603190728.xcKzTcOu-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/202603190728.xcKzTcOu-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/dma/tegra210-adma.c:1083:55: warning: format specifies type 'unsigned long long' but the argument has type 'resource_size_t' (aka 'unsigned int') [-Wformat]
1083 | dev_err(&pdev->dev, "invalid page number %llu\n", page_no);
| ~~~~ ^~~~~~~
| %u
include/linux/dev_printk.h:154:65: note: expanded from macro 'dev_err'
154 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ~~~ ^~~~~~~~~~~
1 warning generated.
vim +1083 drivers/dma/tegra210-adma.c
1033
1034 static int tegra_adma_probe(struct platform_device *pdev)
1035 {
1036 const struct tegra_adma_chip_data *cdata;
1037 struct tegra_adma *tdma;
1038 struct resource *res_page, *res_base;
1039 int ret, i;
1040
1041 cdata = of_device_get_match_data(&pdev->dev);
1042 if (!cdata) {
1043 dev_err(&pdev->dev, "device match data not found\n");
1044 return -ENODEV;
1045 }
1046
1047 tdma = devm_kzalloc(&pdev->dev,
1048 struct_size(tdma, channels, cdata->nr_channels),
1049 GFP_KERNEL);
1050 if (!tdma)
1051 return -ENOMEM;
1052
1053 tdma->dev = &pdev->dev;
1054 tdma->cdata = cdata;
1055 tdma->nr_channels = cdata->nr_channels;
1056 platform_set_drvdata(pdev, tdma);
1057
1058 res_page = platform_get_resource_byname(pdev, IORESOURCE_MEM, "page");
1059 if (res_page) {
1060 tdma->ch_base_addr = devm_ioremap_resource(&pdev->dev, res_page);
1061 if (IS_ERR(tdma->ch_base_addr)) {
1062 dev_err(&pdev->dev, "failed to map page resource\n");
1063 return PTR_ERR(tdma->ch_base_addr);
1064 }
1065
1066 res_base = platform_get_resource_byname(pdev, IORESOURCE_MEM, "global");
1067 if (res_base) {
1068 resource_size_t page_offset, page_no;
1069 unsigned int ch_base_offset;
1070
1071 if (res_page->start < res_base->start) {
1072 dev_err(&pdev->dev, "invalid page/global resource order\n");
1073 return -EINVAL;
1074 }
1075
1076 page_offset = res_page->start - res_base->start;
1077 ch_base_offset = cdata->ch_base_offset;
1078 if (!ch_base_offset)
1079 return -EINVAL;
1080
1081 page_no = div_u64(page_offset, ch_base_offset);
1082 if (!page_no || page_no > INT_MAX) {
> 1083 dev_err(&pdev->dev, "invalid page number %llu\n", page_no);
1084 return -EINVAL;
1085 }
1086
1087 tdma->ch_page_no = page_no - 1;
1088 tdma->base_addr = devm_ioremap_resource(&pdev->dev, res_base);
1089 if (IS_ERR(tdma->base_addr)) {
1090 dev_err(&pdev->dev, "failed to map global resource\n");
1091 return PTR_ERR(tdma->base_addr);
1092 }
1093 }
1094 } else {
1095 /* If no 'page' property found, then reg DT binding would be legacy */
1096 res_base = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1097 if (res_base) {
1098 tdma->base_addr = devm_ioremap_resource(&pdev->dev, res_base);
1099 if (IS_ERR(tdma->base_addr)) {
1100 dev_err(&pdev->dev, "failed to map base resource\n");
1101 return PTR_ERR(tdma->base_addr);
1102 }
1103 } else {
1104 dev_err(&pdev->dev, "failed to map mem resource\n");
1105 return -ENODEV;
1106 }
1107
1108 tdma->ch_base_addr = tdma->base_addr + cdata->ch_base_offset;
1109 }
1110
1111 tdma->ahub_clk = devm_clk_get(&pdev->dev, "d_audio");
1112 if (IS_ERR(tdma->ahub_clk)) {
1113 dev_err(&pdev->dev, "Error: Missing ahub controller clock\n");
1114 return PTR_ERR(tdma->ahub_clk);
1115 }
1116
1117 tdma->dma_chan_mask = devm_kzalloc(&pdev->dev,
1118 BITS_TO_LONGS(tdma->nr_channels) * sizeof(unsigned long),
1119 GFP_KERNEL);
1120 if (!tdma->dma_chan_mask)
1121 return -ENOMEM;
1122
1123 /* Enable all channels by default */
1124 bitmap_fill(tdma->dma_chan_mask, tdma->nr_channels);
1125
1126 ret = of_property_read_u32_array(pdev->dev.of_node, "dma-channel-mask",
1127 (u32 *)tdma->dma_chan_mask,
1128 BITS_TO_U32(tdma->nr_channels));
1129 if (ret < 0 && (ret != -EINVAL)) {
1130 dev_err(&pdev->dev, "dma-channel-mask is not complete.\n");
1131 return ret;
1132 }
1133
1134 INIT_LIST_HEAD(&tdma->dma_dev.channels);
1135 for (i = 0; i < tdma->nr_channels; i++) {
1136 struct tegra_adma_chan *tdc = &tdma->channels[i];
1137
1138 /* skip for reserved channels */
1139 if (!test_bit(i, tdma->dma_chan_mask))
1140 continue;
1141
1142 tdc->chan_addr = tdma->ch_base_addr + (cdata->ch_reg_size * i);
1143
1144 if (tdma->base_addr) {
1145 if (cdata->global_ch_fifo_base)
1146 tdc->global_ch_fifo_offset = cdata->global_ch_fifo_base + (4 * i);
1147
1148 if (cdata->global_ch_config_base)
1149 tdc->global_ch_config_offset =
1150 cdata->global_ch_config_base + (4 * i);
1151 }
1152
1153 tdc->irq = of_irq_get(pdev->dev.of_node, i);
1154 if (tdc->irq <= 0) {
1155 ret = tdc->irq ?: -ENXIO;
1156 dev_err_probe(&pdev->dev, ret, "failed to get IRQ for channel %d\n", i);
1157 goto irq_dispose;
1158 }
1159
1160 vchan_init(&tdc->vc, &tdma->dma_dev);
1161 tdc->vc.desc_free = tegra_adma_desc_free;
1162 tdc->tdma = tdma;
1163 }
1164
1165 pm_runtime_enable(&pdev->dev);
1166
1167 ret = pm_runtime_resume_and_get(&pdev->dev);
1168 if (ret < 0) {
1169 dev_err(&pdev->dev, "runtime PM resume failed: %d\n", ret);
1170 goto rpm_disable;
1171 }
1172
1173 ret = tegra_adma_init(tdma);
1174 if (ret) {
1175 dev_err(&pdev->dev, "failed to initialize ADMA: %d\n", ret);
1176 goto rpm_put;
1177 }
1178
1179 dma_cap_set(DMA_SLAVE, tdma->dma_dev.cap_mask);
1180 dma_cap_set(DMA_PRIVATE, tdma->dma_dev.cap_mask);
1181 dma_cap_set(DMA_CYCLIC, tdma->dma_dev.cap_mask);
1182
1183 tdma->dma_dev.dev = &pdev->dev;
1184 tdma->dma_dev.device_alloc_chan_resources =
1185 tegra_adma_alloc_chan_resources;
1186 tdma->dma_dev.device_free_chan_resources =
1187 tegra_adma_free_chan_resources;
1188 tdma->dma_dev.device_issue_pending = tegra_adma_issue_pending;
1189 tdma->dma_dev.device_prep_dma_cyclic = tegra_adma_prep_dma_cyclic;
1190 tdma->dma_dev.device_config = tegra_adma_slave_config;
1191 tdma->dma_dev.device_tx_status = tegra_adma_tx_status;
1192 tdma->dma_dev.device_terminate_all = tegra_adma_terminate_all;
1193 tdma->dma_dev.device_synchronize = tegra_adma_synchronize;
1194 tdma->dma_dev.src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES);
1195 tdma->dma_dev.dst_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES);
1196 tdma->dma_dev.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
1197 tdma->dma_dev.residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT;
1198 tdma->dma_dev.device_pause = tegra_adma_pause;
1199 tdma->dma_dev.device_resume = tegra_adma_resume;
1200
1201 ret = dma_async_device_register(&tdma->dma_dev);
1202 if (ret < 0) {
1203 dev_err(&pdev->dev, "ADMA registration failed: %d\n", ret);
1204 goto rpm_put;
1205 }
1206
1207 ret = of_dma_controller_register(pdev->dev.of_node,
1208 tegra_dma_of_xlate, tdma);
1209 if (ret < 0) {
1210 dev_err(&pdev->dev, "ADMA OF registration failed %d\n", ret);
1211 goto dma_remove;
1212 }
1213
1214 pm_runtime_put(&pdev->dev);
1215
1216 dev_info(&pdev->dev, "Tegra210 ADMA driver registered %d channels\n",
1217 tdma->nr_channels);
1218
1219 return 0;
1220
1221 dma_remove:
1222 dma_async_device_unregister(&tdma->dma_dev);
1223 rpm_put:
1224 pm_runtime_put_sync(&pdev->dev);
1225 rpm_disable:
1226 pm_runtime_disable(&pdev->dev);
1227 irq_dispose:
1228 while (--i >= 0)
1229 irq_dispose_mapping(tdma->channels[i].irq);
1230
1231 return ret;
1232 }
1233
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-03-18 23:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-18 7:39 [PATCH] dmaengine: tegra210-adma: Add error logging on failure paths Sheetal
2026-03-18 9:45 ` Vinod Koul
2026-03-18 23:42 ` kernel test robot
2026-03-18 23:42 ` kernel test robot [this message]
2026-06-08 12:12 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202603190728.xcKzTcOu-lkp@intel.com \
--to=lkp@intel.com \
--cc=Frank.Li@kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=jonathanh@nvidia.com \
--cc=ldewangan@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mkumard@nvidia.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=sheetal@nvidia.com \
--cc=thierry.reding@kernel.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.