Re: [PATCH net-next v3 5/7] net: phy: enable qoriq backplane support
by kernel test robot
Hi Florinel,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Florinel-Iordache/doc-net-add-ba...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 29a720c1042f469c8fea317cb5e7f496b116e07d
config: mips-allyesconfig (attached as .config)
compiler: mips-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
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 <<):
>> drivers/net/phy/backplane/qoriq_backplane.c:150:18: warning: no previous prototype for 'get_serdes_type' [-Wmissing-prototypes]
150 | enum serdes_type get_serdes_type(struct device_node *serdes_node)
| ^~~~~~~~~~~~~~~
vim +/get_serdes_type +150 drivers/net/phy/backplane/qoriq_backplane.c
149
> 150 enum serdes_type get_serdes_type(struct device_node *serdes_node)
151 {
152 enum serdes_type serdes = SERDES_INVAL;
153 const char *serdes_comp;
154 int comp_no, i, ret;
155
156 comp_no = of_property_count_strings(serdes_node, "compatible");
157 for (i = 0; i < comp_no; i++) {
158 ret = of_property_read_string_index(serdes_node, "compatible",
159 i, &serdes_comp);
160 if (ret == 0) {
161 if (!strcasecmp(serdes_comp, "serdes-10g")) {
162 serdes = SERDES_10G;
163 break;
164 }
165 }
166 }
167
168 return serdes;
169 }
170
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[android-common:android-4.19-stable 9069/9999] drivers/iommu/io-pgtable-arm.c:666:20: error: implicit declaration of function 'iommu_pgsize'
by kernel test robot
Hi Swathi,
FYI, the error/warning still remains.
tree: https://android.googlesource.com/kernel/common android-4.19-stable
head: f69cc0ed2fca72b2388037e10daac94b0473739c
commit: 27de1978c331d4e7571a5d0187ef1802d65dbf65 [9069/9999] ANDROID: GKI: iommu/io-pgtable-arm: LPAE related updates by vendor
config: x86_64-randconfig-a016-20200622 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 1d4c87335d5236ea1f35937e1014980ba961ae34)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 27de1978c331d4e7571a5d0187ef1802d65dbf65
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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 >>):
drivers/iommu/io-pgtable-arm.c:312:16: error: implicit declaration of function 'io_pgtable_alloc_pages_exact' [-Werror,-Wimplicit-function-declaration]
void *pages = io_pgtable_alloc_pages_exact(cfg, cookie, size,
^
drivers/iommu/io-pgtable-arm.c:312:8: warning: incompatible integer to pointer conversion initializing 'void *' with an expression of type 'int' [-Wint-conversion]
void *pages = io_pgtable_alloc_pages_exact(cfg, cookie, size,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iommu/io-pgtable-arm.c:337:2: error: implicit declaration of function 'io_pgtable_free_pages_exact' [-Werror,-Wimplicit-function-declaration]
io_pgtable_free_pages_exact(cfg, cookie, pages, size);
^
drivers/iommu/io-pgtable-arm.c:337:2: note: did you mean 'io_pgtable_alloc_pages_exact'?
drivers/iommu/io-pgtable-arm.c:312:16: note: 'io_pgtable_alloc_pages_exact' declared here
void *pages = io_pgtable_alloc_pages_exact(cfg, cookie, size,
^
drivers/iommu/io-pgtable-arm.c:347:2: error: implicit declaration of function 'io_pgtable_free_pages_exact' [-Werror,-Wimplicit-function-declaration]
io_pgtable_free_pages_exact(cfg, cookie, pages, size);
^
drivers/iommu/io-pgtable-arm.c:572:19: error: use of undeclared identifier 'IOMMU_USE_UPSTREAM_HINT'
else if (prot & IOMMU_USE_UPSTREAM_HINT)
^
drivers/iommu/io-pgtable-arm.c:575:19: error: use of undeclared identifier 'IOMMU_USE_LLC_NWA'
else if (prot & IOMMU_USE_LLC_NWA)
^
>> drivers/iommu/io-pgtable-arm.c:666:20: error: implicit declaration of function 'iommu_pgsize' [-Werror,-Wimplicit-function-declaration]
size_t pgsize = iommu_pgsize(
^
drivers/iommu/io-pgtable-arm.c:767:9: error: implicit declaration of function 'iommu_pgsize' [-Werror,-Wimplicit-function-declaration]
size = iommu_pgsize(data->iop.cfg.pgsize_bitmap, iova, size);
^
drivers/iommu/io-pgtable-arm.c:901:19: error: implicit declaration of function 'iommu_pgsize' [-Werror,-Wimplicit-function-declaration]
size_to_unmap = iommu_pgsize(data->iop.cfg.pgsize_bitmap, iova,
^
drivers/iommu/io-pgtable-arm.c:1095:4: error: field designator 'map_sg' does not refer to any field in type 'struct io_pgtable_ops'
.map_sg = arm_lpae_map_sg,
^
drivers/iommu/io-pgtable-arm.c:1098:4: error: field designator 'is_iova_coherent' does not refer to any field in type 'struct io_pgtable_ops'
.is_iova_coherent = arm_lpae_is_iova_coherent,
^
drivers/iommu/io-pgtable-arm.c:1099:4: error: field designator 'iova_to_pte' does not refer to any field in type 'struct io_pgtable_ops'; did you mean 'iova_to_phys'?
.iova_to_pte = arm_lpae_iova_get_pte,
^~~~~~~~~~~
iova_to_phys
include/linux/io-pgtable.h:132:16: note: 'iova_to_phys' declared here
phys_addr_t (*iova_to_phys)(struct io_pgtable_ops *ops,
^
drivers/iommu/io-pgtable-arm.c:1113:8: error: use of undeclared identifier 'IO_PGTABLE_QUIRK_QCOM_USE_UPSTREAM_HINT'
| IO_PGTABLE_QUIRK_QCOM_USE_UPSTREAM_HINT
^
drivers/iommu/io-pgtable-arm.c:1114:8: error: use of undeclared identifier 'IO_PGTABLE_QUIRK_QSMMUV500_NON_SHAREABLE'
| IO_PGTABLE_QUIRK_QSMMUV500_NON_SHAREABLE
^
drivers/iommu/io-pgtable-arm.c:1115:8: error: use of undeclared identifier 'IO_PGTABLE_QUIRK_QCOM_USE_LLC_NWA'
| IO_PGTABLE_QUIRK_QCOM_USE_LLC_NWA))
^
drivers/iommu/io-pgtable-arm.c:1127:26: error: use of undeclared identifier 'IO_PGTABLE_QUIRK_QCOM_USE_UPSTREAM_HINT'
else if ((cfg->quirks & IO_PGTABLE_QUIRK_QCOM_USE_UPSTREAM_HINT) &&
^
drivers/iommu/io-pgtable-arm.c:1128:18: error: use of undeclared identifier 'IO_PGTABLE_QUIRK_QSMMUV500_NON_SHAREABLE'
(cfg->quirks & IO_PGTABLE_QUIRK_QSMMUV500_NON_SHAREABLE))
^
drivers/iommu/io-pgtable-arm.c:1132:25: error: use of undeclared identifier 'IO_PGTABLE_QUIRK_QCOM_USE_UPSTREAM_HINT'
else if (cfg->quirks & IO_PGTABLE_QUIRK_QCOM_USE_UPSTREAM_HINT)
^
drivers/iommu/io-pgtable-arm.c:1136:26: error: use of undeclared identifier 'IO_PGTABLE_QUIRK_QCOM_USE_LLC_NWA'
else if ((cfg->quirks & IO_PGTABLE_QUIRK_QCOM_USE_LLC_NWA) &&
^
drivers/iommu/io-pgtable-arm.c:1137:18: error: use of undeclared identifier 'IO_PGTABLE_QUIRK_QSMMUV500_NON_SHAREABLE'
(cfg->quirks & IO_PGTABLE_QUIRK_QSMMUV500_NON_SHAREABLE))
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
vim +/iommu_pgsize +666 drivers/iommu/io-pgtable-arm.c
625
626 static int arm_lpae_map_sg(struct io_pgtable_ops *ops, unsigned long iova,
627 struct scatterlist *sg, unsigned int nents,
628 int iommu_prot, size_t *size)
629 {
630 struct arm_lpae_io_pgtable *data = io_pgtable_ops_to_data(ops);
631 arm_lpae_iopte *ptep = data->pgd;
632 int lvl = ARM_LPAE_START_LVL(data);
633 arm_lpae_iopte prot;
634 struct scatterlist *s;
635 size_t mapped = 0;
636 int i;
637 int ret = -EINVAL;
638 unsigned int min_pagesz;
639 struct io_pgtable_cfg *cfg = &data->iop.cfg;
640 struct map_state ms;
641
642 /* If no access, then nothing to do */
643 if (!(iommu_prot & (IOMMU_READ | IOMMU_WRITE)))
644 goto out_err;
645
646 prot = arm_lpae_prot_to_pte(data, iommu_prot);
647
648 min_pagesz = 1 << __ffs(cfg->pgsize_bitmap);
649
650 memset(&ms, 0, sizeof(ms));
651
652 for_each_sg(sg, s, nents, i) {
653 phys_addr_t phys = page_to_phys(sg_page(s)) + s->offset;
654 size_t size = s->length;
655
656 /*
657 * We are mapping on IOMMU page boundaries, so offset within
658 * the page must be 0. However, the IOMMU may support pages
659 * smaller than PAGE_SIZE, so s->offset may still represent
660 * an offset of that boundary within the CPU page.
661 */
662 if (!IS_ALIGNED(s->offset, min_pagesz))
663 goto out_err;
664
665 while (size) {
> 666 size_t pgsize = iommu_pgsize(
667 cfg->pgsize_bitmap, iova | phys, size);
668
669 if (ms.pgtable && (iova < ms.iova_end)) {
670 arm_lpae_iopte *ptep = ms.pgtable +
671 ARM_LPAE_LVL_IDX(iova, MAP_STATE_LVL,
672 data);
673 arm_lpae_init_pte(
674 data, iova, phys, prot, MAP_STATE_LVL,
675 ptep, ms.prev_pgtable, false);
676 ms.num_pte++;
677 } else {
678 ret = __arm_lpae_map(data, iova, phys, pgsize,
679 prot, lvl, ptep, NULL, &ms);
680 if (ret)
681 goto out_err;
682 }
683
684 iova += pgsize;
685 mapped += pgsize;
686 phys += pgsize;
687 size -= pgsize;
688 }
689 }
690
691 if (ms.pgtable)
692 pgtable_dma_sync_single_for_device(cfg,
693 __arm_lpae_dma_addr(ms.pte_start),
694 ms.num_pte * sizeof(*ms.pte_start),
695 DMA_TO_DEVICE);
696
697 /*
698 * Synchronise all PTE updates for the new mapping before there's
699 * a chance for anything to kick off a table walk for the new iova.
700 */
701 wmb();
702
703 return mapped;
704
705 out_err:
706 /* Return the size of the partial mapping so that they can be undone */
707 *size = mapped;
708 return ret;
709 }
710
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: drivers/gpu/drm/panel/panel-samsung-ld9040.c:240:12: warning: stack frame size of 8312 bytes in function 'ld9040_prepare'
by Nick Desaulniers
On Sat, Jun 20, 2020 at 3:09 PM Vladimir Oltean <olteanv(a)gmail.com> wrote:
>
> On Sat, 20 Jun 2020 at 21:22, kernel test robot <lkp(a)intel.com> wrote:
> >
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: 4333a9b0b67bb4e8bcd91bdd80da80b0ec151162
> > commit: 79591b7db21d255db158afaa48c557dcab631a1c spi: Add a PTP system timestamp to the transfer structure
> > date: 9 months ago
> > config: x86_64-randconfig-a014-20200620 (attached as .config)
> > compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project f5bbe390d23d7da0ffb110cdb24b583c2dc87eba)
> > 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 x86_64 cross compiling tool for clang build
> > # apt-get install binutils-x86-64-linux-gnu
> > git checkout 79591b7db21d255db158afaa48c557dcab631a1c
> > # save the attached .config to linux build tree
> > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
> >
> > 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 <<):
> >
> > >> drivers/gpu/drm/panel/panel-samsung-ld9040.c:240:12: warning: stack frame size of 8312 bytes in function 'ld9040_prepare' [-Wframe-larger-than=]
> > static int ld9040_prepare(struct drm_panel *panel)
> > ^
> > 1 warning generated.
> >
> > vim +/ld9040_prepare +240 drivers/gpu/drm/panel/panel-samsung-ld9040.c
> >
> > ff219937763253 drivers/gpu/drm/panel/panel-ld9040.c Andrzej Hajda 2014-03-26 239
> > 099b3e8699322e drivers/gpu/drm/panel/panel-ld9040.c Ajay Kumar 2014-07-31 @240 static int ld9040_prepare(struct drm_panel *panel)
> > ff219937763253 drivers/gpu/drm/panel/panel-ld9040.c Andrzej Hajda 2014-03-26 241 {
> > ff219937763253 drivers/gpu/drm/panel/panel-ld9040.c Andrzej Hajda 2014-03-26 242 struct ld9040 *ctx = panel_to_ld9040(panel);
> > ff219937763253 drivers/gpu/drm/panel/panel-ld9040.c Andrzej Hajda 2014-03-26 243 int ret;
> > ff219937763253 drivers/gpu/drm/panel/panel-ld9040.c Andrzej Hajda 2014-03-26 244
> > ff219937763253 drivers/gpu/drm/panel/panel-ld9040.c Andrzej Hajda 2014-03-26 245 ret = ld9040_power_on(ctx);
> > ff219937763253 drivers/gpu/drm/panel/panel-ld9040.c Andrzej Hajda 2014-03-26 246 if (ret < 0)
> > ff219937763253 drivers/gpu/drm/panel/panel-ld9040.c Andrzej Hajda 2014-03-26 247 return ret;
> > ff219937763253 drivers/gpu/drm/panel/panel-ld9040.c Andrzej Hajda 2014-03-26 248
> > ff219937763253 drivers/gpu/drm/panel/panel-ld9040.c Andrzej Hajda 2014-03-26 249 ld9040_init(ctx);
> > ff219937763253 drivers/gpu/drm/panel/panel-ld9040.c Andrzej Hajda 2014-03-26 250
> > ff219937763253 drivers/gpu/drm/panel/panel-ld9040.c Andrzej Hajda 2014-03-26 251 ret = ld9040_clear_error(ctx);
> > ff219937763253 drivers/gpu/drm/panel/panel-ld9040.c Andrzej Hajda 2014-03-26 252
> > ff219937763253 drivers/gpu/drm/panel/panel-ld9040.c Andrzej Hajda 2014-03-26 253 if (ret < 0)
> > 8141028278c2ea drivers/gpu/drm/panel/panel-ld9040.c Ajay Kumar 2014-07-31 254 ld9040_unprepare(panel);
> > ff219937763253 drivers/gpu/drm/panel/panel-ld9040.c Andrzej Hajda 2014-03-26 255
> > ff219937763253 drivers/gpu/drm/panel/panel-ld9040.c Andrzej Hajda 2014-03-26 256 return ret;
> > ff219937763253 drivers/gpu/drm/panel/panel-ld9040.c Andrzej Hajda 2014-03-26 257 }
> > ff219937763253 drivers/gpu/drm/panel/panel-ld9040.c Andrzej Hajda 2014-03-26 258
> >
> > :::::: The code at line 240 was first introduced by commit
> > :::::: 099b3e8699322efb7229913d2c1651588205f182 drm/panel: ld9040: Add dummy prepare and unprepare routines
> >
> > :::::: TO: Ajay Kumar <ajaykumar.rs(a)samsung.com>
> > :::::: CC: Thierry Reding <treding(a)nvidia.com>
> >
> > ---
> > 0-DAY CI Kernel Test Service, Intel Corporation
> > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>
> I really don't get what's the problem here. The listing of
> ld9040_prepare at the given commit and with the given .config is:
I wrote a tool to help debug these.
https://github.com/ClangBuiltLinux/frame-larger-than
If you fetch the randconfig and rebuild with debug info, that tool
will help show you which variables are used in which stack frames and
what their sizes are. Also note that strange things get dug up from
randconfigs.
>
> 0000000000000630 <ld9040_prepare>:
> {
> 630: f3 0f 1e fa endbr64
> 634: e8 00 00 00 00 callq 639 <ld9040_prepare+0x9>
> 635: R_X86_64_PLT32 __fentry__-0x4
> 639: 41 56 push %r14
> ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
> 63b: 48 8d 77 30 lea 0x30(%rdi),%rsi
> {
> 63f: 41 55 push %r13
> 641: 41 54 push %r12
> ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
> 643: 4c 8d 67 f8 lea -0x8(%rdi),%r12
> {
> 647: 55 push %rbp
> 648: 48 89 fd mov %rdi,%rbp
> ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
> 64b: bf 02 00 00 00 mov $0x2,%edi
> 650: e8 00 00 00 00 callq 655 <ld9040_prepare+0x25>
> 651: R_X86_64_PLT32 regulator_bulk_enable-0x4
> 655: 41 89 c5 mov %eax,%r13d
> if (ret < 0)
> 658: 85 c0 test %eax,%eax
> 65a: 0f 88 3f 02 00 00 js 89f <ld9040_prepare+0x26f>
> msleep(ctx->power_on_delay);
> 660: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
> 667: fc ff df
> 66a: 48 8d 7d 68 lea 0x68(%rbp),%rdi
> 66e: 48 89 fa mov %rdi,%rdx
> 671: 48 c1 ea 03 shr $0x3,%rdx
> 675: 0f b6 04 02 movzbl (%rdx,%rax,1),%eax
> 679: 84 c0 test %al,%al
> 67b: 74 08 je 685 <ld9040_prepare+0x55>
> 67d: 3c 03 cmp $0x3,%al
> 67f: 0f 8e 38 02 00 00 jle 8bd <ld9040_prepare+0x28d>
> 685: 8b 7d 68 mov 0x68(%rbp),%edi
> gpiod_set_value(ctx->reset_gpio, 0);
> 688: 4c 8d 75 60 lea 0x60(%rbp),%r14
> msleep(ctx->power_on_delay);
> 68c: e8 00 00 00 00 callq 691 <ld9040_prepare+0x61>
> 68d: R_X86_64_PLT32 msleep-0x4
> gpiod_set_value(ctx->reset_gpio, 0);
> 691: 4c 89 f2 mov %r14,%rdx
> 694: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
> 69b: fc ff df
> 69e: 48 c1 ea 03 shr $0x3,%rdx
> 6a2: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1)
> 6a6: 0f 85 53 02 00 00 jne 8ff <ld9040_prepare+0x2cf>
> 6ac: 48 8b 7d 60 mov 0x60(%rbp),%rdi
> msleep(ctx->reset_delay);
> 6b0: 4c 8d 6d 6c lea 0x6c(%rbp),%r13
> gpiod_set_value(ctx->reset_gpio, 0);
> 6b4: 31 f6 xor %esi,%esi
> 6b6: e8 00 00 00 00 callq 6bb <ld9040_prepare+0x8b>
> 6b7: R_X86_64_PLT32 gpiod_set_value-0x4
> msleep(ctx->reset_delay);
> 6bb: 4c 89 ea mov %r13,%rdx
> 6be: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
> 6c5: fc ff df
> 6c8: 48 c1 ea 03 shr $0x3,%rdx
> 6cc: 0f b6 14 02 movzbl (%rdx,%rax,1),%edx
> 6d0: 4c 89 e8 mov %r13,%rax
> 6d3: 83 e0 07 and $0x7,%eax
> 6d6: 83 c0 03 add $0x3,%eax
> 6d9: 38 d0 cmp %dl,%al
> 6db: 7c 08 jl 6e5 <ld9040_prepare+0xb5>
> 6dd: 84 d2 test %dl,%dl
> 6df: 0f 85 00 02 00 00 jne 8e5 <ld9040_prepare+0x2b5>
> 6e5: 8b 7d 6c mov 0x6c(%rbp),%edi
> 6e8: e8 00 00 00 00 callq 6ed <ld9040_prepare+0xbd>
> 6e9: R_X86_64_PLT32 msleep-0x4
> gpiod_set_value(ctx->reset_gpio, 1);
> 6ed: 4c 89 f2 mov %r14,%rdx
> 6f0: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
> 6f7: fc ff df
> 6fa: 48 c1 ea 03 shr $0x3,%rdx
> 6fe: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1)
> 702: 0f 85 ea 01 00 00 jne 8f2 <ld9040_prepare+0x2c2>
> 708: 48 8b 7d 60 mov 0x60(%rbp),%rdi
> 70c: be 01 00 00 00 mov $0x1,%esi
> 711: e8 00 00 00 00 callq 716 <ld9040_prepare+0xe6>
> 712: R_X86_64_PLT32 gpiod_set_value-0x4
> msleep(ctx->reset_delay);
> 716: 4c 89 ea mov %r13,%rdx
> 719: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
> 720: fc ff df
> 723: 48 c1 ea 03 shr $0x3,%rdx
> 727: 0f b6 14 02 movzbl (%rdx,%rax,1),%edx
> 72b: 4c 89 e8 mov %r13,%rax
> 72e: 83 e0 07 and $0x7,%eax
> 731: 83 c0 03 add $0x3,%eax
> 734: 38 d0 cmp %dl,%al
> 736: 7c 08 jl 740 <ld9040_prepare+0x110>
> 738: 84 d2 test %dl,%dl
> 73a: 0f 85 98 01 00 00 jne 8d8 <ld9040_prepare+0x2a8>
> 740: 8b 7d 6c mov 0x6c(%rbp),%edi
> 743: e8 00 00 00 00 callq 748 <ld9040_prepare+0x118>
> 744: R_X86_64_PLT32 msleep-0x4
> ld9040_dcs_write_seq_static(ctx, MCS_USER_SETTING, 0x5a, 0x5a);
> 748: ba 03 00 00 00 mov $0x3,%edx
> 74d: 48 c7 c6 00 00 00 00 mov $0x0,%rsi
> 750: R_X86_64_32S .rodata+0x520
> 754: 4c 89 e7 mov %r12,%rdi
> 757: e8 f4 fc ff ff callq 450 <ld9040_dcs_write>
> ld9040_dcs_write_seq_static(ctx, MCS_PANEL_CONDITION,
> 75c: ba 18 00 00 00 mov $0x18,%edx
> 761: 48 c7 c6 00 00 00 00 mov $0x0,%rsi
> 764: R_X86_64_32S .rodata+0x4e0
> 768: 4c 89 e7 mov %r12,%rdi
> 76b: e8 e0 fc ff ff callq 450 <ld9040_dcs_write>
> ld9040_dcs_write_seq_static(ctx, MCS_DISPCTL,
> 770: ba 06 00 00 00 mov $0x6,%edx
> 775: 48 c7 c6 00 00 00 00 mov $0x0,%rsi
> 778: R_X86_64_32S .rodata+0x4a0
> 77c: 4c 89 e7 mov %r12,%rdi
> 77f: e8 cc fc ff ff callq 450 <ld9040_dcs_write>
> ld9040_dcs_write_seq_static(ctx, MCS_MANPWR, 0x04);
> 784: ba 02 00 00 00 mov $0x2,%edx
> 789: 48 c7 c6 00 00 00 00 mov $0x0,%rsi
> 78c: R_X86_64_32S .rodata+0x460
> 790: 4c 89 e7 mov %r12,%rdi
> 793: e8 b8 fc ff ff callq 450 <ld9040_dcs_write>
> ld9040_dcs_write_seq_static(ctx, MCS_POWER_CTRL,
> 798: ba 08 00 00 00 mov $0x8,%edx
> 79d: 48 c7 c6 00 00 00 00 mov $0x0,%rsi
> 7a0: R_X86_64_32S .rodata+0x420
> 7a4: 4c 89 e7 mov %r12,%rdi
> 7a7: e8 a4 fc ff ff callq 450 <ld9040_dcs_write>
> ld9040_dcs_write_seq_static(ctx, MCS_ELVSS_ON, 0x0d, 0x00, 0x16);
> 7ac: ba 04 00 00 00 mov $0x4,%edx
> 7b1: 48 c7 c6 00 00 00 00 mov $0x0,%rsi
> 7b4: R_X86_64_32S .rodata+0x3e0
> 7b8: 4c 89 e7 mov %r12,%rdi
> 7bb: e8 90 fc ff ff callq 450 <ld9040_dcs_write>
> ld9040_dcs_write_seq_static(ctx, MCS_GTCON, 0x09, 0x00, 0x00);
> 7c0: ba 04 00 00 00 mov $0x4,%edx
> 7c5: 4c 89 e7 mov %r12,%rdi
> 7c8: 48 c7 c6 00 00 00 00 mov $0x0,%rsi
> 7cb: R_X86_64_32S .rodata+0x3a0
> 7cf: e8 7c fc ff ff callq 450 <ld9040_dcs_write>
> ld9040_dcs_write(ctx, ld9040_gammas[ctx->brightness],
> 7d4: 48 8d bd a8 00 00 00 lea 0xa8(%rbp),%rdi
> 7db: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
> 7e2: fc ff df
> 7e5: 48 89 fa mov %rdi,%rdx
> 7e8: 48 c1 ea 03 shr $0x3,%rdx
> 7ec: 0f b6 04 02 movzbl (%rdx,%rax,1),%eax
> 7f0: 84 c0 test %al,%al
> 7f2: 74 08 je 7fc <ld9040_prepare+0x1cc>
> 7f4: 3c 03 cmp $0x3,%al
> 7f6: 0f 8e d2 00 00 00 jle 8ce <ld9040_prepare+0x29e>
> 7fc: 48 63 85 a8 00 00 00 movslq 0xa8(%rbp),%rax
> 803: 4c 89 e7 mov %r12,%rdi
> 806: 48 8d 14 80 lea (%rax,%rax,4),%rdx
> 80a: 48 8d 04 50 lea (%rax,%rdx,2),%rax
> 80e: ba 16 00 00 00 mov $0x16,%edx
> 813: 48 8d b4 00 00 00 00 lea 0x0(%rax,%rax,1),%rsi
> 81a: 00
> 817: R_X86_64_32S .rodata+0x840
> 81b: e8 30 fc ff ff callq 450 <ld9040_dcs_write>
> ld9040_dcs_write_seq_static(ctx, MCS_GAMMA_CTRL, 0x02, 0x5a);
> 820: ba 03 00 00 00 mov $0x3,%edx
> 825: 48 c7 c6 00 00 00 00 mov $0x0,%rsi
> 828: R_X86_64_32S .rodata+0x2e0
> 82c: 4c 89 e7 mov %r12,%rdi
> 82f: e8 1c fc ff ff callq 450 <ld9040_dcs_write>
> ld9040_dcs_write_seq_static(ctx, MIPI_DCS_EXIT_SLEEP_MODE);
> 834: ba 01 00 00 00 mov $0x1,%edx
> 839: 48 c7 c6 00 00 00 00 mov $0x0,%rsi
> 83c: R_X86_64_32S .rodata+0x360
> 840: 4c 89 e7 mov %r12,%rdi
> 843: e8 08 fc ff ff callq 450 <ld9040_dcs_write>
> ld9040_dcs_write_seq_static(ctx, MIPI_DCS_SET_DISPLAY_ON);
> 848: ba 01 00 00 00 mov $0x1,%edx
> 84d: 4c 89 e7 mov %r12,%rdi
> 850: 48 c7 c6 00 00 00 00 mov $0x0,%rsi
> 853: R_X86_64_32S .rodata+0x320
> 857: e8 f4 fb ff ff callq 450 <ld9040_dcs_write>
> int ret = ctx->error;
> 85c: 48 8d bd ac 00 00 00 lea 0xac(%rbp),%rdi
> 863: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
> 86a: fc ff df
> 86d: 48 89 fa mov %rdi,%rdx
> 870: 48 c1 ea 03 shr $0x3,%rdx
> 874: 0f b6 14 02 movzbl (%rdx,%rax,1),%edx
> 878: 48 89 f8 mov %rdi,%rax
> 87b: 83 e0 07 and $0x7,%eax
> 87e: 83 c0 03 add $0x3,%eax
> 881: 38 d0 cmp %dl,%al
> 883: 7c 04 jl 889 <ld9040_prepare+0x259>
> 885: 84 d2 test %dl,%dl
> 887: 75 3e jne 8c7 <ld9040_prepare+0x297>
> 889: 44 8b ad ac 00 00 00 mov 0xac(%rbp),%r13d
> ctx->error = 0;
> 890: c7 85 ac 00 00 00 00 movl $0x0,0xac(%rbp)
> 897: 00 00 00
> if (ret < 0)
> 89a: 45 85 ed test %r13d,%r13d
> 89d: 78 0b js 8aa <ld9040_prepare+0x27a>
> }
> 89f: 5d pop %rbp
> 8a0: 44 89 e8 mov %r13d,%eax
> 8a3: 41 5c pop %r12
> 8a5: 41 5d pop %r13
> 8a7: 41 5e pop %r14
> 8a9: c3 retq
>
> I don't see it having a stack frame of 8312 bytes?
>
> Thanks,
> -Vladimir
>
> --
> You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe(a)googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/CA%2Bh21hpABfDvthiwq_....
--
Thanks,
~Nick Desaulniers
2 years, 2 months
[chrome-os:chromeos-4.19 56/57] kernel/sched/fair.c:535:22: warning: variable 'p' set but not used
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.19
head: 0bd0742aae0ae9f23b26be2795b8458191236b5b
commit: 9238e47da086f0075b28712a867544a7cda5e9e1 [56/57] FIXUP: FROMLIST: sched/fair: core wide vruntime comparison
config: c6x-randconfig-r023-20200622 (attached as .config)
compiler: c6x-elf-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 9238e47da086f0075b28712a867544a7cda5e9e1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=c6x
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 <<):
kernel/sched/fair.c: In function 'cfs_prio_less':
>> kernel/sched/fair.c:535:22: warning: variable 'p' set but not used [-Wunused-but-set-variable]
535 | struct task_struct *p;
| ^
At top level:
kernel/sched/fair.c:7650:1: warning: 'pick_task_fair' defined but not used [-Wunused-function]
7650 | pick_task_fair(struct rq *rq)
| ^~~~~~~~~~~~~~
vim +/p +535 kernel/sched/fair.c
1727d28632e4f12 Aaron Lu 2019-07-25 528
231822f7cf32291 Guenter Roeck 2020-06-16 529 #ifdef CONFIG_FAIR_GROUP_SCHED
1727d28632e4f12 Aaron Lu 2019-07-25 530 bool cfs_prio_less(struct task_struct *a, struct task_struct *b)
1727d28632e4f12 Aaron Lu 2019-07-25 531 {
1727d28632e4f12 Aaron Lu 2019-07-25 532 struct sched_entity *sea = &a->se;
1727d28632e4f12 Aaron Lu 2019-07-25 533 struct sched_entity *seb = &b->se;
1727d28632e4f12 Aaron Lu 2019-07-25 534 bool samecpu = task_cpu(a) == task_cpu(b);
1727d28632e4f12 Aaron Lu 2019-07-25 @535 struct task_struct *p;
1727d28632e4f12 Aaron Lu 2019-07-25 536 s64 delta;
1727d28632e4f12 Aaron Lu 2019-07-25 537
1727d28632e4f12 Aaron Lu 2019-07-25 538 if (samecpu) {
1727d28632e4f12 Aaron Lu 2019-07-25 539 /* vruntime is per cfs_rq */
1727d28632e4f12 Aaron Lu 2019-07-25 540 while (!is_same_group(sea, seb)) {
1727d28632e4f12 Aaron Lu 2019-07-25 541 int sea_depth = sea->depth;
1727d28632e4f12 Aaron Lu 2019-07-25 542 int seb_depth = seb->depth;
1727d28632e4f12 Aaron Lu 2019-07-25 543
1727d28632e4f12 Aaron Lu 2019-07-25 544 if (sea_depth >= seb_depth)
1727d28632e4f12 Aaron Lu 2019-07-25 545 sea = parent_entity(sea);
1727d28632e4f12 Aaron Lu 2019-07-25 546 if (sea_depth <= seb_depth)
1727d28632e4f12 Aaron Lu 2019-07-25 547 seb = parent_entity(seb);
1727d28632e4f12 Aaron Lu 2019-07-25 548 }
1727d28632e4f12 Aaron Lu 2019-07-25 549
1727d28632e4f12 Aaron Lu 2019-07-25 550 delta = (s64)(sea->vruntime - seb->vruntime);
1727d28632e4f12 Aaron Lu 2019-07-25 551 goto out;
1727d28632e4f12 Aaron Lu 2019-07-25 552 }
1727d28632e4f12 Aaron Lu 2019-07-25 553
1727d28632e4f12 Aaron Lu 2019-07-25 554 /* crosscpu: compare root level se's vruntime to decide priority */
1727d28632e4f12 Aaron Lu 2019-07-25 555 while (sea->parent)
1727d28632e4f12 Aaron Lu 2019-07-25 556 sea = sea->parent;
1727d28632e4f12 Aaron Lu 2019-07-25 557 while (seb->parent)
1727d28632e4f12 Aaron Lu 2019-07-25 558 seb = seb->parent;
1727d28632e4f12 Aaron Lu 2019-07-25 559 delta = (s64)(sea->vruntime - seb->vruntime);
1727d28632e4f12 Aaron Lu 2019-07-25 560
1727d28632e4f12 Aaron Lu 2019-07-25 561 out:
1727d28632e4f12 Aaron Lu 2019-07-25 562 p = delta > 0 ? b : a;
1727d28632e4f12 Aaron Lu 2019-07-25 563
1727d28632e4f12 Aaron Lu 2019-07-25 564 return delta > 0;
1727d28632e4f12 Aaron Lu 2019-07-25 565 }
231822f7cf32291 Guenter Roeck 2020-06-16 566 #endif /* CONFIG_FAIR_GROUP_SCHED */
1727d28632e4f12 Aaron Lu 2019-07-25 567
:::::: The code at line 535 was first introduced by commit
:::::: 1727d28632e4f124f314bc19ad4f40ec183fe60e FROMLIST: sched/fair: core wide vruntime comparison
:::::: TO: Aaron Lu <aaron.lu(a)linux.alibaba.com>
:::::: CC: Commit Bot <commit-bot(a)chromium.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH net-next v3 4/7] net: phy: add backplane kr driver support
by kernel test robot
Hi Florinel,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Florinel-Iordache/doc-net-add-ba...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 29a720c1042f469c8fea317cb5e7f496b116e07d
config: mips-allyesconfig (attached as .config)
compiler: mips-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
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 <<):
drivers/net/phy/backplane/backplane.c: In function 'bp_kr_state_machine':
>> drivers/net/phy/backplane/backplane.c:590:27: warning: variable 'bpdev' set but not used [-Wunused-but-set-variable]
590 | struct backplane_device *bpdev;
| ^~~~~
--
drivers/net/phy/backplane/link_training.c: In function 'lt_train_remote_tx':
>> drivers/net/phy/backplane/link_training.c:557:6: warning: variable 'lp_resp_time' set but not used [-Wunused-but-set-variable]
557 | u64 lp_resp_time;
| ^~~~~~~~~~~~
drivers/net/phy/backplane/link_training.c: In function 'lt_train_local_tx':
>> drivers/net/phy/backplane/link_training.c:1143:15: warning: variable 'old_ld_status' set but not used [-Wunused-but-set-variable]
1143 | int request, old_ld_status;
| ^~~~~~~~~~~~~
vim +/bpdev +590 drivers/net/phy/backplane/backplane.c
586
587 static void bp_kr_state_machine(struct work_struct *work)
588 {
589 struct delayed_work *dwork = to_delayed_work(work);
> 590 struct backplane_device *bpdev;
591 u32 kr_timeout = KR_TIMEOUT_1;
592 struct phy_device *phydev;
593 struct lane_device *lane;
594 bool start_train = false;
595
596 lane = container_of(dwork, struct lane_device, krwk);
597 if (!lane)
598 return;
599
600 bpdev = lane->bpdev;
601 phydev = lane->phydev;
602
603 if (!backplane_is_mode_kr(phydev->interface))
604 return;
605
606 /* Check if equalization algorithm is installed */
607 if (!lane->krln.eq_alg)
608 return;
609
610 /* Check if link training is used */
611 if (!lane->krln.eq_alg->use_local_tx_training &&
612 !lane->krln.eq_alg->use_remote_tx_training)
613 return;
614
615 mutex_lock(&lane->lane_lock);
616 switch (lane->krln.state) {
617 case DETECTING_LP:
618 start_train = detect_lp(lane);
619 break;
620 case TRAINED:
621 kr_timeout = KR_TIMEOUT_2;
622 if (!backplane_is_link_up(phydev)) {
623 kr_timeout = KR_TIMEOUT_1;
624 detect_hotplug(lane);
625 }
626 break;
627 }
628
629 if (start_train)
630 kr_train_step(lane);
631
632 mutex_unlock(&lane->lane_lock);
633 start_kr_state_machine(lane, kr_timeout);
634 }
635
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH v1] dmaengine: acpi: Drop double check for ACPI companion device
by kernel test robot
Hi Andy,
I love your patch! Perhaps something to improve:
[auto build test WARNING on slave-dma/next]
[also build test WARNING on linus/master v5.8-rc2 next-20200622]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/dmaengine-acpi-D...
base: https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/slave-dma.git next
config: arm64-randconfig-r025-20200622 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 1d4c87335d5236ea1f35937e1014980ba961ae34)
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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
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 <<):
>> drivers/dma/acpi-dma.c:380:10: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'struct dma_chan *' [-Wint-conversion]
return ret;
^~~
1 warning generated.
vim +380 drivers/dma/acpi-dma.c
347
348 /**
349 * acpi_dma_request_slave_chan_by_index - Get the DMA slave channel
350 * @dev: struct device to get DMA request from
351 * @index: index of FixedDMA descriptor for @dev
352 *
353 * Return:
354 * Pointer to appropriate dma channel on success or an error pointer.
355 */
356 struct dma_chan *acpi_dma_request_slave_chan_by_index(struct device *dev,
357 size_t index)
358 {
359 struct acpi_dma_parser_data pdata;
360 struct acpi_dma_spec *dma_spec = &pdata.dma_spec;
361 struct acpi_device *adev = ACPI_COMPANION(dev);
362 struct list_head resource_list;
363 struct acpi_dma *adma;
364 struct dma_chan *chan = NULL;
365 int found;
366 int ret;
367
368 memset(&pdata, 0, sizeof(pdata));
369 pdata.index = index;
370
371 /* Initial values for the request line and channel */
372 dma_spec->chan_id = -1;
373 dma_spec->slave_id = -1;
374
375 INIT_LIST_HEAD(&resource_list);
376 ret = acpi_dev_get_resources(adev, &resource_list,
377 acpi_dma_parse_fixed_dma, &pdata);
378 acpi_dev_free_resource_list(&resource_list);
379 if (ret < 0)
> 380 return ret;
381
382 if (dma_spec->slave_id < 0 || dma_spec->chan_id < 0)
383 return ERR_PTR(-ENODEV);
384
385 mutex_lock(&acpi_dma_lock);
386
387 list_for_each_entry(adma, &acpi_dma_list, dma_controllers) {
388 /*
389 * We are not going to call translation function if slave_id
390 * doesn't fall to the request range.
391 */
392 found = acpi_dma_update_dma_spec(adma, dma_spec);
393 if (found < 0)
394 continue;
395 chan = adma->acpi_dma_xlate(dma_spec, adma);
396 /*
397 * Try to get a channel only from the DMA controller that
398 * matches the slave_id. See acpi_dma_update_dma_spec()
399 * description for the details.
400 */
401 if (found > 0 || chan)
402 break;
403 }
404
405 mutex_unlock(&acpi_dma_lock);
406 return chan ? chan : ERR_PTR(-EPROBE_DEFER);
407 }
408 EXPORT_SYMBOL_GPL(acpi_dma_request_slave_chan_by_index);
409
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[android-common:android-4.19-stable 9050/9999] sound/soc/soc-dapm.c:3833:1: warning: the frame size of 2072 bytes is larger than 2048 bytes
by kernel test robot
Hi Greg,
FYI, the error/warning still remains.
tree: https://android.googlesource.com/kernel/common android-4.19-stable
head: 20763d5b10df774960bfc616e30d4b9cdf744fc1
commit: b8539473ea414eaa4ef28791fa308a6ab8c5d67c [9050/9999] ANDROID: GKI: workqueue.h: add Android ABI padding to some structures
config: x86_64-randconfig-s021-20200622 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-dirty
git checkout b8539473ea414eaa4ef28791fa308a6ab8c5d67c
# save the attached .config to linux build tree
make W=1 C=1 ARCH=x86_64 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 warnings (new ones prefixed by >>, old ones prefixed by <<):
sound/soc/soc-dapm.c: In function 'pop_dbg':
sound/soc/soc-dapm.c:174:2: warning: function 'pop_dbg' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
174 | vsnprintf(buf, PAGE_SIZE, fmt, args);
| ^~~~~~~~~
sound/soc/soc-dapm.c: In function 'snd_soc_dai_link_event':
>> sound/soc/soc-dapm.c:3833:1: warning: the frame size of 2072 bytes is larger than 2048 bytes [-Wframe-larger-than=]
3833 | }
| ^
vim +3833 sound/soc/soc-dapm.c
4ba1327ab8ce17 Mark Brown 2008-05-13 3697
c74184ed30ecce Mark Brown 2012-04-04 3698 static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w,
c74184ed30ecce Mark Brown 2012-04-04 3699 struct snd_kcontrol *kcontrol, int event)
c74184ed30ecce Mark Brown 2012-04-04 3700 {
c74184ed30ecce Mark Brown 2012-04-04 3701 struct snd_soc_dapm_path *source_p, *sink_p;
c74184ed30ecce Mark Brown 2012-04-04 3702 struct snd_soc_dai *source, *sink;
249dc49576fc95 Charles Keepax 2018-08-15 3703 struct snd_soc_pcm_runtime *rtd = w->priv;
c66150824b8a80 Nikesh Oswal 2015-02-02 3704 const struct snd_soc_pcm_stream *config = w->params + w->params_select;
c74184ed30ecce Mark Brown 2012-04-04 3705 struct snd_pcm_substream substream;
9747cec21e2d55 Mark Brown 2012-04-26 3706 struct snd_pcm_hw_params *params = NULL;
8053f21675b073 Nicolin Chen 2016-07-26 3707 struct snd_pcm_runtime *runtime = NULL;
3ba66feb59810e Takashi Iwai 2018-07-25 3708 unsigned int fmt;
0376916b7b2cff Charles Keepax 2018-09-06 3709 int ret = 0;
c74184ed30ecce Mark Brown 2012-04-04 3710
bf4edea863c435 Takashi Iwai 2013-11-07 3711 if (WARN_ON(!config) ||
a3423b02cf745c Lars-Peter Clausen 2015-08-11 3712 WARN_ON(list_empty(&w->edges[SND_SOC_DAPM_DIR_OUT]) ||
a3423b02cf745c Lars-Peter Clausen 2015-08-11 3713 list_empty(&w->edges[SND_SOC_DAPM_DIR_IN])))
bf4edea863c435 Takashi Iwai 2013-11-07 3714 return -EINVAL;
c74184ed30ecce Mark Brown 2012-04-04 3715
c74184ed30ecce Mark Brown 2012-04-04 3716 /* We only support a single source and sink, pick the first */
a3423b02cf745c Lars-Peter Clausen 2015-08-11 3717 source_p = list_first_entry(&w->edges[SND_SOC_DAPM_DIR_OUT],
a3423b02cf745c Lars-Peter Clausen 2015-08-11 3718 struct snd_soc_dapm_path,
a3423b02cf745c Lars-Peter Clausen 2015-08-11 3719 list_node[SND_SOC_DAPM_DIR_OUT]);
a3423b02cf745c Lars-Peter Clausen 2015-08-11 3720 sink_p = list_first_entry(&w->edges[SND_SOC_DAPM_DIR_IN],
a3423b02cf745c Lars-Peter Clausen 2015-08-11 3721 struct snd_soc_dapm_path,
a3423b02cf745c Lars-Peter Clausen 2015-08-11 3722 list_node[SND_SOC_DAPM_DIR_IN]);
c74184ed30ecce Mark Brown 2012-04-04 3723
c74184ed30ecce Mark Brown 2012-04-04 3724 source = source_p->source->priv;
c74184ed30ecce Mark Brown 2012-04-04 3725 sink = sink_p->sink->priv;
c74184ed30ecce Mark Brown 2012-04-04 3726
c74184ed30ecce Mark Brown 2012-04-04 3727 /* Be a little careful as we don't want to overflow the mask array */
c74184ed30ecce Mark Brown 2012-04-04 3728 if (config->formats) {
c74184ed30ecce Mark Brown 2012-04-04 3729 fmt = ffs(config->formats) - 1;
c74184ed30ecce Mark Brown 2012-04-04 3730 } else {
30a6a1a4eed170 Liam Girdwood 2012-11-19 3731 dev_warn(w->dapm->dev, "ASoC: Invalid format %llx specified\n",
c74184ed30ecce Mark Brown 2012-04-04 3732 config->formats);
c74184ed30ecce Mark Brown 2012-04-04 3733 fmt = 0;
c74184ed30ecce Mark Brown 2012-04-04 3734 }
c74184ed30ecce Mark Brown 2012-04-04 3735
c74184ed30ecce Mark Brown 2012-04-04 3736 /* Currently very limited parameter selection */
9747cec21e2d55 Mark Brown 2012-04-26 3737 params = kzalloc(sizeof(*params), GFP_KERNEL);
9747cec21e2d55 Mark Brown 2012-04-26 3738 if (!params) {
9747cec21e2d55 Mark Brown 2012-04-26 3739 ret = -ENOMEM;
9747cec21e2d55 Mark Brown 2012-04-26 3740 goto out;
9747cec21e2d55 Mark Brown 2012-04-26 3741 }
9747cec21e2d55 Mark Brown 2012-04-26 3742 snd_mask_set(hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT), fmt);
c74184ed30ecce Mark Brown 2012-04-04 3743
9747cec21e2d55 Mark Brown 2012-04-26 3744 hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE)->min =
c74184ed30ecce Mark Brown 2012-04-04 3745 config->rate_min;
9747cec21e2d55 Mark Brown 2012-04-26 3746 hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE)->max =
c74184ed30ecce Mark Brown 2012-04-04 3747 config->rate_max;
c74184ed30ecce Mark Brown 2012-04-04 3748
9747cec21e2d55 Mark Brown 2012-04-26 3749 hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS)->min
c74184ed30ecce Mark Brown 2012-04-04 3750 = config->channels_min;
9747cec21e2d55 Mark Brown 2012-04-26 3751 hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS)->max
c74184ed30ecce Mark Brown 2012-04-04 3752 = config->channels_max;
c74184ed30ecce Mark Brown 2012-04-04 3753
c74184ed30ecce Mark Brown 2012-04-04 3754 memset(&substream, 0, sizeof(substream));
c74184ed30ecce Mark Brown 2012-04-04 3755
8053f21675b073 Nicolin Chen 2016-07-26 3756 /* Allocate a dummy snd_pcm_runtime for startup() and other ops() */
8053f21675b073 Nicolin Chen 2016-07-26 3757 runtime = kzalloc(sizeof(*runtime), GFP_KERNEL);
8053f21675b073 Nicolin Chen 2016-07-26 3758 if (!runtime) {
8053f21675b073 Nicolin Chen 2016-07-26 3759 ret = -ENOMEM;
8053f21675b073 Nicolin Chen 2016-07-26 3760 goto out;
8053f21675b073 Nicolin Chen 2016-07-26 3761 }
8053f21675b073 Nicolin Chen 2016-07-26 3762 substream.runtime = runtime;
249dc49576fc95 Charles Keepax 2018-08-15 3763 substream.private_data = rtd;
8053f21675b073 Nicolin Chen 2016-07-26 3764
c74184ed30ecce Mark Brown 2012-04-04 3765 switch (event) {
c74184ed30ecce Mark Brown 2012-04-04 3766 case SND_SOC_DAPM_PRE_PMU:
c74184ed30ecce Mark Brown 2012-04-04 3767 substream.stream = SNDRV_PCM_STREAM_CAPTURE;
9900a4226c785d Kuninori Morimoto 2017-09-25 3768 if (source->driver->ops->startup) {
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3769 ret = source->driver->ops->startup(&substream, source);
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3770 if (ret < 0) {
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3771 dev_err(source->dev,
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3772 "ASoC: startup() failed: %d\n", ret);
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3773 goto out;
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3774 }
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3775 source->active++;
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3776 }
93e6958a3674d2 Benoit Cousson 2014-07-08 3777 ret = soc_dai_hw_params(&substream, params, source);
93e6958a3674d2 Benoit Cousson 2014-07-08 3778 if (ret < 0)
9747cec21e2d55 Mark Brown 2012-04-26 3779 goto out;
c74184ed30ecce Mark Brown 2012-04-04 3780
c74184ed30ecce Mark Brown 2012-04-04 3781 substream.stream = SNDRV_PCM_STREAM_PLAYBACK;
9900a4226c785d Kuninori Morimoto 2017-09-25 3782 if (sink->driver->ops->startup) {
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3783 ret = sink->driver->ops->startup(&substream, sink);
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3784 if (ret < 0) {
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3785 dev_err(sink->dev,
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3786 "ASoC: startup() failed: %d\n", ret);
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3787 goto out;
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3788 }
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3789 sink->active++;
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3790 }
93e6958a3674d2 Benoit Cousson 2014-07-08 3791 ret = soc_dai_hw_params(&substream, params, sink);
93e6958a3674d2 Benoit Cousson 2014-07-08 3792 if (ret < 0)
9747cec21e2d55 Mark Brown 2012-04-26 3793 goto out;
c74184ed30ecce Mark Brown 2012-04-04 3794 break;
c74184ed30ecce Mark Brown 2012-04-04 3795
c74184ed30ecce Mark Brown 2012-04-04 3796 case SND_SOC_DAPM_POST_PMU:
da18396f949eca Mark Brown 2013-02-06 3797 ret = snd_soc_dai_digital_mute(sink, 0,
da18396f949eca Mark Brown 2013-02-06 3798 SNDRV_PCM_STREAM_PLAYBACK);
c74184ed30ecce Mark Brown 2012-04-04 3799 if (ret != 0 && ret != -ENOTSUPP)
30a6a1a4eed170 Liam Girdwood 2012-11-19 3800 dev_warn(sink->dev, "ASoC: Failed to unmute: %d\n", ret);
9747cec21e2d55 Mark Brown 2012-04-26 3801 ret = 0;
c74184ed30ecce Mark Brown 2012-04-04 3802 break;
c74184ed30ecce Mark Brown 2012-04-04 3803
c74184ed30ecce Mark Brown 2012-04-04 3804 case SND_SOC_DAPM_PRE_PMD:
da18396f949eca Mark Brown 2013-02-06 3805 ret = snd_soc_dai_digital_mute(sink, 1,
da18396f949eca Mark Brown 2013-02-06 3806 SNDRV_PCM_STREAM_PLAYBACK);
c74184ed30ecce Mark Brown 2012-04-04 3807 if (ret != 0 && ret != -ENOTSUPP)
30a6a1a4eed170 Liam Girdwood 2012-11-19 3808 dev_warn(sink->dev, "ASoC: Failed to mute: %d\n", ret);
9747cec21e2d55 Mark Brown 2012-04-26 3809 ret = 0;
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3810
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3811 source->active--;
9900a4226c785d Kuninori Morimoto 2017-09-25 3812 if (source->driver->ops->shutdown) {
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3813 substream.stream = SNDRV_PCM_STREAM_CAPTURE;
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3814 source->driver->ops->shutdown(&substream, source);
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3815 }
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3816
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3817 sink->active--;
9900a4226c785d Kuninori Morimoto 2017-09-25 3818 if (sink->driver->ops->shutdown) {
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3819 substream.stream = SNDRV_PCM_STREAM_PLAYBACK;
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3820 sink->driver->ops->shutdown(&substream, sink);
9b8ef9f6b3fccc Jeeja KP 2015-10-20 3821 }
c74184ed30ecce Mark Brown 2012-04-04 3822 break;
c74184ed30ecce Mark Brown 2012-04-04 3823
c74184ed30ecce Mark Brown 2012-04-04 3824 default:
a6ed0608bd289b Takashi Iwai 2013-11-06 3825 WARN(1, "Unknown event %d\n", event);
75881df3fd7708 Sudip Mukherjee 2015-09-10 3826 ret = -EINVAL;
c74184ed30ecce Mark Brown 2012-04-04 3827 }
c74184ed30ecce Mark Brown 2012-04-04 3828
9747cec21e2d55 Mark Brown 2012-04-26 3829 out:
8053f21675b073 Nicolin Chen 2016-07-26 3830 kfree(runtime);
9747cec21e2d55 Mark Brown 2012-04-26 3831 kfree(params);
9747cec21e2d55 Mark Brown 2012-04-26 3832 return ret;
c74184ed30ecce Mark Brown 2012-04-04 @3833 }
c74184ed30ecce Mark Brown 2012-04-04 3834
:::::: The code at line 3833 was first introduced by commit
:::::: c74184ed30ecce2a5e9ae9aa22cb5e3942e0c7c7 ASoC: core: Support transparent CODEC<->CODEC DAI links
:::::: TO: Mark Brown <broonie(a)opensource.wolfsonmicro.com>
:::::: CC: Mark Brown <broonie(a)opensource.wolfsonmicro.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH 1/3] mfd: ds1374: Introduce Dallas/Maxim DS1374 MFD core driver
by kernel test robot
Hi "Johnson,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on abelloni/rtc-next]
[also build test ERROR on linux/master linus/master v5.8-rc2 next-20200622]
[cannot apply to ljones-mfd/for-mfd-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Johnson-CH-Chen/Use-MFD-for-Dall...
base: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
config: sparc-allyesconfig (attached as .config)
compiler: sparc64-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc
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 >>):
drivers/mfd/ds1374.c: In function 'ds1374_suspend':
>> drivers/mfd/ds1374.c:56:3: error: implicit declaration of function 'enable_irq_wake' [-Werror=implicit-function-declaration]
56 | enable_irq_wake(client->irq);
| ^~~~~~~~~~~~~~~
drivers/mfd/ds1374.c: In function 'ds1374_resume':
>> drivers/mfd/ds1374.c:65:3: error: implicit declaration of function 'disable_irq_wake' [-Werror=implicit-function-declaration]
65 | disable_irq_wake(client->irq);
| ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/enable_irq_wake +56 drivers/mfd/ds1374.c
49
50 #ifdef CONFIG_PM_SLEEP
51 static int ds1374_suspend(struct device *dev)
52 {
53 struct i2c_client *client = to_i2c_client(dev);
54
55 if (client->irq > 0 && device_may_wakeup(&client->dev))
> 56 enable_irq_wake(client->irq);
57 return 0;
58 }
59
60 static int ds1374_resume(struct device *dev)
61 {
62 struct i2c_client *client = to_i2c_client(dev);
63
64 if (client->irq > 0 && device_may_wakeup(&client->dev))
> 65 disable_irq_wake(client->irq);
66 return 0;
67 }
68 #endif
69
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months