[ext4:dev 9/17] fs/ext4/fast_commit.c:1737:16: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long unsigned int'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
head: 21175ca434c5d49509b73cf473618b01b0b85437
commit: d556435156b7970b8ce61b355df558a5168927cc [9/17] jbd2: avoid -Wempty-body warnings
config: m68k-defconfig (attached as .config)
compiler: m68k-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
# https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git/commit/?id...
git remote add ext4 https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git
git fetch --no-tags ext4 dev
git checkout d556435156b7970b8ce61b355df558a5168927cc
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
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/kernel.h:16,
from include/linux/list.h:9,
from include/linux/rculist.h:10,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/blkdev.h:5,
from fs/ext4/ext4.h:21,
from fs/ext4/fast_commit.c:10:
fs/ext4/fast_commit.c: In function 'ext4_fc_replay_add_range':
>> fs/ext4/fast_commit.c:1737:16: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long unsigned int' [-Wformat=]
1737 | jbd_debug(1, "Converting from %d to %d %lld",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:140:10: note: in definition of macro 'no_printk'
140 | printk(fmt, ##__VA_ARGS__); \
| ^~~
fs/ext4/fast_commit.c:1737:3: note: in expansion of macro 'jbd_debug'
1737 | jbd_debug(1, "Converting from %d to %d %lld",
| ^~~~~~~~~
fs/ext4/fast_commit.c:1737:34: note: format string is defined here
1737 | jbd_debug(1, "Converting from %d to %d %lld",
| ~^
| |
| int
| %ld
--
In file included from include/linux/kernel.h:16,
from include/linux/list.h:9,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from fs/jbd2/recovery.c:17:
fs/jbd2/recovery.c: In function 'fc_do_one_pass':
>> fs/jbd2/recovery.c:256:16: warning: format '%d' expects a matching 'int' argument [-Wformat=]
256 | jbd_debug(3, "Processing fast commit blk with seq %d");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:140:10: note: in definition of macro 'no_printk'
140 | printk(fmt, ##__VA_ARGS__); \
| ^~~
fs/jbd2/recovery.c:256:3: note: in expansion of macro 'jbd_debug'
256 | jbd_debug(3, "Processing fast commit blk with seq %d");
| ^~~~~~~~~
fs/jbd2/recovery.c:256:54: note: format string is defined here
256 | jbd_debug(3, "Processing fast commit blk with seq %d");
| ~^
| |
| int
vim +1737 fs/ext4/fast_commit.c
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1631
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1632 /* Replay add range tag */
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1633 static int ext4_fc_replay_add_range(struct super_block *sb,
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1634 struct ext4_fc_tl *tl)
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1635 {
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1636 struct ext4_fc_add_range *fc_add_ex;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1637 struct ext4_extent newex, *ex;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1638 struct inode *inode;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1639 ext4_lblk_t start, cur;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1640 int remaining, len;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1641 ext4_fsblk_t start_pblk;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1642 struct ext4_map_blocks map;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1643 struct ext4_ext_path *path = NULL;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1644 int ret;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1645
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1646 fc_add_ex = (struct ext4_fc_add_range *)ext4_fc_tag_val(tl);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1647 ex = (struct ext4_extent *)&fc_add_ex->fc_ex;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1648
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1649 trace_ext4_fc_replay(sb, EXT4_FC_TAG_ADD_RANGE,
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1650 le32_to_cpu(fc_add_ex->fc_ino), le32_to_cpu(ex->ee_block),
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1651 ext4_ext_get_actual_len(ex));
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1652
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1653 inode = ext4_iget(sb, le32_to_cpu(fc_add_ex->fc_ino),
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1654 EXT4_IGET_NORMAL);
23dd561ad9eae0 Yi Li 2020-12-30 1655 if (IS_ERR(inode)) {
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1656 jbd_debug(1, "Inode not found.");
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1657 return 0;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1658 }
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1659
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1660 ret = ext4_fc_record_modified_inode(sb, inode->i_ino);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1661
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1662 start = le32_to_cpu(ex->ee_block);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1663 start_pblk = ext4_ext_pblock(ex);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1664 len = ext4_ext_get_actual_len(ex);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1665
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1666 cur = start;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1667 remaining = len;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1668 jbd_debug(1, "ADD_RANGE, lblk %d, pblk %lld, len %d, unwritten %d, inode %ld\n",
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1669 start, start_pblk, len, ext4_ext_is_unwritten(ex),
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1670 inode->i_ino);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1671
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1672 while (remaining > 0) {
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1673 map.m_lblk = cur;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1674 map.m_len = remaining;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1675 map.m_pblk = 0;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1676 ret = ext4_map_blocks(NULL, inode, &map, 0);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1677
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1678 if (ret < 0) {
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1679 iput(inode);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1680 return 0;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1681 }
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1682
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1683 if (ret == 0) {
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1684 /* Range is not mapped */
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1685 path = ext4_find_extent(inode, cur, NULL, 0);
8c9be1e58a8dc0 Harshad Shirwadkar 2020-10-27 1686 if (IS_ERR(path)) {
8c9be1e58a8dc0 Harshad Shirwadkar 2020-10-27 1687 iput(inode);
8c9be1e58a8dc0 Harshad Shirwadkar 2020-10-27 1688 return 0;
8c9be1e58a8dc0 Harshad Shirwadkar 2020-10-27 1689 }
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1690 memset(&newex, 0, sizeof(newex));
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1691 newex.ee_block = cpu_to_le32(cur);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1692 ext4_ext_store_pblock(
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1693 &newex, start_pblk + cur - start);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1694 newex.ee_len = cpu_to_le16(map.m_len);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1695 if (ext4_ext_is_unwritten(ex))
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1696 ext4_ext_mark_unwritten(&newex);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1697 down_write(&EXT4_I(inode)->i_data_sem);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1698 ret = ext4_ext_insert_extent(
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1699 NULL, inode, &path, &newex, 0);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1700 up_write((&EXT4_I(inode)->i_data_sem));
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1701 ext4_ext_drop_refs(path);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1702 kfree(path);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1703 if (ret) {
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1704 iput(inode);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1705 return 0;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1706 }
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1707 goto next;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1708 }
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1709
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1710 if (start_pblk + cur - start != map.m_pblk) {
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1711 /*
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1712 * Logical to physical mapping changed. This can happen
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1713 * if this range was removed and then reallocated to
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1714 * map to new physical blocks during a fast commit.
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1715 */
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1716 ret = ext4_ext_replay_update_ex(inode, cur, map.m_len,
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1717 ext4_ext_is_unwritten(ex),
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1718 start_pblk + cur - start);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1719 if (ret) {
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1720 iput(inode);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1721 return 0;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1722 }
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1723 /*
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1724 * Mark the old blocks as free since they aren't used
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1725 * anymore. We maintain an array of all the modified
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1726 * inodes. In case these blocks are still used at either
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1727 * a different logical range in the same inode or in
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1728 * some different inode, we will mark them as allocated
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1729 * at the end of the FC replay using our array of
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1730 * modified inodes.
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1731 */
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1732 ext4_mb_mark_bb(inode->i_sb, map.m_pblk, map.m_len, 0);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1733 goto next;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1734 }
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1735
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1736 /* Range is mapped and needs a state change */
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 @1737 jbd_debug(1, "Converting from %d to %d %lld",
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1738 map.m_flags & EXT4_MAP_UNWRITTEN,
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1739 ext4_ext_is_unwritten(ex), map.m_pblk);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1740 ret = ext4_ext_replay_update_ex(inode, cur, map.m_len,
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1741 ext4_ext_is_unwritten(ex), map.m_pblk);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1742 if (ret) {
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1743 iput(inode);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1744 return 0;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1745 }
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1746 /*
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1747 * We may have split the extent tree while toggling the state.
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1748 * Try to shrink the extent tree now.
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1749 */
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1750 ext4_ext_replay_shrink_inode(inode, start + len);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1751 next:
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1752 cur += map.m_len;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1753 remaining -= map.m_len;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1754 }
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1755 ext4_ext_replay_shrink_inode(inode, i_size_read(inode) >>
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1756 sb->s_blocksize_bits);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1757 iput(inode);
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1758 return 0;
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1759 }
8016e29f4362e2 Harshad Shirwadkar 2020-10-15 1760
:::::: The code at line 1737 was first introduced by commit
:::::: 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2 ext4: fast commit recovery path
:::::: TO: Harshad Shirwadkar <harshadshirwadkar(a)gmail.com>
:::::: CC: Theodore Ts'o <tytso(a)mit.edu>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH 2/4] phy: phy-can-transceiver: Add support for generic CAN transceiver driver
by kernel test robot
Hi Aswath,
I love your patch! Perhaps something to improve:
[auto build test WARNING on mkl-can-next/testing]
[also build test WARNING on robh/for-next linus/master v5.12-rc6 next-20210409]
[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/Aswath-Govindraju/CAN-TRANSCEIVE...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git testing
config: sh-allmodconfig (attached as .config)
compiler: sh4-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
# https://github.com/0day-ci/linux/commit/4c36c3573a45d758ed08da12e803ddd1c...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Aswath-Govindraju/CAN-TRANSCEIVER-Add-support-for-CAN-transceivers/20210409-214324
git checkout 4c36c3573a45d758ed08da12e803ddd1c99b52b7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh
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/phy-can-transceiver.c:77:5: warning: no previous prototype for 'can_transceiver_phy_probe' [-Wmissing-prototypes]
77 | int can_transceiver_phy_probe(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for SND_ATMEL_SOC_PDC
Depends on SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && HAS_DMA
Selected by
- SND_ATMEL_SOC_SSC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC
- SND_ATMEL_SOC_SSC_PDC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && ATMEL_SSC
vim +/can_transceiver_phy_probe +77 drivers/phy/phy-can-transceiver.c
76
> 77 int can_transceiver_phy_probe(struct platform_device *pdev)
78 {
79 struct phy_provider *phy_provider;
80 struct device *dev = &pdev->dev;
81 struct can_transceiver_phy *can_transceiver_phy;
82 const struct can_transceiver_data *drvdata;
83 const struct of_device_id *match;
84 struct phy *phy;
85 struct gpio_desc *standby_gpio;
86 struct gpio_desc *enable_gpio;
87 u32 max_bitrate = 0;
88
89 can_transceiver_phy = devm_kzalloc(dev, sizeof(struct can_transceiver_phy), GFP_KERNEL);
90
91 match = of_match_node(can_transceiver_phy_ids, pdev->dev.of_node);
92 drvdata = match->data;
93
94 phy = devm_phy_create(dev, dev->of_node,
95 &can_transceiver_phy_ops);
96 if (IS_ERR(phy)) {
97 dev_err(dev, "failed to create can transceiver phy\n");
98 return PTR_ERR(phy);
99 }
100
101 device_property_read_u32(dev, "max-bitrate", &max_bitrate);
102 phy->attrs.max_link_rate = max_bitrate / 1000000;
103
104 can_transceiver_phy->generic_phy = phy;
105
106 if (drvdata->flags & STB_PRESENT) {
107 standby_gpio = devm_gpiod_get(dev, "standby", GPIOD_OUT_LOW);
108 if (IS_ERR(standby_gpio))
109 return PTR_ERR(standby_gpio);
110 can_transceiver_phy->standby_gpio = standby_gpio;
111 }
112
113 if (drvdata->flags & EN_PRESENT) {
114 enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW);
115 if (IS_ERR(enable_gpio))
116 return PTR_ERR(enable_gpio);
117 can_transceiver_phy->enable_gpio = enable_gpio;
118 }
119
120 phy_set_drvdata(can_transceiver_phy->generic_phy, can_transceiver_phy);
121
122 phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
123
124 return PTR_ERR_OR_ZERO(phy_provider);
125 }
126
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[RFC PATCH] __dm_attach_interposer() can be static
by kernel test robot
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
dm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 04142454c4eed..2a584c2103f3a 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -2679,7 +2679,7 @@ static int __dm_suspend(struct mapped_device *md, struct dm_table *map,
return r;
}
-int __dm_attach_interposer(struct mapped_device *md)
+static int __dm_attach_interposer(struct mapped_device *md)
{
int r;
struct dm_table *map;
@@ -2721,7 +2721,7 @@ int __dm_attach_interposer(struct mapped_device *md)
return r;
}
-int __dm_detach_interposer(struct mapped_device *md)
+static int __dm_detach_interposer(struct mapped_device *md)
{
struct dm_table *map = NULL;
struct block_device *original_bdev;
1 year, 5 months
Re: [PATCH v8 3/4] Adds blk_interposer to md.
by kernel test robot
Hi Sergei,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on block/for-next]
[also build test WARNING on hch-configfs/for-next v5.12-rc6]
[cannot apply to dm/for-next next-20210409]
[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/Sergei-Shtepa/block-device-inter...
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: x86_64-randconfig-s032-20210409 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-279-g6d5d9b42-dirty
# https://github.com/0day-ci/linux/commit/df79fb333cb0a1263a1f03f54de425507...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sergei-Shtepa/block-device-interposer/20210409-194943
git checkout df79fb333cb0a1263a1f03f54de425507e3c2238
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/md/dm-table.c:337:63: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted fmode_t [usertype] mode @@ got bool [usertype] interpose @@
drivers/md/dm-table.c:337:63: sparse: expected restricted fmode_t [usertype] mode
drivers/md/dm-table.c:337:63: sparse: got bool [usertype] interpose
--
>> drivers/md/dm.c:2682:5: sparse: sparse: symbol '__dm_attach_interposer' was not declared. Should it be static?
>> drivers/md/dm.c:2724:5: sparse: sparse: symbol '__dm_detach_interposer' was not declared. Should it be static?
Please review and possibly fold the followup patch.
vim +337 drivers/md/dm-table.c
322
323 /*
324 * This upgrades the mode on an already open dm_dev, being
325 * careful to leave things as they were if we fail to reopen the
326 * device and not to touch the existing bdev field in case
327 * it is accessed concurrently.
328 */
329 static int upgrade_mode(struct dm_dev_internal *dd, fmode_t new_mode,
330 bool interpose, struct mapped_device *md)
331 {
332 int r;
333 struct dm_dev *old_dev, *new_dev;
334
335 old_dev = dd->dm_dev;
336
> 337 r = dm_get_table_device(md, dd->dm_dev->bdev->bd_dev, interpose,
338 dd->dm_dev->mode | new_mode, &new_dev);
339 if (r)
340 return r;
341
342 dd->dm_dev = new_dev;
343 dm_put_table_device(md, old_dev);
344
345 return 0;
346 }
347
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[linux-stable-rc:linux-4.19.y 3686/9999] arch/mips/loongson64/common/mem.c:95:5: warning: no previous prototype for '__uncached_access'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
head: e864f43593ccf9180c61738abdf1c1dde091367d
commit: aaa81d9e6523b4fe55aee536ce10bcc1c55b5d0f [3686/9999] MIPS: Disable Loongson MMI instructions for kernel build
config: mips-randconfig-r031-20210409 (attached as .config)
compiler: mips64el-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
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gi...
git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc linux-4.19.y
git checkout aaa81d9e6523b4fe55aee536ce10bcc1c55b5d0f
# 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 >>):
>> arch/mips/loongson64/common/mem.c:95:5: warning: no previous prototype for '__uncached_access' [-Wmissing-prototypes]
95 | int __uncached_access(struct file *file, unsigned long addr)
| ^~~~~~~~~~~~~~~~~
--
>> arch/mips/loongson64/common/machtype.c:39:20: warning: no previous prototype for 'mach_prom_init_machtype' [-Wmissing-prototypes]
39 | void __weak __init mach_prom_init_machtype(void)
| ^~~~~~~~~~~~~~~~~~~~~~~
--
In file included from sound/pci/au88x0/au8820.c:3:
sound/pci/au88x0/au88x0_core.c: In function 'vortex_adbdma_setbuffers':
>> sound/pci/au88x0/au88x0.h:39:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
39 | #define hwwrite(x,y,z) writel((z),(x)+(y))
| ^~~~~~~~~~~~~~~~~~~
sound/pci/au88x0/au88x0_core.c:1115:3: note: in expansion of macro 'hwwrite'
1115 | hwwrite(vortex->mmio,
| ^~~~~~~
In file included from sound/pci/au88x0/au8820.c:10:
sound/pci/au88x0/au88x0_core.c:1119:2: note: here
1119 | case 3:
| ^~~~
In file included from sound/pci/au88x0/au8820.c:3:
>> sound/pci/au88x0/au88x0.h:39:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
39 | #define hwwrite(x,y,z) writel((z),(x)+(y))
| ^~~~~~~~~~~~~~~~~~~
sound/pci/au88x0/au88x0_core.c:1122:3: note: in expansion of macro 'hwwrite'
1122 | hwwrite(vortex->mmio,
| ^~~~~~~
In file included from sound/pci/au88x0/au8820.c:10:
sound/pci/au88x0/au88x0_core.c:1126:2: note: here
1126 | case 2:
| ^~~~
In file included from sound/pci/au88x0/au8820.c:3:
>> sound/pci/au88x0/au88x0.h:39:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
39 | #define hwwrite(x,y,z) writel((z),(x)+(y))
| ^~~~~~~~~~~~~~~~~~~
sound/pci/au88x0/au88x0_core.c:1128:3: note: in expansion of macro 'hwwrite'
1128 | hwwrite(vortex->mmio,
| ^~~~~~~
In file included from sound/pci/au88x0/au8820.c:10:
sound/pci/au88x0/au88x0_core.c:1132:2: note: here
1132 | case 1:
| ^~~~
In file included from sound/pci/au88x0/au8820.c:3:
sound/pci/au88x0/au88x0_core.c: In function 'vortex_wtdma_setbuffers':
>> sound/pci/au88x0/au88x0.h:39:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
39 | #define hwwrite(x,y,z) writel((z),(x)+(y))
| ^~~~~~~~~~~~~~~~~~~
sound/pci/au88x0/au88x0_core.c:1391:3: note: in expansion of macro 'hwwrite'
1391 | hwwrite(vortex->mmio, VORTEX_WTDMA_BUFBASE + (wtdma << 4) + 0xc,
| ^~~~~~~
In file included from sound/pci/au88x0/au8820.c:10:
sound/pci/au88x0/au88x0_core.c:1394:2: note: here
1394 | case 3:
| ^~~~
In file included from sound/pci/au88x0/au8820.c:3:
>> sound/pci/au88x0/au88x0.h:39:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
39 | #define hwwrite(x,y,z) writel((z),(x)+(y))
| ^~~~~~~~~~~~~~~~~~~
sound/pci/au88x0/au88x0_core.c:1397:3: note: in expansion of macro 'hwwrite'
1397 | hwwrite(vortex->mmio, VORTEX_WTDMA_BUFBASE + (wtdma << 4) + 0x8,
| ^~~~~~~
In file included from sound/pci/au88x0/au8820.c:10:
sound/pci/au88x0/au88x0_core.c:1400:2: note: here
1400 | case 2:
| ^~~~
In file included from sound/pci/au88x0/au8820.c:3:
>> sound/pci/au88x0/au88x0.h:39:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
39 | #define hwwrite(x,y,z) writel((z),(x)+(y))
| ^~~~~~~~~~~~~~~~~~~
sound/pci/au88x0/au88x0_core.c:1402:3: note: in expansion of macro 'hwwrite'
1402 | hwwrite(vortex->mmio, VORTEX_WTDMA_BUFBASE + (wtdma << 4) + 0x4,
| ^~~~~~~
In file included from sound/pci/au88x0/au8820.c:10:
sound/pci/au88x0/au88x0_core.c:1405:2: note: here
1405 | case 1:
| ^~~~
--
sound/pci/hda/patch_realtek.c: In function 'alc269_suspend':
>> sound/pci/hda/patch_realtek.c:3565:29: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
3565 | alc5505_dsp_suspend(codec);
| ^
sound/pci/hda/patch_realtek.c: In function 'alc269_resume':
sound/pci/hda/patch_realtek.c:3600:28: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
3600 | alc5505_dsp_resume(codec);
| ^
--
sound/pci/lx6464es/lx_core.c: In function 'lx_interrupt_handle_async_events':
>> sound/pci/lx6464es/lx_core.c:1005:6: warning: variable 'urun_mask' set but not used [-Wunused-but-set-variable]
1005 | u64 urun_mask;
| ^~~~~~~~~
>> sound/pci/lx6464es/lx_core.c:1004:6: warning: variable 'orun_mask' set but not used [-Wunused-but-set-variable]
1004 | u64 orun_mask;
| ^~~~~~~~~
vim +/__uncached_access +95 arch/mips/loongson64/common/mem.c
1a08f1524d2ee4 arch/mips/loongson/common/mem.c Huacai Chen 2014-03-21 93
42d226c7248a28 arch/mips/lemote/lm2e/mem.c Songmao Tian 2007-06-06 94 /* override of arch/mips/mm/cache.c: __uncached_access */
42d226c7248a28 arch/mips/lemote/lm2e/mem.c Songmao Tian 2007-06-06 @95 int __uncached_access(struct file *file, unsigned long addr)
42d226c7248a28 arch/mips/lemote/lm2e/mem.c Songmao Tian 2007-06-06 96 {
6b2f3d1f769be5 arch/mips/loongson/common/mem.c Christoph Hellwig 2009-10-27 97 if (file->f_flags & O_DSYNC)
42d226c7248a28 arch/mips/lemote/lm2e/mem.c Songmao Tian 2007-06-06 98 return 1;
42d226c7248a28 arch/mips/lemote/lm2e/mem.c Songmao Tian 2007-06-06 99
42d226c7248a28 arch/mips/lemote/lm2e/mem.c Songmao Tian 2007-06-06 100 return addr >= __pa(high_memory) ||
85749d24bcf904 arch/mips/loongson/common/mem.c Wu Zhangjin 2009-07-02 101 ((addr >= LOONGSON_MMIO_MEM_START) &&
85749d24bcf904 arch/mips/loongson/common/mem.c Wu Zhangjin 2009-07-02 102 (addr < LOONGSON_MMIO_MEM_END));
42d226c7248a28 arch/mips/lemote/lm2e/mem.c Songmao Tian 2007-06-06 103 }
22f1fdfd62a5f6 arch/mips/loongson/common/mem.c Wu Zhangjin 2009-11-11 104
:::::: The code at line 95 was first introduced by commit
:::::: 42d226c7248a28ff8c478c06b7e9bd9ef5d73574 [MIPS] New files for lemote fulong mini-PC support
:::::: TO: Songmao Tian <tiansm(a)lemote.com>
:::::: CC: Ralf Baechle <ralf(a)linux-mips.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[PATCH] iommu: dart: fix call_kern.cocci warnings
by Julia Lawall
From: kernel test robot <lkp(a)intel.com>
Function apple_dart_attach_stream called on line 519 inside
lock on line 509 but uses GFP_KERNEL
Generated by: scripts/coccinelle/locks/call_kern.cocci
Fixes: ce67d3b3ef37 ("iommu: dart: Add DART iommu driver")
CC: Sven Peter <sven(a)svenpeter.dev>
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: Julia Lawall <julia.lawall(a)inria.fr>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git hack/m1-pcie
head: 1fd2c9634dd24fba323baba52200de18e4d3f4ee
commit: ce67d3b3ef3734925631ec65deb1cf8078d826cf [14/15] iommu: dart: Add DART iommu driver
:::::: branch date: 8 hours ago
:::::: commit date: 8 hours ago
Please take the patch only if it's a positive warning. Thanks!
apple-dart-iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/iommu/apple-dart-iommu.c
+++ b/drivers/iommu/apple-dart-iommu.c
@@ -435,7 +435,7 @@ static int apple_dart_attach_stream(stru
goto error;
}
- stream = kzalloc(sizeof(*stream), GFP_KERNEL);
+ stream = kzalloc(sizeof(*stream), GFP_ATOMIC);
if (!stream) {
ret = -ENOMEM;
goto error;
1 year, 5 months
Re: [PATCH] RFC: media: v4l2-subdev: add subdev-wide config struct
by kernel test robot
Hi Tomi,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v5.12-rc6 next-20210409]
[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/Tomi-Valkeinen/RFC-media-v4l2-su...
base: git://linuxtv.org/media_tree.git master
config: parisc-randconfig-r003-20210409 (attached as .config)
compiler: hppa-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
# https://github.com/0day-ci/linux/commit/4690ebdd6fd3180366038788f7df1fa24...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Tomi-Valkeinen/RFC-media-v4l2-subdev-add-subdev-wide-config-struct/20210409-213822
git checkout 4690ebdd6fd3180366038788f7df1fa2420f00c9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
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/media/i2c/tda1997x.c: In function 'tda1997x_init_cfg':
>> drivers/media/i2c/tda1997x.c:1726:38: error: passing argument 2 of 'v4l2_subdev_get_try_format' from incompatible pointer type [-Werror=incompatible-pointer-types]
1726 | mf = v4l2_subdev_get_try_format(sd, cfg, 0);
| ^~~
| |
| struct v4l2_subdev_pad_config *
In file included from include/media/v4l2-device.h:13,
from drivers/media/i2c/tda1997x.c:20:
include/media/v4l2-subdev.h:957:34: note: expected 'struct v4l2_subdev_config *' but argument is of type 'struct v4l2_subdev_pad_config *'
957 | struct v4l2_subdev_config *cfg,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/media/i2c/tda1997x.c: In function 'tda1997x_get_format':
drivers/media/i2c/tda1997x.c:1778:40: error: passing argument 2 of 'v4l2_subdev_get_try_format' from incompatible pointer type [-Werror=incompatible-pointer-types]
1778 | fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
| ^~~
| |
| struct v4l2_subdev_pad_config *
In file included from include/media/v4l2-device.h:13,
from drivers/media/i2c/tda1997x.c:20:
include/media/v4l2-subdev.h:957:34: note: expected 'struct v4l2_subdev_config *' but argument is of type 'struct v4l2_subdev_pad_config *'
957 | struct v4l2_subdev_config *cfg,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/media/i2c/tda1997x.c: In function 'tda1997x_set_format':
drivers/media/i2c/tda1997x.c:1812:40: error: passing argument 2 of 'v4l2_subdev_get_try_format' from incompatible pointer type [-Werror=incompatible-pointer-types]
1812 | fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
| ^~~
| |
| struct v4l2_subdev_pad_config *
In file included from include/media/v4l2-device.h:13,
from drivers/media/i2c/tda1997x.c:20:
include/media/v4l2-subdev.h:957:34: note: expected 'struct v4l2_subdev_config *' but argument is of type 'struct v4l2_subdev_pad_config *'
957 | struct v4l2_subdev_config *cfg,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/media/i2c/tda1997x.c: At top level:
>> drivers/media/i2c/tda1997x.c:1911:14: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *)' [-Werror=incompatible-pointer-types]
1911 | .init_cfg = tda1997x_init_cfg,
| ^~~~~~~~~~~~~~~~~
drivers/media/i2c/tda1997x.c:1911:14: note: (near initialization for 'tda1997x_pad_ops.init_cfg')
>> drivers/media/i2c/tda1997x.c:1912:20: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_mbus_code_enum *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_mbus_code_enum *)' [-Werror=incompatible-pointer-types]
1912 | .enum_mbus_code = tda1997x_enum_mbus_code,
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/tda1997x.c:1912:20: note: (near initialization for 'tda1997x_pad_ops.enum_mbus_code')
>> drivers/media/i2c/tda1997x.c:1913:13: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
1913 | .get_fmt = tda1997x_get_format,
| ^~~~~~~~~~~~~~~~~~~
drivers/media/i2c/tda1997x.c:1913:13: note: (near initialization for 'tda1997x_pad_ops.get_fmt')
drivers/media/i2c/tda1997x.c:1914:13: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
1914 | .set_fmt = tda1997x_set_format,
| ^~~~~~~~~~~~~~~~~~~
drivers/media/i2c/tda1997x.c:1914:13: note: (near initialization for 'tda1997x_pad_ops.set_fmt')
cc1: some warnings being treated as errors
--
>> drivers/media/i2c/saa7115.c:1615:13: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
1615 | .set_fmt = saa711x_set_fmt,
| ^~~~~~~~~~~~~~~
drivers/media/i2c/saa7115.c:1615:13: note: (near initialization for 'saa711x_pad_ops.set_fmt')
cc1: some warnings being treated as errors
--
>> drivers/media/i2c/adv7170.c:325:20: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_mbus_code_enum *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_mbus_code_enum *)' [-Werror=incompatible-pointer-types]
325 | .enum_mbus_code = adv7170_enum_mbus_code,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/adv7170.c:325:20: note: (near initialization for 'adv7170_pad_ops.enum_mbus_code')
>> drivers/media/i2c/adv7170.c:326:13: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
326 | .get_fmt = adv7170_get_fmt,
| ^~~~~~~~~~~~~~~
drivers/media/i2c/adv7170.c:326:13: note: (near initialization for 'adv7170_pad_ops.get_fmt')
drivers/media/i2c/adv7170.c:327:13: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
327 | .set_fmt = adv7170_set_fmt,
| ^~~~~~~~~~~~~~~
drivers/media/i2c/adv7170.c:327:13: note: (near initialization for 'adv7170_pad_ops.set_fmt')
cc1: some warnings being treated as errors
--
drivers/media/i2c/adv7180.c: In function 'adv7180_get_pad_format':
>> drivers/media/i2c/adv7180.c:708:52: error: passing argument 2 of 'v4l2_subdev_get_try_format' from incompatible pointer type [-Werror=incompatible-pointer-types]
708 | format->format = *v4l2_subdev_get_try_format(sd, cfg, 0);
| ^~~
| |
| struct v4l2_subdev_pad_config *
In file included from include/media/v4l2-device.h:13,
from drivers/media/i2c/adv7180.c:20:
include/media/v4l2-subdev.h:957:34: note: expected 'struct v4l2_subdev_config *' but argument is of type 'struct v4l2_subdev_pad_config *'
957 | struct v4l2_subdev_config *cfg,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/media/i2c/adv7180.c: In function 'adv7180_set_pad_format':
drivers/media/i2c/adv7180.c:745:45: error: passing argument 2 of 'v4l2_subdev_get_try_format' from incompatible pointer type [-Werror=incompatible-pointer-types]
745 | framefmt = v4l2_subdev_get_try_format(sd, cfg, 0);
| ^~~
| |
| struct v4l2_subdev_pad_config *
In file included from include/media/v4l2-device.h:13,
from drivers/media/i2c/adv7180.c:20:
include/media/v4l2-subdev.h:957:34: note: expected 'struct v4l2_subdev_config *' but argument is of type 'struct v4l2_subdev_pad_config *'
957 | struct v4l2_subdev_config *cfg,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/media/i2c/adv7180.c: At top level:
>> drivers/media/i2c/adv7180.c:868:14: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *)' [-Werror=incompatible-pointer-types]
868 | .init_cfg = adv7180_init_cfg,
| ^~~~~~~~~~~~~~~~
drivers/media/i2c/adv7180.c:868:14: note: (near initialization for 'adv7180_pad_ops.init_cfg')
>> drivers/media/i2c/adv7180.c:869:20: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_mbus_code_enum *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_mbus_code_enum *)' [-Werror=incompatible-pointer-types]
869 | .enum_mbus_code = adv7180_enum_mbus_code,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/adv7180.c:869:20: note: (near initialization for 'adv7180_pad_ops.enum_mbus_code')
>> drivers/media/i2c/adv7180.c:870:13: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
870 | .set_fmt = adv7180_set_pad_format,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/adv7180.c:870:13: note: (near initialization for 'adv7180_pad_ops.set_fmt')
drivers/media/i2c/adv7180.c:871:13: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
871 | .get_fmt = adv7180_get_pad_format,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/adv7180.c:871:13: note: (near initialization for 'adv7180_pad_ops.get_fmt')
cc1: some warnings being treated as errors
--
>> drivers/media/i2c/adv7183.c:513:20: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_mbus_code_enum *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_mbus_code_enum *)' [-Werror=incompatible-pointer-types]
513 | .enum_mbus_code = adv7183_enum_mbus_code,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/adv7183.c:513:20: note: (near initialization for 'adv7183_pad_ops.enum_mbus_code')
>> drivers/media/i2c/adv7183.c:514:13: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
514 | .get_fmt = adv7183_get_fmt,
| ^~~~~~~~~~~~~~~
drivers/media/i2c/adv7183.c:514:13: note: (near initialization for 'adv7183_pad_ops.get_fmt')
drivers/media/i2c/adv7183.c:515:13: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
515 | .set_fmt = adv7183_set_fmt,
| ^~~~~~~~~~~~~~~
drivers/media/i2c/adv7183.c:515:13: note: (near initialization for 'adv7183_pad_ops.set_fmt')
cc1: some warnings being treated as errors
--
drivers/media/i2c/adv7842.c: In function 'adv7842_get_format':
>> drivers/media/i2c/adv7842.c:2095:40: error: passing argument 2 of 'v4l2_subdev_get_try_format' from incompatible pointer type [-Werror=incompatible-pointer-types]
2095 | fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
| ^~~
| |
| struct v4l2_subdev_pad_config *
In file included from include/media/v4l2-device.h:13,
from drivers/media/i2c/adv7842.c:30:
include/media/v4l2-subdev.h:957:34: note: expected 'struct v4l2_subdev_config *' but argument is of type 'struct v4l2_subdev_pad_config *'
957 | struct v4l2_subdev_config *cfg,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/media/i2c/adv7842.c: In function 'adv7842_set_format':
drivers/media/i2c/adv7842.c:2127:40: error: passing argument 2 of 'v4l2_subdev_get_try_format' from incompatible pointer type [-Werror=incompatible-pointer-types]
2127 | fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
| ^~~
| |
| struct v4l2_subdev_pad_config *
In file included from include/media/v4l2-device.h:13,
from drivers/media/i2c/adv7842.c:30:
include/media/v4l2-subdev.h:957:34: note: expected 'struct v4l2_subdev_config *' but argument is of type 'struct v4l2_subdev_pad_config *'
957 | struct v4l2_subdev_config *cfg,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/media/i2c/adv7842.c: At top level:
>> drivers/media/i2c/adv7842.c:3300:20: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_mbus_code_enum *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_mbus_code_enum *)' [-Werror=incompatible-pointer-types]
3300 | .enum_mbus_code = adv7842_enum_mbus_code,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/adv7842.c:3300:20: note: (near initialization for 'adv7842_pad_ops.enum_mbus_code')
>> drivers/media/i2c/adv7842.c:3301:13: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
3301 | .get_fmt = adv7842_get_format,
| ^~~~~~~~~~~~~~~~~~
drivers/media/i2c/adv7842.c:3301:13: note: (near initialization for 'adv7842_pad_ops.get_fmt')
drivers/media/i2c/adv7842.c:3302:13: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
3302 | .set_fmt = adv7842_set_format,
| ^~~~~~~~~~~~~~~~~~
drivers/media/i2c/adv7842.c:3302:13: note: (near initialization for 'adv7842_pad_ops.set_fmt')
cc1: some warnings being treated as errors
--
drivers/media/i2c/adv7511-v4l2.c: In function 'adv7511_get_fmt':
>> drivers/media/i2c/adv7511-v4l2.c:1264:40: error: passing argument 2 of 'v4l2_subdev_get_try_format' from incompatible pointer type [-Werror=incompatible-pointer-types]
1264 | fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
| ^~~
| |
| struct v4l2_subdev_pad_config *
In file included from include/media/v4l2-device.h:13,
from drivers/media/i2c/adv7511-v4l2.c:24:
include/media/v4l2-subdev.h:957:34: note: expected 'struct v4l2_subdev_config *' but argument is of type 'struct v4l2_subdev_pad_config *'
957 | struct v4l2_subdev_config *cfg,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/media/i2c/adv7511-v4l2.c: In function 'adv7511_set_fmt':
drivers/media/i2c/adv7511-v4l2.c:1319:40: error: passing argument 2 of 'v4l2_subdev_get_try_format' from incompatible pointer type [-Werror=incompatible-pointer-types]
1319 | fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
| ^~~
| |
| struct v4l2_subdev_pad_config *
In file included from include/media/v4l2-device.h:13,
from drivers/media/i2c/adv7511-v4l2.c:24:
include/media/v4l2-subdev.h:957:34: note: expected 'struct v4l2_subdev_config *' but argument is of type 'struct v4l2_subdev_pad_config *'
957 | struct v4l2_subdev_config *cfg,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/media/i2c/adv7511-v4l2.c: At top level:
>> drivers/media/i2c/adv7511-v4l2.c:1426:20: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_mbus_code_enum *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_mbus_code_enum *)' [-Werror=incompatible-pointer-types]
1426 | .enum_mbus_code = adv7511_enum_mbus_code,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/adv7511-v4l2.c:1426:20: note: (near initialization for 'adv7511_pad_ops.enum_mbus_code')
>> drivers/media/i2c/adv7511-v4l2.c:1427:13: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
1427 | .get_fmt = adv7511_get_fmt,
| ^~~~~~~~~~~~~~~
drivers/media/i2c/adv7511-v4l2.c:1427:13: note: (near initialization for 'adv7511_pad_ops.get_fmt')
drivers/media/i2c/adv7511-v4l2.c:1428:13: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
1428 | .set_fmt = adv7511_set_fmt,
| ^~~~~~~~~~~~~~~
drivers/media/i2c/adv7511-v4l2.c:1428:13: note: (near initialization for 'adv7511_pad_ops.set_fmt')
cc1: some warnings being treated as errors
--
drivers/media/i2c/tvp5150.c: In function 'tvp5150_get_pad_crop':
>> drivers/media/i2c/tvp5150.c:1038:49: error: passing argument 2 of 'v4l2_subdev_get_try_crop' from incompatible pointer type [-Werror=incompatible-pointer-types]
1038 | return v4l2_subdev_get_try_crop(&decoder->sd, cfg, pad);
| ^~~
| |
| struct v4l2_subdev_pad_config *
In file included from include/media/v4l2-device.h:13,
from drivers/media/i2c/tvp5150.c:19:
include/media/v4l2-subdev.h:975:32: note: expected 'struct v4l2_subdev_config *' but argument is of type 'struct v4l2_subdev_pad_config *'
975 | struct v4l2_subdev_config *cfg,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/media/i2c/tvp5150.c: At top level:
>> drivers/media/i2c/tvp5150.c:1733:14: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *)' [-Werror=incompatible-pointer-types]
1733 | .init_cfg = tvp5150_init_cfg,
| ^~~~~~~~~~~~~~~~
drivers/media/i2c/tvp5150.c:1733:14: note: (near initialization for 'tvp5150_pad_ops.init_cfg')
>> drivers/media/i2c/tvp5150.c:1734:20: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_mbus_code_enum *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_mbus_code_enum *)' [-Werror=incompatible-pointer-types]
1734 | .enum_mbus_code = tvp5150_enum_mbus_code,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/tvp5150.c:1734:20: note: (near initialization for 'tvp5150_pad_ops.enum_mbus_code')
>> drivers/media/i2c/tvp5150.c:1735:21: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_frame_size_enum *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_frame_size_enum *)' [-Werror=incompatible-pointer-types]
1735 | .enum_frame_size = tvp5150_enum_frame_size,
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/tvp5150.c:1735:21: note: (near initialization for 'tvp5150_pad_ops.enum_frame_size')
>> drivers/media/i2c/tvp5150.c:1736:13: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
1736 | .set_fmt = tvp5150_fill_fmt,
| ^~~~~~~~~~~~~~~~
drivers/media/i2c/tvp5150.c:1736:13: note: (near initialization for 'tvp5150_pad_ops.set_fmt')
drivers/media/i2c/tvp5150.c:1737:13: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
1737 | .get_fmt = tvp5150_fill_fmt,
| ^~~~~~~~~~~~~~~~
drivers/media/i2c/tvp5150.c:1737:13: note: (near initialization for 'tvp5150_pad_ops.get_fmt')
>> drivers/media/i2c/tvp5150.c:1738:19: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_selection *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_selection *)' [-Werror=incompatible-pointer-types]
1738 | .get_selection = tvp5150_get_selection,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/tvp5150.c:1738:19: note: (near initialization for 'tvp5150_pad_ops.get_selection')
drivers/media/i2c/tvp5150.c:1739:19: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_selection *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_selection *)' [-Werror=incompatible-pointer-types]
1739 | .set_selection = tvp5150_set_selection,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/tvp5150.c:1739:19: note: (near initialization for 'tvp5150_pad_ops.set_selection')
cc1: some warnings being treated as errors
--
>> drivers/media/i2c/tw9910.c:915:20: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_mbus_code_enum *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_mbus_code_enum *)' [-Werror=incompatible-pointer-types]
915 | .enum_mbus_code = tw9910_enum_mbus_code,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/tw9910.c:915:20: note: (near initialization for 'tw9910_subdev_pad_ops.enum_mbus_code')
>> drivers/media/i2c/tw9910.c:916:19: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_selection *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_selection *)' [-Werror=incompatible-pointer-types]
916 | .get_selection = tw9910_get_selection,
| ^~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/tw9910.c:916:19: note: (near initialization for 'tw9910_subdev_pad_ops.get_selection')
>> drivers/media/i2c/tw9910.c:917:13: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
917 | .get_fmt = tw9910_get_fmt,
| ^~~~~~~~~~~~~~
drivers/media/i2c/tw9910.c:917:13: note: (near initialization for 'tw9910_subdev_pad_ops.get_fmt')
drivers/media/i2c/tw9910.c:918:13: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
918 | .set_fmt = tw9910_set_fmt,
| ^~~~~~~~~~~~~~
drivers/media/i2c/tw9910.c:918:13: note: (near initialization for 'tw9910_subdev_pad_ops.set_fmt')
cc1: some warnings being treated as errors
--
>> drivers/media/i2c/ml86v7667.c:298:20: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_mbus_code_enum *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_mbus_code_enum *)' [-Werror=incompatible-pointer-types]
298 | .enum_mbus_code = ml86v7667_enum_mbus_code,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/ml86v7667.c:298:20: note: (near initialization for 'ml86v7667_subdev_pad_ops.enum_mbus_code')
>> drivers/media/i2c/ml86v7667.c:299:13: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
299 | .get_fmt = ml86v7667_fill_fmt,
| ^~~~~~~~~~~~~~~~~~
drivers/media/i2c/ml86v7667.c:299:13: note: (near initialization for 'ml86v7667_subdev_pad_ops.get_fmt')
drivers/media/i2c/ml86v7667.c:300:13: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
300 | .set_fmt = ml86v7667_fill_fmt,
| ^~~~~~~~~~~~~~~~~~
drivers/media/i2c/ml86v7667.c:300:13: note: (near initialization for 'ml86v7667_subdev_pad_ops.set_fmt')
cc1: some warnings being treated as errors
--
>> drivers/media/i2c/saa717x.c:1214:13: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
1214 | .set_fmt = saa717x_set_fmt,
| ^~~~~~~~~~~~~~~
drivers/media/i2c/saa717x.c:1214:13: note: (near initialization for 'saa717x_pad_ops.set_fmt')
cc1: some warnings being treated as errors
..
vim +/v4l2_subdev_get_try_format +1726 drivers/media/i2c/tda1997x.c
9ac0038db9a7e1 Tim Harvey 2018-02-15 1714
9ac0038db9a7e1 Tim Harvey 2018-02-15 1715
9ac0038db9a7e1 Tim Harvey 2018-02-15 1716 /* -----------------------------------------------------------------------------
9ac0038db9a7e1 Tim Harvey 2018-02-15 1717 * v4l2_subdev_pad_ops
9ac0038db9a7e1 Tim Harvey 2018-02-15 1718 */
9ac0038db9a7e1 Tim Harvey 2018-02-15 1719
9ac0038db9a7e1 Tim Harvey 2018-02-15 1720 static int tda1997x_init_cfg(struct v4l2_subdev *sd,
9ac0038db9a7e1 Tim Harvey 2018-02-15 1721 struct v4l2_subdev_pad_config *cfg)
9ac0038db9a7e1 Tim Harvey 2018-02-15 1722 {
9ac0038db9a7e1 Tim Harvey 2018-02-15 1723 struct tda1997x_state *state = to_state(sd);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1724 struct v4l2_mbus_framefmt *mf;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1725
9ac0038db9a7e1 Tim Harvey 2018-02-15 @1726 mf = v4l2_subdev_get_try_format(sd, cfg, 0);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1727 mf->code = state->mbus_codes[0];
9ac0038db9a7e1 Tim Harvey 2018-02-15 1728
9ac0038db9a7e1 Tim Harvey 2018-02-15 1729 return 0;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1730 }
9ac0038db9a7e1 Tim Harvey 2018-02-15 1731
9ac0038db9a7e1 Tim Harvey 2018-02-15 1732 static int tda1997x_enum_mbus_code(struct v4l2_subdev *sd,
9ac0038db9a7e1 Tim Harvey 2018-02-15 1733 struct v4l2_subdev_pad_config *cfg,
9ac0038db9a7e1 Tim Harvey 2018-02-15 1734 struct v4l2_subdev_mbus_code_enum *code)
9ac0038db9a7e1 Tim Harvey 2018-02-15 1735 {
9ac0038db9a7e1 Tim Harvey 2018-02-15 1736 struct tda1997x_state *state = to_state(sd);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1737
9ac0038db9a7e1 Tim Harvey 2018-02-15 1738 v4l_dbg(1, debug, state->client, "%s %d\n", __func__, code->index);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1739 if (code->index >= ARRAY_SIZE(state->mbus_codes))
9ac0038db9a7e1 Tim Harvey 2018-02-15 1740 return -EINVAL;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1741
9ac0038db9a7e1 Tim Harvey 2018-02-15 1742 if (!state->mbus_codes[code->index])
9ac0038db9a7e1 Tim Harvey 2018-02-15 1743 return -EINVAL;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1744
9ac0038db9a7e1 Tim Harvey 2018-02-15 1745 code->code = state->mbus_codes[code->index];
9ac0038db9a7e1 Tim Harvey 2018-02-15 1746
9ac0038db9a7e1 Tim Harvey 2018-02-15 1747 return 0;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1748 }
9ac0038db9a7e1 Tim Harvey 2018-02-15 1749
9ac0038db9a7e1 Tim Harvey 2018-02-15 1750 static void tda1997x_fill_format(struct tda1997x_state *state,
9ac0038db9a7e1 Tim Harvey 2018-02-15 1751 struct v4l2_mbus_framefmt *format)
9ac0038db9a7e1 Tim Harvey 2018-02-15 1752 {
9ac0038db9a7e1 Tim Harvey 2018-02-15 1753 const struct v4l2_bt_timings *bt;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1754
9ac0038db9a7e1 Tim Harvey 2018-02-15 1755 memset(format, 0, sizeof(*format));
9ac0038db9a7e1 Tim Harvey 2018-02-15 1756 bt = &state->timings.bt;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1757 format->width = bt->width;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1758 format->height = bt->height;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1759 format->colorspace = state->colorimetry.colorspace;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1760 format->field = (bt->interlaced) ?
9ac0038db9a7e1 Tim Harvey 2018-02-15 1761 V4L2_FIELD_SEQ_TB : V4L2_FIELD_NONE;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1762 }
9ac0038db9a7e1 Tim Harvey 2018-02-15 1763
9ac0038db9a7e1 Tim Harvey 2018-02-15 1764 static int tda1997x_get_format(struct v4l2_subdev *sd,
9ac0038db9a7e1 Tim Harvey 2018-02-15 1765 struct v4l2_subdev_pad_config *cfg,
9ac0038db9a7e1 Tim Harvey 2018-02-15 1766 struct v4l2_subdev_format *format)
9ac0038db9a7e1 Tim Harvey 2018-02-15 1767 {
9ac0038db9a7e1 Tim Harvey 2018-02-15 1768 struct tda1997x_state *state = to_state(sd);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1769
9ac0038db9a7e1 Tim Harvey 2018-02-15 1770 v4l_dbg(1, debug, state->client, "%s pad=%d which=%d\n",
9ac0038db9a7e1 Tim Harvey 2018-02-15 1771 __func__, format->pad, format->which);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1772
9ac0038db9a7e1 Tim Harvey 2018-02-15 1773 tda1997x_fill_format(state, &format->format);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1774
9ac0038db9a7e1 Tim Harvey 2018-02-15 1775 if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
9ac0038db9a7e1 Tim Harvey 2018-02-15 1776 struct v4l2_mbus_framefmt *fmt;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1777
9ac0038db9a7e1 Tim Harvey 2018-02-15 1778 fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1779 format->format.code = fmt->code;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1780 } else
9ac0038db9a7e1 Tim Harvey 2018-02-15 1781 format->format.code = state->mbus_code;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1782
9ac0038db9a7e1 Tim Harvey 2018-02-15 1783 return 0;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1784 }
9ac0038db9a7e1 Tim Harvey 2018-02-15 1785
9ac0038db9a7e1 Tim Harvey 2018-02-15 1786 static int tda1997x_set_format(struct v4l2_subdev *sd,
9ac0038db9a7e1 Tim Harvey 2018-02-15 1787 struct v4l2_subdev_pad_config *cfg,
9ac0038db9a7e1 Tim Harvey 2018-02-15 1788 struct v4l2_subdev_format *format)
9ac0038db9a7e1 Tim Harvey 2018-02-15 1789 {
9ac0038db9a7e1 Tim Harvey 2018-02-15 1790 struct tda1997x_state *state = to_state(sd);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1791 u32 code = 0;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1792 int i;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1793
9ac0038db9a7e1 Tim Harvey 2018-02-15 1794 v4l_dbg(1, debug, state->client, "%s pad=%d which=%d fmt=0x%x\n",
9ac0038db9a7e1 Tim Harvey 2018-02-15 1795 __func__, format->pad, format->which, format->format.code);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1796
9ac0038db9a7e1 Tim Harvey 2018-02-15 1797 for (i = 0; i < ARRAY_SIZE(state->mbus_codes); i++) {
9ac0038db9a7e1 Tim Harvey 2018-02-15 1798 if (format->format.code == state->mbus_codes[i]) {
9ac0038db9a7e1 Tim Harvey 2018-02-15 1799 code = state->mbus_codes[i];
9ac0038db9a7e1 Tim Harvey 2018-02-15 1800 break;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1801 }
9ac0038db9a7e1 Tim Harvey 2018-02-15 1802 }
9ac0038db9a7e1 Tim Harvey 2018-02-15 1803 if (!code)
9ac0038db9a7e1 Tim Harvey 2018-02-15 1804 code = state->mbus_codes[0];
9ac0038db9a7e1 Tim Harvey 2018-02-15 1805
9ac0038db9a7e1 Tim Harvey 2018-02-15 1806 tda1997x_fill_format(state, &format->format);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1807 format->format.code = code;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1808
9ac0038db9a7e1 Tim Harvey 2018-02-15 1809 if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
9ac0038db9a7e1 Tim Harvey 2018-02-15 1810 struct v4l2_mbus_framefmt *fmt;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1811
9ac0038db9a7e1 Tim Harvey 2018-02-15 1812 fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1813 *fmt = format->format;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1814 } else {
9ac0038db9a7e1 Tim Harvey 2018-02-15 1815 int ret = tda1997x_setup_format(state, format->format.code);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1816
9ac0038db9a7e1 Tim Harvey 2018-02-15 1817 if (ret)
9ac0038db9a7e1 Tim Harvey 2018-02-15 1818 return ret;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1819 /* mbus_code has changed - re-configure csc/vidout */
9ac0038db9a7e1 Tim Harvey 2018-02-15 1820 tda1997x_configure_csc(sd);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1821 tda1997x_configure_vidout(state);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1822 }
9ac0038db9a7e1 Tim Harvey 2018-02-15 1823
9ac0038db9a7e1 Tim Harvey 2018-02-15 1824 return 0;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1825 }
9ac0038db9a7e1 Tim Harvey 2018-02-15 1826
9ac0038db9a7e1 Tim Harvey 2018-02-15 1827 static int tda1997x_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
9ac0038db9a7e1 Tim Harvey 2018-02-15 1828 {
9ac0038db9a7e1 Tim Harvey 2018-02-15 1829 struct tda1997x_state *state = to_state(sd);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1830
9ac0038db9a7e1 Tim Harvey 2018-02-15 1831 v4l_dbg(1, debug, state->client, "%s pad=%d\n", __func__, edid->pad);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1832 memset(edid->reserved, 0, sizeof(edid->reserved));
9ac0038db9a7e1 Tim Harvey 2018-02-15 1833
9ac0038db9a7e1 Tim Harvey 2018-02-15 1834 if (edid->start_block == 0 && edid->blocks == 0) {
9ac0038db9a7e1 Tim Harvey 2018-02-15 1835 edid->blocks = state->edid.blocks;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1836 return 0;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1837 }
9ac0038db9a7e1 Tim Harvey 2018-02-15 1838
9ac0038db9a7e1 Tim Harvey 2018-02-15 1839 if (!state->edid.present)
9ac0038db9a7e1 Tim Harvey 2018-02-15 1840 return -ENODATA;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1841
9ac0038db9a7e1 Tim Harvey 2018-02-15 1842 if (edid->start_block >= state->edid.blocks)
9ac0038db9a7e1 Tim Harvey 2018-02-15 1843 return -EINVAL;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1844
9ac0038db9a7e1 Tim Harvey 2018-02-15 1845 if (edid->start_block + edid->blocks > state->edid.blocks)
9ac0038db9a7e1 Tim Harvey 2018-02-15 1846 edid->blocks = state->edid.blocks - edid->start_block;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1847
9ac0038db9a7e1 Tim Harvey 2018-02-15 1848 memcpy(edid->edid, state->edid.edid + edid->start_block * 128,
9ac0038db9a7e1 Tim Harvey 2018-02-15 1849 edid->blocks * 128);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1850
9ac0038db9a7e1 Tim Harvey 2018-02-15 1851 return 0;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1852 }
9ac0038db9a7e1 Tim Harvey 2018-02-15 1853
9ac0038db9a7e1 Tim Harvey 2018-02-15 1854 static int tda1997x_set_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
9ac0038db9a7e1 Tim Harvey 2018-02-15 1855 {
9ac0038db9a7e1 Tim Harvey 2018-02-15 1856 struct tda1997x_state *state = to_state(sd);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1857 int i;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1858
9ac0038db9a7e1 Tim Harvey 2018-02-15 1859 v4l_dbg(1, debug, state->client, "%s pad=%d\n", __func__, edid->pad);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1860 memset(edid->reserved, 0, sizeof(edid->reserved));
9ac0038db9a7e1 Tim Harvey 2018-02-15 1861
9ac0038db9a7e1 Tim Harvey 2018-02-15 1862 if (edid->start_block != 0)
9ac0038db9a7e1 Tim Harvey 2018-02-15 1863 return -EINVAL;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1864
9ac0038db9a7e1 Tim Harvey 2018-02-15 1865 if (edid->blocks == 0) {
9ac0038db9a7e1 Tim Harvey 2018-02-15 1866 state->edid.blocks = 0;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1867 state->edid.present = 0;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1868 tda1997x_disable_edid(sd);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1869 return 0;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1870 }
9ac0038db9a7e1 Tim Harvey 2018-02-15 1871
9ac0038db9a7e1 Tim Harvey 2018-02-15 1872 if (edid->blocks > 2) {
9ac0038db9a7e1 Tim Harvey 2018-02-15 1873 edid->blocks = 2;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1874 return -E2BIG;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1875 }
9ac0038db9a7e1 Tim Harvey 2018-02-15 1876
9ac0038db9a7e1 Tim Harvey 2018-02-15 1877 tda1997x_disable_edid(sd);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1878
9ac0038db9a7e1 Tim Harvey 2018-02-15 1879 /* write base EDID */
9ac0038db9a7e1 Tim Harvey 2018-02-15 1880 for (i = 0; i < 128; i++)
9ac0038db9a7e1 Tim Harvey 2018-02-15 1881 io_write(sd, REG_EDID_IN_BYTE0 + i, edid->edid[i]);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1882
9ac0038db9a7e1 Tim Harvey 2018-02-15 1883 /* write CEA Extension */
9ac0038db9a7e1 Tim Harvey 2018-02-15 1884 for (i = 0; i < 128; i++)
9ac0038db9a7e1 Tim Harvey 2018-02-15 1885 io_write(sd, REG_EDID_IN_BYTE128 + i, edid->edid[i+128]);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1886
0806bc0afbb415 Tim Harvey 2019-02-05 1887 /* store state */
0806bc0afbb415 Tim Harvey 2019-02-05 1888 memcpy(state->edid.edid, edid->edid, 256);
0806bc0afbb415 Tim Harvey 2019-02-05 1889 state->edid.blocks = edid->blocks;
0806bc0afbb415 Tim Harvey 2019-02-05 1890
9ac0038db9a7e1 Tim Harvey 2018-02-15 1891 tda1997x_enable_edid(sd);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1892
9ac0038db9a7e1 Tim Harvey 2018-02-15 1893 return 0;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1894 }
9ac0038db9a7e1 Tim Harvey 2018-02-15 1895
9ac0038db9a7e1 Tim Harvey 2018-02-15 1896 static int tda1997x_get_dv_timings_cap(struct v4l2_subdev *sd,
9ac0038db9a7e1 Tim Harvey 2018-02-15 1897 struct v4l2_dv_timings_cap *cap)
9ac0038db9a7e1 Tim Harvey 2018-02-15 1898 {
9ac0038db9a7e1 Tim Harvey 2018-02-15 1899 *cap = tda1997x_dv_timings_cap;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1900 return 0;
9ac0038db9a7e1 Tim Harvey 2018-02-15 1901 }
9ac0038db9a7e1 Tim Harvey 2018-02-15 1902
9ac0038db9a7e1 Tim Harvey 2018-02-15 1903 static int tda1997x_enum_dv_timings(struct v4l2_subdev *sd,
9ac0038db9a7e1 Tim Harvey 2018-02-15 1904 struct v4l2_enum_dv_timings *timings)
9ac0038db9a7e1 Tim Harvey 2018-02-15 1905 {
9ac0038db9a7e1 Tim Harvey 2018-02-15 1906 return v4l2_enum_dv_timings_cap(timings, &tda1997x_dv_timings_cap,
9ac0038db9a7e1 Tim Harvey 2018-02-15 1907 NULL, NULL);
9ac0038db9a7e1 Tim Harvey 2018-02-15 1908 }
9ac0038db9a7e1 Tim Harvey 2018-02-15 1909
9ac0038db9a7e1 Tim Harvey 2018-02-15 1910 static const struct v4l2_subdev_pad_ops tda1997x_pad_ops = {
9ac0038db9a7e1 Tim Harvey 2018-02-15 @1911 .init_cfg = tda1997x_init_cfg,
9ac0038db9a7e1 Tim Harvey 2018-02-15 @1912 .enum_mbus_code = tda1997x_enum_mbus_code,
9ac0038db9a7e1 Tim Harvey 2018-02-15 @1913 .get_fmt = tda1997x_get_format,
9ac0038db9a7e1 Tim Harvey 2018-02-15 1914 .set_fmt = tda1997x_set_format,
9ac0038db9a7e1 Tim Harvey 2018-02-15 1915 .get_edid = tda1997x_get_edid,
9ac0038db9a7e1 Tim Harvey 2018-02-15 1916 .set_edid = tda1997x_set_edid,
9ac0038db9a7e1 Tim Harvey 2018-02-15 1917 .dv_timings_cap = tda1997x_get_dv_timings_cap,
9ac0038db9a7e1 Tim Harvey 2018-02-15 1918 .enum_dv_timings = tda1997x_enum_dv_timings,
9ac0038db9a7e1 Tim Harvey 2018-02-15 1919 };
9ac0038db9a7e1 Tim Harvey 2018-02-15 1920
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH] RFC: media: v4l2-subdev: add subdev-wide config struct
by kernel test robot
Hi Tomi,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v5.12-rc6 next-20210409]
[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/Tomi-Valkeinen/RFC-media-v4l2-su...
base: git://linuxtv.org/media_tree.git master
config: m68k-allmodconfig (attached as .config)
compiler: m68k-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
# https://github.com/0day-ci/linux/commit/4690ebdd6fd3180366038788f7df1fa24...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Tomi-Valkeinen/RFC-media-v4l2-subdev-add-subdev-wide-config-struct/20210409-213822
git checkout 4690ebdd6fd3180366038788f7df1fa2420f00c9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/kernel.h:10,
from include/linux/delay.h:22,
from drivers/staging/media/imx/imx-ic-prpencvf.c:11:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:174:49: warning: ordered comparison of pointer with null pointer [-Wextra]
174 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:137:2: note: in expansion of macro 'BUG_ON'
137 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:137:10: note: in expansion of macro 'virt_addr_valid'
137 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
drivers/staging/media/imx/imx-ic-prpencvf.c: In function '__prp_get_fmt':
>> drivers/staging/media/imx/imx-ic-prpencvf.c:796:51: error: passing argument 2 of 'v4l2_subdev_get_try_format' from incompatible pointer type [-Werror=incompatible-pointer-types]
796 | return v4l2_subdev_get_try_format(&ic_priv->sd, cfg, pad);
| ^~~
| |
| struct v4l2_subdev_pad_config *
In file included from include/media/v4l2-device.h:13,
from drivers/staging/media/imx/imx-ic-prpencvf.c:19:
include/media/v4l2-subdev.h:957:34: note: expected 'struct v4l2_subdev_config *' but argument is of type 'struct v4l2_subdev_pad_config *'
957 | struct v4l2_subdev_config *cfg,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/staging/media/imx/imx-ic-prpencvf.c: At top level:
>> drivers/staging/media/imx/imx-ic-prpencvf.c:1300:14: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *)' [-Werror=incompatible-pointer-types]
1300 | .init_cfg = imx_media_init_cfg,
| ^~~~~~~~~~~~~~~~~~
drivers/staging/media/imx/imx-ic-prpencvf.c:1300:14: note: (near initialization for 'prp_pad_ops.init_cfg')
>> drivers/staging/media/imx/imx-ic-prpencvf.c:1301:20: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_mbus_code_enum *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_mbus_code_enum *)' [-Werror=incompatible-pointer-types]
1301 | .enum_mbus_code = prp_enum_mbus_code,
| ^~~~~~~~~~~~~~~~~~
drivers/staging/media/imx/imx-ic-prpencvf.c:1301:20: note: (near initialization for 'prp_pad_ops.enum_mbus_code')
>> drivers/staging/media/imx/imx-ic-prpencvf.c:1302:21: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_frame_size_enum *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_frame_size_enum *)' [-Werror=incompatible-pointer-types]
1302 | .enum_frame_size = prp_enum_frame_size,
| ^~~~~~~~~~~~~~~~~~~
drivers/staging/media/imx/imx-ic-prpencvf.c:1302:21: note: (near initialization for 'prp_pad_ops.enum_frame_size')
drivers/staging/media/imx/imx-ic-prpencvf.c:1303:13: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
1303 | .get_fmt = prp_get_fmt,
| ^~~~~~~~~~~
drivers/staging/media/imx/imx-ic-prpencvf.c:1303:13: note: (near initialization for 'prp_pad_ops.get_fmt')
drivers/staging/media/imx/imx-ic-prpencvf.c:1304:13: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
1304 | .set_fmt = prp_set_fmt,
| ^~~~~~~~~~~
drivers/staging/media/imx/imx-ic-prpencvf.c:1304:13: note: (near initialization for 'prp_pad_ops.set_fmt')
cc1: some warnings being treated as errors
--
In file included from include/linux/dev_printk.h:14,
from include/linux/device.h:15,
from drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c:9:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:174:49: warning: ordered comparison of pointer with null pointer [-Wextra]
174 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:137:2: note: in expansion of macro 'BUG_ON'
137 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:137:10: note: in expansion of macro 'virt_addr_valid'
137 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c: In function 'sun4i_csi_subdev_init_cfg':
>> drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c:276:43: error: passing argument 2 of 'v4l2_subdev_get_try_format' from incompatible pointer type [-Werror=incompatible-pointer-types]
276 | fmt = v4l2_subdev_get_try_format(subdev, cfg, CSI_SUBDEV_SINK);
| ^~~
| |
| struct v4l2_subdev_pad_config *
In file included from include/media/v4l2-mc.h:15,
from drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c:13:
include/media/v4l2-subdev.h:957:34: note: expected 'struct v4l2_subdev_config *' but argument is of type 'struct v4l2_subdev_pad_config *'
957 | struct v4l2_subdev_config *cfg,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c: In function 'sun4i_csi_subdev_get_fmt':
drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c:290:51: error: passing argument 2 of 'v4l2_subdev_get_try_format' from incompatible pointer type [-Werror=incompatible-pointer-types]
290 | subdev_fmt = v4l2_subdev_get_try_format(subdev, cfg, fmt->pad);
| ^~~
| |
| struct v4l2_subdev_pad_config *
In file included from include/media/v4l2-mc.h:15,
from drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c:13:
include/media/v4l2-subdev.h:957:34: note: expected 'struct v4l2_subdev_config *' but argument is of type 'struct v4l2_subdev_pad_config *'
957 | struct v4l2_subdev_config *cfg,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c: In function 'sun4i_csi_subdev_set_fmt':
drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c:307:51: error: passing argument 2 of 'v4l2_subdev_get_try_format' from incompatible pointer type [-Werror=incompatible-pointer-types]
307 | subdev_fmt = v4l2_subdev_get_try_format(subdev, cfg, fmt->pad);
| ^~~
| |
| struct v4l2_subdev_pad_config *
In file included from include/media/v4l2-mc.h:15,
from drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c:13:
include/media/v4l2-subdev.h:957:34: note: expected 'struct v4l2_subdev_config *' but argument is of type 'struct v4l2_subdev_pad_config *'
957 | struct v4l2_subdev_config *cfg,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c: At top level:
>> drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c:339:14: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *)' [-Werror=incompatible-pointer-types]
339 | .init_cfg = sun4i_csi_subdev_init_cfg,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c:339:14: note: (near initialization for 'sun4i_csi_subdev_pad_ops.init_cfg')
>> drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c:340:13: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
340 | .get_fmt = sun4i_csi_subdev_get_fmt,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c:340:13: note: (near initialization for 'sun4i_csi_subdev_pad_ops.get_fmt')
drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c:341:13: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_format *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_format *)' [-Werror=incompatible-pointer-types]
341 | .set_fmt = sun4i_csi_subdev_set_fmt,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c:341:13: note: (near initialization for 'sun4i_csi_subdev_pad_ops.set_fmt')
>> drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c:342:20: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_config *, struct v4l2_subdev_mbus_code_enum *)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_pad_config *, struct v4l2_subdev_mbus_code_enum *)' [-Werror=incompatible-pointer-types]
342 | .enum_mbus_code = sun4i_csi_subdev_enum_mbus_code,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c:342:20: note: (near initialization for 'sun4i_csi_subdev_pad_ops.enum_mbus_code')
cc1: some warnings being treated as errors
vim +/v4l2_subdev_get_try_format +796 drivers/staging/media/imx/imx-ic-prpencvf.c
f0d9c8924e2c33 Steve Longerbeam 2017-06-07 788
f0d9c8924e2c33 Steve Longerbeam 2017-06-07 789 static struct v4l2_mbus_framefmt *
f0d9c8924e2c33 Steve Longerbeam 2017-06-07 790 __prp_get_fmt(struct prp_priv *priv, struct v4l2_subdev_pad_config *cfg,
f0d9c8924e2c33 Steve Longerbeam 2017-06-07 791 unsigned int pad, enum v4l2_subdev_format_whence which)
f0d9c8924e2c33 Steve Longerbeam 2017-06-07 792 {
f0d9c8924e2c33 Steve Longerbeam 2017-06-07 793 struct imx_ic_priv *ic_priv = priv->ic_priv;
f0d9c8924e2c33 Steve Longerbeam 2017-06-07 794
f0d9c8924e2c33 Steve Longerbeam 2017-06-07 795 if (which == V4L2_SUBDEV_FORMAT_TRY)
f0d9c8924e2c33 Steve Longerbeam 2017-06-07 @796 return v4l2_subdev_get_try_format(&ic_priv->sd, cfg, pad);
f0d9c8924e2c33 Steve Longerbeam 2017-06-07 797 else
f0d9c8924e2c33 Steve Longerbeam 2017-06-07 798 return &priv->format_mbus[pad];
f0d9c8924e2c33 Steve Longerbeam 2017-06-07 799 }
f0d9c8924e2c33 Steve Longerbeam 2017-06-07 800
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months