[afaerber:rtd1295-next 99/166] g2227.c:undefined reference to `i2c_register_driver'
by kernel test robot
tree: https://github.com/afaerber/linux.git rtd1295-next
head: af9d43a7ab49361eb3297bfc219db99e3ced1bb1
commit: 3b369dfc364fc8a7f6a4a4fbcb2c7c8f6d7e6880 [99/166] regulator: Add GMT G2227 driver
config: h8300-allmodconfig (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.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
git checkout 3b369dfc364fc8a7f6a4a4fbcb2c7c8f6d7e6880
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=h8300
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 >>, old ones prefixed by <<):
h8300-linux-ld: drivers/regulator/g2227.o: in function `g2227_probe':
g2227.c:(.text+0x87): undefined reference to `__devm_regmap_init_i2c'
h8300-linux-ld: drivers/regulator/g2227.o: in function `g2227_driver_init':
>> g2227.c:(.init.text+0xf): undefined reference to `i2c_register_driver'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[linux-review:UPDATE-20200613-235004/Borislav-Petkov/x86-msr-Filter-MSR-writes/20200612-185246 1/1] arch/x86/kernel/msr.c:281:21: warning: passing argument 1 of 'strstrip' discards 'const' qualifier from pointer target type
by kernel test robot
tree: https://github.com/0day-ci/linux/commits/UPDATE-20200613-235004/Borislav-...
head: 24611fae296234f2f3d5e95062d44390a482887b
commit: 24611fae296234f2f3d5e95062d44390a482887b [1/1] x86/msr: Filter MSR writes
config: x86_64-randconfig-c002-20200613 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
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 >>, old ones prefixed by <<):
arch/x86/kernel/msr.c: In function 'set_allow_writes':
>> arch/x86/kernel/msr.c:281:21: warning: passing argument 1 of 'strstrip' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
281 | char *s = strstrip(val);
| ^~~
In file included from include/linux/bitmap.h:9,
from include/linux/cpumask.h:12,
from arch/x86/include/asm/cpumask.h:5,
from arch/x86/include/asm/msr.h:11,
from arch/x86/include/asm/processor.h:22,
from arch/x86/include/asm/cpufeature.h:5,
from arch/x86/include/asm/thread_info.h:53,
from include/linux/thread_info.h:38,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/stat.h:19,
from include/linux/module.h:13,
from arch/x86/kernel/msr.c:22:
include/linux/string.h:76:49: note: expected 'char *' but argument is of type 'const char *'
76 | static inline __must_check char *strstrip(char *str)
| ~~~~~~^~~
In file included from include/linux/compiler_types.h:59,
from <command-line>:
arch/x86/kernel/msr.c: In function 'filter_write':
>> include/linux/compiler_attributes.h:200:41: warning: attribute 'fallthrough' not preceding a case label or default label
200 | # define fallthrough __attribute__((__fallthrough__))
| ^~~~~~~~~~~~~
>> arch/x86/kernel/msr.c:86:11: note: in expansion of macro 'fallthrough'
86 | default: fallthrough;
| ^~~~~~~~~~~
vim +281 arch/x86/kernel/msr.c
80
81 static int filter_write(u32 reg)
82 {
83 switch (allow_writes) {
84 case MSR_WRITES_ON: return 0; break;
85 case MSR_WRITES_OFF: return -EPERM; break;
> 86 default: fallthrough;
87 }
88
89 if (reg == MSR_IA32_ENERGY_PERF_BIAS)
90 return 0;
91
92 pr_err_ratelimited("Write to unrecognized MSR 0x%x by %s\n"
93 "Please report to x86(a)kernel.org\n",
94 reg, current->comm);
95
96 return 0;
97 }
98
99 static ssize_t msr_write(struct file *file, const char __user *buf,
100 size_t count, loff_t *ppos)
101 {
102 const u32 __user *tmp = (const u32 __user *)buf;
103 u32 data[2];
104 u32 reg = *ppos;
105 int cpu = iminor(file_inode(file));
106 int err = 0;
107 ssize_t bytes = 0;
108
109 err = security_locked_down(LOCKDOWN_MSR);
110 if (err)
111 return err;
112
113 err = filter_write(reg);
114 if (err)
115 return err;
116
117 if (count % 8)
118 return -EINVAL; /* Invalid chunk size */
119
120 for (; count; count -= 8) {
121 if (copy_from_user(&data, tmp, 8)) {
122 err = -EFAULT;
123 break;
124 }
125
126 add_taint(TAINT_CPU_OUT_OF_SPEC, LOCKDEP_STILL_OK);
127
128 err = wrmsr_safe_on_cpu(cpu, reg, data[0], data[1]);
129 if (err)
130 break;
131
132 tmp += 2;
133 bytes += 8;
134 }
135
136 return bytes ? bytes : err;
137 }
138
139 static long msr_ioctl(struct file *file, unsigned int ioc, unsigned long arg)
140 {
141 u32 __user *uregs = (u32 __user *)arg;
142 u32 regs[8];
143 int cpu = iminor(file_inode(file));
144 int err;
145
146 switch (ioc) {
147 case X86_IOC_RDMSR_REGS:
148 if (!(file->f_mode & FMODE_READ)) {
149 err = -EBADF;
150 break;
151 }
152 if (copy_from_user(®s, uregs, sizeof(regs))) {
153 err = -EFAULT;
154 break;
155 }
156 err = rdmsr_safe_regs_on_cpu(cpu, regs);
157 if (err)
158 break;
159 if (copy_to_user(uregs, ®s, sizeof(regs)))
160 err = -EFAULT;
161 break;
162
163 case X86_IOC_WRMSR_REGS:
164 if (!(file->f_mode & FMODE_WRITE)) {
165 err = -EBADF;
166 break;
167 }
168 if (copy_from_user(®s, uregs, sizeof(regs))) {
169 err = -EFAULT;
170 break;
171 }
172 err = security_locked_down(LOCKDOWN_MSR);
173 if (err)
174 break;
175 err = wrmsr_safe_regs_on_cpu(cpu, regs);
176 if (err)
177 break;
178 if (copy_to_user(uregs, ®s, sizeof(regs)))
179 err = -EFAULT;
180 break;
181
182 default:
183 err = -ENOTTY;
184 break;
185 }
186
187 return err;
188 }
189
190 static int msr_open(struct inode *inode, struct file *file)
191 {
192 unsigned int cpu = iminor(file_inode(file));
193 struct cpuinfo_x86 *c;
194
195 if (!capable(CAP_SYS_RAWIO))
196 return -EPERM;
197
198 if (cpu >= nr_cpu_ids || !cpu_online(cpu))
199 return -ENXIO; /* No such CPU */
200
201 c = &cpu_data(cpu);
202 if (!cpu_has(c, X86_FEATURE_MSR))
203 return -EIO; /* MSR not supported */
204
205 return 0;
206 }
207
208 /*
209 * File operations we support
210 */
211 static const struct file_operations msr_fops = {
212 .owner = THIS_MODULE,
213 .llseek = no_seek_end_llseek,
214 .read = msr_read,
215 .write = msr_write,
216 .open = msr_open,
217 .unlocked_ioctl = msr_ioctl,
218 .compat_ioctl = msr_ioctl,
219 };
220
221 static int msr_device_create(unsigned int cpu)
222 {
223 struct device *dev;
224
225 dev = device_create(msr_class, NULL, MKDEV(MSR_MAJOR, cpu), NULL,
226 "msr%d", cpu);
227 return PTR_ERR_OR_ZERO(dev);
228 }
229
230 static int msr_device_destroy(unsigned int cpu)
231 {
232 device_destroy(msr_class, MKDEV(MSR_MAJOR, cpu));
233 return 0;
234 }
235
236 static char *msr_devnode(struct device *dev, umode_t *mode)
237 {
238 return kasprintf(GFP_KERNEL, "cpu/%u/msr", MINOR(dev->devt));
239 }
240
241 static int __init msr_init(void)
242 {
243 int err;
244
245 if (__register_chrdev(MSR_MAJOR, 0, NR_CPUS, "cpu/msr", &msr_fops)) {
246 pr_err("unable to get major %d for msr\n", MSR_MAJOR);
247 return -EBUSY;
248 }
249 msr_class = class_create(THIS_MODULE, "msr");
250 if (IS_ERR(msr_class)) {
251 err = PTR_ERR(msr_class);
252 goto out_chrdev;
253 }
254 msr_class->devnode = msr_devnode;
255
256 err = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "x86/msr:online",
257 msr_device_create, msr_device_destroy);
258 if (err < 0)
259 goto out_class;
260 cpuhp_msr_state = err;
261 return 0;
262
263 out_class:
264 class_destroy(msr_class);
265 out_chrdev:
266 __unregister_chrdev(MSR_MAJOR, 0, NR_CPUS, "cpu/msr");
267 return err;
268 }
269 module_init(msr_init);
270
271 static void __exit msr_exit(void)
272 {
273 cpuhp_remove_state(cpuhp_msr_state);
274 class_destroy(msr_class);
275 __unregister_chrdev(MSR_MAJOR, 0, NR_CPUS, "cpu/msr");
276 }
277 module_exit(msr_exit)
278
279 static int set_allow_writes(const char *val, const struct kernel_param *cp)
280 {
> 281 char *s = strstrip(val);
282
283 if (!strcmp(s, "on"))
284 allow_writes = MSR_WRITES_ON;
285 else if (!strcmp(s, "off"))
286 allow_writes = MSR_WRITES_OFF;
287 else
288 allow_writes = MSR_WRITES_DEFAULT;
289
290 return 0;
291 }
292
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH v4 3/9] media: i2c: ov6650: Use new [get|set]_mbus_config ops
by kernel test robot
Hi Jacopo,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on v5.7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Jacopo-Mondi/v4l2-subdev-Introdu...
base: git://linuxtv.org/media_tree.git master
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck warnings: (new ones prefixed by >>)
>> drivers/media/i2c/ov6650.c:941:34: warning: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
| (comj & COMJ_VSYNC_HIGH ? V4L2_MBUS_VSYNC_ACTIVE_HIGH
^
drivers/media/i2c/ov6650.c:943:34: warning: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
| (comf & COMF_HREF_LOW ? V4L2_MBUS_HSYNC_ACTIVE_LOW
^
drivers/media/i2c/ov6650.c:945:34: warning: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
| (comj & COMJ_PCLK_RISING ? V4L2_MBUS_PCLK_SAMPLE_RISING
^
--
In file included from fs/nfsd/trace.c:
>> fs/nfsd/trace.h:175:0: warning: There is an unknown macro here somewhere. Configuration is required. If DECLARE_EVENT_CLASS is a macro then please configure it. [unknownMacro]
^
>> fs/nfsd/nfsctl.c:1277:7: warning: Opposite inner 'if' condition leads to a dead code block. [oppositeInnerCondition]
if (!files->name)
^
fs/nfsd/nfsctl.c:1276:19: note: outer condition: files->name
for (i = 0; files->name && files->name[0]; i++, files++) {
^
fs/nfsd/nfsctl.c:1277:7: note: opposite inner condition: !files->name
if (!files->name)
^
>> fs/nfsd/nfsctl.c:524:5: warning: Variable 'rv' is reassigned a value before the old one has been used. [redundantAssignment]
rv = nfsd_get_nrthreads(npools, nthreads, net);
^
fs/nfsd/nfsctl.c:504:5: note: Variable 'rv' is reassigned a value before the old one has been used.
rv = -ENOMEM;
^
fs/nfsd/nfsctl.c:524:5: note: Variable 'rv' is reassigned a value before the old one has been used.
rv = nfsd_get_nrthreads(npools, nthreads, net);
^
>> fs/nfsd/nfsctl.c:1201:6: warning: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment]
ret = __nfsd_mkdir(d_inode(parent), dentry, S_IFDIR | 0600, ncl);
^
fs/nfsd/nfsctl.c:1195:0: note: Variable 'ret' is reassigned a value before the old one has been used.
int ret = -ENOMEM;
^
fs/nfsd/nfsctl.c:1201:6: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = __nfsd_mkdir(d_inode(parent), dentry, S_IFDIR | 0600, ncl);
^
vim +941 drivers/media/i2c/ov6650.c
922
923 /* Request bus settings on camera side */
924 static int ov6650_get_mbus_config(struct v4l2_subdev *sd,
925 unsigned int pad,
926 struct v4l2_mbus_config *cfg)
927 {
928 struct i2c_client *client = v4l2_get_subdevdata(sd);
929 u8 comj, comf;
930 int ret;
931
932 ret = ov6650_reg_read(client, REG_COMJ, &comj);
933 if (ret)
934 return ret;
935
936 ret = ov6650_reg_read(client, REG_COMF, &comf);
937 if (ret)
938 return ret;
939
940 cfg->flags = V4L2_MBUS_MASTER
> 941 | (comj & COMJ_VSYNC_HIGH ? V4L2_MBUS_VSYNC_ACTIVE_HIGH
942 : V4L2_MBUS_VSYNC_ACTIVE_LOW)
943 | (comf & COMF_HREF_LOW ? V4L2_MBUS_HSYNC_ACTIVE_LOW
944 : V4L2_MBUS_HSYNC_ACTIVE_HIGH)
945 | (comj & COMJ_PCLK_RISING ? V4L2_MBUS_PCLK_SAMPLE_RISING
946 : V4L2_MBUS_PCLK_SAMPLE_FALLING);
947 cfg->type = V4L2_MBUS_PARALLEL;
948
949 return 0;
950 }
951
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[afaerber:rtd1295-next 105/166] drivers/ata/ahci_rtd1295.c:273:2: note: in expansion of macro 'AHCI_SHT'
by kernel test robot
tree: https://github.com/afaerber/linux.git rtd1295-next
head: af9d43a7ab49361eb3297bfc219db99e3ced1bb1
commit: 21a6ebd158b3d4ce66ddeaf68d1ab4ff3cc08fa4 [105/166] ahci: Implement
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.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
git checkout 21a6ebd158b3d4ce66ddeaf68d1ab4ff3cc08fa4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.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 >>, old ones prefixed by <<):
In file included from drivers/ata/ahci_rtd1295.c:10:
drivers/ata/ahci.h:385:16: warning: initialized field overwritten [-Woverride-init]
385 | .can_queue = AHCI_MAX_CMDS, | ^~~~~~~~~~~~~
>> drivers/ata/ahci_rtd1295.c:273:2: note: in expansion of macro 'AHCI_SHT'
273 | AHCI_SHT(DRV_NAME),
| ^~~~~~~~
drivers/ata/ahci.h:385:16: note: (near initialization for 'rtd129x_ahci_scsi_host_template.can_queue')
385 | .can_queue = AHCI_MAX_CMDS, | ^~~~~~~~~~~~~
>> drivers/ata/ahci_rtd1295.c:273:2: note: in expansion of macro 'AHCI_SHT'
273 | AHCI_SHT(DRV_NAME),
| ^~~~~~~~
drivers/ata/ahci.h:389:17: warning: initialized field overwritten [-Woverride-init]
389 | .sdev_attrs = ahci_sdev_attrs
| ^~~~~~~~~~~~~~~
>> drivers/ata/ahci_rtd1295.c:273:2: note: in expansion of macro 'AHCI_SHT'
273 | AHCI_SHT(DRV_NAME),
| ^~~~~~~~
drivers/ata/ahci.h:389:17: note: (near initialization for 'rtd129x_ahci_scsi_host_template.sdev_attrs')
389 | .sdev_attrs = ahci_sdev_attrs
| ^~~~~~~~~~~~~~~
>> drivers/ata/ahci_rtd1295.c:273:2: note: in expansion of macro 'AHCI_SHT'
273 | AHCI_SHT(DRV_NAME),
| ^~~~~~~~
vim +/AHCI_SHT +273 drivers/ata/ahci_rtd1295.c
271
272 static struct scsi_host_template rtd129x_ahci_scsi_host_template = {
> 273 AHCI_SHT(DRV_NAME),
274 };
275
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH v2] Makefile: Improve compressed debug info support detection
by Nick Desaulniers
On Thu, Jun 11, 2020 at 3:03 PM Arvind Sankar <nivedita(a)alum.mit.edu> wrote:
>
> Commit
> 10e68b02c861 ("Makefile: support compressed debug info")
> added support for compressed debug sections.
>
> Support is detected by checking
> - does the compiler support -gz=zlib
> - does the assembler support --compressed-debug-sections=zlib
> - does the linker support --compressed-debug-sections=zlib
>
> However, the gcc driver's support for this option is somewhat
> convoluted. The driver's builtin specs are set based on the version of
> binutils that it was configured with. It reports an error if the
> configure-time linker/assembler (i.e., not necessarily the actual
> assembler that will be run) do not support the option, but only if the
> assembler (or linker) is actually invoked when -gz=zlib is passed.
>
> The cc-option check in scripts/Kconfig.include does not invoke the
> assembler, so the gcc driver reports success even if it does not support
> the option being passed to the assembler.
>
> Because the as-option check passes the option directly to the assembler
> via -Wa,--compressed-debug-sections=zlib, the gcc driver does not see
> this option and will never report an error.
Thanks for expanding on the failure.
Reviewed-by: Nick Desaulniers <ndesaulniers(a)google.com>
>
> Combined with an installed version of binutils that is more recent than
> the one the compiler was built with, it is possible for all three tests
> to succeed, yet an actual compilation with -gz=zlib to fail.
>
> Moreover, it is unnecessary to explicitly pass
> --compressed-debug-sections=zlib to the assembler via -Wa, since the
> driver will do that automatically when it supports -gz=zlib.
>
> Convert the as-option to just -gz=zlib, simplifying it as well as
> performing a better test of the gcc driver's capabilities.
>
> Reported-by: kernel test robot <lkp(a)intel.com>
> Signed-off-by: Arvind Sankar <nivedita(a)alum.mit.edu>
> ---
> Makefile | 2 +-
> lib/Kconfig.debug | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 839f9fee22cb..cb29e56f227a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -842,7 +842,7 @@ endif
>
> ifdef CONFIG_DEBUG_INFO_COMPRESSED
> DEBUG_CFLAGS += -gz=zlib
> -KBUILD_AFLAGS += -Wa,--compress-debug-sections=zlib
> +KBUILD_AFLAGS += -gz=zlib
> KBUILD_LDFLAGS += --compress-debug-sections=zlib
> endif
>
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index cb98741601bd..94ce36be470c 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -229,7 +229,7 @@ config DEBUG_INFO_COMPRESSED
> bool "Compressed debugging information"
> depends on DEBUG_INFO
> depends on $(cc-option,-gz=zlib)
> - depends on $(as-option,-Wa$(comma)--compress-debug-sections=zlib)
> + depends on $(as-option,-gz=zlib)
> depends on $(ld-option,--compress-debug-sections=zlib)
> help
> Compress the debug information using zlib. Requires GCC 5.0+ or Clang
> --
> 2.26.2
>
--
Thanks,
~Nick Desaulniers
2 years, 3 months
[omap-audio:peter/linux-next-wip 42/92] sound/soc/codecs/tas2555.c:641:6: warning: Variable 'ret' is reassigned a value before the old one has been used.
by kernel test robot
tree: https://github.com/omap-audio/linux-audio peter/linux-next-wip
head: 3ccffada68ccec8f6de29adb489e7595f04b68b0
commit: 16efff7134364033e3cdc79d4d341e3b814974d7 [42/92] ASoC: Initial driver for TAS2555 Smart Amplifier
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck warnings: (new ones prefixed by >>)
>> sound/soc/codecs/tas2555.c:641:6: warning: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment]
ret = regmap_read(tas2555->regmap, TAS2555_BOOKCTL_REG,
^
sound/soc/codecs/tas2555.c:636:6: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = regulator_bulk_enable(ARRAY_SIZE(tas2555->supplies),
^
sound/soc/codecs/tas2555.c:641:6: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = regmap_read(tas2555->regmap, TAS2555_BOOKCTL_REG,
^
vim +/ret +641 sound/soc/codecs/tas2555.c
628
629 static int tas2555_codec_probe(struct snd_soc_component *component)
630 {
631 struct tas2555_priv *tas2555 = snd_soc_component_get_drvdata(component);
632 int ret;
633
634 tas2555->component = component;
635
636 ret = regulator_bulk_enable(ARRAY_SIZE(tas2555->supplies),
637 tas2555->supplies);
638
639 gpiod_set_value(tas2555->nreset, 1);
640
> 641 ret = regmap_read(tas2555->regmap, TAS2555_BOOKCTL_REG,
642 &tas2555->current_book);
643 if (ret < 0)
644 tas2555->current_book = 0;
645
646 dev_info(component->dev, "TAS2555 PGID: 0x%02x\n",
647 tas2555_read(component, TAS2555_REV_PGID_REG));
648
649 return tas2555_init(component);
650 }
651
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[pm:acpica-osl 2/2] drivers/acpi/osl.c:533:13: error: implicit declaration of function 'acpi_os_drop_map_ref'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git acpica-osl
head: cfc2a23e4be42e58a453502acaf4a6330ef32f5f
commit: cfc2a23e4be42e58a453502acaf4a6330ef32f5f [2/2] ACPI: OSL: Add support for deferred unmapping of ACPI memory
config: i386-randconfig-s031-20200614 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-250-g42323db3-dirty
git checkout cfc2a23e4be42e58a453502acaf4a6330ef32f5f
# save the attached .config to linux build tree
make W=1 C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
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 >>, old ones prefixed by <<):
drivers/acpi/osl.c: In function 'acpi_os_vprintf':
drivers/acpi/osl.c:153:2: warning: function 'acpi_os_vprintf' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
153 | vsprintf(buffer, fmt, args);
| ^~~~~~~~
drivers/acpi/osl.c: In function 'acpi_os_unmap_generic_address':
>> drivers/acpi/osl.c:533:13: error: implicit declaration of function 'acpi_os_drop_map_ref' [-Werror=implicit-function-declaration]
533 | refcount = acpi_os_drop_map_ref(map);
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/acpi/osl.c:537:3: error: implicit declaration of function 'acpi_os_map_cleanup'; did you mean 'acpi_os_map_memory'? [-Werror=implicit-function-declaration]
537 | acpi_os_map_cleanup(map);
| ^~~~~~~~~~~~~~~~~~~
| acpi_os_map_memory
cc1: some warnings being treated as errors
sparse warnings: (new ones prefixed by >>)
drivers/acpi/osl.c:375:17: sparse: sparse: cast removes address space '<asn:2>' of expression
>> drivers/acpi/osl.c:481:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] <asn:2> *virt @@ got void *virt @@
>> drivers/acpi/osl.c:481:29: sparse: expected void [noderef] <asn:2> *virt
>> drivers/acpi/osl.c:481:29: sparse: got void *virt
drivers/acpi/osl.c:533:20: sparse: sparse: undefined identifier 'acpi_os_drop_map_ref'
drivers/acpi/osl.c:537:17: sparse: sparse: undefined identifier 'acpi_os_map_cleanup'
drivers/acpi/osl.c:757:1: sparse: sparse: context imbalance in 'acpi_os_read_memory' - wrong count at exit
drivers/acpi/osl.c:790:1: sparse: sparse: context imbalance in 'acpi_os_write_memory' - wrong count at exit
vim +/acpi_os_drop_map_ref +533 drivers/acpi/osl.c
620242ae8c3d9c Myron Stowe 2010-10-21 466
cfc2a23e4be42e Rafael J. Wysocki 2020-06-13 467 /**
cfc2a23e4be42e Rafael J. Wysocki 2020-06-13 468 * acpi_os_unmap_deferred - Drop a memory mapping reference.
cfc2a23e4be42e Rafael J. Wysocki 2020-06-13 469 * @virt: Start of the address range to drop a reference to.
cfc2a23e4be42e Rafael J. Wysocki 2020-06-13 470 * @size: Size of the address range to drop a reference to.
cfc2a23e4be42e Rafael J. Wysocki 2020-06-13 471 *
cfc2a23e4be42e Rafael J. Wysocki 2020-06-13 472 * Look up the given virtual address range in the list of existing ACPI memory
cfc2a23e4be42e Rafael J. Wysocki 2020-06-13 473 * mappings, drop a reference to it and if there are no more active references
cfc2a23e4be42e Rafael J. Wysocki 2020-06-13 474 * to it, put it in the list of unused memory mappings.
cfc2a23e4be42e Rafael J. Wysocki 2020-06-13 475 *
cfc2a23e4be42e Rafael J. Wysocki 2020-06-13 476 * During early init (when acpi_permanent_mmap has not been set yet) this
cfc2a23e4be42e Rafael J. Wysocki 2020-06-13 477 * routine behaves like acpi_os_unmap_memory().
cfc2a23e4be42e Rafael J. Wysocki 2020-06-13 478 */
cfc2a23e4be42e Rafael J. Wysocki 2020-06-13 479 void __ref acpi_os_unmap_deferred(void *virt, acpi_size size)
cfc2a23e4be42e Rafael J. Wysocki 2020-06-13 480 {
cfc2a23e4be42e Rafael J. Wysocki 2020-06-13 @481 acpi_os_unref_iomem(virt, size);
ad71860a17ba33 Alexey Starikovskiy 2007-02-02 482 }
a238317ce81855 Lv Zheng 2014-05-20 483
cfc2a23e4be42e Rafael J. Wysocki 2020-06-13 484 /**
cfc2a23e4be42e Rafael J. Wysocki 2020-06-13 485 * acpi_os_release_unused_mappings - Release unused ACPI memory mappings.
cfc2a23e4be42e Rafael J. Wysocki 2020-06-13 486 */
cfc2a23e4be42e Rafael J. Wysocki 2020-06-13 487 void acpi_os_release_unused_mappings(void)
a238317ce81855 Lv Zheng 2014-05-20 488 {
cfc2a23e4be42e Rafael J. Wysocki 2020-06-13 489 __acpi_os_release_unused_mappings(false);
a238317ce81855 Lv Zheng 2014-05-20 490 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 491
6f68c91c55ea35 Myron Stowe 2011-11-07 492 int acpi_os_map_generic_address(struct acpi_generic_address *gas)
29718521237a1b Myron Stowe 2010-10-21 493 {
bc9ffce27962c0 Myron Stowe 2011-11-07 494 u64 addr;
29718521237a1b Myron Stowe 2010-10-21 495 void __iomem *virt;
29718521237a1b Myron Stowe 2010-10-21 496
bc9ffce27962c0 Myron Stowe 2011-11-07 497 if (gas->space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY)
29718521237a1b Myron Stowe 2010-10-21 498 return 0;
29718521237a1b Myron Stowe 2010-10-21 499
bc9ffce27962c0 Myron Stowe 2011-11-07 500 /* Handle possible alignment issues */
bc9ffce27962c0 Myron Stowe 2011-11-07 501 memcpy(&addr, &gas->address, sizeof(addr));
bc9ffce27962c0 Myron Stowe 2011-11-07 502 if (!addr || !gas->bit_width)
29718521237a1b Myron Stowe 2010-10-21 503 return -EINVAL;
29718521237a1b Myron Stowe 2010-10-21 504
a238317ce81855 Lv Zheng 2014-05-20 505 virt = acpi_os_map_iomem(addr, gas->bit_width / 8);
29718521237a1b Myron Stowe 2010-10-21 506 if (!virt)
29718521237a1b Myron Stowe 2010-10-21 507 return -EIO;
29718521237a1b Myron Stowe 2010-10-21 508
29718521237a1b Myron Stowe 2010-10-21 509 return 0;
29718521237a1b Myron Stowe 2010-10-21 510 }
6f68c91c55ea35 Myron Stowe 2011-11-07 511 EXPORT_SYMBOL(acpi_os_map_generic_address);
29718521237a1b Myron Stowe 2010-10-21 512
6f68c91c55ea35 Myron Stowe 2011-11-07 513 void acpi_os_unmap_generic_address(struct acpi_generic_address *gas)
29718521237a1b Myron Stowe 2010-10-21 514 {
bc9ffce27962c0 Myron Stowe 2011-11-07 515 u64 addr;
7fe135dc058fae Rafael J. Wysocki 2011-02-08 516 struct acpi_ioremap *map;
833a426cc471b6 Francesco Ruggeri 2019-11-19 517 unsigned long refcount;
29718521237a1b Myron Stowe 2010-10-21 518
bc9ffce27962c0 Myron Stowe 2011-11-07 519 if (gas->space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY)
29718521237a1b Myron Stowe 2010-10-21 520 return;
29718521237a1b Myron Stowe 2010-10-21 521
bc9ffce27962c0 Myron Stowe 2011-11-07 522 /* Handle possible alignment issues */
bc9ffce27962c0 Myron Stowe 2011-11-07 523 memcpy(&addr, &gas->address, sizeof(addr));
bc9ffce27962c0 Myron Stowe 2011-11-07 524 if (!addr || !gas->bit_width)
29718521237a1b Myron Stowe 2010-10-21 525 return;
29718521237a1b Myron Stowe 2010-10-21 526
7bbb890358b96c Rafael J. Wysocki 2011-02-08 527 mutex_lock(&acpi_ioremap_lock);
bc9ffce27962c0 Myron Stowe 2011-11-07 528 map = acpi_map_lookup(addr, gas->bit_width / 8);
7fe135dc058fae Rafael J. Wysocki 2011-02-08 529 if (!map) {
7fe135dc058fae Rafael J. Wysocki 2011-02-08 530 mutex_unlock(&acpi_ioremap_lock);
7fe135dc058fae Rafael J. Wysocki 2011-02-08 531 return;
7fe135dc058fae Rafael J. Wysocki 2011-02-08 532 }
833a426cc471b6 Francesco Ruggeri 2019-11-19 @533 refcount = acpi_os_drop_map_ref(map);
7bbb890358b96c Rafael J. Wysocki 2011-02-08 534 mutex_unlock(&acpi_ioremap_lock);
29718521237a1b Myron Stowe 2010-10-21 535
833a426cc471b6 Francesco Ruggeri 2019-11-19 536 if (!refcount)
b7c1fadd6c2eea Rafael J. Wysocki 2011-02-08 @537 acpi_os_map_cleanup(map);
29718521237a1b Myron Stowe 2010-10-21 538 }
6f68c91c55ea35 Myron Stowe 2011-11-07 539 EXPORT_SYMBOL(acpi_os_unmap_generic_address);
29718521237a1b Myron Stowe 2010-10-21 540
:::::: The code at line 533 was first introduced by commit
:::::: 833a426cc471b6088011b3d67f1dc4e147614647 ACPI: OSL: only free map once in osl.c
:::::: TO: Francesco Ruggeri <fruggeri(a)arista.com>
:::::: CC: Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[PATCH] mxl692: fix platform_no_drv_owner.cocci warnings
by kernel test robot
From: kernel test robot <lkp(a)intel.com>
drivers/media/dvb-frontends/mxl692.c:1350:3-8: No need to set .owner here. The core will do it.
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
CC: Brad Love <brad(a)nextdimension.cc>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
url: https://github.com/0day-ci/linux/commits/Brad-Love/MaxLinear-mxl692-demod...
base: git://linuxtv.org/media_tree.git master
mxl692.c | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/media/dvb-frontends/mxl692.c
+++ b/drivers/media/dvb-frontends/mxl692.c
@@ -1347,7 +1347,6 @@ MODULE_DEVICE_TABLE(i2c, mxl692_id_table
static struct i2c_driver mxl692_driver = {
.driver = {
- .owner = THIS_MODULE,
.name = "mxl692",
},
.probe = mxl692_probe,
2 years, 3 months