LB2_LINUX_TEST_SRC([class_create_without_module_arg], [
#include <linux/device/class.h>
],[
- struct class *class __attribute__ ((unused));
+ struct class *class;
class = class_create("empty");
if (IS_ERR(class))
- /* checked */;
+ return PTR_ERR(class);
],[-Werror])
])
AC_DEFUN([LC_HAVE_CLASS_CREATE_MODULE_ARG], [
/**
* return device operations vector for this object
*/
-static const inline struct lu_device_operations *
+static inline const struct lu_device_operations *
lu_object_ops(const struct lu_object *o)
{
return o->lo_dev->ld_ops;
* @{
*/
const char *ll_opcode2str(__u32 opcode);
-const int ll_str2opcode(const char *ops);
+int ll_str2opcode(const char *ops);
#ifdef CONFIG_PROC_FS
void ptlrpc_lprocfs_register_obd(struct obd_device *obd);
void ptlrpc_lprocfs_unregister_obd(struct obd_device *obd);
return rc;
}
-const static struct proc_ops pool_proc_operations = {
+static const struct proc_ops pool_proc_operations = {
.proc_open = pool_proc_open,
.proc_read = seq_read,
.proc_lseek = seq_lseek,
return 0;
}
-const static struct lov_layout_operations lov_dispatch[] = {
+static const struct lov_layout_operations lov_dispatch[] = {
[LLT_EMPTY] = {
.llo_init = lov_init_empty,
.llo_delete = lov_delete_empty,
return rc;
}
-const static struct proc_ops pool_proc_operations = {
+static const struct proc_ops pool_proc_operations = {
.proc_open = pool_proc_open,
.proc_read = seq_read,
.proc_lseek = seq_lseek,
int npages;
int i;
int rc;
+ gfp_t gfp;
+
ENTRY;
max_pages = rp->rp_exp->exp_obd->u.cli.cl_max_pages_per_rpc;
inode = op_data->op_data;
fid = &op_data->op_fid1;
LASSERT(inode != NULL);
+ gfp = mapping_gfp_mask(inode->i_mapping);
OBD_ALLOC_PTR_ARRAY_LARGE(page_pool, max_pages);
if (page_pool != NULL) {
}
for (npages = 1; npages < max_pages; npages++) {
- page = page_cache_alloc(inode->i_mapping);
+ page = __page_cache_alloc(gfp);
if (page == NULL)
break;
page_pool[npages] = page;
static const char spaces[] = " ";
-static int inline width(const char *str, int len)
+static inline int width(const char *str, int len)
{
return len - min((int)strlen(str), 15);
}
}
skcipher_request_set_crypt(req, &src, &dst, src.length, iv);
- if (!iv)
+ if (!iv) {
skcipher_request_set_crypt_iv(req);
+ }
if (enc)
rc = crypto_skcipher_encrypt_iv(req, &dst, &src,
return ll_rpc_opcode_table[offset].opname;
}
-const int ll_str2opcode(const char *ops)
+int ll_str2opcode(const char *ops)
{
int i;