[superna9999:amlogic/v5.17/g12-dsi 6/7] drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:58:16: error: use of undeclared identifier 'encoder_dsi'
by kernel test robot
tree: https://github.com/superna9999/linux amlogic/v5.17/g12-dsi
head: cc44c3ce92a63f2c59a3f0ac03e6defd41542940
commit: 02c9727464cf0ef4cebca0197a0f7395be6371f7 [6/7] fixup! drm/meson: add support for MIPI-DSI transceiver
config: arm-randconfig-r034-20211210 (https://download.01.org/0day-ci/archive/20211210/202112101635.GITAhfmQ-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 097a1cb1d5ebb3a0ec4bcaed8ba3ff6a8e33c00a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/superna9999/linux/commit/02c9727464cf0ef4cebca0197a0f7...
git remote add superna9999 https://github.com/superna9999/linux
git fetch --no-tags superna9999 amlogic/v5.17/g12-dsi
git checkout 02c9727464cf0ef4cebca0197a0f7395be6371f7
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/gpu/drm/meson/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
>> drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:58:16: error: use of undeclared identifier 'encoder_dsi'
phy_configure(encoder_dsi->phy, &mipi_dsi->phy_opts);
^
>> drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:68:2: error: implicit declaration of function 'meson_dw_mipi_dsi_hw_init' [-Werror,-Wimplicit-function-declaration]
meson_dw_mipi_dsi_hw_init(mipi_dsi);
^
drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:68:2: note: did you mean 'dw_mipi_dsi_phy_init'?
drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:51:12: note: 'dw_mipi_dsi_phy_init' declared here
static int dw_mipi_dsi_phy_init(void *priv_data)
^
>> drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:72:21: error: use of undeclared identifier 'COLOR_24BIT'
dpi_data_format = COLOR_24BIT;
^
>> drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:73:21: error: use of undeclared identifier 'MIPI_DSI_VENC_COLOR_24B'
venc_data_width = MIPI_DSI_VENC_COLOR_24B;
^
>> drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:76:21: error: use of undeclared identifier 'COLOR_18BIT_CFG_2'
dpi_data_format = COLOR_18BIT_CFG_2;
^
>> drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:77:21: error: use of undeclared identifier 'MIPI_DSI_VENC_COLOR_18B'
venc_data_width = MIPI_DSI_VENC_COLOR_18B;
^
>> drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:70:10: warning: enumeration values 'MIPI_DSI_FMT_RGB666_PACKED' and 'MIPI_DSI_FMT_RGB565' not handled in switch [-Wswitch]
switch (mipi_dsi->dsi_device->format) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:89:4: error: too many arguments provided to function-like macro invocation
mipi_dsi->base + MIPI_DSI_TOP_CNTL);
^
arch/arm/include/asm/io.h:300:9: note: macro 'writel_relaxed' defined here
#define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c)
^
>> drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:82:2: error: use of undeclared identifier 'writel_relaxed'
writel_relaxed((dpi_data_format << BIT_DPI_COLOR_MODE) |
^
>> drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:111:17: error: assigning to 'struct drm_display_mode *' from 'const struct drm_display_mode *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
mipi_dsi->mode = mode;
^ ~~~~
>> drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:113:8: error: implicit declaration of function 'encoder_dsi_pixel_format_to_bpp' [-Werror,-Wimplicit-function-declaration]
bpp = encoder_dsi_pixel_format_to_bpp(mipi_dsi->dsi_device->format);
^
drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:113:8: note: did you mean 'mipi_dsi_pixel_format_to_bpp'?
include/drm/drm_mipi_dsi.h:209:19: note: 'mipi_dsi_pixel_format_to_bpp' declared here
static inline int mipi_dsi_pixel_format_to_bpp(enum mipi_dsi_pixel_format fmt)
^
drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:116:12: error: use of undeclared identifier 'encoder_dsi'
bpp, encoder_dsi->dsi_device->lanes,
^
drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:161:6: warning: unused variable 'ret' [-Wunused-variable]
int ret;
^
drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:160:22: warning: unused variable 'encoder' [-Wunused-variable]
struct drm_encoder *encoder;
^
>> drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:176:13: error: static declaration of 'meson_dw_mipi_dsi_hw_init' follows non-static declaration
static void meson_dw_mipi_dsi_hw_init(struct meson_dw_mipi_dsi *mipi_dsi)
^
drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:68:2: note: previous implicit declaration is here
meson_dw_mipi_dsi_hw_init(mipi_dsi);
^
>> drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:200:2: error: implicit declaration of function 'witch' [-Werror,-Wimplicit-function-declaration]
witch (device->format) {
^
>> drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:200:24: error: expected ';' after expression
witch (device->format) {
^
;
>> drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:201:2: error: 'case' statement not in switch statement
case MIPI_DSI_FMT_RGB888:
^
>> drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:202:3: error: use of undeclared identifier 'dpi_data_format'
dpi_data_format = COLOR_24BIT;
^
drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:202:21: error: use of undeclared identifier 'COLOR_24BIT'
dpi_data_format = COLOR_24BIT;
^
>> drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:203:3: error: use of undeclared identifier 'venc_data_width'
venc_data_width = MIPI_DSI_VENC_COLOR_24B;
^
drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:203:21: error: use of undeclared identifier 'MIPI_DSI_VENC_COLOR_24B'
venc_data_width = MIPI_DSI_VENC_COLOR_24B;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
3 warnings and 20 errors generated.
vim +/encoder_dsi +58 drivers/gpu/drm/meson/meson_dw_mipi_dsi.c
47
48 #define encoder_to_meson_dw_mipi_dsi(x) \
49 container_of(x, struct meson_dw_mipi_dsi, encoder)
50
51 static int dw_mipi_dsi_phy_init(void *priv_data)
52 {
53 struct meson_dw_mipi_dsi *mipi_dsi = priv_data;
54 unsigned int dpi_data_format, venc_data_width;
55 struct meson_drm *priv = mipi_dsi->priv;
56 int ret;
57
> 58 phy_configure(encoder_dsi->phy, &mipi_dsi->phy_opts);
59
60 ret = clk_set_rate(mipi_dsi->px_clk, mipi_dsi->phy_opts.mipi_dphy.hs_clk_rate);
61 if (ret) {
62 pr_err("Failed to set DSI PLL rate %lu\n",
63 mipi_dsi->phy_opts.mipi_dphy.hs_clk_rate);
64
65 return ret;
66 }
67
> 68 meson_dw_mipi_dsi_hw_init(mipi_dsi);
69
> 70 switch (mipi_dsi->dsi_device->format) {
71 case MIPI_DSI_FMT_RGB888:
> 72 dpi_data_format = COLOR_24BIT;
> 73 venc_data_width = MIPI_DSI_VENC_COLOR_24B;
74 break;
75 case MIPI_DSI_FMT_RGB666:
> 76 dpi_data_format = COLOR_18BIT_CFG_2;
> 77 venc_data_width = MIPI_DSI_VENC_COLOR_18B;
78 break;
79 };
80
81 /* Configure color format for DPI register */
> 82 writel_relaxed((dpi_data_format << BIT_DPI_COLOR_MODE) |
83 (venc_data_width << BIT_IN_COLOR_MODE) |
84 0 << BIT_COMP0_SEL |
85 1 << BIT_COMP1_SEL |
86 2 << BIT_COMP2_SEL,
87 (mipi_dsi->mode->flags & DRM_MODE_FLAG_NHSYNC ? 0 : BIT(BIT_HSYNC_POL)) |
88 (mipi_dsi->mode->flags & DRM_MODE_FLAG_NVSYNC ? 0 : BIT(BIT_VSYNC_POL)),
> 89 mipi_dsi->base + MIPI_DSI_TOP_CNTL);
90
91 phy_power_on(mipi_dsi->phy);
92
93 return 0;
94 }
95
96 static void dw_mipi_dsi_phy_power_off(void *priv_data)
97 {
98 struct meson_dw_mipi_dsi *mipi_dsi = priv_data;
99
100 phy_power_off(mipi_dsi->phy);
101 }
102
103 static int
104 dw_mipi_dsi_get_lane_mbps(void *priv_data, const struct drm_display_mode *mode,
105 unsigned long mode_flags, u32 lanes, u32 format,
106 unsigned int *lane_mbps)
107 {
108 struct meson_dw_mipi_dsi *mipi_dsi = priv_data;
109 int bpp;
110
> 111 mipi_dsi->mode = mode;
112
> 113 bpp = encoder_dsi_pixel_format_to_bpp(mipi_dsi->dsi_device->format);
114
115 phy_mipi_dphy_get_default_config(mode->clock * 1000,
116 bpp, encoder_dsi->dsi_device->lanes,
117 &mipi_dsi->phy_opts.mipi_dphy);
118
119 *lane_mbps = mipi_dsi->phy_opts.mipi_dphy.hs_clk_rate / 1000000;
120
121 return 0;
122 }
123
124 static int
125 dw_mipi_dsi_phy_get_timing(void *priv_data, unsigned int lane_mbps,
126 struct dw_mipi_dsi_dphy_timing *timing)
127 {
128 /* TOFIX handle other cases */
129
130 timing->clk_lp2hs = 37;
131 timing->clk_hs2lp = 135;
132 timing->data_lp2hs = 50;
133 timing->data_hs2lp = 3;
134
135 return 0;
136 }
137
138 static int
139 dw_mipi_dsi_get_esc_clk_rate(void *priv_data, unsigned int *esc_clk_rate)
140 {
141 *esc_clk_rate = 4; /* Mhz */
142
143 return 0;
144 }
145
146 static const struct dw_mipi_dsi_phy_ops meson_dw_mipi_dsi_phy_ops = {
147 .init = dw_mipi_dsi_phy_init,
148 .power_off = dw_mipi_dsi_phy_power_off,
149 .get_lane_mbps = dw_mipi_dsi_get_lane_mbps,
150 .get_timing = dw_mipi_dsi_phy_get_timing,
151 .get_esc_clk_rate = dw_mipi_dsi_get_esc_clk_rate,
152 };
153
154 static int meson_dw_mipi_dsi_bind(struct device *dev, struct device *master,
155 void *data)
156 {
157 struct meson_dw_mipi_dsi *mipi_dsi = dev_get_drvdata(dev);
158 struct drm_device *drm = data;
159 struct meson_drm *priv = drm->dev_private;
160 struct drm_encoder *encoder;
161 int ret;
162
163 /* Check before if we are supposed to have a sub-device... */
164 if (!mipi_dsi->dsi_device)
165 return -EPROBE_DEFER;
166
167 mipi_dsi->priv = priv;
168
169 return 0;
170 }
171
172 static const struct component_ops meson_dw_mipi_dsi_ops = {
173 .bind = meson_dw_mipi_dsi_bind,
174 };
175
> 176 static void meson_dw_mipi_dsi_hw_init(struct meson_dw_mipi_dsi *mipi_dsi)
177 {
178 writel_relaxed((1 << 4) | (1 << 5) | (0 << 6),
179 mipi_dsi->base + MIPI_DSI_TOP_CNTL);
180
181 writel_bits_relaxed(0xf, 0xf,
182 mipi_dsi->base + MIPI_DSI_TOP_SW_RESET);
183 writel_bits_relaxed(0xf, 0,
184 mipi_dsi->base + MIPI_DSI_TOP_SW_RESET);
185
186 writel_bits_relaxed(0x3, 0x3,
187 mipi_dsi->base + MIPI_DSI_TOP_CLK_CNTL);
188
189 writel_relaxed(0, mipi_dsi->base + MIPI_DSI_TOP_MEM_PD);
190 }
191
192 static int meson_dw_mipi_dsi_host_attach(void *priv_data,
193 struct mipi_dsi_device *device)
194 {
195 struct meson_dw_mipi_dsi *mipi_dsi = priv_data;
196 u32 reg;
197
198 mipi_dsi->dsi_device = device;
199
> 200 witch (device->format) {
> 201 case MIPI_DSI_FMT_RGB888:
> 202 dpi_data_format = COLOR_24BIT;
> 203 venc_data_width = MIPI_DSI_VENC_COLOR_24B;
204 break;
205 case MIPI_DSI_FMT_RGB666:
206 dpi_data_format = COLOR_18BIT_CFG_2;
207 venc_data_width = MIPI_DSI_VENC_COLOR_18B;
208 break;
209 case MIPI_DSI_FMT_RGB666_PACKED:
210 case MIPI_DSI_FMT_RGB565:
211 DRM_DEV_ERROR(mipi_dsi->dev, "invalid pixel format %d\n", device->format);
212 return -EINVAL;
213 };
214
215 phy_init(mipi_dsi->phy);
216
217 return 0;
218 }
219
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 2 weeks
[jlayton:ceph-fscrypt-content 50/51] fs/ceph/file.c:1710:31: error: too many arguments to function 'ceph_fscrypt_encrypt_pages'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git ceph-fscrypt-content
head: a7bdf8275eeb05b44be3426ce23ac0e99791ab80
commit: 81588e00b89cb14beb905a04b84198f99f5db059 [50/51] ceph: add read/modify/write to ceph_sync_write
config: arm64-buildonly-randconfig-r003-20211210 (https://download.01.org/0day-ci/archive/20211210/202112101601.2Bb6e4oM-lk...)
compiler: aarch64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git/commit/...
git remote add jlayton https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git
git fetch --no-tags jlayton ceph-fscrypt-content
git checkout 81588e00b89cb14beb905a04b84198f99f5db059
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash fs/ceph/
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 >>):
fs/ceph/file.c: In function 'ceph_sync_write':
>> fs/ceph/file.c:1710:31: error: too many arguments to function 'ceph_fscrypt_encrypt_pages'
1710 | ret = ceph_fscrypt_encrypt_pages(inode, pages,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from fs/ceph/super.h:29,
from fs/ceph/file.c:16:
fs/ceph/crypto.h:213:19: note: declared here
213 | static inline int ceph_fscrypt_encrypt_pages(struct inode *inode, struct page **page,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
At top level:
fs/ceph/file.c:1283:1: warning: 'ceph_direct_read_write' defined but not used [-Wunused-function]
1283 | ceph_direct_read_write(struct kiocb *iocb, struct iov_iter *iter,
| ^~~~~~~~~~~~~~~~~~~~~~
vim +/ceph_fscrypt_encrypt_pages +1710 fs/ceph/file.c
1485
1486 /*
1487 * Synchronous write, straight from __user pointer or user pages.
1488 *
1489 * If write spans object boundary, just do multiple writes. (For a
1490 * correct atomic write, we should e.g. take write locks on all
1491 * objects, rollback on failure, etc.)
1492 */
1493 static ssize_t
1494 ceph_sync_write(struct kiocb *iocb, struct iov_iter *from, loff_t pos,
1495 struct ceph_snap_context *snapc)
1496 {
1497 struct file *file = iocb->ki_filp;
1498 struct inode *inode = file_inode(file);
1499 struct ceph_inode_info *ci = ceph_inode(inode);
1500 struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
1501 struct ceph_osd_client *osdc = &fsc->client->osdc;
1502 struct ceph_osd_request *req;
1503 struct page **pages;
1504 u64 len;
1505 int num_pages;
1506 int written = 0;
1507 int ret;
1508 bool check_caps = false;
1509 struct timespec64 mtime = current_time(inode);
1510 size_t count = iov_iter_count(from);
1511
1512 if (ceph_snap(file_inode(file)) != CEPH_NOSNAP)
1513 return -EROFS;
1514
1515 dout("sync_write on file %p %lld~%u snapc %p seq %lld\n",
1516 file, pos, (unsigned)count, snapc, snapc->seq);
1517
1518 ret = filemap_write_and_wait_range(inode->i_mapping,
1519 pos, pos + count - 1);
1520 if (ret < 0)
1521 return ret;
1522
1523 ret = invalidate_inode_pages2_range(inode->i_mapping,
1524 pos >> PAGE_SHIFT,
1525 (pos + count - 1) >> PAGE_SHIFT);
1526 if (ret < 0)
1527 dout("invalidate_inode_pages2_range returned %d\n", ret);
1528
1529 while ((len = iov_iter_count(from)) > 0) {
1530 size_t left;
1531 int n;
1532 u64 write_pos = pos;
1533 u64 write_len;
1534 u64 objnum, objoff;
1535 u32 objlen;
1536 u64 assert_ver;
1537 bool rmw;
1538 struct iov_iter saved_iter = *from;
1539 size_t off;
1540
1541 /* clamp the length to the end of first object */
1542 ceph_calc_file_object_mapping(&ci->i_layout, pos, len,
1543 &objnum, &objoff, &objlen);
1544 if (objlen < len)
1545 len = objlen;
1546
1547 write_len = len;
1548 fscrypt_adjust_off_and_len(inode, &write_pos, &write_len);
1549
1550 /*
1551 * If we had to adjust the length or position to align with a
1552 * crypto block, then we must do a read/modify/write cycle. We
1553 * use a version assertion to redrive the thing if something
1554 * changes in between.
1555 */
1556 rmw = (pos != write_pos || len != write_len);
1557
1558 /*
1559 * The data is emplaced into the page as it would be if it were in
1560 * an array of pagecache pages.
1561 */
1562 num_pages = calc_pages_for(write_pos, write_len);
1563 pages = ceph_alloc_page_vector(num_pages, GFP_KERNEL);
1564 if (IS_ERR(pages)) {
1565 ret = PTR_ERR(pages);
1566 break;
1567 }
1568
1569 /* Do we need to preload the pages? */
1570 if (rmw) {
1571 u64 first_pos = write_pos;
1572 u64 last_pos = (write_pos + write_len) - CEPH_FSCRYPT_BLOCK_SIZE;
1573 u64 read_len = CEPH_FSCRYPT_BLOCK_SIZE;
1574 bool first = (pos != write_pos);
1575 bool last = (len != write_len && first_pos != last_pos);
1576
1577 /* We should only need to do this for encrypted inodes */
1578 WARN_ON_ONCE(!IS_ENCRYPTED(inode));
1579
1580 /*
1581 * Allocate a read request for one or two extents, depending
1582 * on how the request was aligned.
1583 */
1584 req = ceph_osdc_new_request(osdc, &ci->i_layout,
1585 ci->i_vino, first ? first_pos : last_pos,
1586 &read_len, 0, (first && last) ? 2 : 1,
1587 CEPH_OSD_OP_READ, CEPH_OSD_FLAG_READ,
1588 NULL, ci->i_truncate_seq,
1589 ci->i_truncate_size, false);
1590 if (IS_ERR(req)) {
1591 ceph_release_page_vector(pages, num_pages);
1592 ret = PTR_ERR(req);
1593 break;
1594 }
1595
1596 /* Something is misaligned! */
1597 if (read_len != CEPH_FSCRYPT_BLOCK_SIZE) {
1598 ret = -EIO;
1599 break;
1600 }
1601
1602 /* Add extent for first block? */
1603 if (first)
1604 osd_req_op_extent_osd_data_pages(req, 0, pages,
1605 CEPH_FSCRYPT_BLOCK_SIZE,
1606 offset_in_page(first_pos),
1607 false, false);
1608
1609 /* Add extent for last block */
1610 if (last) {
1611 /* Init the other extent if first extent has been used */
1612 if (first) {
1613 osd_req_op_extent_init(req, 1, CEPH_OSD_OP_READ,
1614 last_pos, read_len,
1615 ci->i_truncate_size,
1616 ci->i_truncate_seq);
1617 }
1618
1619 osd_req_op_extent_osd_data_pages(req, first ? 1 : 0,
1620 &pages[num_pages - 1],
1621 CEPH_FSCRYPT_BLOCK_SIZE,
1622 offset_in_page(last_pos),
1623 false, false);
1624 }
1625
1626 ret = ceph_osdc_start_request(osdc, req, false);
1627 if (!ret)
1628 ret = ceph_osdc_wait_request(osdc, req);
1629
1630 /* FIXME: length field is wrong if there are 2 extents */
1631 ceph_update_read_metrics(&fsc->mdsc->metric,
1632 req->r_start_latency,
1633 req->r_end_latency,
1634 read_len, ret);
1635
1636 /* Ok if object is not already present */
1637 if (ret == -ENOENT) {
1638 /*
1639 * If there is no object, then we can't assert
1640 * on its version. Clear rmw so that we don't try.
1641 */
1642 ceph_osdc_put_request(req);
1643 rmw = false;
1644 ret = 0;
1645
1646 /*
1647 * zero out the soon-to-be uncopied parts of the
1648 * first and last pages.
1649 */
1650 if (first)
1651 zero_user_segment(pages[0], 0,
1652 offset_in_page(first_pos));
1653 if (last)
1654 zero_user_segment(pages[num_pages - 1],
1655 offset_in_page(last_pos),
1656 PAGE_SIZE);
1657 } else {
1658 /* Grab assert version. It must be non-zero. */
1659 assert_ver = req->r_version;
1660 WARN_ON_ONCE(assert_ver == 0);
1661
1662 ceph_osdc_put_request(req);
1663 if (ret < 0) {
1664 ceph_release_page_vector(pages, num_pages);
1665 break;
1666 }
1667
1668 if (first) {
1669 ret = ceph_fscrypt_decrypt_block_inplace(inode,
1670 pages[0],
1671 CEPH_FSCRYPT_BLOCK_SIZE,
1672 offset_in_page(first_pos),
1673 first_pos >> CEPH_FSCRYPT_BLOCK_SHIFT);
1674 if (ret)
1675 break;
1676 }
1677 if (last) {
1678 ret = ceph_fscrypt_decrypt_block_inplace(inode,
1679 pages[num_pages - 1],
1680 CEPH_FSCRYPT_BLOCK_SIZE,
1681 offset_in_page(last_pos),
1682 last_pos >> CEPH_FSCRYPT_BLOCK_SHIFT);
1683 if (ret)
1684 break;
1685 }
1686 }
1687 }
1688
1689 left = len;
1690 off = offset_in_page(pos);
1691 for (n = 0; n < num_pages; n++) {
1692 size_t plen = min_t(size_t, left, PAGE_SIZE - off);
1693
1694 /* copy the data */
1695 ret = copy_page_from_iter(pages[n], off, plen, from);
1696 if (ret != plen) {
1697 ret = -EFAULT;
1698 break;
1699 }
1700 off = 0;
1701 left -= ret;
1702 }
1703 if (ret < 0) {
1704 dout("sync_write write failed with %d\n", ret);
1705 ceph_release_page_vector(pages, num_pages);
1706 break;
1707 }
1708
1709 if (IS_ENCRYPTED(inode)) {
> 1710 ret = ceph_fscrypt_encrypt_pages(inode, pages,
1711 offset_in_page(write_pos),
1712 write_len, GFP_KERNEL);
1713 if (ret < 0) {
1714 dout("encryption failed with %d\n", ret);
1715 break;
1716 }
1717 }
1718
1719 req = ceph_osdc_new_request(osdc, &ci->i_layout,
1720 ci->i_vino, write_pos, &write_len,
1721 rmw ? 1 : 0, rmw ? 2 : 1,
1722 CEPH_OSD_OP_WRITE,
1723 CEPH_OSD_FLAG_WRITE,
1724 snapc, ci->i_truncate_seq,
1725 ci->i_truncate_size, false);
1726 if (IS_ERR(req)) {
1727 ret = PTR_ERR(req);
1728 ceph_release_page_vector(pages, num_pages);
1729 break;
1730 }
1731
1732 osd_req_op_extent_osd_data_pages(req, rmw ? 1 : 0, pages, write_len,
1733 write_pos & ~CEPH_FSCRYPT_BLOCK_MASK,
1734 false, true);
1735 req->r_inode = inode;
1736 req->r_mtime = mtime;
1737
1738 /* Set up the assertion */
1739 if (rmw) {
1740 /* Set up the assertion */
1741 osd_req_op_init(req, 0, CEPH_OSD_OP_ASSERT_VER, 0);
1742 req->r_ops[0].assert_ver.ver = assert_ver;
1743 }
1744
1745 ret = ceph_osdc_start_request(osdc, req, false);
1746 if (!ret)
1747 ret = ceph_osdc_wait_request(osdc, req);
1748
1749 ceph_update_write_metrics(&fsc->mdsc->metric, req->r_start_latency,
1750 req->r_end_latency, len, ret);
1751 ceph_osdc_put_request(req);
1752 if (ret != 0) {
1753 dout("sync_write osd write returned %d\n", ret);
1754 /* Version changed! Must re-do the rmw cycle */
1755 if (ret == -ERANGE || ret == -EOVERFLOW) {
1756 /* We should only ever see this on a rmw */
1757 WARN_ON_ONCE(!rmw);
1758
1759 /* The version should never go backward */
1760 WARN_ON_ONCE(ret == -EOVERFLOW);
1761
1762 *from = saved_iter;
1763
1764 /* FIXME: limit number of times we loop? */
1765 continue;
1766 }
1767 ceph_set_error_write(ci);
1768 break;
1769 }
1770 ceph_clear_error_write(ci);
1771 pos += len;
1772 written += len;
1773 if (pos > i_size_read(inode)) {
1774 check_caps = ceph_inode_set_size(inode, pos);
1775 if (check_caps)
1776 ceph_check_caps(ceph_inode(inode),
1777 CHECK_CAPS_AUTHONLY,
1778 NULL);
1779 }
1780
1781 }
1782
1783 if (ret != -EOLDSNAPC && written > 0) {
1784 ret = written;
1785 iocb->ki_pos = pos;
1786 }
1787 dout("sync_write returning %d\n", ret);
1788 return ret;
1789 }
1790
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 2 weeks
[jpirko-mlxsw:petrm_soft_counters 9/10] include/linux/kern_levels.h:5:25: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'size_t' {aka 'unsigned int'}
by kernel test robot
tree: https://github.com/jpirko/linux_mlxsw petrm_soft_counters
head: 38ca0aa04554a994a5ab769f0c07b37484b5f4c9
commit: 0839ffb5b56fb6f5e67545c77bf6151fe606835d [9/10] wip
config: arc-randconfig-r043-20211210 (https://download.01.org/0day-ci/archive/20211210/202112101613.n18YqogN-lk...)
compiler: arc-elf-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/jpirko/linux_mlxsw/commit/0839ffb5b56fb6f5e67545c77bf6...
git remote add jpirko-mlxsw https://github.com/jpirko/linux_mlxsw
git fetch --no-tags jpirko-mlxsw petrm_soft_counters
git checkout 0839ffb5b56fb6f5e67545c77bf6151fe606835d
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash net/core/
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:19,
from include/linux/list.h:9,
from include/linux/module.h:12,
from net/core/rtnetlink.c:17:
net/core/rtnetlink.c: In function 'if_nlmsg_stats_size':
>> include/linux/kern_levels.h:5:25: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/printk.h:418:25: note: in definition of macro 'printk_index_wrap'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~
net/core/rtnetlink.c:5509:9: note: in expansion of macro 'printk'
5509 | printk(KERN_WARNING "if_nlmsg_stats_size %ld\n", size);
| ^~~~~~
include/linux/kern_levels.h:12:25: note: in expansion of macro 'KERN_SOH'
12 | #define KERN_WARNING KERN_SOH "4" /* warning conditions */
| ^~~~~~~~
net/core/rtnetlink.c:5509:16: note: in expansion of macro 'KERN_WARNING'
5509 | printk(KERN_WARNING "if_nlmsg_stats_size %ld\n", size);
| ^~~~~~~~~~~~
vim +5 include/linux/kern_levels.h
314ba3520e513a7 Joe Perches 2012-07-30 4
04d2c8c83d0e3ac Joe Perches 2012-07-30 @5 #define KERN_SOH "\001" /* ASCII Start Of Header */
04d2c8c83d0e3ac Joe Perches 2012-07-30 6 #define KERN_SOH_ASCII '\001'
04d2c8c83d0e3ac Joe Perches 2012-07-30 7
:::::: The code at line 5 was first introduced by commit
:::::: 04d2c8c83d0e3ac5f78aeede51babb3236200112 printk: convert the format for KERN_<LEVEL> to a 2 byte pattern
:::::: TO: Joe Perches <joe(a)perches.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 2 weeks
[superna9999:amlogic/v5.17/g12-dsi 5/7] drivers/gpu/drm/meson/meson_encoder_dsi.c:72:2: error: implicit declaration of function 'meson_vclk_setup'
by kernel test robot
tree: https://github.com/superna9999/linux amlogic/v5.17/g12-dsi
head: cc44c3ce92a63f2c59a3f0ac03e6defd41542940
commit: e1e87e576f5befbf752a2c7b9c019328f1742d71 [5/7] fixup! WIP: drm/meson: add DSI encoder
config: arm-randconfig-r034-20211210 (https://download.01.org/0day-ci/archive/20211210/202112101636.y17bk2Zb-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 097a1cb1d5ebb3a0ec4bcaed8ba3ff6a8e33c00a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/superna9999/linux/commit/e1e87e576f5befbf752a2c7b9c019...
git remote add superna9999 https://github.com/superna9999/linux
git fetch --no-tags superna9999 amlogic/v5.17/g12-dsi
git checkout e1e87e576f5befbf752a2c7b9c019328f1742d71
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/gpu/drm/meson/
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/gpu/drm/meson/meson_encoder_dsi.c:72:2: error: implicit declaration of function 'meson_vclk_setup' [-Werror,-Wimplicit-function-declaration]
meson_vclk_setup(priv, MESON_VCLK_TARGET_DSI, mode->clock * 1000, 0, 0, 0, false);
^
>> drivers/gpu/drm/meson/meson_encoder_dsi.c:72:25: error: use of undeclared identifier 'MESON_VCLK_TARGET_DSI'
meson_vclk_setup(priv, MESON_VCLK_TARGET_DSI, mode->clock * 1000, 0, 0, 0, false);
^
>> drivers/gpu/drm/meson/meson_encoder_dsi.c:74:2: error: implicit declaration of function 'meson_venc_encoder_dsi_mode_set' [-Werror,-Wimplicit-function-declaration]
meson_venc_encoder_dsi_mode_set(priv, mode);
^
drivers/gpu/drm/meson/meson_encoder_dsi.c:74:2: note: did you mean 'meson_venc_mipi_dsi_mode_set'?
drivers/gpu/drm/meson/meson_venc.h:70:6: note: 'meson_venc_mipi_dsi_mode_set' declared here
void meson_venc_mipi_dsi_mode_set(struct meson_drm *priv,
^
>> drivers/gpu/drm/meson/meson_encoder_dsi.c:96:18: error: use of undeclared identifier 'meson_encoder_dsi_atomic_check'; did you mean 'meson_encoder_dsi_atomic_enable'?
.atomic_check = meson_encoder_dsi_atomic_check,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
meson_encoder_dsi_atomic_enable
drivers/gpu/drm/meson/meson_encoder_dsi.c:45:13: note: 'meson_encoder_dsi_atomic_enable' declared here
static void meson_encoder_dsi_atomic_enable(struct drm_bridge *bridge,
^
drivers/gpu/drm/meson/meson_encoder_dsi.c:97:19: error: use of undeclared identifier 'meson_encoder_dsi_atomic_check'; did you mean 'meson_encoder_dsi_atomic_enable'?
.atomic_enable = meson_encoder_dsi_atomic_check,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
meson_encoder_dsi_atomic_enable
drivers/gpu/drm/meson/meson_encoder_dsi.c:45:13: note: 'meson_encoder_dsi_atomic_enable' declared here
static void meson_encoder_dsi_atomic_enable(struct drm_bridge *bridge,
^
drivers/gpu/drm/meson/meson_encoder_dsi.c:98:20: error: use of undeclared identifier 'meson_encoder_dsi_atomic_check'; did you mean 'meson_encoder_dsi_atomic_enable'?
.atomic_disable = meson_encoder_dsi_atomic_check,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
meson_encoder_dsi_atomic_enable
drivers/gpu/drm/meson/meson_encoder_dsi.c:45:13: note: 'meson_encoder_dsi_atomic_enable' declared here
static void meson_encoder_dsi_atomic_enable(struct drm_bridge *bridge,
^
drivers/gpu/drm/meson/meson_encoder_dsi.c:99:18: error: use of undeclared identifier 'meson_encoder_dsi_atomic_check'; did you mean 'meson_encoder_dsi_atomic_enable'?
.atomic_check = meson_encoder_dsi_atomic_check,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
meson_encoder_dsi_atomic_enable
drivers/gpu/drm/meson/meson_encoder_dsi.c:45:13: note: 'meson_encoder_dsi_atomic_enable' declared here
static void meson_encoder_dsi_atomic_enable(struct drm_bridge *bridge,
^
>> drivers/gpu/drm/meson/meson_encoder_dsi.c:96:18: error: incompatible function pointer types initializing 'int (*)(struct drm_bridge *, struct drm_bridge_state *, struct drm_crtc_state *, struct drm_connector_state *)' with an expression of type 'void (struct drm_bridge *, struct drm_bridge_state *)' [-Werror,-Wincompatible-function-pointer-types]
.atomic_check = meson_encoder_dsi_atomic_check,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/meson/meson_encoder_dsi.c:99:18: error: incompatible function pointer types initializing 'int (*)(struct drm_bridge *, struct drm_bridge_state *, struct drm_crtc_state *, struct drm_connector_state *)' with an expression of type 'void (struct drm_bridge *, struct drm_bridge_state *)' [-Werror,-Wincompatible-function-pointer-types]
.atomic_check = meson_encoder_dsi_atomic_check,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/meson/meson_encoder_dsi.c:99:18: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
.atomic_check = meson_encoder_dsi_atomic_check,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/meson/meson_encoder_dsi.c:96:18: note: previous initialization is here
.atomic_check = meson_encoder_dsi_atomic_check,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 9 errors generated.
vim +/meson_vclk_setup +72 drivers/gpu/drm/meson/meson_encoder_dsi.c
44
45 static void meson_encoder_dsi_atomic_enable(struct drm_bridge *bridge,
46 struct drm_bridge_state *bridge_state)
47 {
48 struct meson_encoder_dsi *encoder_dsi = bridge_to_meson_encoder_dsi(bridge);
49 struct drm_atomic_state *state = bridge_state->base.state;
50 struct meson_drm *priv = encoder_dsi->priv;
51 struct drm_connector_state *conn_state;
52 struct drm_crtc_state *crtc_state;
53 struct drm_connector *connector;
54 struct drm_display_mode *mode;
55
56 connector = drm_atomic_get_new_connector_for_encoder(state, bridge->encoder);
57 if (WARN_ON(!connector))
58 return;
59
60 conn_state = drm_atomic_get_new_connector_state(state, connector);
61 if (WARN_ON(!conn_state))
62 return;
63
64 crtc_state = drm_atomic_get_new_crtc_state(state, conn_state->crtc);
65 if (WARN_ON(!crtc_state))
66 return;
67
68 mode = &crtc_state->adjusted_mode;
69 if (WARN_ON(!mode))
70 return;
71
> 72 meson_vclk_setup(priv, MESON_VCLK_TARGET_DSI, mode->clock * 1000, 0, 0, 0, false);
73
> 74 meson_venc_encoder_dsi_mode_set(priv, mode);
75
76 meson_encl_load_gamma(priv);
77
78 writel_bits_relaxed(BIT(3), BIT(3), priv->io_base + _REG(ENCL_VIDEO_MODE_ADV));
79 writel_relaxed(0, priv->io_base + _REG(ENCL_TST_EN));
80
81 writel_relaxed(1, priv->io_base + _REG(ENCL_VIDEO_EN));
82 }
83
84 static void meson_encoder_dsi_atomic_disable(struct drm_bridge *bridge,
85 struct drm_bridge_state *bridge_state)
86 {
87 struct meson_encoder_dsi *meson_encoder_dsi =
88 bridge_to_meson_encoder_dsi(bridge);
89 struct meson_drm *priv = meson_encoder_dsi->priv;
90
91 writel_relaxed(0, priv->io_base + _REG(ENCL_VIDEO_EN));
92 }
93
94 static const struct drm_bridge_funcs meson_encoder_dsi_bridge_funcs = {
95 .attach = meson_encoder_dsi_attach,
> 96 .atomic_check = meson_encoder_dsi_atomic_check,
97 .atomic_enable = meson_encoder_dsi_atomic_check,
98 .atomic_disable = meson_encoder_dsi_atomic_check,
> 99 .atomic_check = meson_encoder_dsi_atomic_check,
100 .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
101 .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
102 .atomic_reset = drm_atomic_helper_bridge_reset,
103 };
104
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 2 weeks
[jlayton:ceph-fscrypt-content 50/51] fs/ceph/file.c:1712:20: error: too many arguments to function call, expected 4, have 5
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git ceph-fscrypt-content
head: a7bdf8275eeb05b44be3426ce23ac0e99791ab80
commit: 81588e00b89cb14beb905a04b84198f99f5db059 [50/51] ceph: add read/modify/write to ceph_sync_write
config: riscv-randconfig-r014-20211210 (https://download.01.org/0day-ci/archive/20211210/202112101520.wAUVIMOO-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 097a1cb1d5ebb3a0ec4bcaed8ba3ff6a8e33c00a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git/commit/...
git remote add jlayton https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git
git fetch --no-tags jlayton ceph-fscrypt-content
git checkout 81588e00b89cb14beb905a04b84198f99f5db059
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/nvme/host/ fs/ceph/
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 fs/ceph/file.c:11:
In file included from include/linux/writeback.h:13:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from fs/ceph/file.c:11:
In file included from include/linux/writeback.h:13:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from fs/ceph/file.c:11:
In file included from include/linux/writeback.h:13:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:1024:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
>> fs/ceph/file.c:1712:20: error: too many arguments to function call, expected 4, have 5
write_len, GFP_KERNEL);
^~~~~~~~~~
include/linux/gfp.h:324:20: note: expanded from macro 'GFP_KERNEL'
#define GFP_KERNEL (__GFP_RECLAIM | __GFP_IO | __GFP_FS)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/ceph/crypto.h:213:19: note: 'ceph_fscrypt_encrypt_pages' declared here
static inline int ceph_fscrypt_encrypt_pages(struct inode *inode, struct page **page,
^
7 warnings and 1 error generated.
vim +1712 fs/ceph/file.c
1485
1486 /*
1487 * Synchronous write, straight from __user pointer or user pages.
1488 *
1489 * If write spans object boundary, just do multiple writes. (For a
1490 * correct atomic write, we should e.g. take write locks on all
1491 * objects, rollback on failure, etc.)
1492 */
1493 static ssize_t
1494 ceph_sync_write(struct kiocb *iocb, struct iov_iter *from, loff_t pos,
1495 struct ceph_snap_context *snapc)
1496 {
1497 struct file *file = iocb->ki_filp;
1498 struct inode *inode = file_inode(file);
1499 struct ceph_inode_info *ci = ceph_inode(inode);
1500 struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
1501 struct ceph_osd_client *osdc = &fsc->client->osdc;
1502 struct ceph_osd_request *req;
1503 struct page **pages;
1504 u64 len;
1505 int num_pages;
1506 int written = 0;
1507 int ret;
1508 bool check_caps = false;
1509 struct timespec64 mtime = current_time(inode);
1510 size_t count = iov_iter_count(from);
1511
1512 if (ceph_snap(file_inode(file)) != CEPH_NOSNAP)
1513 return -EROFS;
1514
1515 dout("sync_write on file %p %lld~%u snapc %p seq %lld\n",
1516 file, pos, (unsigned)count, snapc, snapc->seq);
1517
1518 ret = filemap_write_and_wait_range(inode->i_mapping,
1519 pos, pos + count - 1);
1520 if (ret < 0)
1521 return ret;
1522
1523 ret = invalidate_inode_pages2_range(inode->i_mapping,
1524 pos >> PAGE_SHIFT,
1525 (pos + count - 1) >> PAGE_SHIFT);
1526 if (ret < 0)
1527 dout("invalidate_inode_pages2_range returned %d\n", ret);
1528
1529 while ((len = iov_iter_count(from)) > 0) {
1530 size_t left;
1531 int n;
1532 u64 write_pos = pos;
1533 u64 write_len;
1534 u64 objnum, objoff;
1535 u32 objlen;
1536 u64 assert_ver;
1537 bool rmw;
1538 struct iov_iter saved_iter = *from;
1539 size_t off;
1540
1541 /* clamp the length to the end of first object */
1542 ceph_calc_file_object_mapping(&ci->i_layout, pos, len,
1543 &objnum, &objoff, &objlen);
1544 if (objlen < len)
1545 len = objlen;
1546
1547 write_len = len;
1548 fscrypt_adjust_off_and_len(inode, &write_pos, &write_len);
1549
1550 /*
1551 * If we had to adjust the length or position to align with a
1552 * crypto block, then we must do a read/modify/write cycle. We
1553 * use a version assertion to redrive the thing if something
1554 * changes in between.
1555 */
1556 rmw = (pos != write_pos || len != write_len);
1557
1558 /*
1559 * The data is emplaced into the page as it would be if it were in
1560 * an array of pagecache pages.
1561 */
1562 num_pages = calc_pages_for(write_pos, write_len);
1563 pages = ceph_alloc_page_vector(num_pages, GFP_KERNEL);
1564 if (IS_ERR(pages)) {
1565 ret = PTR_ERR(pages);
1566 break;
1567 }
1568
1569 /* Do we need to preload the pages? */
1570 if (rmw) {
1571 u64 first_pos = write_pos;
1572 u64 last_pos = (write_pos + write_len) - CEPH_FSCRYPT_BLOCK_SIZE;
1573 u64 read_len = CEPH_FSCRYPT_BLOCK_SIZE;
1574 bool first = (pos != write_pos);
1575 bool last = (len != write_len && first_pos != last_pos);
1576
1577 /* We should only need to do this for encrypted inodes */
1578 WARN_ON_ONCE(!IS_ENCRYPTED(inode));
1579
1580 /*
1581 * Allocate a read request for one or two extents, depending
1582 * on how the request was aligned.
1583 */
1584 req = ceph_osdc_new_request(osdc, &ci->i_layout,
1585 ci->i_vino, first ? first_pos : last_pos,
1586 &read_len, 0, (first && last) ? 2 : 1,
1587 CEPH_OSD_OP_READ, CEPH_OSD_FLAG_READ,
1588 NULL, ci->i_truncate_seq,
1589 ci->i_truncate_size, false);
1590 if (IS_ERR(req)) {
1591 ceph_release_page_vector(pages, num_pages);
1592 ret = PTR_ERR(req);
1593 break;
1594 }
1595
1596 /* Something is misaligned! */
1597 if (read_len != CEPH_FSCRYPT_BLOCK_SIZE) {
1598 ret = -EIO;
1599 break;
1600 }
1601
1602 /* Add extent for first block? */
1603 if (first)
1604 osd_req_op_extent_osd_data_pages(req, 0, pages,
1605 CEPH_FSCRYPT_BLOCK_SIZE,
1606 offset_in_page(first_pos),
1607 false, false);
1608
1609 /* Add extent for last block */
1610 if (last) {
1611 /* Init the other extent if first extent has been used */
1612 if (first) {
1613 osd_req_op_extent_init(req, 1, CEPH_OSD_OP_READ,
1614 last_pos, read_len,
1615 ci->i_truncate_size,
1616 ci->i_truncate_seq);
1617 }
1618
1619 osd_req_op_extent_osd_data_pages(req, first ? 1 : 0,
1620 &pages[num_pages - 1],
1621 CEPH_FSCRYPT_BLOCK_SIZE,
1622 offset_in_page(last_pos),
1623 false, false);
1624 }
1625
1626 ret = ceph_osdc_start_request(osdc, req, false);
1627 if (!ret)
1628 ret = ceph_osdc_wait_request(osdc, req);
1629
1630 /* FIXME: length field is wrong if there are 2 extents */
1631 ceph_update_read_metrics(&fsc->mdsc->metric,
1632 req->r_start_latency,
1633 req->r_end_latency,
1634 read_len, ret);
1635
1636 /* Ok if object is not already present */
1637 if (ret == -ENOENT) {
1638 /*
1639 * If there is no object, then we can't assert
1640 * on its version. Clear rmw so that we don't try.
1641 */
1642 ceph_osdc_put_request(req);
1643 rmw = false;
1644 ret = 0;
1645
1646 /*
1647 * zero out the soon-to-be uncopied parts of the
1648 * first and last pages.
1649 */
1650 if (first)
1651 zero_user_segment(pages[0], 0,
1652 offset_in_page(first_pos));
1653 if (last)
1654 zero_user_segment(pages[num_pages - 1],
1655 offset_in_page(last_pos),
1656 PAGE_SIZE);
1657 } else {
1658 /* Grab assert version. It must be non-zero. */
1659 assert_ver = req->r_version;
1660 WARN_ON_ONCE(assert_ver == 0);
1661
1662 ceph_osdc_put_request(req);
1663 if (ret < 0) {
1664 ceph_release_page_vector(pages, num_pages);
1665 break;
1666 }
1667
1668 if (first) {
1669 ret = ceph_fscrypt_decrypt_block_inplace(inode,
1670 pages[0],
1671 CEPH_FSCRYPT_BLOCK_SIZE,
1672 offset_in_page(first_pos),
1673 first_pos >> CEPH_FSCRYPT_BLOCK_SHIFT);
1674 if (ret)
1675 break;
1676 }
1677 if (last) {
1678 ret = ceph_fscrypt_decrypt_block_inplace(inode,
1679 pages[num_pages - 1],
1680 CEPH_FSCRYPT_BLOCK_SIZE,
1681 offset_in_page(last_pos),
1682 last_pos >> CEPH_FSCRYPT_BLOCK_SHIFT);
1683 if (ret)
1684 break;
1685 }
1686 }
1687 }
1688
1689 left = len;
1690 off = offset_in_page(pos);
1691 for (n = 0; n < num_pages; n++) {
1692 size_t plen = min_t(size_t, left, PAGE_SIZE - off);
1693
1694 /* copy the data */
1695 ret = copy_page_from_iter(pages[n], off, plen, from);
1696 if (ret != plen) {
1697 ret = -EFAULT;
1698 break;
1699 }
1700 off = 0;
1701 left -= ret;
1702 }
1703 if (ret < 0) {
1704 dout("sync_write write failed with %d\n", ret);
1705 ceph_release_page_vector(pages, num_pages);
1706 break;
1707 }
1708
1709 if (IS_ENCRYPTED(inode)) {
1710 ret = ceph_fscrypt_encrypt_pages(inode, pages,
1711 offset_in_page(write_pos),
> 1712 write_len, GFP_KERNEL);
1713 if (ret < 0) {
1714 dout("encryption failed with %d\n", ret);
1715 break;
1716 }
1717 }
1718
1719 req = ceph_osdc_new_request(osdc, &ci->i_layout,
1720 ci->i_vino, write_pos, &write_len,
1721 rmw ? 1 : 0, rmw ? 2 : 1,
1722 CEPH_OSD_OP_WRITE,
1723 CEPH_OSD_FLAG_WRITE,
1724 snapc, ci->i_truncate_seq,
1725 ci->i_truncate_size, false);
1726 if (IS_ERR(req)) {
1727 ret = PTR_ERR(req);
1728 ceph_release_page_vector(pages, num_pages);
1729 break;
1730 }
1731
1732 osd_req_op_extent_osd_data_pages(req, rmw ? 1 : 0, pages, write_len,
1733 write_pos & ~CEPH_FSCRYPT_BLOCK_MASK,
1734 false, true);
1735 req->r_inode = inode;
1736 req->r_mtime = mtime;
1737
1738 /* Set up the assertion */
1739 if (rmw) {
1740 /* Set up the assertion */
1741 osd_req_op_init(req, 0, CEPH_OSD_OP_ASSERT_VER, 0);
1742 req->r_ops[0].assert_ver.ver = assert_ver;
1743 }
1744
1745 ret = ceph_osdc_start_request(osdc, req, false);
1746 if (!ret)
1747 ret = ceph_osdc_wait_request(osdc, req);
1748
1749 ceph_update_write_metrics(&fsc->mdsc->metric, req->r_start_latency,
1750 req->r_end_latency, len, ret);
1751 ceph_osdc_put_request(req);
1752 if (ret != 0) {
1753 dout("sync_write osd write returned %d\n", ret);
1754 /* Version changed! Must re-do the rmw cycle */
1755 if (ret == -ERANGE || ret == -EOVERFLOW) {
1756 /* We should only ever see this on a rmw */
1757 WARN_ON_ONCE(!rmw);
1758
1759 /* The version should never go backward */
1760 WARN_ON_ONCE(ret == -EOVERFLOW);
1761
1762 *from = saved_iter;
1763
1764 /* FIXME: limit number of times we loop? */
1765 continue;
1766 }
1767 ceph_set_error_write(ci);
1768 break;
1769 }
1770 ceph_clear_error_write(ci);
1771 pos += len;
1772 written += len;
1773 if (pos > i_size_read(inode)) {
1774 check_caps = ceph_inode_set_size(inode, pos);
1775 if (check_caps)
1776 ceph_check_caps(ceph_inode(inode),
1777 CHECK_CAPS_AUTHONLY,
1778 NULL);
1779 }
1780
1781 }
1782
1783 if (ret != -EOLDSNAPC && written > 0) {
1784 ret = written;
1785 iocb->ki_pos = pos;
1786 }
1787 dout("sync_write returning %d\n", ret);
1788 return ret;
1789 }
1790
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 2 weeks
[android-common:android13-5.15 1/3] mm/memory_hotplug.c:1505:17: warning: format specifies type 'unsigned long' but the argument has type 'u64' (aka 'unsigned long long')
by kernel test robot
tree: https://android.googlesource.com/kernel/common android13-5.15
head: 5c9cf613be14804250ff56fe5651760b3acf2c91
commit: 42db6c2e985bd4805fd6c74a6e8749cf72e084a7 [1/3] ANDROID: mm/memory_hotplug: implement {add/remove}_memory_subsection
config: x86_64-randconfig-r021-20211210 (https://download.01.org/0day-ci/archive/20211210/202112101536.eWkoI5S7-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 097a1cb1d5ebb3a0ec4bcaed8ba3ff6a8e33c00a)
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 remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android13-5.15
git checkout 42db6c2e985bd4805fd6c74a6e8749cf72e084a7
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
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 >>):
>> mm/memory_hotplug.c:1505:17: warning: format specifies type 'unsigned long' but the argument has type 'u64' (aka 'unsigned long long') [-Wformat]
__func__, start, size);
^~~~~
include/linux/printk.h:493:33: note: expanded from macro 'pr_err'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:450:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:422:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
mm/memory_hotplug.c:1505:24: warning: format specifies type 'unsigned long' but the argument has type 'u64' (aka 'unsigned long long') [-Wformat]
__func__, start, size);
^~~~
include/linux/printk.h:493:33: note: expanded from macro 'pr_err'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:450:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:422:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
mm/memory_hotplug.c:1525:17: warning: format specifies type 'unsigned long' but the argument has type 'u64' (aka 'unsigned long long') [-Wformat]
__func__, start, size);
^~~~~
include/linux/printk.h:493:33: note: expanded from macro 'pr_err'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:450:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:422:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
mm/memory_hotplug.c:1525:24: warning: format specifies type 'unsigned long' but the argument has type 'u64' (aka 'unsigned long long') [-Wformat]
__func__, start, size);
^~~~
include/linux/printk.h:493:33: note: expanded from macro 'pr_err'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:450:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:422:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
mm/memory_hotplug.c:2304:17: warning: format specifies type 'unsigned long' but the argument has type 'u64' (aka 'unsigned long long') [-Wformat]
__func__, start, size);
^~~~~
include/linux/printk.h:493:33: note: expanded from macro 'pr_err'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:450:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:422:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
mm/memory_hotplug.c:2304:24: warning: format specifies type 'unsigned long' but the argument has type 'u64' (aka 'unsigned long long') [-Wformat]
__func__, start, size);
^~~~
include/linux/printk.h:493:33: note: expanded from macro 'pr_err'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:450:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:422:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
mm/memory_hotplug.c:2312:17: warning: format specifies type 'unsigned long' but the argument has type 'u64' (aka 'unsigned long long') [-Wformat]
__func__, start, start + size);
^~~~~
include/linux/printk.h:493:33: note: expanded from macro 'pr_err'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:450:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:422:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
mm/memory_hotplug.c:2312:24: warning: format specifies type 'unsigned long' but the argument has type 'unsigned long long' [-Wformat]
__func__, start, start + size);
^~~~~~~~~~~~
include/linux/printk.h:493:33: note: expanded from macro 'pr_err'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:450:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:422:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
8 warnings generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for ASYNC_TX_ENABLE_CHANNEL_SWITCH
Depends on DMADEVICES
Selected by
- GKI_HIDDEN_DMA_CONFIGS
vim +1505 mm/memory_hotplug.c
1492
1493 int add_memory_subsection(int nid, u64 start, u64 size)
1494 {
1495 struct mhp_params params = { .pgprot = PAGE_KERNEL };
1496 struct resource *res;
1497 int ret;
1498
1499 if (size == memory_block_size_bytes())
1500 return add_memory(nid, start, size, MHP_NONE);
1501
1502 if (!IS_ALIGNED(start, SUBSECTION_SIZE) ||
1503 !IS_ALIGNED(size, SUBSECTION_SIZE)) {
1504 pr_err("%s: start 0x%lx size 0x%lx not aligned to subsection size\n",
> 1505 __func__, start, size);
1506 return -EINVAL;
1507 }
1508
1509 res = register_memory_resource(start, size, "System RAM");
1510 if (IS_ERR(res))
1511 return PTR_ERR(res);
1512
1513 mem_hotplug_begin();
1514
1515 nid = memory_add_physaddr_to_nid(start);
1516
1517 if (IS_ENABLED(CONFIG_ARCH_KEEP_MEMBLOCK))
1518 memblock_add_node(start, size, nid);
1519
1520 ret = arch_add_memory(nid, start, size, ¶ms);
1521 if (ret) {
1522 if (IS_ENABLED(CONFIG_ARCH_KEEP_MEMBLOCK))
1523 memblock_remove(start, size);
1524 pr_err("%s failed to add subsection start 0x%lx size 0x%lx\n",
1525 __func__, start, size);
1526 }
1527 mem_hotplug_done();
1528
1529 return ret;
1530 }
1531 EXPORT_SYMBOL_GPL(add_memory_subsection);
1532
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 2 weeks
arch/riscv/include/asm/atomic.h:204 arch_atomic_fetch_add_unless() warn: inconsistent indenting
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c741e49150dbb0c0aebe234389f4aa8b47958fa8
commit: a18b14d8886614b3c7d290c4cfc33389822b0535 riscv: Disable STACKPROTECTOR_PER_TASK if GCC_PLUGIN_RANDSTRUCT is enabled
date: 4 months ago
config: riscv-randconfig-m031-20211210 (https://download.01.org/0day-ci/archive/20211210/202112101559.gQTLUnTO-lk...)
compiler: riscv64-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
New smatch warnings:
arch/riscv/include/asm/atomic.h:204 arch_atomic_fetch_add_unless() warn: inconsistent indenting
arch/riscv/include/asm/atomic.h:225 arch_atomic64_fetch_add_unless() warn: inconsistent indenting
arch/riscv/include/asm/atomic.h:204 arch_atomic_fetch_add_unless() warn: inconsistent indenting
arch/riscv/include/asm/atomic.h:225 arch_atomic64_fetch_add_unless() warn: inconsistent indenting
arch/riscv/include/asm/atomic.h:204 arch_atomic_fetch_add_unless() warn: inconsistent indenting
arch/riscv/include/asm/atomic.h:225 arch_atomic64_fetch_add_unless() warn: inconsistent indenting
arch/riscv/include/asm/atomic.h:317 arch_atomic_sub_if_positive() warn: inconsistent indenting
arch/riscv/include/asm/atomic.h:225 arch_atomic64_fetch_add_unless() warn: inconsistent indenting
arch/riscv/include/asm/atomic.h:204 arch_atomic_fetch_add_unless() warn: inconsistent indenting
arch/riscv/include/asm/atomic.h:204 arch_atomic_fetch_add_unless() warn: inconsistent indenting
drivers/crypto/cavium/cpt/cptpf_mbox.c:31 cpt_clear_mbox_intr() warn: should '1 << vf' be a 64 bit type?
sound/soc/rockchip/rockchip_i2s.c:690 rockchip_i2s_probe() warn: 'i2s->hclk' not released on lines: 618,623,630.
sound/soc/stm/stm32_sai_sub.c:503 stm32_sai_isr() error: uninitialized symbol 'sr'.
sound/soc/stm/stm32_sai_sub.c:503 stm32_sai_isr() error: uninitialized symbol 'imr'.
sound/soc/stm/stm32_sai_sub.c:790 stm32_sai_startup() error: uninitialized symbol 'cr2'.
sound/soc/stm/stm32_sai_sub.c:869 stm32_sai_set_slots() error: uninitialized symbol 'slotr'.
drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:1295 create_engine_group() error: we previously assumed 'mirrored_eng_grp' could be null (see line 1251)
drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:1348 ucode_load_store() warn: variable dereferenced before check 'val' (see line 1341)
drivers/video/fbdev/riva/riva_hw.c:1823 SetStartAddress3() warn: inconsistent indenting
sound/soc/qcom/qdsp6/q6afe.c:1001 q6afe_set_param() warn: is 'p' large enough for 'struct apr_pkt'? 0
arch/riscv/include/asm/atomic.h:204 arch_atomic_fetch_add_unless() warn: inconsistent indenting
arch/riscv/kernel/signal.c:42 restore_fp_state() warn: maybe return -EFAULT instead of the bytes remaining?
arch/riscv/kernel/signal.c:70 save_fp_state() warn: maybe return -EFAULT instead of the bytes remaining?
drivers/net/wireless/ath/wcn36xx/main.c:574 wcn36xx_set_key() error: we previously assumed 'sta' could be null (see line 516)
drivers/net/wireless/ath/wcn36xx/smd.c:515 wcn36xx_smd_load_nv() error: we previously assumed 'wcn->nv' could be null (see line 506)
drivers/net/wireless/ath/wcn36xx/smd.c:1898 wcn36xx_smd_send_beacon() warn: potential spectre issue 'msg_body.beacon' [w]
drivers/net/wireless/ath/wcn36xx/smd.c:2910 wcn36xx_smd_gtk_offload_get_info_rsp() warn: inconsistent indenting
drivers/net/usb/hso.c:1399 hso_serial_set_termios() error: we previously assumed 'old' could be null (see line 1389)
arch/riscv/kernel/perf_event.c:160 riscv_map_cache_event() warn: inconsistent indenting
drivers/net/wireless/ath/ath10k/ahb.c:92 ath10k_ahb_clock_init() warn: passing zero to 'PTR_ERR'
lib/test_kasan.c:174 kmalloc_pagealloc_oob_right() error: buffer overflow 'ptr' 8202 <= 8202
arch/riscv/include/asm/atomic.h:339 arch_atomic64_sub_if_positive() warn: inconsistent indenting
arch/riscv/include/asm/atomic.h:317 arch_atomic_sub_if_positive() warn: inconsistent indenting
Old smatch warnings:
drivers/net/wireless/ath/ath11k/wmi.c:6146 ath11k_mgmt_rx_event() warn: 'rx_ev.snr + -95' 4294967201 can't fit into 127 'status->signal'
sound/soc/stm/stm32_sai_sub.c:1503 stm32_sai_sub_parse_of() warn: 'sai->pdata->pclk' not released on lines: 1498.
drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:1363 ucode_load_store() warn: variable dereferenced before check 'val' (see line 1341)
drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:1375 ucode_load_store() warn: variable dereferenced before check 'val' (see line 1341)
drivers/video/fbdev/riva/riva_hw.c:979 nv10CalcArbitration() warn: inconsistent indenting
drivers/video/fbdev/riva/riva_hw.c:1825 SetStartAddress3() warn: inconsistent indenting
sound/soc/qcom/qdsp6/q6afe.c:1055 q6afe_port_set_param_v2() warn: is 'p' large enough for 'struct apr_pkt'? 0
arch/riscv/kernel/signal.c:95 restore_sigcontext() warn: maybe return -EFAULT instead of the bytes remaining?
arch/riscv/kernel/signal.c:148 setup_sigcontext() warn: maybe return -EFAULT instead of the bytes remaining?
drivers/net/wireless/ath/ath10k/ahb.c:99 ath10k_ahb_clock_init() warn: passing zero to 'PTR_ERR'
drivers/net/wireless/ath/ath10k/ahb.c:106 ath10k_ahb_clock_init() warn: passing zero to 'PTR_ERR'
lib/test_kasan.c:130 kmalloc_oob_right() error: buffer overflow 'ptr' 123 <= 123
lib/test_kasan.c:154 kmalloc_node_oob_right() error: buffer overflow 'ptr' 4096 <= 4096
lib/test_kasan.c:281 krealloc_more_oob_helper() warn: potentially one past the end of array 'ptr2[size2]'
lib/test_kasan.c:281 krealloc_more_oob_helper() warn: potentially one past the end of array 'ptr2[size2]'
lib/test_kasan.c:310 krealloc_less_oob_helper() warn: potentially one past the end of array 'ptr2[size2]'
lib/test_kasan.c:310 krealloc_less_oob_helper() warn: potentially one past the end of array 'ptr2[size2]'
lib/test_kasan.c:324 krealloc_less_oob_helper() warn: potentially one past the end of array 'ptr2[middle]'
lib/test_kasan.c:324 krealloc_less_oob_helper() warn: potentially one past the end of array 'ptr2[middle]'
lib/test_kasan.c:373 krealloc_uaf() warn: passing freed memory 'ptr1'
lib/test_kasan.c:411 kmalloc_uaf_16() error: dereferencing freed memory 'ptr2'
lib/test_kasan.c:513 kmalloc_uaf_memset() warn: passing freed memory 'ptr'
lib/test_kasan.c:665 kasan_global_oob() error: buffer overflow 'array' 10 <= 13
lib/test_kasan.c:684 ksize_unpoisons_memory() error: buffer overflow 'ptr' 123 <= 123
lib/test_kasan.c:705 ksize_uaf() warn: passing freed memory 'ptr'
lib/test_kasan.c:769 kmem_cache_double_free() error: double free of 'p'
lib/test_kasan.c:844 kasan_memcmp() error: memcmp() 'ptr' too small (24 vs 25)
vim +204 arch/riscv/include/asm/atomic.h
fab957c11efe2f Palmer Dabbelt 2017-07-10 198
5ce6c1f3535fa8 Andrea Parri 2018-03-09 199 /* This is required to provide a full barrier on success. */
9efbb355831014 Mark Rutland 2021-05-25 200 static __always_inline int arch_atomic_fetch_add_unless(atomic_t *v, int a, int u)
fab957c11efe2f Palmer Dabbelt 2017-07-10 201 {
fab957c11efe2f Palmer Dabbelt 2017-07-10 202 int prev, rc;
fab957c11efe2f Palmer Dabbelt 2017-07-10 203
fab957c11efe2f Palmer Dabbelt 2017-07-10 @204 __asm__ __volatile__ (
5ce6c1f3535fa8 Andrea Parri 2018-03-09 205 "0: lr.w %[p], %[c]\n"
5ce6c1f3535fa8 Andrea Parri 2018-03-09 206 " beq %[p], %[u], 1f\n"
5ce6c1f3535fa8 Andrea Parri 2018-03-09 207 " add %[rc], %[p], %[a]\n"
5ce6c1f3535fa8 Andrea Parri 2018-03-09 208 " sc.w.rl %[rc], %[rc], %[c]\n"
5ce6c1f3535fa8 Andrea Parri 2018-03-09 209 " bnez %[rc], 0b\n"
5ce6c1f3535fa8 Andrea Parri 2018-03-09 210 " fence rw, rw\n"
5ce6c1f3535fa8 Andrea Parri 2018-03-09 211 "1:\n"
fab957c11efe2f Palmer Dabbelt 2017-07-10 212 : [p]"=&r" (prev), [rc]"=&r" (rc), [c]"+A" (v->counter)
fab957c11efe2f Palmer Dabbelt 2017-07-10 213 : [a]"r" (a), [u]"r" (u)
fab957c11efe2f Palmer Dabbelt 2017-07-10 214 : "memory");
fab957c11efe2f Palmer Dabbelt 2017-07-10 215 return prev;
fab957c11efe2f Palmer Dabbelt 2017-07-10 216 }
9efbb355831014 Mark Rutland 2021-05-25 217 #define arch_atomic_fetch_add_unless arch_atomic_fetch_add_unless
fab957c11efe2f Palmer Dabbelt 2017-07-10 218
fab957c11efe2f Palmer Dabbelt 2017-07-10 219 #ifndef CONFIG_GENERIC_ATOMIC64
9efbb355831014 Mark Rutland 2021-05-25 220 static __always_inline s64 arch_atomic64_fetch_add_unless(atomic64_t *v, s64 a, s64 u)
fab957c11efe2f Palmer Dabbelt 2017-07-10 221 {
0754211847d7a2 Mark Rutland 2019-05-22 222 s64 prev;
0754211847d7a2 Mark Rutland 2019-05-22 223 long rc;
fab957c11efe2f Palmer Dabbelt 2017-07-10 224
fab957c11efe2f Palmer Dabbelt 2017-07-10 @225 __asm__ __volatile__ (
5ce6c1f3535fa8 Andrea Parri 2018-03-09 226 "0: lr.d %[p], %[c]\n"
5ce6c1f3535fa8 Andrea Parri 2018-03-09 227 " beq %[p], %[u], 1f\n"
5ce6c1f3535fa8 Andrea Parri 2018-03-09 228 " add %[rc], %[p], %[a]\n"
5ce6c1f3535fa8 Andrea Parri 2018-03-09 229 " sc.d.rl %[rc], %[rc], %[c]\n"
5ce6c1f3535fa8 Andrea Parri 2018-03-09 230 " bnez %[rc], 0b\n"
5ce6c1f3535fa8 Andrea Parri 2018-03-09 231 " fence rw, rw\n"
5ce6c1f3535fa8 Andrea Parri 2018-03-09 232 "1:\n"
fab957c11efe2f Palmer Dabbelt 2017-07-10 233 : [p]"=&r" (prev), [rc]"=&r" (rc), [c]"+A" (v->counter)
fab957c11efe2f Palmer Dabbelt 2017-07-10 234 : [a]"r" (a), [u]"r" (u)
fab957c11efe2f Palmer Dabbelt 2017-07-10 235 : "memory");
fab957c11efe2f Palmer Dabbelt 2017-07-10 236 return prev;
fab957c11efe2f Palmer Dabbelt 2017-07-10 237 }
9efbb355831014 Mark Rutland 2021-05-25 238 #define arch_atomic64_fetch_add_unless arch_atomic64_fetch_add_unless
fab957c11efe2f Palmer Dabbelt 2017-07-10 239 #endif
fab957c11efe2f Palmer Dabbelt 2017-07-10 240
fab957c11efe2f Palmer Dabbelt 2017-07-10 241 /*
fab957c11efe2f Palmer Dabbelt 2017-07-10 242 * atomic_{cmp,}xchg is required to have exactly the same ordering semantics as
5ce6c1f3535fa8 Andrea Parri 2018-03-09 243 * {cmp,}xchg and the operations that return, so they need a full barrier.
fab957c11efe2f Palmer Dabbelt 2017-07-10 244 */
5ce6c1f3535fa8 Andrea Parri 2018-03-09 245 #define ATOMIC_OP(c_t, prefix, size) \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 246 static __always_inline \
9efbb355831014 Mark Rutland 2021-05-25 247 c_t arch_atomic##prefix##_xchg_relaxed(atomic##prefix##_t *v, c_t n) \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 248 { \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 249 return __xchg_relaxed(&(v->counter), n, size); \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 250 } \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 251 static __always_inline \
9efbb355831014 Mark Rutland 2021-05-25 252 c_t arch_atomic##prefix##_xchg_acquire(atomic##prefix##_t *v, c_t n) \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 253 { \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 254 return __xchg_acquire(&(v->counter), n, size); \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 255 } \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 256 static __always_inline \
9efbb355831014 Mark Rutland 2021-05-25 257 c_t arch_atomic##prefix##_xchg_release(atomic##prefix##_t *v, c_t n) \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 258 { \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 259 return __xchg_release(&(v->counter), n, size); \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 260 } \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 261 static __always_inline \
9efbb355831014 Mark Rutland 2021-05-25 262 c_t arch_atomic##prefix##_xchg(atomic##prefix##_t *v, c_t n) \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 263 { \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 264 return __xchg(&(v->counter), n, size); \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 265 } \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 266 static __always_inline \
9efbb355831014 Mark Rutland 2021-05-25 267 c_t arch_atomic##prefix##_cmpxchg_relaxed(atomic##prefix##_t *v, \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 268 c_t o, c_t n) \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 269 { \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 270 return __cmpxchg_relaxed(&(v->counter), o, n, size); \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 271 } \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 272 static __always_inline \
9efbb355831014 Mark Rutland 2021-05-25 273 c_t arch_atomic##prefix##_cmpxchg_acquire(atomic##prefix##_t *v, \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 274 c_t o, c_t n) \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 275 { \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 276 return __cmpxchg_acquire(&(v->counter), o, n, size); \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 277 } \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 278 static __always_inline \
9efbb355831014 Mark Rutland 2021-05-25 279 c_t arch_atomic##prefix##_cmpxchg_release(atomic##prefix##_t *v, \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 280 c_t o, c_t n) \
fab957c11efe2f Palmer Dabbelt 2017-07-10 281 { \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 282 return __cmpxchg_release(&(v->counter), o, n, size); \
fab957c11efe2f Palmer Dabbelt 2017-07-10 283 } \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 284 static __always_inline \
9efbb355831014 Mark Rutland 2021-05-25 285 c_t arch_atomic##prefix##_cmpxchg(atomic##prefix##_t *v, c_t o, c_t n) \
fab957c11efe2f Palmer Dabbelt 2017-07-10 286 { \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 287 return __cmpxchg(&(v->counter), o, n, size); \
fab957c11efe2f Palmer Dabbelt 2017-07-10 288 }
fab957c11efe2f Palmer Dabbelt 2017-07-10 289
fab957c11efe2f Palmer Dabbelt 2017-07-10 290 #ifdef CONFIG_GENERIC_ATOMIC64
5ce6c1f3535fa8 Andrea Parri 2018-03-09 291 #define ATOMIC_OPS() \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 292 ATOMIC_OP(int, , 4)
fab957c11efe2f Palmer Dabbelt 2017-07-10 293 #else
5ce6c1f3535fa8 Andrea Parri 2018-03-09 294 #define ATOMIC_OPS() \
5ce6c1f3535fa8 Andrea Parri 2018-03-09 295 ATOMIC_OP(int, , 4) \
0754211847d7a2 Mark Rutland 2019-05-22 296 ATOMIC_OP(s64, 64, 8)
fab957c11efe2f Palmer Dabbelt 2017-07-10 297 #endif
fab957c11efe2f Palmer Dabbelt 2017-07-10 298
5ce6c1f3535fa8 Andrea Parri 2018-03-09 299 ATOMIC_OPS()
fab957c11efe2f Palmer Dabbelt 2017-07-10 300
9efbb355831014 Mark Rutland 2021-05-25 301 #define arch_atomic_xchg_relaxed arch_atomic_xchg_relaxed
9efbb355831014 Mark Rutland 2021-05-25 302 #define arch_atomic_xchg_acquire arch_atomic_xchg_acquire
9efbb355831014 Mark Rutland 2021-05-25 303 #define arch_atomic_xchg_release arch_atomic_xchg_release
9efbb355831014 Mark Rutland 2021-05-25 304 #define arch_atomic_xchg arch_atomic_xchg
9efbb355831014 Mark Rutland 2021-05-25 305 #define arch_atomic_cmpxchg_relaxed arch_atomic_cmpxchg_relaxed
9efbb355831014 Mark Rutland 2021-05-25 306 #define arch_atomic_cmpxchg_acquire arch_atomic_cmpxchg_acquire
9efbb355831014 Mark Rutland 2021-05-25 307 #define arch_atomic_cmpxchg_release arch_atomic_cmpxchg_release
9efbb355831014 Mark Rutland 2021-05-25 308 #define arch_atomic_cmpxchg arch_atomic_cmpxchg
8b699616f399b5 Andrea Parri 2018-12-01 309
fab957c11efe2f Palmer Dabbelt 2017-07-10 310 #undef ATOMIC_OPS
fab957c11efe2f Palmer Dabbelt 2017-07-10 311 #undef ATOMIC_OP
fab957c11efe2f Palmer Dabbelt 2017-07-10 312
9efbb355831014 Mark Rutland 2021-05-25 313 static __always_inline int arch_atomic_sub_if_positive(atomic_t *v, int offset)
fab957c11efe2f Palmer Dabbelt 2017-07-10 314 {
fab957c11efe2f Palmer Dabbelt 2017-07-10 315 int prev, rc;
fab957c11efe2f Palmer Dabbelt 2017-07-10 316
fab957c11efe2f Palmer Dabbelt 2017-07-10 @317 __asm__ __volatile__ (
5ce6c1f3535fa8 Andrea Parri 2018-03-09 318 "0: lr.w %[p], %[c]\n"
5ce6c1f3535fa8 Andrea Parri 2018-03-09 319 " sub %[rc], %[p], %[o]\n"
5ce6c1f3535fa8 Andrea Parri 2018-03-09 320 " bltz %[rc], 1f\n"
5ce6c1f3535fa8 Andrea Parri 2018-03-09 321 " sc.w.rl %[rc], %[rc], %[c]\n"
5ce6c1f3535fa8 Andrea Parri 2018-03-09 322 " bnez %[rc], 0b\n"
5ce6c1f3535fa8 Andrea Parri 2018-03-09 323 " fence rw, rw\n"
5ce6c1f3535fa8 Andrea Parri 2018-03-09 324 "1:\n"
fab957c11efe2f Palmer Dabbelt 2017-07-10 325 : [p]"=&r" (prev), [rc]"=&r" (rc), [c]"+A" (v->counter)
fab957c11efe2f Palmer Dabbelt 2017-07-10 326 : [o]"r" (offset)
fab957c11efe2f Palmer Dabbelt 2017-07-10 327 : "memory");
fab957c11efe2f Palmer Dabbelt 2017-07-10 328 return prev - offset;
fab957c11efe2f Palmer Dabbelt 2017-07-10 329 }
fab957c11efe2f Palmer Dabbelt 2017-07-10 330
9efbb355831014 Mark Rutland 2021-05-25 331 #define arch_atomic_dec_if_positive(v) arch_atomic_sub_if_positive(v, 1)
fab957c11efe2f Palmer Dabbelt 2017-07-10 332
fab957c11efe2f Palmer Dabbelt 2017-07-10 333 #ifndef CONFIG_GENERIC_ATOMIC64
9efbb355831014 Mark Rutland 2021-05-25 334 static __always_inline s64 arch_atomic64_sub_if_positive(atomic64_t *v, s64 offset)
fab957c11efe2f Palmer Dabbelt 2017-07-10 335 {
0754211847d7a2 Mark Rutland 2019-05-22 336 s64 prev;
0754211847d7a2 Mark Rutland 2019-05-22 337 long rc;
fab957c11efe2f Palmer Dabbelt 2017-07-10 338
fab957c11efe2f Palmer Dabbelt 2017-07-10 @339 __asm__ __volatile__ (
5ce6c1f3535fa8 Andrea Parri 2018-03-09 340 "0: lr.d %[p], %[c]\n"
5ce6c1f3535fa8 Andrea Parri 2018-03-09 341 " sub %[rc], %[p], %[o]\n"
5ce6c1f3535fa8 Andrea Parri 2018-03-09 342 " bltz %[rc], 1f\n"
5ce6c1f3535fa8 Andrea Parri 2018-03-09 343 " sc.d.rl %[rc], %[rc], %[c]\n"
5ce6c1f3535fa8 Andrea Parri 2018-03-09 344 " bnez %[rc], 0b\n"
5ce6c1f3535fa8 Andrea Parri 2018-03-09 345 " fence rw, rw\n"
5ce6c1f3535fa8 Andrea Parri 2018-03-09 346 "1:\n"
fab957c11efe2f Palmer Dabbelt 2017-07-10 347 : [p]"=&r" (prev), [rc]"=&r" (rc), [c]"+A" (v->counter)
fab957c11efe2f Palmer Dabbelt 2017-07-10 348 : [o]"r" (offset)
fab957c11efe2f Palmer Dabbelt 2017-07-10 349 : "memory");
fab957c11efe2f Palmer Dabbelt 2017-07-10 350 return prev - offset;
fab957c11efe2f Palmer Dabbelt 2017-07-10 351 }
fab957c11efe2f Palmer Dabbelt 2017-07-10 352
:::::: The code at line 204 was first introduced by commit
:::::: fab957c11efe2f405e08b9f0d080524bc2631428 RISC-V: Atomic and Locking Code
:::::: TO: Palmer Dabbelt <palmer(a)dabbelt.com>
:::::: CC: Palmer Dabbelt <palmer(a)dabbelt.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 2 weeks
Get cash app support to solve various issues
by ariabrown0123@gmail.com
Want to get cash app support?
Do you want to get help on cash app problems?
For this, you’ll need to reach experts by dialing the helpline number. With this, get easy troubleshooting solutions any time of the day. Make sure to ring on the helpline number so that you can directly speak to the techies. https://www.squarecashhelps.com/
9 months, 2 weeks