[freescale-fslc:pr/416 15241/20667] arch/arm/mach-imx/busfreq_optee.c:108:5: warning: no previous prototype for 'update_freq_optee'
by kernel test robot
Hi Jason,
First bad commit (maybe != root cause):
tree: https://github.com/Freescale/linux-fslc pr/416
head: 915e71b823c877d351de1cbe650344ef6eace94b
commit: 5bb09de3044acf91e6f8c712c026d5a4bc53b563 [15241/20667] MLK-24874-1: include: uapi: fmd: fix the UAPI_HEADER_TEST/install failure
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-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/5bb09de3044acf91e6f8c712c0...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc pr/416
git checkout 5bb09de3044acf91e6f8c712c026d5a4bc53b563
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> arch/arm/mach-imx/busfreq_optee.c:108:5: warning: no previous prototype for 'update_freq_optee' [-Wmissing-prototypes]
108 | int update_freq_optee(int ddr_rate)
| ^~~~~~~~~~~~~~~~~
>> arch/arm/mach-imx/busfreq_optee.c:281:5: warning: no previous prototype for 'init_freq_optee' [-Wmissing-prototypes]
281 | int init_freq_optee(struct platform_device *busfreq_pdev)
| ^~~~~~~~~~~~~~~
vim +/update_freq_optee +108 arch/arm/mach-imx/busfreq_optee.c
7c335a91f0f4c6a Cedric Neveux 2018-10-18 99
7c335a91f0f4c6a Cedric Neveux 2018-10-18 100 /**
7c335a91f0f4c6a Cedric Neveux 2018-10-18 101 * @brief Request OPTEE OS to change the memory bus frequency
7c335a91f0f4c6a Cedric Neveux 2018-10-18 102 * to \a ddr_rate value
7c335a91f0f4c6a Cedric Neveux 2018-10-18 103 *
7c335a91f0f4c6a Cedric Neveux 2018-10-18 104 * @param[in] rate Bus Frequency
7c335a91f0f4c6a Cedric Neveux 2018-10-18 105 *
7c335a91f0f4c6a Cedric Neveux 2018-10-18 106 * @retval 0 Success
7c335a91f0f4c6a Cedric Neveux 2018-10-18 107 */
7c335a91f0f4c6a Cedric Neveux 2018-10-18 @108 int update_freq_optee(int ddr_rate)
7c335a91f0f4c6a Cedric Neveux 2018-10-18 109 {
7c335a91f0f4c6a Cedric Neveux 2018-10-18 110 struct arm_smccc_res res;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 111
7c335a91f0f4c6a Cedric Neveux 2018-10-18 112 uint32_t me = 0;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 113 uint32_t dll_off = 0;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 114 int mode = get_bus_freq_mode();
7c335a91f0f4c6a Cedric Neveux 2018-10-18 115
7c335a91f0f4c6a Cedric Neveux 2018-10-18 116 #ifdef CONFIG_SMP
7c335a91f0f4c6a Cedric Neveux 2018-10-18 117 uint32_t reg = 0;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 118 uint32_t cpu = 0;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 119 uint32_t online_cpus = 0;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 120 uint32_t all_cpus = 0;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 121 #endif
7c335a91f0f4c6a Cedric Neveux 2018-10-18 122
c2e58ab882a1953 Cedric Neveux 2018-11-16 123 pr_info("\nBusfreq OPTEE set from %d to %d start...\n",
7c335a91f0f4c6a Cedric Neveux 2018-10-18 124 curr_ddr_rate, ddr_rate);
7c335a91f0f4c6a Cedric Neveux 2018-10-18 125
7c335a91f0f4c6a Cedric Neveux 2018-10-18 126 if (ddr_rate == curr_ddr_rate)
7c335a91f0f4c6a Cedric Neveux 2018-10-18 127 return 0;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 128
7c335a91f0f4c6a Cedric Neveux 2018-10-18 129 if (cpu_is_imx6()) {
7c335a91f0f4c6a Cedric Neveux 2018-10-18 130 if ((mode == BUS_FREQ_LOW) || (mode == BUS_FREQ_AUDIO))
7c335a91f0f4c6a Cedric Neveux 2018-10-18 131 dll_off = 1;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 132 }
7c335a91f0f4c6a Cedric Neveux 2018-10-18 133
7c335a91f0f4c6a Cedric Neveux 2018-10-18 134 local_irq_disable();
7c335a91f0f4c6a Cedric Neveux 2018-10-18 135
7c335a91f0f4c6a Cedric Neveux 2018-10-18 136 #ifdef CONFIG_SMP
7c335a91f0f4c6a Cedric Neveux 2018-10-18 137 me = smp_processor_id();
7c335a91f0f4c6a Cedric Neveux 2018-10-18 138
7c335a91f0f4c6a Cedric Neveux 2018-10-18 139 /* Make sure all the online cores to be active */
7c335a91f0f4c6a Cedric Neveux 2018-10-18 140 do {
7c335a91f0f4c6a Cedric Neveux 2018-10-18 141 all_cpus = 0;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 142
7c335a91f0f4c6a Cedric Neveux 2018-10-18 143 for_each_online_cpu(cpu)
7c335a91f0f4c6a Cedric Neveux 2018-10-18 144 all_cpus |= (pSync->wfe_status[cpu] << cpu);
7c335a91f0f4c6a Cedric Neveux 2018-10-18 145 } while (all_cpus);
7c335a91f0f4c6a Cedric Neveux 2018-10-18 146
7c335a91f0f4c6a Cedric Neveux 2018-10-18 147 pSync->change_ongoing = 1;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 148 dsb();
7c335a91f0f4c6a Cedric Neveux 2018-10-18 149
7c335a91f0f4c6a Cedric Neveux 2018-10-18 150 for_each_online_cpu(cpu) {
7c335a91f0f4c6a Cedric Neveux 2018-10-18 151 if (cpu != me) {
7c335a91f0f4c6a Cedric Neveux 2018-10-18 152 online_cpus |= (1 << cpu);
7c335a91f0f4c6a Cedric Neveux 2018-10-18 153 /* Set the interrupt to be pending in the GIC. */
7c335a91f0f4c6a Cedric Neveux 2018-10-18 154 reg = 1 << (irqs_for_wfe[cpu] % 32);
7c335a91f0f4c6a Cedric Neveux 2018-10-18 155 writel_relaxed(reg, gic_dist_base + GIC_DIST_PENDING_SET
7c335a91f0f4c6a Cedric Neveux 2018-10-18 156 + (irqs_for_wfe[cpu] / 32) * 4);
7c335a91f0f4c6a Cedric Neveux 2018-10-18 157 }
7c335a91f0f4c6a Cedric Neveux 2018-10-18 158 }
7c335a91f0f4c6a Cedric Neveux 2018-10-18 159
7c335a91f0f4c6a Cedric Neveux 2018-10-18 160 /* Wait for all active CPUs to be in WFE */
7c335a91f0f4c6a Cedric Neveux 2018-10-18 161 do {
7c335a91f0f4c6a Cedric Neveux 2018-10-18 162 all_cpus = 0;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 163
7c335a91f0f4c6a Cedric Neveux 2018-10-18 164 for_each_online_cpu(cpu)
7c335a91f0f4c6a Cedric Neveux 2018-10-18 165 all_cpus |= (pSync->wfe_status[cpu] << cpu);
7c335a91f0f4c6a Cedric Neveux 2018-10-18 166 } while (all_cpus != online_cpus);
7c335a91f0f4c6a Cedric Neveux 2018-10-18 167
7c335a91f0f4c6a Cedric Neveux 2018-10-18 168 #endif
7c335a91f0f4c6a Cedric Neveux 2018-10-18 169
7c335a91f0f4c6a Cedric Neveux 2018-10-18 170 /* Now we can change the DDR frequency. */
7c335a91f0f4c6a Cedric Neveux 2018-10-18 171 /* Call the TEE SiP */
7c335a91f0f4c6a Cedric Neveux 2018-10-18 172 arm_smccc_smc(OPTEE_SMC_FAST_CALL_SIP_VAL(IMX_SIP_BUSFREQ_CHANGE),
7c335a91f0f4c6a Cedric Neveux 2018-10-18 173 ddr_rate, dll_off, 0, 0, 0, 0, 0, &res);
7c335a91f0f4c6a Cedric Neveux 2018-10-18 174
7c335a91f0f4c6a Cedric Neveux 2018-10-18 175 curr_ddr_rate = ddr_rate;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 176
7c335a91f0f4c6a Cedric Neveux 2018-10-18 177 #ifdef CONFIG_SMP
7c335a91f0f4c6a Cedric Neveux 2018-10-18 178 /* DDR frequency change is done */
7c335a91f0f4c6a Cedric Neveux 2018-10-18 179 pSync->change_ongoing = 0;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 180 dsb();
7c335a91f0f4c6a Cedric Neveux 2018-10-18 181
7c335a91f0f4c6a Cedric Neveux 2018-10-18 182 /* wake up all the cores. */
7c335a91f0f4c6a Cedric Neveux 2018-10-18 183 sev();
7c335a91f0f4c6a Cedric Neveux 2018-10-18 184 #endif
7c335a91f0f4c6a Cedric Neveux 2018-10-18 185
7c335a91f0f4c6a Cedric Neveux 2018-10-18 186 local_irq_enable();
7c335a91f0f4c6a Cedric Neveux 2018-10-18 187
c2e58ab882a1953 Cedric Neveux 2018-11-16 188 pr_info("Busfreq OPTEE set to %d done! cpu=%d\n",
c2e58ab882a1953 Cedric Neveux 2018-11-16 189 ddr_rate, me);
7c335a91f0f4c6a Cedric Neveux 2018-10-18 190
7c335a91f0f4c6a Cedric Neveux 2018-10-18 191 return 0;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 192 }
7c335a91f0f4c6a Cedric Neveux 2018-10-18 193
2fc7c702e104bff Cedric Neveux 2018-11-22 194 #ifdef CONFIG_SMP
7c335a91f0f4c6a Cedric Neveux 2018-10-18 195 static int init_freq_optee_smp(struct platform_device *busfreq_pdev)
7c335a91f0f4c6a Cedric Neveux 2018-10-18 196 {
7c335a91f0f4c6a Cedric Neveux 2018-10-18 197 struct device_node *node = 0;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 198 struct device *dev = &busfreq_pdev->dev;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 199 uint32_t cpu;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 200 int err;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 201 int irq;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 202 struct irq_data *irq_data;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 203 unsigned long wfe_iram_base;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 204
7c335a91f0f4c6a Cedric Neveux 2018-10-18 205 if (cpu_is_imx6()) {
7c335a91f0f4c6a Cedric Neveux 2018-10-18 206 node = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-gic");
7c335a91f0f4c6a Cedric Neveux 2018-10-18 207 if (!node) {
7c335a91f0f4c6a Cedric Neveux 2018-10-18 208 if (cpu_is_imx6q())
7c335a91f0f4c6a Cedric Neveux 2018-10-18 209 pr_debug("failed to find imx6q-a9-gic device tree data!\n");
7c335a91f0f4c6a Cedric Neveux 2018-10-18 210
7c335a91f0f4c6a Cedric Neveux 2018-10-18 211 return -EINVAL;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 212 }
7c335a91f0f4c6a Cedric Neveux 2018-10-18 213 } else {
7c335a91f0f4c6a Cedric Neveux 2018-10-18 214 node = of_find_compatible_node(NULL, NULL, "arm,cortex-a7-gic");
7c335a91f0f4c6a Cedric Neveux 2018-10-18 215 if (!node) {
7c335a91f0f4c6a Cedric Neveux 2018-10-18 216 pr_debug("failed to find imx7d-a7-gic device tree data!\n");
7c335a91f0f4c6a Cedric Neveux 2018-10-18 217 return -EINVAL;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 218 }
7c335a91f0f4c6a Cedric Neveux 2018-10-18 219 }
7c335a91f0f4c6a Cedric Neveux 2018-10-18 220
7c335a91f0f4c6a Cedric Neveux 2018-10-18 221 gic_dist_base = of_iomap(node, 0);
7c335a91f0f4c6a Cedric Neveux 2018-10-18 222 WARN(!gic_dist_base, "unable to map gic dist registers\n");
7c335a91f0f4c6a Cedric Neveux 2018-10-18 223
7c335a91f0f4c6a Cedric Neveux 2018-10-18 224 irqs_for_wfe = devm_kzalloc(dev, sizeof(uint32_t) * num_present_cpus(),
7c335a91f0f4c6a Cedric Neveux 2018-10-18 225 GFP_KERNEL);
7c335a91f0f4c6a Cedric Neveux 2018-10-18 226
7c335a91f0f4c6a Cedric Neveux 2018-10-18 227 for_each_online_cpu(cpu) {
7c335a91f0f4c6a Cedric Neveux 2018-10-18 228 /*
7c335a91f0f4c6a Cedric Neveux 2018-10-18 229 * set up a reserved interrupt to get all
7c335a91f0f4c6a Cedric Neveux 2018-10-18 230 * the active cores into a WFE state
7c335a91f0f4c6a Cedric Neveux 2018-10-18 231 * before changing the DDR frequency.
7c335a91f0f4c6a Cedric Neveux 2018-10-18 232 */
7c335a91f0f4c6a Cedric Neveux 2018-10-18 233 irq = platform_get_irq(busfreq_pdev, cpu);
7c335a91f0f4c6a Cedric Neveux 2018-10-18 234
7c335a91f0f4c6a Cedric Neveux 2018-10-18 235 if (cpu_is_imx6()) {
7c335a91f0f4c6a Cedric Neveux 2018-10-18 236 err = request_irq(irq, wait_in_wfe_irq,
7c335a91f0f4c6a Cedric Neveux 2018-10-18 237 IRQF_PERCPU, "mmdc_1", NULL);
7c335a91f0f4c6a Cedric Neveux 2018-10-18 238 } else {
7c335a91f0f4c6a Cedric Neveux 2018-10-18 239 err = request_irq(irq, wait_in_wfe_irq,
7c335a91f0f4c6a Cedric Neveux 2018-10-18 240 IRQF_PERCPU, "ddrc", NULL);
7c335a91f0f4c6a Cedric Neveux 2018-10-18 241 }
7c335a91f0f4c6a Cedric Neveux 2018-10-18 242
7c335a91f0f4c6a Cedric Neveux 2018-10-18 243 if (err) {
7c335a91f0f4c6a Cedric Neveux 2018-10-18 244 dev_err(dev,
7c335a91f0f4c6a Cedric Neveux 2018-10-18 245 "Busfreq:request_irq failed %d, err = %d\n",
7c335a91f0f4c6a Cedric Neveux 2018-10-18 246 irq, err);
7c335a91f0f4c6a Cedric Neveux 2018-10-18 247 return err;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 248 }
7c335a91f0f4c6a Cedric Neveux 2018-10-18 249
7c335a91f0f4c6a Cedric Neveux 2018-10-18 250 err = irq_set_affinity(irq, cpumask_of(cpu));
7c335a91f0f4c6a Cedric Neveux 2018-10-18 251 if (err) {
7c335a91f0f4c6a Cedric Neveux 2018-10-18 252 dev_err(dev,
7c335a91f0f4c6a Cedric Neveux 2018-10-18 253 "Busfreq: Cannot set irq affinity irq=%d,\n",
7c335a91f0f4c6a Cedric Neveux 2018-10-18 254 irq);
7c335a91f0f4c6a Cedric Neveux 2018-10-18 255 return err;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 256 }
7c335a91f0f4c6a Cedric Neveux 2018-10-18 257
7c335a91f0f4c6a Cedric Neveux 2018-10-18 258 irq_data = irq_get_irq_data(irq);
7c335a91f0f4c6a Cedric Neveux 2018-10-18 259 irqs_for_wfe[cpu] = irq_data->hwirq + 32;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 260 }
7c335a91f0f4c6a Cedric Neveux 2018-10-18 261
7c335a91f0f4c6a Cedric Neveux 2018-10-18 262 /* Store the variable used to communicate between cores */
7c335a91f0f4c6a Cedric Neveux 2018-10-18 263 pSync = (void *)ddr_freq_change_iram_base;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 264
7c335a91f0f4c6a Cedric Neveux 2018-10-18 265 memset(pSync, 0, sizeof(*pSync));
7c335a91f0f4c6a Cedric Neveux 2018-10-18 266
7c335a91f0f4c6a Cedric Neveux 2018-10-18 267 wfe_iram_base = ddr_freq_change_iram_base + sizeof(*pSync);
7c335a91f0f4c6a Cedric Neveux 2018-10-18 268
7c335a91f0f4c6a Cedric Neveux 2018-10-18 269 if (wfe_iram_base & (FNCPY_ALIGN - 1))
7c335a91f0f4c6a Cedric Neveux 2018-10-18 270 wfe_iram_base += FNCPY_ALIGN -
7c335a91f0f4c6a Cedric Neveux 2018-10-18 271 ((uintptr_t)wfe_iram_base % (FNCPY_ALIGN));
7c335a91f0f4c6a Cedric Neveux 2018-10-18 272
7c335a91f0f4c6a Cedric Neveux 2018-10-18 273 wfe_change_freq = (void *)fncpy((void *)wfe_iram_base,
7c335a91f0f4c6a Cedric Neveux 2018-10-18 274 &imx_smp_wfe_optee,
7c335a91f0f4c6a Cedric Neveux 2018-10-18 275 ((&imx_smp_wfe_end -&imx_smp_wfe_start) *4));
7c335a91f0f4c6a Cedric Neveux 2018-10-18 276
7c335a91f0f4c6a Cedric Neveux 2018-10-18 277 return 0;
7c335a91f0f4c6a Cedric Neveux 2018-10-18 278
7c335a91f0f4c6a Cedric Neveux 2018-10-18 279 }
7c335a91f0f4c6a Cedric Neveux 2018-10-18 280
7c335a91f0f4c6a Cedric Neveux 2018-10-18 @281 int init_freq_optee(struct platform_device *busfreq_pdev)
:::::: The code at line 108 was first introduced by commit
:::::: 7c335a91f0f4c6a7d7d0f8931e1570025222a379 MLK-20023 Move Busfreq support to OPTEE OS
:::::: TO: Cedric Neveux <cedric.neveux(a)nxp.com>
:::::: CC: Silvano di Ninno <silvano.dininno(a)nxp.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
Re: [PATCH RFC v2 3/6] staging: r8188eu: add error handling of rtw_read8
by kernel test robot
Hi Pavel,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on staging/staging-testing]
url: https://github.com/0day-ci/linux/commits/Pavel-Skripkin/staging-r8188eu-r...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 093991aaadf0fbb34184fa37a46e7a157da3f386
config: arc-allyesconfig (attached as .config)
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/0day-ci/linux/commit/2b557bc2dab8449fa9bb37a8a4c36b071...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Pavel-Skripkin/staging-r8188eu-remove-read-write-_macreg/20210822-233538
git checkout 2b557bc2dab8449fa9bb37a8a4c36b0714b007f7
# save the attached .config 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 warnings (new ones prefixed by >>):
drivers/staging/r8188eu/os_dep/ioctl_linux.c: In function 'rtw_dbg_mode_hdl':
>> drivers/staging/r8188eu/os_dep/ioctl_linux.c:2258:13: warning: variable 'error' set but not used [-Wunused-but-set-variable]
2258 | int error;
| ^~~~~
vim +/error +2258 drivers/staging/r8188eu/os_dep/ioctl_linux.c
2250
2251 static void rtw_dbg_mode_hdl(struct adapter *padapter, u32 id, u8 *pdata, u32 len)
2252 {
2253 struct mp_rw_reg *RegRWStruct;
2254 struct rf_reg_param *prfreg;
2255 u8 path;
2256 u8 offset;
2257 u32 value;
> 2258 int error;
2259
2260 DBG_88E("%s\n", __func__);
2261
2262 switch (id) {
2263 case GEN_MP_IOCTL_SUBCODE(MP_START):
2264 DBG_88E("871x_driver is only for normal mode, can't enter mp mode\n");
2265 break;
2266 case GEN_MP_IOCTL_SUBCODE(READ_REG):
2267 RegRWStruct = (struct mp_rw_reg *)pdata;
2268 switch (RegRWStruct->width) {
2269 case 1:
2270 error = rtw_read8(padapter, RegRWStruct->offset,
2271 (u8 *) &RegRWStruct->value);
2272 break;
2273 case 2:
2274 RegRWStruct->value = rtw_read16(padapter, RegRWStruct->offset);
2275 break;
2276 case 4:
2277 RegRWStruct->value = rtw_read32(padapter, RegRWStruct->offset);
2278 break;
2279 default:
2280 break;
2281 }
2282
2283 break;
2284 case GEN_MP_IOCTL_SUBCODE(WRITE_REG):
2285 RegRWStruct = (struct mp_rw_reg *)pdata;
2286 switch (RegRWStruct->width) {
2287 case 1:
2288 rtw_write8(padapter, RegRWStruct->offset, (u8)RegRWStruct->value);
2289 break;
2290 case 2:
2291 rtw_write16(padapter, RegRWStruct->offset, (u16)RegRWStruct->value);
2292 break;
2293 case 4:
2294 rtw_write32(padapter, RegRWStruct->offset, (u32)RegRWStruct->value);
2295 break;
2296 default:
2297 break;
2298 }
2299
2300 break;
2301 case GEN_MP_IOCTL_SUBCODE(READ_RF_REG):
2302
2303 prfreg = (struct rf_reg_param *)pdata;
2304
2305 path = (u8)prfreg->path;
2306 offset = (u8)prfreg->offset;
2307
2308 value = rtw_hal_read_rfreg(padapter, path, offset, 0xffffffff);
2309
2310 prfreg->value = value;
2311
2312 break;
2313 case GEN_MP_IOCTL_SUBCODE(WRITE_RF_REG):
2314
2315 prfreg = (struct rf_reg_param *)pdata;
2316
2317 path = (u8)prfreg->path;
2318 offset = (u8)prfreg->offset;
2319 value = prfreg->value;
2320
2321 rtw_hal_write_rfreg(padapter, path, offset, 0xffffffff, value);
2322
2323 break;
2324 case GEN_MP_IOCTL_SUBCODE(TRIGGER_GPIO):
2325 DBG_88E("==> trigger gpio 0\n");
2326 rtw_hal_set_hwreg(padapter, HW_VAR_TRIGGER_GPIO_0, NULL);
2327 break;
2328 case GEN_MP_IOCTL_SUBCODE(GET_WIFI_STATUS):
2329 *pdata = rtw_hal_sreset_get_wifi_status(padapter);
2330 break;
2331 default:
2332 break;
2333 }
2334 }
2335
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
Re: [PATCH 01/12] sfc: falcon: Read VPD with pci_vpd_alloc()
by kernel test robot
Hi Heiner,
I love your patch! Perhaps something to improve:
[auto build test WARNING on scsi/for-next]
[also build test WARNING on pci/next mkp-scsi/for-next linus/master v5.14-rc6 next-20210820]
[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]
url: https://github.com/0day-ci/linux/commits/Heiner-Kallweit/PCI-VPD-Convert-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-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/0day-ci/linux/commit/f04e3b53e818526cc8b869af3804e375c...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Heiner-Kallweit/PCI-VPD-Convert-more-users-to-the-new-VPD-API-functions/20210822-220229
git checkout f04e3b53e818526cc8b869af3804e375c0a48abf
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/sfc/falcon/efx.c: In function 'ef4_probe_vpd_strings':
drivers/net/ethernet/sfc/falcon/efx.c:2792:20: error: implicit declaration of function 'pci_vpd_alloc'; did you mean 'pci_pool_alloc'? [-Werror=implicit-function-declaration]
2792 | vpd_data = pci_vpd_alloc(dev, &vpd_size);
| ^~~~~~~~~~~~~
| pci_pool_alloc
>> drivers/net/ethernet/sfc/falcon/efx.c:2792:18: warning: assignment to 'u8 *' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
2792 | vpd_data = pci_vpd_alloc(dev, &vpd_size);
| ^
cc1: some warnings being treated as errors
vim +2792 drivers/net/ethernet/sfc/falcon/efx.c
2781
2782 /* NIC VPD information
2783 * Called during probe to display the part number of the installed NIC.
2784 */
2785 static void ef4_probe_vpd_strings(struct ef4_nic *efx)
2786 {
2787 struct pci_dev *dev = efx->pci_dev;
2788 int ro_start, ro_size, i, j;
2789 unsigned int vpd_size;
2790 u8 *vpd_data;
2791
> 2792 vpd_data = pci_vpd_alloc(dev, &vpd_size);
2793 if (IS_ERR(vpd_data)) {
2794 pci_warn(dev, "Unable to read VPD\n");
2795 return;
2796 }
2797
2798 /* Get the Read only section */
2799 ro_start = pci_vpd_find_tag(vpd_data, vpd_size, PCI_VPD_LRDT_RO_DATA);
2800 if (ro_start < 0) {
2801 netif_err(efx, drv, efx->net_dev, "VPD Read-only not found\n");
2802 goto out;
2803 }
2804
2805 ro_size = pci_vpd_lrdt_size(&vpd_data[ro_start]);
2806 j = ro_size;
2807 i = ro_start + PCI_VPD_LRDT_TAG_SIZE;
2808 if (i + j > vpd_size)
2809 j = vpd_size - i;
2810
2811 /* Get the Part number */
2812 i = pci_vpd_find_info_keyword(vpd_data, i, j, "PN");
2813 if (i < 0) {
2814 netif_err(efx, drv, efx->net_dev, "Part number not found\n");
2815 goto out;
2816 }
2817
2818 j = pci_vpd_info_field_size(&vpd_data[i]);
2819 i += PCI_VPD_INFO_FLD_HDR_SIZE;
2820 if (i + j > vpd_size) {
2821 netif_err(efx, drv, efx->net_dev, "Incomplete part number\n");
2822 goto out;
2823 }
2824
2825 netif_info(efx, drv, efx->net_dev,
2826 "Part Number : %.*s\n", j, &vpd_data[i]);
2827
2828 i = ro_start + PCI_VPD_LRDT_TAG_SIZE;
2829 j = ro_size;
2830 i = pci_vpd_find_info_keyword(vpd_data, i, j, "SN");
2831 if (i < 0) {
2832 netif_err(efx, drv, efx->net_dev, "Serial number not found\n");
2833 goto out;
2834 }
2835
2836 j = pci_vpd_info_field_size(&vpd_data[i]);
2837 i += PCI_VPD_INFO_FLD_HDR_SIZE;
2838 if (i + j > vpd_size) {
2839 netif_err(efx, drv, efx->net_dev, "Incomplete serial number\n");
2840 goto out;
2841 }
2842
2843 efx->vpd_sn = kmalloc(j + 1, GFP_KERNEL);
2844 if (!efx->vpd_sn)
2845 goto out;
2846
2847 snprintf(efx->vpd_sn, j + 1, "%s", &vpd_data[i]);
2848 out:
2849 kfree(vpd_data);
2850 }
2851
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[linux-next:master 7056/9522] drivers/gpu/drm/tegra/dc.c:1856:2: warning: Value stored to 'old_dc_state' is never read [clang-analyzer-deadcode.DeadStores]
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 86ed57fd8c93fdfaabb4f58e78455180fa7d8a84
commit: 04d5d5df9df79f9045e76404775fc8a084aac23d [7056/9522] drm/tegra: dc: Support memory bandwidth management
config: arm-randconfig-c002-20210822 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 9e9d70591e72fc6762b4b9a226b68ed1307419bf)
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/commi...
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 04d5d5df9df79f9045e76404775fc8a084aac23d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
14 warnings generated.
>> drivers/gpu/drm/tegra/dc.c:1856:2: warning: Value stored to 'old_dc_state' is never read [clang-analyzer-deadcode.DeadStores]
old_dc_state = to_const_dc_state(old_crtc_state);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/tegra/dc.c:1856:2: note: Value stored to 'old_dc_state' is never read
old_dc_state = to_const_dc_state(old_crtc_state);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/tegra/dc.c:1857:2: warning: Value stored to 'new_dc_state' is never read [clang-analyzer-deadcode.DeadStores]
new_dc_state = to_const_dc_state(crtc->state);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/tegra/dc.c:1857:2: note: Value stored to 'new_dc_state' is never read
new_dc_state = to_const_dc_state(crtc->state);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/tegra/dc.c:2145:2: warning: Value stored to 'value' is never read [clang-analyzer-deadcode.DeadStores]
value = tegra_dc_readl(dc, DC_CMD_STATE_CONTROL);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/tegra/dc.c:2145:2: note: Value stored to 'value' is never read
value = tegra_dc_readl(dc, DC_CMD_STATE_CONTROL);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/tegra/dc.c:2149:2: warning: Value stored to 'value' is never read [clang-analyzer-deadcode.DeadStores]
value = tegra_dc_readl(dc, DC_CMD_STATE_CONTROL);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/tegra/dc.c:2149:2: note: Value stored to 'value' is never read
value = tegra_dc_readl(dc, DC_CMD_STATE_CONTROL);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/tegra/dc.c:2238:2: warning: Value stored to 'old_state' is never read [clang-analyzer-deadcode.DeadStores]
old_state = drm_atomic_get_old_crtc_state(state, crtc);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/tegra/dc.c:2238:2: note: Value stored to 'old_state' is never read
old_state = drm_atomic_get_old_crtc_state(state, crtc);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 9 warnings (6 in non-user code, 3 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
1 warning generated.
drivers/gpu/drm/tegra/hda.c:53:3: warning: Value stored to 'bits' is never read [clang-analyzer-deadcode.DeadStores]
bits = (format & AC_FMT_BITS_MASK) >> AC_FMT_BITS_SHIFT;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/tegra/hda.c:53:3: note: Value stored to 'bits' is never read
bits = (format & AC_FMT_BITS_MASK) >> AC_FMT_BITS_SHIFT;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
vim +/old_dc_state +1856 drivers/gpu/drm/tegra/dc.c
1836
1837 static void
1838 tegra_crtc_update_memory_bandwidth(struct drm_crtc *crtc,
1839 struct drm_atomic_state *state,
1840 bool prepare_bandwidth_transition)
1841 {
1842 const struct tegra_plane_state *old_tegra_state, *new_tegra_state;
1843 const struct tegra_dc_state *old_dc_state, *new_dc_state;
1844 u32 i, new_avg_bw, old_avg_bw, new_peak_bw, old_peak_bw;
1845 const struct drm_plane_state *old_plane_state;
1846 const struct drm_crtc_state *old_crtc_state;
1847 struct tegra_dc_window window, old_window;
1848 struct tegra_dc *dc = to_tegra_dc(crtc);
1849 struct tegra_plane *tegra;
1850 struct drm_plane *plane;
1851
1852 if (dc->soc->has_nvdisplay)
1853 return;
1854
1855 old_crtc_state = drm_atomic_get_old_crtc_state(state, crtc);
> 1856 old_dc_state = to_const_dc_state(old_crtc_state);
> 1857 new_dc_state = to_const_dc_state(crtc->state);
1858
1859 if (!crtc->state->active) {
1860 if (!old_crtc_state->active)
1861 return;
1862
1863 /*
1864 * When CRTC is disabled on DPMS, the state of attached planes
1865 * is kept unchanged. Hence we need to enforce removal of the
1866 * bandwidths from the ICC paths.
1867 */
1868 drm_atomic_crtc_for_each_plane(plane, crtc) {
1869 tegra = to_tegra_plane(plane);
1870
1871 icc_set_bw(tegra->icc_mem, 0, 0);
1872 icc_set_bw(tegra->icc_mem_vfilter, 0, 0);
1873 }
1874
1875 return;
1876 }
1877
1878 for_each_old_plane_in_state(old_crtc_state->state, plane,
1879 old_plane_state, i) {
1880 old_tegra_state = to_const_tegra_plane_state(old_plane_state);
1881 new_tegra_state = to_const_tegra_plane_state(plane->state);
1882 tegra = to_tegra_plane(plane);
1883
1884 /*
1885 * We're iterating over the global atomic state and it contains
1886 * planes from another CRTC, hence we need to filter out the
1887 * planes unrelated to this CRTC.
1888 */
1889 if (tegra->dc != dc)
1890 continue;
1891
1892 new_avg_bw = new_tegra_state->avg_memory_bandwidth;
1893 old_avg_bw = old_tegra_state->avg_memory_bandwidth;
1894
1895 new_peak_bw = new_tegra_state->total_peak_memory_bandwidth;
1896 old_peak_bw = old_tegra_state->total_peak_memory_bandwidth;
1897
1898 /*
1899 * See the comment related to !crtc->state->active above,
1900 * which explains why bandwidths need to be updated when
1901 * CRTC is turning ON.
1902 */
1903 if (new_avg_bw == old_avg_bw && new_peak_bw == old_peak_bw &&
1904 old_crtc_state->active)
1905 continue;
1906
1907 window.src.h = drm_rect_height(&plane->state->src) >> 16;
1908 window.dst.h = drm_rect_height(&plane->state->dst);
1909
1910 old_window.src.h = drm_rect_height(&old_plane_state->src) >> 16;
1911 old_window.dst.h = drm_rect_height(&old_plane_state->dst);
1912
1913 /*
1914 * During the preparation phase (atomic_begin), the memory
1915 * freq should go high before the DC changes are committed
1916 * if bandwidth requirement goes up, otherwise memory freq
1917 * should to stay high if BW requirement goes down. The
1918 * opposite applies to the completion phase (post_commit).
1919 */
1920 if (prepare_bandwidth_transition) {
1921 new_avg_bw = max(old_avg_bw, new_avg_bw);
1922 new_peak_bw = max(old_peak_bw, new_peak_bw);
1923
1924 if (tegra_plane_use_vertical_filtering(tegra, &old_window))
1925 window = old_window;
1926 }
1927
1928 icc_set_bw(tegra->icc_mem, new_avg_bw, new_peak_bw);
1929
1930 if (tegra_plane_use_vertical_filtering(tegra, &window))
1931 icc_set_bw(tegra->icc_mem_vfilter, new_avg_bw, new_peak_bw);
1932 else
1933 icc_set_bw(tegra->icc_mem_vfilter, 0, 0);
1934 }
1935 }
1936
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[intel-linux-intel-lts:5.4/yocto 15747/18252] drivers/net/ethernet/intel/igc/igc_main.c:1531:31: sparse: sparse: cast to restricted __be16
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: cfef018a5efc728040e938c270bbc68fc8124d33
commit: 838384fea3c5ff86d19b3fe3ef01d2be8d83d7d2 [15747/18252] igc: Enable VLAN Insertion and VLAN Stripping
config: x86_64-randconfig-s022-20210815 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-348-gf0e6938b-dirty
# https://github.com/intel/linux-intel-lts/commit/838384fea3c5ff86d19b3fe3e...
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.4/yocto
git checkout 838384fea3c5ff86d19b3fe3ef01d2be8d83d7d2
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/net/ethernet/intel/igc/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/intel/igc/igc_main.c:1531:31: sparse: sparse: cast to restricted __be16
>> drivers/net/ethernet/intel/igc/igc_main.c:1531:31: sparse: sparse: cast from restricted __le16
>> drivers/net/ethernet/intel/igc/igc_main.c:1531:31: sparse: sparse: cast to restricted __be16
>> drivers/net/ethernet/intel/igc/igc_main.c:1531:31: sparse: sparse: cast from restricted __le16
>> drivers/net/ethernet/intel/igc/igc_main.c:1531:31: sparse: sparse: cast to restricted __be16
>> drivers/net/ethernet/intel/igc/igc_main.c:1531:31: sparse: sparse: cast from restricted __le16
>> drivers/net/ethernet/intel/igc/igc_main.c:1531:31: sparse: sparse: cast to restricted __be16
>> drivers/net/ethernet/intel/igc/igc_main.c:1531:31: sparse: sparse: cast from restricted __le16
vim +1531 drivers/net/ethernet/intel/igc/igc_main.c
1519
1520 static void igc_rx_vlan(struct igc_ring *rx_ring,
1521 union igc_adv_rx_desc *rx_desc,
1522 struct sk_buff *skb)
1523 {
1524 struct net_device *dev = rx_ring->netdev;
1525 u16 vid;
1526
1527 if ((dev->features & NETIF_F_HW_VLAN_CTAG_RX) &&
1528 igc_test_staterr(rx_desc, IGC_RXD_STAT_VP)) {
1529 if (igc_test_staterr(rx_desc, IGC_RXDEXT_STATERR_LB) &&
1530 test_bit(IGC_RING_FLAG_RX_LB_VLAN_BSWAP, &rx_ring->flags))
> 1531 vid = be16_to_cpu(rx_desc->wb.upper.vlan);
1532 else
1533 vid = le16_to_cpu(rx_desc->wb.upper.vlan);
1534
1535 __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);
1536 }
1537 }
1538
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[intel-linux-intel-lts:5.4/yocto 15479/18252] drivers/net/ethernet/intel/igc/igc_ptp.c:460:18: sparse: sparse: cast to restricted __le32
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: cfef018a5efc728040e938c270bbc68fc8124d33
commit: 12fc406ee6d446e71ab81fc11faa3b2ebe1095c4 [15479/18252] igc: Fix igc_ptp_rx_pktstamp()
config: x86_64-randconfig-s022-20210815 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-348-gf0e6938b-dirty
# https://github.com/intel/linux-intel-lts/commit/12fc406ee6d446e71ab81fc11...
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.4/yocto
git checkout 12fc406ee6d446e71ab81fc11faa3b2ebe1095c4
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/net/ethernet/intel/igc/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/intel/igc/igc_ptp.c:460:18: sparse: sparse: cast to restricted __le32
drivers/net/ethernet/intel/igc/igc_ptp.c:461:24: sparse: sparse: cast to restricted __le32
drivers/net/ethernet/intel/igc/igc_ptp.c:742:21: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/intel/igc/igc_ptp.c:742:21: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/intel/igc/igc_ptp.c:742:21: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/intel/igc/igc_ptp.c:742:21: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/intel/igc/igc_ptp.c:742:21: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/intel/igc/igc_ptp.c:742:21: sparse: sparse: cast to restricted __be32
vim +460 drivers/net/ethernet/intel/igc/igc_ptp.c
432
433 /**
434 * igc_ptp_rx_pktstamp - Retrieve timestamp from rx packet buffer
435 * @q_vector: Pointer to interrupt specific structure
436 * @va: Pointer to address containing Rx buffer
437 * @skb: Buffer containing timestamp and packet
438 *
439 * This function retrieves the timestamp saved in the beginning of packet
440 * buffer. While two timestamps are available, one in timer0 reference and the
441 * other in timer1 reference, this function considers only the timestamp in
442 * timer0 reference.
443 */
444 void igc_ptp_rx_pktstamp(struct igc_q_vector *q_vector, u32 *va,
445 struct sk_buff *skb)
446 {
447 struct igc_adapter *adapter = q_vector->adapter;
448 u64 regval;
449 int adjust;
450
451 /* Timestamps are saved in little endian at the beginning of the packet
452 * buffer following the layout:
453 *
454 * DWORD: | 0 | 1 | 2 | 3 |
455 * Field: | Timer1 SYSTIML | Timer1 SYSTIMH | Timer0 SYSTIML | Timer0 SYSTIMH |
456 *
457 * SYSTIML holds the nanoseconds part while SYSTIMH holds the seconds
458 * part of the timestamp.
459 */
> 460 regval = le32_to_cpu(va[2]);
461 regval |= (u64)le32_to_cpu(va[3]) << 32;
462 igc_ptp_systim_to_hwtstamp(adapter, skb_hwtstamps(skb), regval);
463
464 /* Adjust timestamp for the RX latency based on link speed */
465 switch (adapter->link_speed) {
466 case SPEED_10:
467 adjust = IGC_I225_RX_LATENCY_10;
468 break;
469 case SPEED_100:
470 adjust = IGC_I225_RX_LATENCY_100;
471 break;
472 case SPEED_1000:
473 adjust = IGC_I225_RX_LATENCY_1000;
474 break;
475 case SPEED_2500:
476 adjust = IGC_I225_RX_LATENCY_2500;
477 break;
478 default:
479 adjust = 0;
480 netdev_warn_once(adapter->netdev, "Imprecise timestamp\n");
481 break;
482 }
483 skb_hwtstamps(skb)->hwtstamp =
484 ktime_sub_ns(skb_hwtstamps(skb)->hwtstamp, adjust);
485 }
486
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[intel-linux-intel-lts:5.4/yocto 14766/18252] drivers/net/ethernet/intel/igc/igc_ptp.c:457:21: sparse: sparse: cast to restricted __be32
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: cfef018a5efc728040e938c270bbc68fc8124d33
commit: 23eaaf813799b52b3df39373c4c82d81a0988816 [14766/18252] igc: Add support for PTP getcrosststamp()
config: x86_64-randconfig-s022-20210815 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-348-gf0e6938b-dirty
# https://github.com/intel/linux-intel-lts/commit/23eaaf813799b52b3df39373c...
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.4/yocto
git checkout 23eaaf813799b52b3df39373c4c82d81a0988816
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/net/ethernet/intel/igc/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/intel/igc/igc_ptp.c:457:21: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/intel/igc/igc_ptp.c:457:21: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/intel/igc/igc_ptp.c:457:21: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/intel/igc/igc_ptp.c:457:21: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/intel/igc/igc_ptp.c:457:21: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/intel/igc/igc_ptp.c:457:21: sparse: sparse: cast to restricted __be32
vim +457 drivers/net/ethernet/intel/igc/igc_ptp.c
441
442 static void igc_ptm_gather_report(struct igc_adapter *adapter)
443 {
444 struct igc_hw *hw = &adapter->hw;
445 u32 t2_curr_h, t2_curr_l;
446 ktime_t t1, t2_curr;
447
448 t1 = ktime_set(rd32(IGC_PTM_T1_TIM0_H),
449 rd32(IGC_PTM_T1_TIM0_L));
450
451 t2_curr_l = rd32(IGC_PTM_CURR_T2_L);
452 t2_curr_h = rd32(IGC_PTM_CURR_T2_H);
453
454 /* FIXME: There's an ambiguity on what endianness some PCIe PTM
455 * messages should use. Find a more robust way to handle this.
456 */
> 457 t2_curr_h = be32_to_cpu(t2_curr_h);
458
459 t2_curr = ((s64)t2_curr_h << 32 | t2_curr_l);
460
461 wr32(IGC_PTM_STAT, IGC_PTM_STAT_VALID);
462
463 mutex_lock(&adapter->ptm_time_lock);
464
465 /* Because get_device_system_crosststamp() requires that the
466 * historic timestamp is before the PTM device/host
467 * timestamps, we keep track of the current and previous
468 * snapshot (historic timestamp).
469 */
470 memcpy(&adapter->prev_snapshot,
471 &adapter->curr_snapshot, sizeof(adapter->prev_snapshot));
472 ktime_get_snapshot(&adapter->curr_snapshot);
473
474 adapter->ptm_device_time = t1;
475 adapter->ptm_host_time = igc_device_tstamp_to_system(t2_curr);
476 mutex_unlock(&adapter->ptm_time_lock);
477
478 mod_delayed_work(system_wq, &adapter->ptm_report,
479 msecs_to_jiffies(IGC_PTM_CYCLE_TIME_MSECS));
480 }
481
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[linux-chenxing:msc313_mainlining 24/41] drivers/pinctrl/mstar/pinctrl-msc313.c:1528:5: warning: no previous prototype for 'mstar_pin_config_get'
by kernel test robot
tree: git://github.com/linux-chenxing/linux.git msc313_mainlining
head: 57db68128a4c2d6de54743980d3f8d6abd32be5c
commit: 02ec8cd4df8a7eba2362bf89ba3ccbd8940ef074 [24/41] pinctrl: mstar: msc313 pinctrl driver
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-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/linux-chenxing/linux/commit/02ec8cd4df8a7eba2362bf89ba...
git remote add linux-chenxing git://github.com/linux-chenxing/linux.git
git fetch --no-tags linux-chenxing msc313_mainlining
git checkout 02ec8cd4df8a7eba2362bf89ba3ccbd8940ef074
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/pinctrl/mstar/pinctrl-msc313.c:1528:5: warning: no previous prototype for 'mstar_pin_config_get' [-Wmissing-prototypes]
1528 | int mstar_pin_config_get(struct pinctrl_dev *pctldev,
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/pinctrl/mstar/pinctrl-msc313.c:1537:5: warning: no previous prototype for 'mstar_pin_config_set' [-Wmissing-prototypes]
1537 | int mstar_pin_config_set(struct pinctrl_dev *pctldev,
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/pinctrl/mstar/pinctrl-msc313.c:1550:5: warning: no previous prototype for 'mstar_pin_config_group_get' [-Wmissing-prototypes]
1550 | int mstar_pin_config_group_get(struct pinctrl_dev *pctldev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/pinctrl/mstar/pinctrl-msc313.c:1557:5: warning: no previous prototype for 'mstar_pin_config_group_set' [-Wmissing-prototypes]
1557 | int mstar_pin_config_group_set(struct pinctrl_dev *pctldev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/mstar_pin_config_get +1528 drivers/pinctrl/mstar/pinctrl-msc313.c
1527
> 1528 int mstar_pin_config_get(struct pinctrl_dev *pctldev,
1529 unsigned int pin,
1530 unsigned long *config)
1531 {
1532 struct msc313_pinctrl *pinctrl = pinctrl_dev_get_drvdata(pctldev);
1533
1534 return msc313_pinctrl_get_config(pinctrl, pin, config);
1535 }
1536
> 1537 int mstar_pin_config_set(struct pinctrl_dev *pctldev,
1538 unsigned int pin,
1539 unsigned long *configs,
1540 unsigned int num_configs)
1541 {
1542 int i;
1543 struct msc313_pinctrl *pinctrl = pinctrl_dev_get_drvdata(pctldev);
1544
1545 for (i = 0; i < num_configs; i++)
1546 mstar_set_config(pinctrl, pin, configs[i]);
1547 return 0;
1548 }
1549
> 1550 int mstar_pin_config_group_get(struct pinctrl_dev *pctldev,
1551 unsigned int selector,
1552 unsigned long *config)
1553 {
1554 return -ENOTSUPP;
1555 }
1556
> 1557 int mstar_pin_config_group_set(struct pinctrl_dev *pctldev,
1558 unsigned int selector,
1559 unsigned long *configs,
1560 unsigned int num_configs)
1561 {
1562 struct msc313_pinctrl *pinctrl = pinctrl_dev_get_drvdata(pctldev);
1563 struct group_desc *group = pinctrl_generic_get_group(pctldev, selector);
1564 int i, j, ret;
1565
1566 for (i = 0; i < group->num_pins; i++) {
1567 for (j = 0; j < num_configs; j++) {
1568 ret = mstar_set_config(pinctrl, group->pins[i], configs[j]);
1569 if (ret)
1570 return ret;
1571 }
1572 }
1573 return 0;
1574 }
1575
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[linux-chenxing:msc313_mainlining 40/41] drivers/rtc/rtc-msc313.c:243:25: error: 'ms_rtc_of_match_table' undeclared here (not in a function); did you mean 'msc313_rtc_of_match_table'?
by kernel test robot
tree: git://github.com/linux-chenxing/linux.git msc313_mainlining
head: 57db68128a4c2d6de54743980d3f8d6abd32be5c
commit: 37205044bfe9b34ab9f2a65eff3cb2f4c348ee02 [40/41] rtc: Add support for the MSTAR MSC313 RTC
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-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/linux-chenxing/linux/commit/37205044bfe9b34ab9f2a65eff...
git remote add linux-chenxing git://github.com/linux-chenxing/linux.git
git fetch --no-tags linux-chenxing msc313_mainlining
git checkout 37205044bfe9b34ab9f2a65eff3cb2f4c348ee02
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sh SHELL=/bin/bash drivers/
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 >>):
In file included from drivers/rtc/rtc-msc313.c:13:
>> drivers/rtc/rtc-msc313.c:243:25: error: 'ms_rtc_of_match_table' undeclared here (not in a function); did you mean 'msc313_rtc_of_match_table'?
243 | MODULE_DEVICE_TABLE(of, ms_rtc_of_match_table);
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/module.h:244:15: note: in definition of macro 'MODULE_DEVICE_TABLE'
244 | extern typeof(name) __mod_##type##__##name##_device_table \
| ^~~~
>> include/linux/module.h:244:21: error: '__mod_of__ms_rtc_of_match_table_device_table' aliased to undefined symbol 'ms_rtc_of_match_table'
244 | extern typeof(name) __mod_##type##__##name##_device_table \
| ^~~~~~
drivers/rtc/rtc-msc313.c:243:1: note: in expansion of macro 'MODULE_DEVICE_TABLE'
243 | MODULE_DEVICE_TABLE(of, ms_rtc_of_match_table);
| ^~~~~~~~~~~~~~~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for SND_ATMEL_SOC_PDC
Depends on SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && HAS_DMA
Selected by
- SND_ATMEL_SOC_SSC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC
- SND_ATMEL_SOC_SSC_PDC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && ATMEL_SSC
vim +243 drivers/rtc/rtc-msc313.c
238
239 static const struct of_device_id msc313_rtc_of_match_table[] = {
240 { .compatible = "mstar,msc313-rtc" },
241 { }
242 };
> 243 MODULE_DEVICE_TABLE(of, ms_rtc_of_match_table);
244
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year