[driver-core:device_h_splitup 34/35] drivers//base/devcon.c:161:40: error: passing argument 2 of 'bus_find_device_by_fwnode' from incompatible pointer type
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git device_h_splitup
head: 8ac09706c581716b3ca938773ad29e50854fa674
commit: bfe8e3fa1f0d3946158a6526aefccc5160b51cb9 [34/35] device.h: move 'struct bus' stuff out to device/bus.h
config: i386-tinyconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
git checkout bfe8e3fa1f0d3946158a6526aefccc5160b51cb9
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from include/linux/device.h:29:0,
from include/linux/node.h:18,
from include/linux/cpu.h:17,
from arch/x86//kernel/irq.c:5:
>> include/linux/device/bus.h:193:62: warning: 'struct fwnode_handle' declared inside parameter list will not be visible outside of this definition or declaration
bus_find_device_by_fwnode(struct bus_type *bus, const struct fwnode_handle *fwnode)
^~~~~~~~~~~~~
--
In file included from include/linux/device.h:29:0,
from drivers//base/devcon.c:9:
>> include/linux/device/bus.h:193:62: warning: 'struct fwnode_handle' declared inside parameter list will not be visible outside of this definition or declaration
bus_find_device_by_fwnode(struct bus_type *bus, const struct fwnode_handle *fwnode)
^~~~~~~~~~~~~
drivers//base/devcon.c: In function 'device_connection_fwnode_match':
>> drivers//base/devcon.c:161:40: error: passing argument 2 of 'bus_find_device_by_fwnode' from incompatible pointer type [-Werror=incompatible-pointer-types]
dev = bus_find_device_by_fwnode(bus, con->fwnode);
^~~
In file included from include/linux/device.h:29:0,
from drivers//base/devcon.c:9:
include/linux/device/bus.h:193:1: note: expected 'const struct fwnode_handle *' but argument is of type 'struct fwnode_handle *'
bus_find_device_by_fwnode(struct bus_type *bus, const struct fwnode_handle *fwnode)
^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/bus_find_device_by_fwnode +161 drivers//base/devcon.c
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 @9 #include <linux/device.h>
637e9e52b185e5 Heikki Krogerus 2019-02-13 10 #include <linux/property.h>
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 11
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 12 static DEFINE_MUTEX(devcon_lock);
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 13 static LIST_HEAD(devcon_list);
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 14
637e9e52b185e5 Heikki Krogerus 2019-02-13 15 static void *
637e9e52b185e5 Heikki Krogerus 2019-02-13 16 fwnode_graph_devcon_match(struct fwnode_handle *fwnode, const char *con_id,
637e9e52b185e5 Heikki Krogerus 2019-02-13 17 void *data, devcon_match_fn_t match)
637e9e52b185e5 Heikki Krogerus 2019-02-13 18 {
637e9e52b185e5 Heikki Krogerus 2019-02-13 19 struct device_connection con = { .id = con_id };
637e9e52b185e5 Heikki Krogerus 2019-02-13 20 struct fwnode_handle *ep;
637e9e52b185e5 Heikki Krogerus 2019-02-13 21 void *ret;
637e9e52b185e5 Heikki Krogerus 2019-02-13 22
637e9e52b185e5 Heikki Krogerus 2019-02-13 23 fwnode_graph_for_each_endpoint(fwnode, ep) {
637e9e52b185e5 Heikki Krogerus 2019-02-13 24 con.fwnode = fwnode_graph_get_remote_port_parent(ep);
637e9e52b185e5 Heikki Krogerus 2019-02-13 25 if (!fwnode_device_is_available(con.fwnode))
637e9e52b185e5 Heikki Krogerus 2019-02-13 26 continue;
637e9e52b185e5 Heikki Krogerus 2019-02-13 27
637e9e52b185e5 Heikki Krogerus 2019-02-13 28 ret = match(&con, -1, data);
637e9e52b185e5 Heikki Krogerus 2019-02-13 29 fwnode_handle_put(con.fwnode);
637e9e52b185e5 Heikki Krogerus 2019-02-13 30 if (ret) {
637e9e52b185e5 Heikki Krogerus 2019-02-13 31 fwnode_handle_put(ep);
637e9e52b185e5 Heikki Krogerus 2019-02-13 32 return ret;
637e9e52b185e5 Heikki Krogerus 2019-02-13 33 }
637e9e52b185e5 Heikki Krogerus 2019-02-13 34 }
637e9e52b185e5 Heikki Krogerus 2019-02-13 35 return NULL;
637e9e52b185e5 Heikki Krogerus 2019-02-13 36 }
637e9e52b185e5 Heikki Krogerus 2019-02-13 37
fde777791eb83f Heikki Krogerus 2019-05-31 38 static void *
fde777791eb83f Heikki Krogerus 2019-05-31 39 fwnode_devcon_match(struct fwnode_handle *fwnode, const char *con_id,
fde777791eb83f Heikki Krogerus 2019-05-31 40 void *data, devcon_match_fn_t match)
fde777791eb83f Heikki Krogerus 2019-05-31 41 {
fde777791eb83f Heikki Krogerus 2019-05-31 42 struct device_connection con = { };
fde777791eb83f Heikki Krogerus 2019-05-31 43 void *ret;
fde777791eb83f Heikki Krogerus 2019-05-31 44 int i;
fde777791eb83f Heikki Krogerus 2019-05-31 45
fde777791eb83f Heikki Krogerus 2019-05-31 46 for (i = 0; ; i++) {
fde777791eb83f Heikki Krogerus 2019-05-31 47 con.fwnode = fwnode_find_reference(fwnode, con_id, i);
fde777791eb83f Heikki Krogerus 2019-05-31 48 if (IS_ERR(con.fwnode))
fde777791eb83f Heikki Krogerus 2019-05-31 49 break;
fde777791eb83f Heikki Krogerus 2019-05-31 50
fde777791eb83f Heikki Krogerus 2019-05-31 51 ret = match(&con, -1, data);
fde777791eb83f Heikki Krogerus 2019-05-31 52 fwnode_handle_put(con.fwnode);
fde777791eb83f Heikki Krogerus 2019-05-31 53 if (ret)
fde777791eb83f Heikki Krogerus 2019-05-31 54 return ret;
fde777791eb83f Heikki Krogerus 2019-05-31 55 }
fde777791eb83f Heikki Krogerus 2019-05-31 56
fde777791eb83f Heikki Krogerus 2019-05-31 57 return NULL;
fde777791eb83f Heikki Krogerus 2019-05-31 58 }
fde777791eb83f Heikki Krogerus 2019-05-31 59
44493062abc38e Heikki Krogerus 2019-08-29 60 /**
44493062abc38e Heikki Krogerus 2019-08-29 61 * fwnode_connection_find_match - Find connection from a device node
44493062abc38e Heikki Krogerus 2019-08-29 62 * @fwnode: Device node with the connection
44493062abc38e Heikki Krogerus 2019-08-29 63 * @con_id: Identifier for the connection
44493062abc38e Heikki Krogerus 2019-08-29 64 * @data: Data for the match function
44493062abc38e Heikki Krogerus 2019-08-29 65 * @match: Function to check and convert the connection description
44493062abc38e Heikki Krogerus 2019-08-29 66 *
44493062abc38e Heikki Krogerus 2019-08-29 67 * Find a connection with unique identifier @con_id between @fwnode and another
44493062abc38e Heikki Krogerus 2019-08-29 68 * device node. @match will be used to convert the connection description to
44493062abc38e Heikki Krogerus 2019-08-29 69 * data the caller is expecting to be returned.
44493062abc38e Heikki Krogerus 2019-08-29 70 */
44493062abc38e Heikki Krogerus 2019-08-29 71 void *fwnode_connection_find_match(struct fwnode_handle *fwnode,
44493062abc38e Heikki Krogerus 2019-08-29 72 const char *con_id, void *data,
44493062abc38e Heikki Krogerus 2019-08-29 73 devcon_match_fn_t match)
44493062abc38e Heikki Krogerus 2019-08-29 74 {
44493062abc38e Heikki Krogerus 2019-08-29 75 void *ret;
44493062abc38e Heikki Krogerus 2019-08-29 76
44493062abc38e Heikki Krogerus 2019-08-29 77 if (!fwnode || !match)
44493062abc38e Heikki Krogerus 2019-08-29 78 return NULL;
44493062abc38e Heikki Krogerus 2019-08-29 79
44493062abc38e Heikki Krogerus 2019-08-29 80 ret = fwnode_graph_devcon_match(fwnode, con_id, data, match);
44493062abc38e Heikki Krogerus 2019-08-29 81 if (ret)
44493062abc38e Heikki Krogerus 2019-08-29 82 return ret;
44493062abc38e Heikki Krogerus 2019-08-29 83
44493062abc38e Heikki Krogerus 2019-08-29 84 return fwnode_devcon_match(fwnode, con_id, data, match);
44493062abc38e Heikki Krogerus 2019-08-29 85 }
44493062abc38e Heikki Krogerus 2019-08-29 86 EXPORT_SYMBOL_GPL(fwnode_connection_find_match);
44493062abc38e Heikki Krogerus 2019-08-29 87
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 88 /**
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 89 * device_connection_find_match - Find physical connection to a device
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 90 * @dev: Device with the connection
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 91 * @con_id: Identifier for the connection
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 92 * @data: Data for the match function
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 93 * @match: Function to check and convert the connection description
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 94 *
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 95 * Find a connection with unique identifier @con_id between @dev and another
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 96 * device. @match will be used to convert the connection description to data the
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 97 * caller is expecting to be returned.
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 98 */
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 99 void *device_connection_find_match(struct device *dev, const char *con_id,
637e9e52b185e5 Heikki Krogerus 2019-02-13 100 void *data, devcon_match_fn_t match)
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 101 {
637e9e52b185e5 Heikki Krogerus 2019-02-13 102 struct fwnode_handle *fwnode = dev_fwnode(dev);
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 103 const char *devname = dev_name(dev);
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 104 struct device_connection *con;
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 105 void *ret = NULL;
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 106 int ep;
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 107
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 108 if (!match)
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 109 return NULL;
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 110
44493062abc38e Heikki Krogerus 2019-08-29 111 ret = fwnode_connection_find_match(fwnode, con_id, data, match);
637e9e52b185e5 Heikki Krogerus 2019-02-13 112 if (ret)
637e9e52b185e5 Heikki Krogerus 2019-02-13 113 return ret;
fde777791eb83f Heikki Krogerus 2019-05-31 114
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 115 mutex_lock(&devcon_lock);
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 116
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 117 list_for_each_entry(con, &devcon_list, list) {
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 118 ep = match_string(con->endpoint, 2, devname);
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 119 if (ep < 0)
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 120 continue;
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 121
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 122 if (con_id && strcmp(con->id, con_id))
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 123 continue;
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 124
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 125 ret = match(con, !ep, data);
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 126 if (ret)
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 127 break;
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 128 }
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 129
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 130 mutex_unlock(&devcon_lock);
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 131
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 132 return ret;
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 133 }
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 134 EXPORT_SYMBOL_GPL(device_connection_find_match);
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 135
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 136 extern struct bus_type platform_bus_type;
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 137 extern struct bus_type pci_bus_type;
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 138 extern struct bus_type i2c_bus_type;
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 139 extern struct bus_type spi_bus_type;
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 140
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 141 static struct bus_type *generic_match_buses[] = {
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 142 &platform_bus_type,
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 143 #ifdef CONFIG_PCI
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 144 &pci_bus_type,
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 145 #endif
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 146 #ifdef CONFIG_I2C
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 147 &i2c_bus_type,
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 148 #endif
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 149 #ifdef CONFIG_SPI_MASTER
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 150 &spi_bus_type,
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 151 #endif
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 152 NULL,
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 153 };
f2d9b66d84f3ff Heikki Krogerus 2018-03-20 154
80e04837a40f6f Heikki Krogerus 2019-02-13 155 static void *device_connection_fwnode_match(struct device_connection *con)
80e04837a40f6f Heikki Krogerus 2019-02-13 156 {
80e04837a40f6f Heikki Krogerus 2019-02-13 157 struct bus_type *bus;
80e04837a40f6f Heikki Krogerus 2019-02-13 158 struct device *dev;
80e04837a40f6f Heikki Krogerus 2019-02-13 159
80e04837a40f6f Heikki Krogerus 2019-02-13 160 for (bus = generic_match_buses[0]; bus; bus++) {
67843bbaf36eb0 Suzuki K Poulose 2019-07-23 @161 dev = bus_find_device_by_fwnode(bus, con->fwnode);
80e04837a40f6f Heikki Krogerus 2019-02-13 162 if (dev && !strncmp(dev_name(dev), con->id, strlen(con->id)))
80e04837a40f6f Heikki Krogerus 2019-02-13 163 return dev;
80e04837a40f6f Heikki Krogerus 2019-02-13 164
80e04837a40f6f Heikki Krogerus 2019-02-13 165 put_device(dev);
80e04837a40f6f Heikki Krogerus 2019-02-13 166 }
80e04837a40f6f Heikki Krogerus 2019-02-13 167 return NULL;
80e04837a40f6f Heikki Krogerus 2019-02-13 168 }
80e04837a40f6f Heikki Krogerus 2019-02-13 169
:::::: The code at line 161 was first introduced by commit
:::::: 67843bbaf36eb087714f40e783ee78e99e9e4b86 drivers: Introduce device lookup variants by fwnode
:::::: TO: Suzuki K Poulose <suzuki.poulose(a)arm.com>
:::::: CC: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 9 months
[driver-core:device_h_splitup 35/35] include/linux/device/class.h:152:21: warning: 'struct fwnode_handle' declared inside parameter list will not be visible outside of this definition or declaration
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git device_h_splitup
head: 8ac09706c581716b3ca938773ad29e50854fa674
commit: 8ac09706c581716b3ca938773ad29e50854fa674 [35/35] device.h: move 'struct class' stuff out to device/class.h
config: i386-tinyconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
git checkout 8ac09706c581716b3ca938773ad29e50854fa674
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/device.h:29:0,
from drivers/base/component.c:11:
include/linux/device/bus.h:193:62: warning: 'struct fwnode_handle' declared inside parameter list will not be visible outside of this definition or declaration
bus_find_device_by_fwnode(struct bus_type *bus, const struct fwnode_handle *fwnode)
^~~~~~~~~~~~~
In file included from include/linux/device.h:30:0,
from drivers/base/component.c:11:
>> include/linux/device/class.h:152:21: warning: 'struct fwnode_handle' declared inside parameter list will not be visible outside of this definition or declaration
const struct fwnode_handle *fwnode)
^~~~~~~~~~~~~
--
In file included from include/linux/device.h:29:0,
from drivers/base/devcon.c:9:
include/linux/device/bus.h:193:62: warning: 'struct fwnode_handle' declared inside parameter list will not be visible outside of this definition or declaration
bus_find_device_by_fwnode(struct bus_type *bus, const struct fwnode_handle *fwnode)
^~~~~~~~~~~~~
In file included from include/linux/device.h:30:0,
from drivers/base/devcon.c:9:
>> include/linux/device/class.h:152:21: warning: 'struct fwnode_handle' declared inside parameter list will not be visible outside of this definition or declaration
const struct fwnode_handle *fwnode)
^~~~~~~~~~~~~
drivers/base/devcon.c: In function 'device_connection_fwnode_match':
drivers/base/devcon.c:161:40: error: passing argument 2 of 'bus_find_device_by_fwnode' from incompatible pointer type [-Werror=incompatible-pointer-types]
dev = bus_find_device_by_fwnode(bus, con->fwnode);
^~~
In file included from include/linux/device.h:29:0,
from drivers/base/devcon.c:9:
include/linux/device/bus.h:193:1: note: expected 'const struct fwnode_handle *' but argument is of type 'struct fwnode_handle *'
bus_find_device_by_fwnode(struct bus_type *bus, const struct fwnode_handle *fwnode)
^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from include/linux/device.h:29:0,
from drivers//base/devcon.c:9:
include/linux/device/bus.h:193:62: warning: 'struct fwnode_handle' declared inside parameter list will not be visible outside of this definition or declaration
bus_find_device_by_fwnode(struct bus_type *bus, const struct fwnode_handle *fwnode)
^~~~~~~~~~~~~
In file included from include/linux/device.h:30:0,
from drivers//base/devcon.c:9:
>> include/linux/device/class.h:152:21: warning: 'struct fwnode_handle' declared inside parameter list will not be visible outside of this definition or declaration
const struct fwnode_handle *fwnode)
^~~~~~~~~~~~~
drivers//base/devcon.c: In function 'device_connection_fwnode_match':
drivers//base/devcon.c:161:40: error: passing argument 2 of 'bus_find_device_by_fwnode' from incompatible pointer type [-Werror=incompatible-pointer-types]
dev = bus_find_device_by_fwnode(bus, con->fwnode);
^~~
In file included from include/linux/device.h:29:0,
from drivers//base/devcon.c:9:
include/linux/device/bus.h:193:1: note: expected 'const struct fwnode_handle *' but argument is of type 'struct fwnode_handle *'
bus_find_device_by_fwnode(struct bus_type *bus, const struct fwnode_handle *fwnode)
^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +152 include/linux/device/class.h
143
144 /**
145 * class_find_device_by_fwnode : device iterator for locating a particular device
146 * matching the fwnode.
147 * @class: class type
148 * @fwnode: fwnode of the device to match.
149 */
150 static inline struct device *
151 class_find_device_by_fwnode(struct class *class,
> 152 const struct fwnode_handle *fwnode)
153 {
154 return class_find_device(class, NULL, fwnode, device_match_fwnode);
155 }
156
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 9 months
[staging:staging-testing 275/291] drivers/staging/exfat/exfat_super.c:747:5-11: preceding lock on line 707 (fwd)
by Julia Lawall
The return at line 747 may need an unlock.
julia
---------- Forwarded message ----------
Date: Sun, 3 Nov 2019 09:21:22 +0800
From: kbuild test robot <lkp(a)intel.com>
To: kbuild(a)lists.01.org
Cc: Julia Lawall <julia.lawall(a)lip6.fr>
Subject: [staging:staging-testing 275/291]
drivers/staging/exfat/exfat_super.c:747:5-11: preceding lock on line 707
CC: kbuild-all(a)lists.01.org
CC: devel(a)driverdev.osuosl.org
TO: Davidlohr Bueso <dave(a)stgolabs.net>
CC: "Greg Kroah-Hartman" <gregkh(a)linuxfoundation.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing
head: f6ea634f1c01cb75675481318930985d6073632a
commit: 3ae82f449cea00de5cd894feb8e9154b2da99b4e [275/291] drivers/staging/exfat: Replace binary semaphores for mutexes
:::::: branch date: 15 hours ago
:::::: commit date: 2 days ago
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Julia Lawall <julia.lawall(a)lip6.fr>
>> drivers/staging/exfat/exfat_super.c:747:5-11: preceding lock on line 707
# https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/commit...
git remote add staging https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
git remote update staging
git checkout 3ae82f449cea00de5cd894feb8e9154b2da99b4e
vim +747 drivers/staging/exfat/exfat_super.c
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 684
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 685 static int ffsReadFile(struct inode *inode, struct file_id_t *fid, void *buffer,
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 686 u64 count, u64 *rcount)
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 687 {
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 688 s32 offset, sec_offset, clu_offset;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 689 u32 clu;
076a8e2f769e87 Colin Ian King 2019-08-30 690 int ret = 0;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 691 sector_t LogSector;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 692 u64 oneblkread, read_bytes;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 693 struct buffer_head *tmp_bh = NULL;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 694 struct super_block *sb = inode->i_sb;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 695 struct fs_info_t *p_fs = &(EXFAT_SB(sb)->fs_info);
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 696 struct bd_info_t *p_bd = &(EXFAT_SB(sb)->bd_info);
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 697
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 698 /* check the validity of the given file id */
3b531807e605bf Valentin Vidic 2019-09-03 699 if (!fid)
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 700 return FFS_INVALIDFID;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 701
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 702 /* check the validity of pointer parameters */
3b531807e605bf Valentin Vidic 2019-09-03 703 if (!buffer)
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 704 return FFS_ERROR;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 705
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 706 /* acquire the lock for file system critical section */
3ae82f449cea00 Davidlohr Bueso 2019-10-30 @707 mutex_lock(&p_fs->v_mutex);
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 708
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 709 /* check if the given file ID is opened */
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 710 if (fid->type != TYPE_FILE) {
7ca8049f098070 Valdis Kletnieks 2019-10-24 711 ret = -EPERM;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 712 goto out;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 713 }
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 714
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 715 if (fid->rwoffset > fid->size)
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 716 fid->rwoffset = fid->size;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 717
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 718 if (count > (fid->size - fid->rwoffset))
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 719 count = fid->size - fid->rwoffset;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 720
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 721 if (count == 0) {
3b531807e605bf Valentin Vidic 2019-09-03 722 if (rcount)
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 723 *rcount = 0;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 724 ret = FFS_EOF;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 725 goto out;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 726 }
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 727
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 728 read_bytes = 0;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 729
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 730 while (count > 0) {
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 731 clu_offset = (s32)(fid->rwoffset >> p_fs->cluster_size_bits);
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 732 clu = fid->start_clu;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 733
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 734 if (fid->flags == 0x03) {
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 735 clu += clu_offset;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 736 } else {
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 737 /* hint information */
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 738 if ((clu_offset > 0) && (fid->hint_last_off > 0) &&
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 739 (clu_offset >= fid->hint_last_off)) {
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 740 clu_offset -= fid->hint_last_off;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 741 clu = fid->hint_last_clu;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 742 }
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 743
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 744 while (clu_offset > 0) {
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 745 /* clu = FAT_read(sb, clu); */
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 746 if (FAT_read(sb, clu, &clu) == -1)
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 @747 return FFS_MEDIAERR;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 748
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 749 clu_offset--;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 750 }
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 751 }
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 752
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 753 /* hint information */
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 754 fid->hint_last_off = (s32)(fid->rwoffset >>
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 755 p_fs->cluster_size_bits);
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 756 fid->hint_last_clu = clu;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 757
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 758 /* byte offset in cluster */
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 759 offset = (s32)(fid->rwoffset & (p_fs->cluster_size - 1));
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 760
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 761 /* sector offset in cluster */
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 762 sec_offset = offset >> p_bd->sector_size_bits;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 763
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 764 /* byte offset in sector */
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 765 offset &= p_bd->sector_size_mask;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 766
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 767 LogSector = START_SECTOR(clu) + sec_offset;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 768
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 769 oneblkread = (u64)(p_bd->sector_size - offset);
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 770 if (oneblkread > count)
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 771 oneblkread = count;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 772
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 773 if ((offset == 0) && (oneblkread == p_bd->sector_size)) {
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 774 if (sector_read(sb, LogSector, &tmp_bh, 1) !=
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 775 FFS_SUCCESS)
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 776 goto err_out;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 777 memcpy((char *)buffer + read_bytes,
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 778 (char *)tmp_bh->b_data, (s32)oneblkread);
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 779 } else {
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 780 if (sector_read(sb, LogSector, &tmp_bh, 1) !=
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 781 FFS_SUCCESS)
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 782 goto err_out;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 783 memcpy((char *)buffer + read_bytes,
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 784 (char *)tmp_bh->b_data + offset,
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 785 (s32)oneblkread);
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 786 }
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 787 count -= oneblkread;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 788 read_bytes += oneblkread;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 789 fid->rwoffset += oneblkread;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 790 }
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 791 brelse(tmp_bh);
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 792
:::::: The code at line 747 was first introduced by commit
:::::: c48c9f7ff32b8b3965a08e40eb6763682d905b5d staging: exfat: add exfat filesystem code to staging
:::::: TO: Valdis Klētnieks <valdis.kletnieks(a)vt.edu>
:::::: CC: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 9 months
[RFC PATCH] mm: compaction_states[] can be static
by kbuild test robot
Fixes: ff0a4b0b75b6 ("mm: Proactive compaction")
Signed-off-by: kbuild test robot <lkp(a)intel.com>
---
compaction.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/compaction.c b/mm/compaction.c
index b337f25b329dc..eb6e82e25ccac 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -26,7 +26,7 @@
#include "internal.h"
#ifdef CONFIG_COMPACTION
-struct compaction_state compaction_states[MAX_NUMNODES];
+static struct compaction_state compaction_states[MAX_NUMNODES];
#endif
#ifdef CONFIG_COMPACTION
2 years, 9 months
Re: [RFC v2] mm: Proactive compaction
by kbuild test robot
Hi Nitin,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on mmotm/master]
url: https://github.com/0day-ci/linux/commits/Nitin-Gupta/mm-Proactive-compact...
base: git://git.cmpxchg.org/linux-mmotm.git master
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-6-g57f8611-dirty
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> mm/compaction.c:29:25: sparse: sparse: symbol 'compaction_states' was not declared. Should it be static?
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast from restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected unsigned long flags @@ got restricted gfpunsigned long flags @@
include/trace/events/compaction.h:170:1: sparse: expected unsigned long flags
include/trace/events/compaction.h:170:1: sparse: got restricted gfp_t [usertype] gfp_mask
include/trace/events/compaction.h:170:1: sparse: sparse: cast to restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: cast to restricted gfp_t
include/trace/events/compaction.h:170:1: sparse: sparse: restricted gfp_t degrades to integer
include/trace/events/compaction.h:170:1: sparse: sparse: restricted gfp_t degrades to integer
include/linux/gfp.h:318:27: sparse: sparse: restricted gfp_t degrades to integer
mm/compaction.c:2343:39: sparse: sparse: incorrect type in initializer (different base types) @@ expected int may_perform_io @@ got restricted gint may_perform_io @@
mm/compaction.c:2343:39: sparse: expected int may_perform_io
mm/compaction.c:2343:39: sparse: got restricted gfp_t
mm/compaction.c:485:13: sparse: sparse: context imbalance in 'compact_lock_irqsave' - wrong count at exit
include/linux/spinlock.h:393:9: sparse: sparse: context imbalance in 'compact_unlock_should_abort' - unexpected unlock
mm/compaction.c:641:39: sparse: sparse: context imbalance in 'isolate_freepages_block' - unexpected unlock
mm/compaction.c:1050:39: sparse: sparse: context imbalance in 'isolate_migratepages_block' - unexpected unlock
Please review and possibly fold the followup patch.
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 9 months
[radeon-alex:amd-mainline-dkms-5.2 2129/2647] drivers/gpu/drm/ttm/ttm_bo_util.c:274:48: error: too many arguments to function 'kmap_atomic_prot'
by kbuild test robot
tree: git://people.freedesktop.org/~agd5f/linux.git amd-mainline-dkms-5.2
head: b027ed8d9051470f4ed6bc071fcde172fe1fc595
commit: f2d51786363ee2a72c55570835e4c79066af2782 [2129/2647] drm/amdkcl: Test whether kmap_atomic() wants one argument
config: i386-randconfig-h004-201944 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
git checkout f2d51786363ee2a72c55570835e4c79066af2782
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
^~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
from <command-line>:0:
include/kcl/kcl_mm_types.h: At top level:
include/kcl/kcl_mm_types.h:10:3: error: conflicting types for 'pfn_t'
} pfn_t;
^~~~~
In file included from include/asm-generic/memory_model.h:5:0,
from arch/x86/include/asm/page.h:76,
from arch/x86/include/asm/thread_info.h:12,
from include/linux/thread_info.h:38,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rbtree.h:34,
from include/drm/drm_mm.h:41,
from include/drm/drm_vma_manager.h:26,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/pfn.h:15:3: note: previous declaration of 'pfn_t' was here
} pfn_t;
^~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
from <command-line>:0:
include/kcl/kcl_mm_types.h:33:13: error: conflicting types for 'vm_fault_t'
typedef int vm_fault_t;
^~~~~~~~~~
In file included from include/drm/drm_mm.h:43:0,
from include/drm/drm_vma_manager.h:26,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm_types.h:631:32: note: previous declaration of 'vm_fault_t' was here
typedef __bitwise unsigned int vm_fault_t;
^~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
from <command-line>:0:
include/kcl/kcl_mm_types.h:35:26: error: conflicting types for 'vmf_insert_mixed'
static inline vm_fault_t vmf_insert_mixed(struct vm_area_struct *vma,
^~~~~~~~~~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:2587:12: note: previous declaration of 'vmf_insert_mixed' was here
vm_fault_t vmf_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
^~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
from <command-line>:0:
include/kcl/kcl_mm_types.h: In function 'vmf_insert_mixed':
include/kcl/kcl_mm_types.h:41:8: error: implicit declaration of function 'vm_insert_mixed'; did you mean 'vmf_insert_mixed'? [-Werror=implicit-function-declaration]
err = vm_insert_mixed(vma, addr, pfn_t_to_pfn(pfn));
^~~~~~~~~~~~~~~
vmf_insert_mixed
include/kcl/kcl_mm_types.h: At top level:
include/kcl/kcl_mm_types.h:53:26: error: conflicting types for 'vmf_insert_pfn'
static inline vm_fault_t vmf_insert_pfn(struct vm_area_struct *vma,
^~~~~~~~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:2583:12: note: previous declaration of 'vmf_insert_pfn' was here
vm_fault_t vmf_insert_pfn(struct vm_area_struct *vma, unsigned long addr,
^~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
from <command-line>:0:
include/kcl/kcl_mm_types.h: In function 'vmf_insert_pfn':
include/kcl/kcl_mm_types.h:56:13: error: implicit declaration of function 'vm_insert_pfn'; did you mean 'vmf_insert_pfn'? [-Werror=implicit-function-declaration]
int err = vm_insert_pfn(vma, addr, pfn);
^~~~~~~~~~~~~
vmf_insert_pfn
drivers/gpu/drm/ttm/ttm_bo_util.c: In function 'ttm_kmap_atomic_prot':
drivers/gpu/drm/ttm/ttm_bo_util.c:265:57: error: 'KM_USER0' undeclared (first use in this function); did you mean 'SI_USER'?
#define __kcl__kmap_atomic(__page) kmap_atomic(__page, KM_USER0)
^
drivers/gpu/drm/ttm/ttm_bo_util.c:303:10: note: in expansion of macro '__kcl__kmap_atomic'
return __kcl__kmap_atomic(page);
^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/ttm/ttm_bo_util.c:265:57: note: each undeclared identifier is reported only once for each function it appears in
#define __kcl__kmap_atomic(__page) kmap_atomic(__page, KM_USER0)
^
drivers/gpu/drm/ttm/ttm_bo_util.c:303:10: note: in expansion of macro '__kcl__kmap_atomic'
return __kcl__kmap_atomic(page);
^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/ttm/ttm_bo_util.c:265:37: error: too many arguments to function 'kmap_atomic'
#define __kcl__kmap_atomic(__page) kmap_atomic(__page, KM_USER0)
^
drivers/gpu/drm/ttm/ttm_bo_util.c:303:10: note: in expansion of macro '__kcl__kmap_atomic'
return __kcl__kmap_atomic(page);
^~~~~~~~~~~~~~~~~~
In file included from include/linux/highmem.h:35:0,
from include/drm/drmP.h:40,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
arch/x86/include/asm/highmem.h:68:7: note: declared here
void *kmap_atomic(struct page *page);
^~~~~~~~~~~
>> drivers/gpu/drm/ttm/ttm_bo_util.c:274:48: error: too many arguments to function 'kmap_atomic_prot'
#define __ttm_kmap_atomic_prot(__page, __prot) kmap_atomic_prot(__page, KM_USER0, __prot)
^
drivers/gpu/drm/ttm/ttm_bo_util.c:305:10: note: in expansion of macro '__ttm_kmap_atomic_prot'
return __ttm_kmap_atomic_prot(page, prot);
^~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/highmem.h:35:0,
from include/drm/drmP.h:40,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
arch/x86/include/asm/highmem.h:67:7: note: declared here
void *kmap_atomic_prot(struct page *page, pgprot_t prot);
^~~~~~~~~~~~~~~~
drivers/gpu/drm/ttm/ttm_bo_util.c: In function 'ttm_kunmap_atomic_prot':
drivers/gpu/drm/ttm/ttm_bo_util.c:319:28: error: macro "kunmap_atomic" passed 2 arguments, but takes just 1
__kcl__kunmap_atomic(addr);
^
drivers/gpu/drm/ttm/ttm_bo_util.c:266:39: error: 'kunmap_atomic' undeclared (first use in this function); did you mean '__kunmap_atomic'?
#define __kcl__kunmap_atomic(__addr) kunmap_atomic(__addr, KM_USER0)
^
drivers/gpu/drm/ttm/ttm_bo_util.c:319:3: note: in expansion of macro '__kcl__kunmap_atomic'
__kcl__kunmap_atomic(addr);
^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/ttm/ttm_bo_util.c:321:27: error: macro "kunmap_atomic" passed 2 arguments, but takes just 1
__ttm_kunmap_atomic(addr);
^
drivers/gpu/drm/ttm/ttm_bo_util.c: In function 'ttm_kmap_atomic_prot':
drivers/gpu/drm/ttm/ttm_bo_util.c:306:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
cc1: some warnings being treated as errors
vim +/kmap_atomic_prot +274 drivers/gpu/drm/ttm/ttm_bo_util.c
271
272 #ifdef CONFIG_X86
273 #if !defined(HAVE_KMAP_ATOMIC_ONE_ARG)
> 274 #define __ttm_kmap_atomic_prot(__page, __prot) kmap_atomic_prot(__page, KM_USER0, __prot)
275 #define __ttm_kunmap_atomic(__addr) kunmap_atomic(__addr, KM_USER0)
276 #else
277 #define __ttm_kunmap_atomic(__addr) kunmap_atomic(__addr)
278 #define __ttm_kmap_atomic_prot(__page, __prot) kmap_atomic_prot(__page, __prot)
279 #endif
280 #else
281 #define __ttm_kmap_atomic_prot(__page, __prot) vmap(&__page, 1, 0, __prot)
282 #define __ttm_kunmap_atomic(__addr) vunmap(__addr)
283 #endif
284
285
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 9 months
[lkp] [+916 bytes kernel size regression] [i386-tinyconfig] [cb51095140] perf: Allocate space in task_struct for pmu specific data
by kbuild test robot
FYI, we noticed a +916 bytes kernel size regression due to commit:
commit: cb510951400c3e63005543e4a5fa53542e46595a (perf: Allocate space in task_struct for pmu specific data)
Details as below (size data is obtained by `nm --size-sort vmlinux`):
8b2214ec: change Makefile
cb510951: perf: Allocate space in task_struct for pmu specific data
+----------------------------+----------+----------+-------+
| symbol | 8b2214ec | cb510951 | delta |
+----------------------------+----------+----------+-------+
| bzImage | 438720 | 439136 | 416 |
| nm.t.perf_event_alloc | 1595 | 1889 | 294 |
| nm.t.get_task_ctx_data_rcu | 0 | 216 | 216 |
| nm.t._free_event | 410 | 545 | 135 |
| nm.t.put_task_ctx_data_rcu | 0 | 112 | 112 |
| nm.T.perf_event_fork | 20 | 118 | 98 |
| nm.t.free_ctx_data | 0 | 19 | 19 |
| nm.T.perf_event_exit_task | 583 | 598 | 15 |
| nm.T.perf_event_init_task | 438 | 448 | 10 |
| nm.t.perf_read | 474 | 481 | 7 |
| nm.t.inherit_event | 357 | 362 | 5 |
| nm.t.find_get_context | 359 | 364 | 5 |
| nm.b.nr_task_data_events | 0 | 4 | 4 |
| nm.t.kzalloc | 10 | 8 | -2 |
| nm.D.linux_banner | 119 | 117 | -2 |
+----------------------------+----------+----------+-------+
Thanks,
Kbuild test robot
2 years, 9 months
Re: [PATCH RFC v4 2/2] dmaengine: avalon-test: Intel Avalon-MM DMA Interface for PCIe test
by kbuild test robot
Hi Alexander,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on linus/master]
[also build test WARNING on v5.4-rc5]
[cannot apply to next-20191031]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Alexander-Gordeev/dmaengine-aval...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 0dbe6cb8f7e05bc9611602ef45980a6c57b245a3
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-6-g57f8611-dirty
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/dma/avalon-test/avalon-dev.c:42:30: sparse: sparse: symbol 'avalon_dev_fops' was not declared. Should it be static?
--
>> drivers/dma/avalon-test/avalon-ioctl.c:23:34: sparse: sparse: duplicate [noderef]
>> drivers/dma/avalon-test/avalon-ioctl.c:23:34: sparse: sparse: multiple address space given: <asn:1> & <asn:1>
drivers/dma/avalon-test/avalon-ioctl.c:23:57: sparse: sparse: multiple address space given: <asn:1> & <asn:1>
--
>> drivers/dma/avalon-test/avalon-xfer.c:52:35: sparse: sparse: mixing different enum types:
>> drivers/dma/avalon-test/avalon-xfer.c:52:35: sparse: unsigned int enum dma_data_direction
>> drivers/dma/avalon-test/avalon-xfer.c:52:35: sparse: unsigned int enum dma_transfer_direction
drivers/dma/avalon-test/avalon-xfer.c:92:65: sparse: sparse: mixing different enum types:
drivers/dma/avalon-test/avalon-xfer.c:92:65: sparse: unsigned int enum dma_data_direction
drivers/dma/avalon-test/avalon-xfer.c:92:65: sparse: unsigned int enum dma_transfer_direction
drivers/dma/avalon-test/avalon-xfer.c:117:56: sparse: sparse: mixing different enum types:
drivers/dma/avalon-test/avalon-xfer.c:117:56: sparse: unsigned int enum dma_data_direction
drivers/dma/avalon-test/avalon-xfer.c:117:56: sparse: unsigned int enum dma_transfer_direction
Please review and possibly fold the followup patch.
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 9 months
[RFC PATCH] dmaengine: avalon-test: avalon_dev_fops can be static
by kbuild test robot
Fixes: 9ea3a9a1478c ("dmaengine: avalon-test: Intel Avalon-MM DMA Interface for PCIe test")
Signed-off-by: kbuild test robot <lkp(a)intel.com>
---
avalon-dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/avalon-test/avalon-dev.c b/drivers/dma/avalon-test/avalon-dev.c
index 34d9507893790..937ac3663efd7 100644
--- a/drivers/dma/avalon-test/avalon-dev.c
+++ b/drivers/dma/avalon-test/avalon-dev.c
@@ -39,7 +39,7 @@ unsigned int dmas_per_cpu = 8;
module_param(dmas_per_cpu, uint, 0644);
MODULE_PARM_DESC(dmas_per_cpu, "Device memory size (default: 8)");
-const struct file_operations avalon_dev_fops = {
+static const struct file_operations avalon_dev_fops = {
.llseek = generic_file_llseek,
.unlocked_ioctl = avalon_dev_ioctl,
.mmap = avalon_dev_mmap,
2 years, 9 months
Re: [PATCH v4 1/2] dmaengine: avalon: Intel Avalon-MM DMA Interface for PCIe
by kbuild test robot
Hi Alexander,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.4-rc5]
[cannot apply to next-20191031]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Alexander-Gordeev/dmaengine-aval...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 0dbe6cb8f7e05bc9611602ef45980a6c57b245a3
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-6-g57f8611-dirty
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/dma/avalon/avalon-hw.c:17:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] src_lo @@ got restrunsigned int [usertype] src_lo @@
>> drivers/dma/avalon/avalon-hw.c:17:22: sparse: expected unsigned int [usertype] src_lo
>> drivers/dma/avalon/avalon-hw.c:17:22: sparse: got restricted __le32 [usertype]
>> drivers/dma/avalon/avalon-hw.c:18:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] src_hi @@ got restrunsigned int [usertype] src_hi @@
>> drivers/dma/avalon/avalon-hw.c:18:22: sparse: expected unsigned int [usertype] src_hi
drivers/dma/avalon/avalon-hw.c:18:22: sparse: got restricted __le32 [usertype]
>> drivers/dma/avalon/avalon-hw.c:19:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] dst_lo @@ got restrunsigned int [usertype] dst_lo @@
>> drivers/dma/avalon/avalon-hw.c:19:22: sparse: expected unsigned int [usertype] dst_lo
drivers/dma/avalon/avalon-hw.c:19:22: sparse: got restricted __le32 [usertype]
>> drivers/dma/avalon/avalon-hw.c:20:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] dst_hi @@ got restrunsigned int [usertype] dst_hi @@
>> drivers/dma/avalon/avalon-hw.c:20:22: sparse: expected unsigned int [usertype] dst_hi
drivers/dma/avalon/avalon-hw.c:20:22: sparse: got restricted __le32 [usertype]
>> drivers/dma/avalon/avalon-hw.c:21:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] ctl_dma_len @@ got restrunsigned int [usertype] ctl_dma_len @@
>> drivers/dma/avalon/avalon-hw.c:21:27: sparse: expected unsigned int [usertype] ctl_dma_len
drivers/dma/avalon/avalon-hw.c:21:27: sparse: got restricted __le32 [usertype]
>> drivers/dma/avalon/avalon-hw.c:22:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int @@ got restricted __le32unsigned int @@
>> drivers/dma/avalon/avalon-hw.c:22:27: sparse: expected unsigned int
drivers/dma/avalon/avalon-hw.c:22:27: sparse: got restricted __le32 [usertype]
drivers/dma/avalon/avalon-hw.c:23:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int @@ got restricted __le32unsigned int @@
drivers/dma/avalon/avalon-hw.c:23:27: sparse: expected unsigned int
drivers/dma/avalon/avalon-hw.c:23:27: sparse: got restricted __le32 [usertype]
drivers/dma/avalon/avalon-hw.c:24:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int @@ got restricted __le32unsigned int @@
drivers/dma/avalon/avalon-hw.c:24:27: sparse: expected unsigned int
drivers/dma/avalon/avalon-hw.c:24:27: sparse: got restricted __le32 [usertype]
--
>> drivers/dma/avalon/avalon-core.c:346:27: sparse: sparse: mixing different enum types:
>> drivers/dma/avalon/avalon-core.c:346:27: sparse: unsigned int enum dma_transfer_direction
>> drivers/dma/avalon/avalon-core.c:346:27: sparse: unsigned int enum dma_data_direction
vim +17 drivers/dma/avalon/avalon-hw.c
13
14 static void setup_desc(struct dma_desc *desc, u32 desc_id,
15 u64 dest, u64 src, u32 size)
16 {
> 17 desc->src_lo = cpu_to_le32(src & 0xfffffffful);
> 18 desc->src_hi = cpu_to_le32((src >> 32));
> 19 desc->dst_lo = cpu_to_le32(dest & 0xfffffffful);
> 20 desc->dst_hi = cpu_to_le32((dest >> 32));
> 21 desc->ctl_dma_len = cpu_to_le32((size >> 2) | (desc_id << 18));
> 22 desc->reserved[0] = cpu_to_le32(0x0);
23 desc->reserved[1] = cpu_to_le32(0x0);
24 desc->reserved[2] = cpu_to_le32(0x0);
25 }
26
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 9 months