Re: [PATCH v6 1/4] phy: cadence: Add Cadence D-PHY Rx driver
by kernel test robot
Hi Pratyush,
I love your patch! Perhaps something to improve:
[auto build test WARNING on robh/for-next]
[also build test WARNING on linus/master v5.16-rc5 next-20211214]
[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/Pratyush-Yadav/Rx-mode-support-f...
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: riscv-randconfig-r035-20211215 (https://download.01.org/0day-ci/archive/20211216/202112160116.Cc1gKnvK-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dd245bab9fbb364faa1581e4f92ba3119a872fba)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/7422cc73ff300a5eb0e57ff6fe426e01f...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Pratyush-Yadav/Rx-mode-support-for-Cadence-DPHY/20211215-021112
git checkout 7422cc73ff300a5eb0e57ff6fe426e01f5dcb2b0
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/phy/cadence/
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/phy/cadence/cdns-dphy-rx.c:223:46: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
dev_err(dev, "Failed to create PHY: %d\n", PTR_ERR(dphy->phy));
~~ ^~~~~~~~~~~~~~~~~~
%ld
include/linux/dev_printk.h:144:65: note: expanded from macro 'dev_err'
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'
_p_func(dev, fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
1 warning generated.
vim +223 drivers/phy/cadence/cdns-dphy-rx.c
203
204 static int cdns_dphy_rx_probe(struct platform_device *pdev)
205 {
206 struct device *dev = &pdev->dev;
207 struct phy_provider *provider;
208 struct cdns_dphy_rx *dphy;
209
210 dphy = devm_kzalloc(dev, sizeof(*dphy), GFP_KERNEL);
211 if (!dphy)
212 return -ENOMEM;
213
214 dev_set_drvdata(dev, dphy);
215 dphy->dev = dev;
216
217 dphy->regs = devm_platform_ioremap_resource(pdev, 0);
218 if (IS_ERR(dphy->regs))
219 return PTR_ERR(dphy->regs);
220
221 dphy->phy = devm_phy_create(dev, NULL, &cdns_dphy_rx_ops);
222 if (IS_ERR(dphy->phy)) {
> 223 dev_err(dev, "Failed to create PHY: %d\n", PTR_ERR(dphy->phy));
224 return PTR_ERR(dphy->phy);
225 }
226
227 phy_set_drvdata(dphy->phy, dphy);
228 provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
229
230 return PTR_ERR_OR_ZERO(provider);
231 }
232
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [PATCH 1/7] drm/i915: Avoid using the i915_fence_array when collecting dependencies
by kernel test robot
Hi "Thomas,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-tip/drm-tip]
[also build test WARNING on drm-exynos/exynos-drm-next drm/drm-next next-20211214]
[cannot apply to drm-intel/for-linux-next v5.16-rc5]
[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/Thomas-Hellstr-m/drm-i915-Asynch...
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: i386-randconfig-a003-20211214 (https://download.01.org/0day-ci/archive/20211216/202112160151.ZGYtb4Fp-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/0f61eb08a6b9d7fa9f19eaa071ad5591d...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Thomas-Hellstr-m/drm-i915-Asynchronous-vma-unbinding/20211215-183859
git checkout 0f61eb08a6b9d7fa9f19eaa071ad5591de123633
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/
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/gpu/drm/i915/gem/i915_gem_ttm_move.c:634:5: warning: no previous prototype for 'prev_deps' [-Wmissing-prototypes]
634 | int prev_deps(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx,
| ^~~~~~~~~
vim +/prev_deps +634 drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c
633
> 634 int prev_deps(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx,
635 struct i915_deps *deps)
636 {
637 int ret;
638
639 ret = i915_deps_add_dependency(deps, bo->moving, ctx);
640 if (!ret)
641 /*
642 * TODO: Only await excl fence here, and shared fences before
643 * signaling the migration fence.
644 */
645 ret = i915_deps_add_resv(deps, bo->base.resv, true, false, ctx);
646
647 return ret;
648 }
649
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [PATCH] c/r: prctl: Remove PR_SET_MM_EXE_FILE old file mapping restriction
by kernel test robot
Hi Keno,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linux/master]
[also build test WARNING on hnaz-mm/master linus/master v5.16-rc5 next-20211214]
[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/Keno-Fischer/c-r-prctl-Remove-PR...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 136057256686de39cc3a07c2e39ef6bc43003ff6
config: riscv-randconfig-s031-20211214 (https://download.01.org/0day-ci/archive/20211216/202112160020.w03m5wpY-lk...)
compiler: riscv32-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/08f30df401c936e27733e3b37765c2b7d...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Keno-Fischer/c-r-prctl-Remove-PR_SET_MM_EXE_FILE-old-file-mapping-restriction/20211215-142515
git checkout 08f30df401c936e27733e3b37765c2b7d35fe0e7
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash
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 >>)
kernel/fork.c:1215:24: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct file [noderef] __rcu *_x_ @@ got struct file *new_exe_file @@
kernel/fork.c:1215:24: sparse: expected struct file [noderef] __rcu *_x_
kernel/fork.c:1215:24: sparse: got struct file *new_exe_file
>> kernel/fork.c:1215:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct file *old_exe_file @@ got struct file [noderef] __rcu * @@
kernel/fork.c:1215:22: sparse: expected struct file *old_exe_file
kernel/fork.c:1215:22: sparse: got struct file [noderef] __rcu *
kernel/fork.c:1572:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct refcount_struct [usertype] *r @@ got struct refcount_struct [noderef] __rcu * @@
kernel/fork.c:1572:38: sparse: expected struct refcount_struct [usertype] *r
kernel/fork.c:1572:38: sparse: got struct refcount_struct [noderef] __rcu *
kernel/fork.c:1581:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:1581:31: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:1581:31: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:1582:36: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *q @@ got struct k_sigaction [noderef] __rcu * @@
kernel/fork.c:1582:36: sparse: expected void const *q
kernel/fork.c:1582:36: sparse: got struct k_sigaction [noderef] __rcu *
kernel/fork.c:1583:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:1583:33: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:1583:33: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:1676:9: sparse: sparse: cast removes address space '__rcu' of expression
kernel/fork.c:1995:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:1995:31: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:1995:31: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:1999:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:1999:33: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:1999:33: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2304:32: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct task_struct [noderef] __rcu *real_parent @@ got struct task_struct * @@
kernel/fork.c:2304:32: sparse: expected struct task_struct [noderef] __rcu *real_parent
kernel/fork.c:2304:32: sparse: got struct task_struct *
kernel/fork.c:2313:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:2313:27: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:2313:27: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2362:54: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct list_head *head @@ got struct list_head [noderef] __rcu * @@
kernel/fork.c:2362:54: sparse: expected struct list_head *head
kernel/fork.c:2362:54: sparse: got struct list_head [noderef] __rcu *
kernel/fork.c:2383:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:2383:29: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:2383:29: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2401:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:2401:29: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:2401:29: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2428:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sighand_struct *sighand @@ got struct sighand_struct [noderef] __rcu *sighand @@
kernel/fork.c:2428:28: sparse: expected struct sighand_struct *sighand
kernel/fork.c:2428:28: sparse: got struct sighand_struct [noderef] __rcu *sighand
kernel/fork.c:2456:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:2456:31: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:2456:31: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2458:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:2458:33: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:2458:33: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2867:24: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct task_struct *[assigned] parent @@ got struct task_struct [noderef] __rcu *real_parent @@
kernel/fork.c:2867:24: sparse: expected struct task_struct *[assigned] parent
kernel/fork.c:2867:24: sparse: got struct task_struct [noderef] __rcu *real_parent
kernel/fork.c:2948:43: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct refcount_struct const [usertype] *r @@ got struct refcount_struct [noderef] __rcu * @@
kernel/fork.c:2948:43: sparse: expected struct refcount_struct const [usertype] *r
kernel/fork.c:2948:43: sparse: got struct refcount_struct [noderef] __rcu *
kernel/fork.c:2039:22: sparse: sparse: dereference of noderef expression
kernel/fork.c: note: in included file (through include/linux/ftrace.h, include/linux/perf_event.h, include/linux/trace_events.h, ...):
include/linux/ptrace.h:218:45: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct task_struct *new_parent @@ got struct task_struct [noderef] __rcu *parent @@
include/linux/ptrace.h:218:45: sparse: expected struct task_struct *new_parent
include/linux/ptrace.h:218:45: sparse: got struct task_struct [noderef] __rcu *parent
include/linux/ptrace.h:218:62: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected struct cred const *ptracer_cred @@ got struct cred const [noderef] __rcu *ptracer_cred @@
include/linux/ptrace.h:218:62: sparse: expected struct cred const *ptracer_cred
include/linux/ptrace.h:218:62: sparse: got struct cred const [noderef] __rcu *ptracer_cred
kernel/fork.c:2360:59: sparse: sparse: dereference of noderef expression
kernel/fork.c:2361:59: sparse: sparse: dereference of noderef expression
vim +1215 kernel/fork.c
3864601387cf41 Jiri Slaby 2011-05-26 1194
35d7bdc86031a2 David Hildenbrand 2021-04-23 1195 /**
35d7bdc86031a2 David Hildenbrand 2021-04-23 1196 * replace_mm_exe_file - replace a reference to the mm's executable file
35d7bdc86031a2 David Hildenbrand 2021-04-23 1197 *
35d7bdc86031a2 David Hildenbrand 2021-04-23 1198 * This changes mm's executable file (shown as symlink /proc/[pid]/exe),
35d7bdc86031a2 David Hildenbrand 2021-04-23 1199 * dealing with concurrent invocation and without grabbing the mmap lock in
35d7bdc86031a2 David Hildenbrand 2021-04-23 1200 * write mode.
35d7bdc86031a2 David Hildenbrand 2021-04-23 1201 *
35d7bdc86031a2 David Hildenbrand 2021-04-23 1202 * Main user is sys_prctl(PR_SET_MM_MAP/EXE_FILE).
35d7bdc86031a2 David Hildenbrand 2021-04-23 1203 */
35d7bdc86031a2 David Hildenbrand 2021-04-23 1204 int replace_mm_exe_file(struct mm_struct *mm, struct file *new_exe_file)
35d7bdc86031a2 David Hildenbrand 2021-04-23 1205 {
35d7bdc86031a2 David Hildenbrand 2021-04-23 1206 struct file *old_exe_file;
35d7bdc86031a2 David Hildenbrand 2021-04-23 1207 int ret = 0;
35d7bdc86031a2 David Hildenbrand 2021-04-23 1208
35d7bdc86031a2 David Hildenbrand 2021-04-23 1209 /* set the new file, lockless */
fe69d560b5bd9e David Hildenbrand 2021-04-23 1210 ret = deny_write_access(new_exe_file);
fe69d560b5bd9e David Hildenbrand 2021-04-23 1211 if (ret)
fe69d560b5bd9e David Hildenbrand 2021-04-23 1212 return -EACCES;
35d7bdc86031a2 David Hildenbrand 2021-04-23 1213 get_file(new_exe_file);
fe69d560b5bd9e David Hildenbrand 2021-04-23 1214
35d7bdc86031a2 David Hildenbrand 2021-04-23 @1215 old_exe_file = xchg(&mm->exe_file, new_exe_file);
fe69d560b5bd9e David Hildenbrand 2021-04-23 1216 if (old_exe_file) {
fe69d560b5bd9e David Hildenbrand 2021-04-23 1217 /*
fe69d560b5bd9e David Hildenbrand 2021-04-23 1218 * Don't race with dup_mmap() getting the file and disallowing
fe69d560b5bd9e David Hildenbrand 2021-04-23 1219 * write access while someone might open the file writable.
fe69d560b5bd9e David Hildenbrand 2021-04-23 1220 */
fe69d560b5bd9e David Hildenbrand 2021-04-23 1221 mmap_read_lock(mm);
fe69d560b5bd9e David Hildenbrand 2021-04-23 1222 allow_write_access(old_exe_file);
35d7bdc86031a2 David Hildenbrand 2021-04-23 1223 fput(old_exe_file);
fe69d560b5bd9e David Hildenbrand 2021-04-23 1224 mmap_read_unlock(mm);
fe69d560b5bd9e David Hildenbrand 2021-04-23 1225 }
35d7bdc86031a2 David Hildenbrand 2021-04-23 1226 return 0;
35d7bdc86031a2 David Hildenbrand 2021-04-23 1227 }
3864601387cf41 Jiri Slaby 2011-05-26 1228
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[asahilinux:touchpad/wip 63/82] drivers/dma/apple-admac.c:221:34: warning: format '%lx' expects argument of type 'long unsigned int', but argument 5 has type 'size_t' {aka 'unsigned int'}
by kernel test robot
tree: https://github.com/AsahiLinux/linux touchpad/wip
head: a2281d64fdbcbab0dae68c6ea75bd5b548332e06
commit: ebaeac45289171e9e6a775d13f2bf34bfec4d104 [63/82] dmaengine: apple-admac: Add Apple ADMAC driver
config: parisc-allyesconfig (https://download.01.org/0day-ci/archive/20211216/202112160031.DEIICVwO-lk...)
compiler: hppa-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/AsahiLinux/linux/commit/ebaeac45289171e9e6a775d13f2bf3...
git remote add asahilinux https://github.com/AsahiLinux/linux
git fetch --no-tags asahilinux touchpad/wip
git checkout ebaeac45289171e9e6a775d13f2bf34bfec4d104
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=parisc SHELL=/bin/bash drivers/dma/
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/dma/apple-admac.c:125:5: warning: no previous prototype for 'admac_alloc_chan_resources' [-Wmissing-prototypes]
125 | int admac_alloc_chan_resources(struct dma_chan *chan)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/dma/apple-admac.c:130:6: warning: no previous prototype for 'admac_free_chan_resources' [-Wmissing-prototypes]
130 | void admac_free_chan_resources(struct dma_chan *chan)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/dma/apple-admac.c:135:5: warning: no previous prototype for 'admac_ring_noccupied_slots' [-Wmissing-prototypes]
135 | int admac_ring_noccupied_slots(int ringval)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/dma/apple-admac.c: In function 'admac_ring_noccupied_slots':
drivers/dma/apple-admac.c:137:22: error: implicit declaration of function 'FIELD_GET'; did you mean 'FOLL_GET'? [-Werror=implicit-function-declaration]
137 | int wrslot = FIELD_GET(RING_WRITE_SLOT, ringval);
| ^~~~~~~~~
| FOLL_GET
drivers/dma/apple-admac.c: At top level:
drivers/dma/apple-admac.c:155:5: warning: no previous prototype for 'admac_cyclic_read_residue' [-Wmissing-prototypes]
155 | u32 admac_cyclic_read_residue(struct admac_data *ad, int channo, struct admac_tx *adtx)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/dma/apple-admac.c:181:17: warning: no previous prototype for 'admac_tx_status' [-Wmissing-prototypes]
181 | enum dma_status admac_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
| ^~~~~~~~~~~~~~~
In file included from include/linux/printk.h:555,
from include/linux/kernel.h:20,
from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/preempt.h:5,
from ./arch/parisc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from drivers/dma/apple-admac.c:2:
drivers/dma/apple-admac.c: In function 'admac_tx_status':
>> drivers/dma/apple-admac.c:221:34: warning: format '%lx' expects argument of type 'long unsigned int', but argument 5 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
221 | dev_dbg(ad->dev, "ch%d residue: %lx, (%ld%%)\n", adchan->no,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call'
134 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:166:9: note: in expansion of macro '_dynamic_func_call'
166 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:9: note: in expansion of macro 'dynamic_dev_dbg'
155 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:30: note: in expansion of macro 'dev_fmt'
155 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/dma/apple-admac.c:221:17: note: in expansion of macro 'dev_dbg'
221 | dev_dbg(ad->dev, "ch%d residue: %lx, (%ld%%)\n", adchan->no,
| ^~~~~~~
drivers/dma/apple-admac.c:221:51: note: format string is defined here
221 | dev_dbg(ad->dev, "ch%d residue: %lx, (%ld%%)\n", adchan->no,
| ~~^
| |
| long unsigned int
| %x
In file included from include/linux/printk.h:555,
from include/linux/kernel.h:20,
from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/preempt.h:5,
from ./arch/parisc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from drivers/dma/apple-admac.c:2:
>> drivers/dma/apple-admac.c:221:34: warning: format '%ld' expects argument of type 'long int', but argument 6 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
221 | dev_dbg(ad->dev, "ch%d residue: %lx, (%ld%%)\n", adchan->no,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call'
134 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:166:9: note: in expansion of macro '_dynamic_func_call'
166 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:9: note: in expansion of macro 'dynamic_dev_dbg'
155 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:30: note: in expansion of macro 'dev_fmt'
155 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/dma/apple-admac.c:221:17: note: in expansion of macro 'dev_dbg'
221 | dev_dbg(ad->dev, "ch%d residue: %lx, (%ld%%)\n", adchan->no,
| ^~~~~~~
drivers/dma/apple-admac.c:221:57: note: format string is defined here
221 | dev_dbg(ad->dev, "ch%d residue: %lx, (%ld%%)\n", adchan->no,
| ~~^
| |
| long int
| %d
drivers/dma/apple-admac.c: At top level:
drivers/dma/apple-admac.c:228:6: warning: no previous prototype for 'admac_start' [-Wmissing-prototypes]
228 | void admac_start(struct admac_chan *adchan)
| ^~~~~~~~~~~
drivers/dma/apple-admac.c:244:6: warning: no previous prototype for 'admac_issue_pending' [-Wmissing-prototypes]
244 | void admac_issue_pending(struct dma_chan *chan)
| ^~~~~~~~~~~~~~~~~~~
drivers/dma/apple-admac.c:263:5: warning: no previous prototype for 'admac_pause' [-Wmissing-prototypes]
263 | int admac_pause(struct dma_chan *chan)
| ^~~~~~~~~~~
drivers/dma/apple-admac.c:272:5: warning: no previous prototype for 'admac_resume' [-Wmissing-prototypes]
272 | int admac_resume(struct dma_chan *chan)
| ^~~~~~~~~~~~
drivers/dma/apple-admac.c:281:5: warning: no previous prototype for 'admac_terminate_all' [-Wmissing-prototypes]
281 | int admac_terminate_all(struct dma_chan *chan)
| ^~~~~~~~~~~~~~~~~~~
drivers/dma/apple-admac.c:303:14: warning: no previous prototype for 'admac_tx_submit' [-Wmissing-prototypes]
303 | dma_cookie_t admac_tx_submit(struct dma_async_tx_descriptor *tx)
| ^~~~~~~~~~~~~~~
drivers/dma/apple-admac.c:325:33: warning: no previous prototype for 'admac_prep_dma_cyclic' [-Wmissing-prototypes]
325 | struct dma_async_tx_descriptor *admac_prep_dma_cyclic(
| ^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/printk.h:555,
from include/linux/kernel.h:20,
from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/preempt.h:5,
from ./arch/parisc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from drivers/dma/apple-admac.c:2:
drivers/dma/apple-admac.c: In function 'admac_cyclic_write_one_desc':
>> drivers/dma/apple-admac.c:387:26: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 5 has type 'dma_addr_t' {aka 'unsigned int'} [-Wformat=]
387 | dev_dbg(ad->dev, "ch%d descriptor: addr=0x%llx len=0x%x flags=0x%lx\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call'
134 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:166:9: note: in expansion of macro '_dynamic_func_call'
166 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:9: note: in expansion of macro 'dynamic_dev_dbg'
155 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:30: note: in expansion of macro 'dev_fmt'
155 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/dma/apple-admac.c:387:9: note: in expansion of macro 'dev_dbg'
387 | dev_dbg(ad->dev, "ch%d descriptor: addr=0x%llx len=0x%x flags=0x%lx\n",
| ^~~~~~~
drivers/dma/apple-admac.c:387:54: note: format string is defined here
387 | dev_dbg(ad->dev, "ch%d descriptor: addr=0x%llx len=0x%x flags=0x%lx\n",
| ~~~^
| |
| long long unsigned int
| %x
>> drivers/dma/apple-admac.c:391:56: warning: right shift count >= width of type [-Wshift-count-overflow]
391 | admac_poke(ad, REG_TX_DESC_WRITE(channo), addr >> 32);
| ^~
cc1: some warnings being treated as errors
vim +221 drivers/dma/apple-admac.c
180
181 enum dma_status admac_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
182 struct dma_tx_state *txstate)
183 {
184 struct admac_chan *adchan = to_admac_chan(chan);
185 struct admac_data *ad = adchan->host;
186 struct admac_tx *adtx;
187
188 enum dma_status ret;
189 size_t residue;
190 unsigned long flags;
191
192 ret = dma_cookie_status(chan, cookie, txstate);
193 if (ret == DMA_COMPLETE || !txstate)
194 return ret;
195
196 /*
197 * Presumably ALSA code will query residue to know if an overrun occured,
198 * this seems a proper place to insert a write barrier.
199 */
200 wmb();
201
202 spin_lock_irqsave(&adchan->lock, flags);
203 adtx = adchan->current_tx;
204
205 if (adtx && adtx->tx.cookie == cookie) {
206 ret = DMA_IN_PROGRESS;
207 residue = admac_cyclic_read_residue(ad, adchan->no, adtx);
208 } else {
209 ret = DMA_IN_PROGRESS;
210 residue = 0;
211 list_for_each_entry(adtx, &adchan->issued, node) {
212 if (adtx->tx.cookie == cookie) {
213 residue = adtx->buf_len;
214 break;
215 }
216 }
217 }
218 spin_unlock_irqrestore(&adchan->lock, flags);
219
220 if (adtx)
> 221 dev_dbg(ad->dev, "ch%d residue: %lx, (%ld%%)\n", adchan->no,
222 residue, residue*100/adtx->buf_len);
223
224 dma_set_residue(txstate, residue);
225 return ret;
226 }
227
228 void admac_start(struct admac_chan *adchan)
229 {
230 struct admac_data *ad = adchan->host;
231 int ch = adchan->no;
232
233 admac_poke(ad, REG_TX_STATUS1(ch), STATUS_DESC_DONE | STATUS_ERR);
234 admac_poke(ad, REG_TX_CTL(ch), REG_TX_CTL_RESET_RINGS);
235 admac_poke(ad, REG_TX_CTL(ch), 0);
236 admac_cyclic_write_one_desc(ad, ch, adchan->current_tx);
237 admac_poke(ad, REG_TX_EN, 1 << ch);
238
239 admac_cyclic_write_desc(ad, ch, adchan->current_tx);
240
241 dev_dbg(ad->dev, "ch%d start\n", ch);
242 }
243
244 void admac_issue_pending(struct dma_chan *chan)
245 {
246 struct admac_chan *adchan = to_admac_chan(chan);
247 struct admac_tx *tx;
248 unsigned long flags;
249
250 spin_lock_irqsave(&adchan->lock, flags);
251 list_splice_tail_init(&adchan->submitted, &adchan->issued);
252 if (!list_empty(&adchan->issued) && !adchan->current_tx) {
253 tx = list_first_entry(&adchan->issued, struct admac_tx, node);
254 list_del(&tx->node);
255
256 adchan->current_tx = tx;
257 adchan->nperiod_acks = 0;
258 admac_start(adchan);
259 }
260 spin_unlock_irqrestore(&adchan->lock, flags);
261 }
262
263 int admac_pause(struct dma_chan *chan)
264 {
265 struct admac_chan *adchan = to_admac_chan(chan);
266
267 admac_poke(adchan->host, REG_TX_EN_CLR, 1 << adchan->no);
268
269 return 0;
270 }
271
272 int admac_resume(struct dma_chan *chan)
273 {
274 struct admac_chan *adchan = to_admac_chan(chan);
275
276 admac_poke(adchan->host, REG_TX_EN, 1 << adchan->no);
277
278 return 0;
279 }
280
281 int admac_terminate_all(struct dma_chan *chan)
282 {
283 struct admac_chan *adchan = to_admac_chan(chan);
284 struct admac_tx *adtx, *_adtx;
285 unsigned long flags;
286 LIST_HEAD(head);
287
288 spin_lock_irqsave(&adchan->lock, flags);
289 admac_poke(adchan->host, REG_TX_EN_CLR, 1 << adchan->no);
290 adchan->current_tx = NULL;
291 list_splice_tail_init(&adchan->submitted, &head);
292 list_splice_tail_init(&adchan->issued, &head);
293 spin_unlock_irqrestore(&adchan->lock, flags);
294
295 list_for_each_entry_safe(adtx, _adtx, &head, node) {
296 list_del(&adtx->node);
297 admac_desc_free(&adtx->tx);
298 }
299
300 return 0;
301 }
302
303 dma_cookie_t admac_tx_submit(struct dma_async_tx_descriptor *tx)
304 {
305 struct admac_tx *adtx = to_admac_tx(tx);
306 struct admac_chan *adchan = to_admac_chan(tx->chan);
307 unsigned long flags;
308 dma_cookie_t cookie;
309
310 spin_lock_irqsave(&adchan->lock, flags);
311 cookie = dma_cookie_assign(tx);
312 list_add_tail(&adtx->node, &adchan->submitted);
313 spin_unlock_irqrestore(&adchan->lock, flags);
314
315 return cookie;
316 }
317
318 static int admac_desc_free(struct dma_async_tx_descriptor *tx)
319 {
320 struct admac_tx *adtx = to_admac_tx(tx);
321 devm_kfree(to_admac_chan(tx->chan)->host->dev, adtx);
322 return 0;
323 }
324
325 struct dma_async_tx_descriptor *admac_prep_dma_cyclic(
326 struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
327 size_t period_len, enum dma_transfer_direction direction,
328 unsigned long flags)
329 {
330 struct admac_chan *adchan = container_of(chan, struct admac_chan, chan);
331 struct admac_tx *adtx;
332
333 adtx = devm_kzalloc(adchan->host->dev, sizeof(*adtx), GFP_NOWAIT);
334 if (!adtx)
335 return NULL;
336
337 adtx->cyclic = true;
338
339 adtx->buf_addr = buf_addr;
340 adtx->buf_len = buf_len;
341 adtx->buf_end = buf_addr + buf_len;
342 adtx->period_len = period_len;
343
344 adtx->submitted_pos = 0;
345 adtx->reclaimed_pos = 0;
346
347 dma_async_tx_descriptor_init(&adtx->tx, chan);
348 adtx->tx.tx_submit = admac_tx_submit;
349 adtx->tx.desc_free = admac_desc_free;
350
351 return &adtx->tx;
352 }
353
354 static struct dma_chan *admac_dma_of_xlate(struct of_phandle_args *dma_spec,
355 struct of_dma *ofdma)
356 {
357 struct admac_data *ad = (struct admac_data*) ofdma->of_dma_data;
358 unsigned int index;
359
360 if (dma_spec->args_count != 1)
361 return NULL;
362
363 index = dma_spec->args[0];
364
365 if (index >= ad->nchannels) {
366 dev_err(ad->dev, "channel index %u out of bounds\n", index);
367 return NULL;
368 }
369
370 return &ad->channels[index].chan;
371 }
372
373 /*
374 * Write one hardware descriptor for a dmaegine cyclic transaction.
375 */
376 static void admac_cyclic_write_one_desc(struct admac_data *ad, int channo,
377 struct admac_tx *tx)
378 {
379 dma_addr_t addr;
380
381 if (WARN_ON(!tx->cyclic))
382 return;
383
384 addr = tx->buf_addr + (tx->submitted_pos % tx->buf_len);
385 WARN_ON(addr + tx->period_len > tx->buf_end);
386
> 387 dev_dbg(ad->dev, "ch%d descriptor: addr=0x%llx len=0x%x flags=0x%lx\n",
388 channo, addr, (u32) tx->period_len, FLAG_DESC_NOTIFY);
389
390 admac_poke(ad, REG_TX_DESC_WRITE(channo), addr);
> 391 admac_poke(ad, REG_TX_DESC_WRITE(channo), addr >> 32);
392 admac_poke(ad, REG_TX_DESC_WRITE(channo), tx->period_len);
393 admac_poke(ad, REG_TX_DESC_WRITE(channo), FLAG_DESC_NOTIFY);
394
395 tx->submitted_pos += tx->period_len;
396 tx->submitted_pos %= 2 * tx->buf_len;
397 }
398
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [PATCH v3 1/2] nvmem: Add driver for OCOTP in Sunplus SP7021
by kernel test robot
Hi Vincent,
I love your patch! Perhaps something to improve:
[auto build test WARNING on robh/for-next]
[also build test WARNING on linux/master linus/master v5.16-rc5 next-20211214]
[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/Vincent-Shih/Add-driver-for-OCOT...
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20211216/202112160054.c4ehe4QI-lk...)
compiler: alpha-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/c0a3142f164bb92fe79eafeb333050e7f...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Vincent-Shih/Add-driver-for-OCOTP-in-Sunplus-SP7021/20211215-193707
git checkout c0a3142f164bb92fe79eafeb333050e7fcf42560
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash drivers/nvmem/
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 >>):
In file included from include/linux/printk.h:555,
from include/linux/kernel.h:20,
from include/linux/clk.h:13,
from drivers/nvmem/sunplus-ocotp.c:9:
drivers/nvmem/sunplus-ocotp.c: In function 'sp_ocotp_probe':
>> drivers/nvmem/sunplus-ocotp.c:206:22: warning: format '%d' expects argument of type 'int', but argument 6 has type 'long unsigned int' [-Wformat=]
206 | dev_dbg(dev, "banks:%d x wpb:%d x wsize:%d = %d",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call'
134 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:166:9: note: in expansion of macro '_dynamic_func_call'
166 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:9: note: in expansion of macro 'dynamic_dev_dbg'
155 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:30: note: in expansion of macro 'dev_fmt'
155 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/nvmem/sunplus-ocotp.c:206:9: note: in expansion of macro 'dev_dbg'
206 | dev_dbg(dev, "banks:%d x wpb:%d x wsize:%d = %d",
| ^~~~~~~
drivers/nvmem/sunplus-ocotp.c:206:50: note: format string is defined here
206 | dev_dbg(dev, "banks:%d x wpb:%d x wsize:%d = %d",
| ~^
| |
| int
| %ld
In file included from include/linux/printk.h:555,
from include/linux/kernel.h:20,
from include/linux/clk.h:13,
from drivers/nvmem/sunplus-ocotp.c:9:
drivers/nvmem/sunplus-ocotp.c:206:22: warning: format '%d' expects argument of type 'int', but argument 7 has type 'long unsigned int' [-Wformat=]
206 | dev_dbg(dev, "banks:%d x wpb:%d x wsize:%d = %d",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call'
134 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:166:9: note: in expansion of macro '_dynamic_func_call'
166 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:9: note: in expansion of macro 'dynamic_dev_dbg'
155 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:30: note: in expansion of macro 'dev_fmt'
155 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/nvmem/sunplus-ocotp.c:206:9: note: in expansion of macro 'dev_dbg'
206 | dev_dbg(dev, "banks:%d x wpb:%d x wsize:%d = %d",
| ^~~~~~~
drivers/nvmem/sunplus-ocotp.c:206:55: note: format string is defined here
206 | dev_dbg(dev, "banks:%d x wpb:%d x wsize:%d = %d",
| ~^
| |
| int
| %ld
drivers/nvmem/sunplus-ocotp.c:158:37: warning: variable 'otp_data' set but not used [-Wunused-but-set-variable]
158 | const struct sp_ocotp_data *otp_data;
| ^~~~~~~~
vim +206 drivers/nvmem/sunplus-ocotp.c
2
3 /*
4 * The OCOTP driver for Sunplus SP7021
5 *
6 * Copyright (C) 2019 Sunplus Technology Inc., All rights reserved.
7 */
8
> 9 #include <linux/clk.h>
10 #include <linux/delay.h>
11 #include <linux/device.h>
12 #include <linux/io.h>
13 #include <linux/iopoll.h>
14 #include <linux/module.h>
15 #include <linux/nvmem-provider.h>
16 #include <linux/of_device.h>
17 #include <linux/platform_device.h>
18
19 /*
20 * OTP memory
21 * Each bank contains 4 words (32 bits).
22 * Bank 0 starts at offset 0 from the base.
23 */
24
25 #define OTP_WORDS_PER_BANK 4
26 #define OTP_WORD_SIZE sizeof(u32)
27 #define OTP_BIT_ADDR_OF_BANK (8 * OTP_WORD_SIZE * OTP_WORDS_PER_BANK)
28 #define QAC628_OTP_NUM_BANKS 8
29 #define QAC628_OTP_SIZE (QAC628_OTP_NUM_BANKS * OTP_WORDS_PER_BANK * OTP_WORD_SIZE)
30 #define OTP_READ_TIMEOUT_US 200000
31
32 /* HB_GPIO */
33 #define ADDRESS_8_DATA 0x20
34
35 /* OTP_RX */
36 #define OTP_CONTROL_2 0x48
37 #define OTP_RD_PERIOD GENMASK(15, 8)
38 #define OTP_RD_PERIOD_MASK ~GENMASK(15, 8)
39 #define ONE_CPU_CLOCK 0x1
40 #define SEL_BAK_KEY2 BIT(5)
41 #define SEL_BAK_KEY2_MASK ~BIT(5)
42 #define SW_TRIM_EN BIT(4)
43 #define SW_TRIM_EN_MASK ~BIT(4)
44 #define SEL_BAK_KEY BIT(3)
45 #define SEL_BAK_KEY_MASK ~BIT(3)
46 #define OTP_READ BIT(2)
47 #define OTP_LOAD_SECURE_DATA BIT(1)
48 #define OTP_LOAD_SECURE_DATA_MASK ~BIT(1)
49 #define OTP_DO_CRC BIT(0)
50 #define OTP_DO_CRC_MASK ~BIT(0)
51 #define OTP_STATUS 0x4c
52 #define OTP_READ_DONE BIT(4)
53 #define OTP_READ_DONE_MASK ~BIT(4)
54 #define OTP_LOAD_SECURE_DONE_MASK ~BIT(2)
55 #define OTP_READ_ADDRESS 0x50
56
57 enum base_type {
58 HB_GPIO,
59 OTPRX,
60 BASEMAX,
61 };
62
63 struct sp_ocotp_priv {
64 struct device *dev;
65 void __iomem *base[BASEMAX];
66 struct clk *clk;
67 };
68
69 struct sp_ocotp_data {
70 int size;
71 };
72
73 const struct sp_ocotp_data sp_otp_v0 = {
74 .size = QAC628_OTP_SIZE,
75 };
76
77 static int sp_otp_read_real(struct sp_ocotp_priv *otp, int addr, char *value)
78 {
79 unsigned int addr_data;
80 unsigned int byte_shift;
81 unsigned int status;
82 int ret;
83
84 addr_data = addr % (OTP_WORD_SIZE * OTP_WORDS_PER_BANK);
85 addr_data = addr_data / OTP_WORD_SIZE;
86
87 byte_shift = addr % (OTP_WORD_SIZE * OTP_WORDS_PER_BANK);
88 byte_shift = byte_shift % OTP_WORD_SIZE;
89
90 addr = addr / (OTP_WORD_SIZE * OTP_WORDS_PER_BANK);
91 addr = addr * OTP_BIT_ADDR_OF_BANK;
92
93 writel(readl(otp->base[OTPRX] + OTP_STATUS) & OTP_READ_DONE_MASK &
94 OTP_LOAD_SECURE_DONE_MASK, otp->base[OTPRX] + OTP_STATUS);
95 writel(addr, otp->base[OTPRX] + OTP_READ_ADDRESS);
96 writel(readl(otp->base[OTPRX] + OTP_CONTROL_2) | OTP_READ,
97 otp->base[OTPRX] + OTP_CONTROL_2);
98 writel(readl(otp->base[OTPRX] + OTP_CONTROL_2) & SEL_BAK_KEY2_MASK & SW_TRIM_EN_MASK
99 & SEL_BAK_KEY_MASK & OTP_LOAD_SECURE_DATA_MASK & OTP_DO_CRC_MASK,
100 otp->base[OTPRX] + OTP_CONTROL_2);
101 writel((readl(otp->base[OTPRX] + OTP_CONTROL_2) & OTP_RD_PERIOD_MASK) |
102 ((ONE_CPU_CLOCK * 0x1e) << 8), otp->base[OTPRX] + OTP_CONTROL_2);
103
104 ret = readl_poll_timeout(otp->base[OTPRX] + OTP_STATUS, status,
105 status & OTP_READ_DONE, 10, OTP_READ_TIMEOUT_US);
106
107 if (ret < 0)
108 return ret;
109
110 *value = (readl(otp->base[HB_GPIO] + ADDRESS_8_DATA + addr_data * OTP_WORD_SIZE)
111 >> (8 * byte_shift)) & 0xff;
112
113 return ret;
114 }
115
116 static int sp_ocotp_read(void *priv, unsigned int offset, void *value, size_t bytes)
117 {
118 struct sp_ocotp_priv *otp = priv;
119 unsigned int addr;
120 char *buf = value;
121 char val[4];
122 int ret;
123
124 ret = clk_enable(otp->clk);
125 if (ret)
126 return ret;
127
128 *buf = 0;
129 for (addr = offset; addr < (offset + bytes); addr++) {
130 ret = sp_otp_read_real(otp, addr, val);
131 if (ret < 0) {
132 dev_err(otp->dev, "OTP read fail:%d at %d", ret, addr);
133 goto disable_clk;
134 }
135
136 *buf++ = *val;
137 }
138
139 disable_clk:
140 clk_disable(otp->clk);
141
142 return ret;
143 }
144
145 static struct nvmem_config sp_ocotp_nvmem_config = {
146 .name = "sp-ocotp",
147 .read_only = true,
148 .word_size = 1,
149 .size = QAC628_OTP_SIZE,
150 .stride = 1,
151 .reg_read = sp_ocotp_read,
152 .owner = THIS_MODULE,
153 };
154
155 static int sp_ocotp_probe(struct platform_device *pdev)
156 {
157 const struct of_device_id *match;
158 const struct sp_ocotp_data *otp_data;
159 struct device *dev = &pdev->dev;
160 struct nvmem_device *nvmem;
161 struct sp_ocotp_priv *otp;
162 struct resource *res;
163 int ret;
164
165 match = of_match_device(dev->driver->of_match_table, dev);
166 if (match && match->data)
167 otp_data = match->data;
168
169 otp = devm_kzalloc(dev, sizeof(*otp), GFP_KERNEL);
170 if (!otp)
171 return -ENOMEM;
172
173 otp->dev = dev;
174
175 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "hb_gpio");
176 otp->base[HB_GPIO] = devm_ioremap_resource(dev, res);
177 if (IS_ERR(otp->base[HB_GPIO]))
178 return PTR_ERR(otp->base[HB_GPIO]);
179
180 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "otprx");
181 otp->base[OTPRX] = devm_ioremap_resource(dev, res);
182 if (IS_ERR(otp->base[OTPRX]))
183 return PTR_ERR(otp->base[OTPRX]);
184
185 otp->clk = devm_clk_get(&pdev->dev, NULL);
186 if (IS_ERR(otp->clk))
187 return dev_err_probe(&pdev->dev, PTR_ERR(otp->clk),
188 "devm_clk_get fail\n");
189
190 ret = clk_prepare(otp->clk);
191 if (ret < 0) {
192 dev_err(dev, "failed to prepare clk: %d\n", ret);
193 return ret;
194 }
195
196 sp_ocotp_nvmem_config.priv = otp;
197 sp_ocotp_nvmem_config.dev = dev;
198
199 nvmem = devm_nvmem_register(dev, &sp_ocotp_nvmem_config);
200 if (IS_ERR(nvmem))
201 return dev_err_probe(&pdev->dev, PTR_ERR(nvmem),
202 "register nvmem device fail\n");
203
204 platform_set_drvdata(pdev, nvmem);
205
> 206 dev_dbg(dev, "banks:%d x wpb:%d x wsize:%d = %d",
207 QAC628_OTP_NUM_BANKS, OTP_WORDS_PER_BANK,
208 OTP_WORD_SIZE, QAC628_OTP_SIZE);
209
210 dev_info(dev, "by Sunplus (C) 2020");
211
212 return 0;
213 }
214
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [PATCH] sfc_ef100: potential dereference of null pointer
by kernel test robot
Hi Jiasheng,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.16-rc5 next-20211214]
[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/Jiasheng-Jiang/sfc_ef100-potenti...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5472f14a37421d1bca3dddf33cabd3bd6dbefbbc
config: arm64-randconfig-r021-20211214 (https://download.01.org/0day-ci/archive/20211216/202112160025.8uELAreL-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dd245bab9fbb364faa1581e4f92ba3119a872fba)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/0day-ci/linux/commit/fc56ac03164889a206ee1b65187a8be7a...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jiasheng-Jiang/sfc_ef100-potential-dereference-of-null-pointer/20211215-174422
git checkout fc56ac03164889a206ee1b65187a8be7aa7b0f04
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/net/ethernet/sfc/
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/ef100_nic.c:608:25: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
struct ef100_nic_data *nic_data = efx->nic_data;
^
1 warning generated.
vim +608 drivers/net/ethernet/sfc/ef100_nic.c
b593b6f1b492170 Edward Cree 2020-08-03 599
b593b6f1b492170 Edward Cree 2020-08-03 600 static size_t ef100_update_stats(struct efx_nic *efx,
b593b6f1b492170 Edward Cree 2020-08-03 601 u64 *full_stats,
b593b6f1b492170 Edward Cree 2020-08-03 602 struct rtnl_link_stats64 *core_stats)
b593b6f1b492170 Edward Cree 2020-08-03 603 {
b593b6f1b492170 Edward Cree 2020-08-03 604 __le64 *mc_stats = kmalloc(array_size(efx->num_mac_stats, sizeof(__le64)), GFP_ATOMIC);
fc56ac03164889a Jiasheng Jiang 2021-12-15 605 if (!mc_stats)
fc56ac03164889a Jiasheng Jiang 2021-12-15 606 return 0;
fc56ac03164889a Jiasheng Jiang 2021-12-15 607
b593b6f1b492170 Edward Cree 2020-08-03 @608 struct ef100_nic_data *nic_data = efx->nic_data;
b593b6f1b492170 Edward Cree 2020-08-03 609 DECLARE_BITMAP(mask, EF100_STAT_COUNT) = {};
b593b6f1b492170 Edward Cree 2020-08-03 610 u64 *stats = nic_data->stats;
b593b6f1b492170 Edward Cree 2020-08-03 611
b593b6f1b492170 Edward Cree 2020-08-03 612 ef100_common_stat_mask(mask);
b593b6f1b492170 Edward Cree 2020-08-03 613 ef100_ethtool_stat_mask(mask);
b593b6f1b492170 Edward Cree 2020-08-03 614
b593b6f1b492170 Edward Cree 2020-08-03 615 efx_nic_copy_stats(efx, mc_stats);
b593b6f1b492170 Edward Cree 2020-08-03 616 efx_nic_update_stats(ef100_stat_desc, EF100_STAT_COUNT, mask,
b593b6f1b492170 Edward Cree 2020-08-03 617 stats, mc_stats, false);
b593b6f1b492170 Edward Cree 2020-08-03 618
b593b6f1b492170 Edward Cree 2020-08-03 619 kfree(mc_stats);
b593b6f1b492170 Edward Cree 2020-08-03 620
b593b6f1b492170 Edward Cree 2020-08-03 621 return ef100_update_stats_common(efx, full_stats, core_stats);
b593b6f1b492170 Edward Cree 2020-08-03 622 }
b593b6f1b492170 Edward Cree 2020-08-03 623
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [RFC PATCH v2] erofs: support tail-packing inline compressed data
by kernel test robot
Hi Yue,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on xiang-erofs/dev-test]
[also build test WARNING on next-20211214]
[cannot apply to v5.16-rc5]
[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/Yue-Hu/erofs-support-tail-packin...
base: https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git dev-test
config: arm64-randconfig-r024-20211214 (https://download.01.org/0day-ci/archive/20211216/202112160025.qGQJemAr-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dd245bab9fbb364faa1581e4f92ba3119a872fba)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/0day-ci/linux/commit/669be7ff96dfecf5377f5717882b8e958...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Yue-Hu/erofs-support-tail-packing-inline-compressed-data/20211215-174814
git checkout 669be7ff96dfecf5377f5717882b8e958eb16f0b
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash fs/erofs/
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 >>):
>> fs/erofs/zmap.c:114:45: warning: result of comparison of constant 65536 with expression of type 'unsigned short' is always false [-Wtautological-constant-out-of-range-compare]
if (!vi->z_idata_size || vi->z_idata_size > EROFS_BLKSIZ) {
~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~
1 warning generated.
vim +114 fs/erofs/zmap.c
31
32 static int z_erofs_fill_inode_lazy(struct inode *inode)
33 {
34 struct erofs_inode *const vi = EROFS_I(inode);
35 struct super_block *const sb = inode->i_sb;
36 int err, headnr;
37 erofs_off_t pos;
38 struct page *page;
39 void *kaddr;
40 struct z_erofs_map_header *h;
41
42 if (test_bit(EROFS_I_Z_INITED_BIT, &vi->flags)) {
43 /*
44 * paired with smp_mb() at the end of the function to ensure
45 * fields will only be observed after the bit is set.
46 */
47 smp_mb();
48 return 0;
49 }
50
51 if (wait_on_bit_lock(&vi->flags, EROFS_I_BL_Z_BIT, TASK_KILLABLE))
52 return -ERESTARTSYS;
53
54 err = 0;
55 if (test_bit(EROFS_I_Z_INITED_BIT, &vi->flags))
56 goto out_unlock;
57
58 DBG_BUGON(!erofs_sb_has_big_pcluster(EROFS_SB(sb)) &&
59 !erofs_sb_has_ztailpacking(EROFS_SB(sb)) &&
60 vi->datalayout == EROFS_INODE_FLAT_COMPRESSION_LEGACY);
61
62 pos = ALIGN(iloc(EROFS_SB(sb), vi->nid) + vi->inode_isize +
63 vi->xattr_isize, 8);
64 page = erofs_get_meta_page(sb, erofs_blknr(pos));
65 if (IS_ERR(page)) {
66 err = PTR_ERR(page);
67 goto out_unlock;
68 }
69
70 kaddr = kmap_atomic(page);
71
72 h = kaddr + erofs_blkoff(pos);
73 vi->z_advise = le16_to_cpu(h->h_advise);
74 vi->z_idata_size = le16_to_cpu(h->h_idata_size);
75 vi->z_algorithmtype[0] = h->h_algorithmtype & 15;
76 vi->z_algorithmtype[1] = h->h_algorithmtype >> 4;
77
78 headnr = 0;
79 if (vi->z_algorithmtype[0] >= Z_EROFS_COMPRESSION_MAX ||
80 vi->z_algorithmtype[++headnr] >= Z_EROFS_COMPRESSION_MAX) {
81 erofs_err(sb, "unknown HEAD%u format %u for nid %llu, please upgrade kernel",
82 headnr + 1, vi->z_algorithmtype[headnr], vi->nid);
83 err = -EOPNOTSUPP;
84 goto unmap_done;
85 }
86
87 vi->z_logical_clusterbits = LOG_BLOCK_SIZE + (h->h_clusterbits & 7);
88 if (!erofs_sb_has_big_pcluster(EROFS_SB(sb)) &&
89 vi->z_advise & (Z_EROFS_ADVISE_BIG_PCLUSTER_1 |
90 Z_EROFS_ADVISE_BIG_PCLUSTER_2)) {
91 erofs_err(sb, "per-inode big pcluster without sb feature for nid %llu",
92 vi->nid);
93 err = -EFSCORRUPTED;
94 goto unmap_done;
95 }
96 if (vi->datalayout == EROFS_INODE_FLAT_COMPRESSION &&
97 !(vi->z_advise & Z_EROFS_ADVISE_BIG_PCLUSTER_1) ^
98 !(vi->z_advise & Z_EROFS_ADVISE_BIG_PCLUSTER_2)) {
99 erofs_err(sb, "big pcluster head1/2 of compact indexes should be consistent for nid %llu",
100 vi->nid);
101 err = -EFSCORRUPTED;
102 goto unmap_done;
103 }
104 unmap_done:
105 kunmap_atomic(kaddr);
106 unlock_page(page);
107 put_page(page);
108 if (err)
109 goto out_unlock;
110
111 if (vi->z_advise & Z_EROFS_ADVISE_INLINE_PCLUSTER) {
112 struct erofs_map_blocks map = { .m_la = inode->i_size - 1 };
113
> 114 if (!vi->z_idata_size || vi->z_idata_size > EROFS_BLKSIZ) {
115 erofs_err(sb, "invalid tail-packing pclustersize %u",
116 vi->z_idata_size);
117 return -EFSCORRUPTED;
118 }
119 err = z_erofs_do_map_blocks(inode, &map,
120 EROFS_GET_BLOCKS_FINDTAIL);
121 if (map.mpage)
122 put_page(map.mpage);
123 if (err < 0)
124 goto out_unlock;
125 }
126
127 /* paired with smp_mb() at the beginning of the function */
128 smp_mb();
129 set_bit(EROFS_I_Z_INITED_BIT, &vi->flags);
130 out_unlock:
131 clear_and_wake_up_bit(EROFS_I_BL_Z_BIT, &vi->flags);
132 return err;
133 }
134
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[plbossart-sound:fix/sof-es8336-quirk 41/48] sound/soc/codecs/es8316.c:70:46: warning: unused variable 'hpout_vol_tlv'
by kernel test robot
tree: https://github.com/plbossart/sound fix/sof-es8336-quirk
head: 96625939a8f1099dff79e7acd81bec23773c72bf
commit: 18e72d0719af01fa1636284f65391fe1fb2cacef [41/48] [HACK][FOR FOR UPSTREAM] es8336 support
config: i386-randconfig-r015-20211214 (https://download.01.org/0day-ci/archive/20211216/202112160035.NlwSgW3O-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b6a2ddb6c8ac29412b1361810972e15221fa021c)
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/plbossart/sound/commit/18e72d0719af01fa1636284f65391fe...
git remote add plbossart-sound https://github.com/plbossart/sound
git fetch --no-tags plbossart-sound fix/sof-es8336-quirk
git checkout 18e72d0719af01fa1636284f65391fe1fb2cacef
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash sound/soc/codecs/
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 >>):
>> sound/soc/codecs/es8316.c:70:46: warning: unused variable 'hpout_vol_tlv' [-Wunused-const-variable]
static const SNDRV_CTL_TLVD_DECLARE_DB_RANGE(hpout_vol_tlv,
^
1 warning generated.
vim +/hpout_vol_tlv +70 sound/soc/codecs/es8316.c
b8b88b70875af78 Daniel Drake 2017-06-12 69
b8b88b70875af78 Daniel Drake 2017-06-12 @70 static const SNDRV_CTL_TLVD_DECLARE_DB_RANGE(hpout_vol_tlv,
b8b88b70875af78 Daniel Drake 2017-06-12 71 0, 0, TLV_DB_SCALE_ITEM(-4800, 0, 0),
b8b88b70875af78 Daniel Drake 2017-06-12 72 1, 3, TLV_DB_SCALE_ITEM(-2400, 1200, 0),
b8b88b70875af78 Daniel Drake 2017-06-12 73 );
b8b88b70875af78 Daniel Drake 2017-06-12 74
:::::: The code at line 70 was first introduced by commit
:::::: b8b88b70875af786d9f346d766fa2b0630e2cf41 ASoC: add es8316 codec driver
:::::: TO: Daniel Drake <drake(a)endlessm.com>
:::::: CC: Mark Brown <broonie(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
【Amazon】アカウント情報をご確認ください
by Amazon.co.jp
Amazonお客様
平素は、Amazonをご利用いただき、誠にありがとうございます。
誰かがあなたのAmazonアカウントにログインして商品を購入しようとしていることに注意してください。
クレジットカードの盗難を防ぐため、ログイン後すぐに情報を更新してください。
あなたが24時間以内に確認できない場合は申し訳ありません。あなたの財産の安全のために、このアカウントの使用を制限します。あらかじめご理解ください。
本件についてご迷惑をおかけしましたことをお詫び申し上げます。
何卒、よろしくお願い申し上げます。
お客様の Amazon アカウント
アカウント所有権の証明をご自身で行う場合は、Amazon 管理コンソールにログインし、所定の手順でお手続きください。アカウント所有権の証明についてのヘルプセンター記事も併せてご参照ください。
状態:
異常は更新待ちです
Amazonクリック&ログイン
Amazonのまたのご利用をお待ちしております。
© 1996-2021, Amazon. Inc. or its affiliates
9 months, 1 week