text stringlengths 213 7.14k | idx int64 16 12.5k |
|---|---|
--- initial
+++ final
@@ -1,44 +1,42 @@
struct kbd_data *kbd_alloc(void) {
struct kbd_data *kbd;
int i;
kbd = kzalloc(sizeof(struct kbd_data), GFP_KERNEL);
if (!kbd) goto out;
kbd->key_maps = kzalloc(sizeof(key_maps), GFP_KERNEL);
if (!kbd->key_maps) goto out_kbd;
for (i = 0; i < ARRAY_SIZE(key_ma... | 705 |
--- initial
+++ final
@@ -1,67 +1,66 @@
static int nexio_init(struct usbtouch_usb *usbtouch) {
struct usb_device *dev = interface_to_usbdev(usbtouch->interface);
struct usb_host_interface *interface = usbtouch->interface->cur_altsetting;
struct nexio_priv *priv;
int ret = -ENOMEM;
int actual_len, i;
... | 706 |
--- initial
+++ final
@@ -1,12 +1,11 @@
static int __init copy_keymap(void) {
const struct key_entry *key;
struct key_entry *new_keymap;
unsigned int length = 1;
for (key = keymap; key->type != KE_END; key++)
length++;
- new_keymap = kmalloc(length * sizeof(struct key_entry), GFP_KERNEL);
+ new_keym... | 707 |
--- initial
+++ final
@@ -1,16 +1,15 @@
static void reg_w_buf(struct gspca_dev *gspca_dev, const u8 *buffer, u16 len) {
if (len <= USB_BUF_SZ) {
memcpy(gspca_dev->usb_buf, buffer, len);
usb_control_msg(gspca_dev->dev, usb_sndctrlpipe(gspca_dev->dev, 0), 0, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,... | 708 |
--- initial
+++ final
@@ -1,31 +1,30 @@
static int firmware_download(struct usb_device *udev) {
int ret = 0, actual_length;
const struct firmware *fw = NULL;
void *fwbuf = NULL;
size_t fwlength = 0, offset;
size_t max_packet_size;
ret = request_firmware(&fw, firmware_name, &udev->dev);
if (ret) {
... | 710 |
--- initial
+++ final
@@ -1,63 +1,62 @@
struct videocodec *videocodec_attach(struct videocodec_master *master) {
struct codec_list *h = codeclist_top;
struct attached_list *a, *ptr;
struct videocodec *codec;
int res;
if (!master) {
dprintk(1, KERN_ERR "videocodec_attach: no data\n");
return NU... | 711 |
--- initial
+++ final
@@ -1,64 +1,63 @@
int ceph_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size, int flags) {
struct inode *inode = dentry->d_inode;
struct ceph_inode_info *ci = ceph_inode(inode);
struct ceph_vxattr_cb *vxattrs = ceph_inode_vxattrs(inode);
int err;
int ... | 712 |
--- initial
+++ final
@@ -1,118 +1,117 @@
static int jffs2_symlink(struct inode *dir_i, struct dentry *dentry, const char *target) {
struct jffs2_inode_info *f, *dir_f;
struct jffs2_sb_info *c;
struct inode *inode;
struct jffs2_raw_inode *ri;
struct jffs2_raw_dirent *rd;
struct jffs2_full_dnode *fn;
... | 713 |
--- initial
+++ final
@@ -1,24 +1,22 @@
static int vf610_ocotp_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
struct resource *res;
struct vf610_ocotp *ocotp_dev;
ocotp_dev = devm_kzalloc(&pdev->dev, sizeof(struct vf610_ocotp), GFP_KERNEL);
if (!ocotp_dev) return -ENOMEM;
res ... | 714 |
--- initial
+++ final
@@ -1,24 +1,22 @@
static int vf610_ocotp_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
struct resource *res;
struct vf610_ocotp *ocotp_dev;
ocotp_dev = devm_kzalloc(&pdev->dev, sizeof(struct vf610_ocotp), GFP_KERNEL);
if (!ocotp_dev) return -ENOMEM;
res ... | 715 |
--- initial
+++ final
@@ -1,25 +1,23 @@
static int imx_ocotp_probe(struct platform_device *pdev) {
const struct of_device_id *of_id;
struct device *dev = &pdev->dev;
struct resource *res;
struct ocotp_priv *priv;
struct nvmem_device *nvmem;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (... | 716 |
--- initial
+++ final
@@ -1,25 +1,23 @@
static int imx_ocotp_probe(struct platform_device *pdev) {
const struct of_device_id *of_id;
struct device *dev = &pdev->dev;
struct resource *res;
struct ocotp_priv *priv;
struct nvmem_device *nvmem;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (... | 717 |
--- initial
+++ final
@@ -1,23 +1,21 @@
static int uniphier_efuse_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
struct resource *res;
struct nvmem_device *nvmem;
struct nvmem_config econfig = {};
struct uniphier_efuse_priv *priv;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KE... | 718 |
--- initial
+++ final
@@ -1,23 +1,21 @@
static int uniphier_efuse_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
struct resource *res;
struct nvmem_device *nvmem;
struct nvmem_config econfig = {};
struct uniphier_efuse_priv *priv;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KE... | 719 |
--- initial
+++ final
@@ -1,28 +1,26 @@
static int rockchip_efuse_probe(struct platform_device *pdev) {
struct resource *res;
struct nvmem_device *nvmem;
struct rockchip_efuse_chip *efuse;
const struct of_device_id *match;
struct device *dev = &pdev->dev;
match = of_match_device(dev->driver->of_match... | 720 |
--- initial
+++ final
@@ -1,28 +1,26 @@
static int rockchip_efuse_probe(struct platform_device *pdev) {
struct resource *res;
struct nvmem_device *nvmem;
struct rockchip_efuse_chip *efuse;
const struct of_device_id *match;
struct device *dev = &pdev->dev;
match = of_match_device(dev->driver->of_match... | 721 |
--- initial
+++ final
@@ -1,23 +1,21 @@
static int mtk_efuse_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
struct resource *res;
struct nvmem_device *nvmem;
struct nvmem_config econfig = {};
struct mtk_efuse_priv *priv;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
... | 722 |
--- initial
+++ final
@@ -1,23 +1,21 @@
static int mtk_efuse_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
struct resource *res;
struct nvmem_device *nvmem;
struct nvmem_config econfig = {};
struct mtk_efuse_priv *priv;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
... | 723 |
--- initial
+++ final
@@ -1,30 +1,28 @@
static int meson_mx_efuse_probe(struct platform_device *pdev) {
const struct meson_mx_efuse_platform_data *drvdata;
struct meson_mx_efuse *efuse;
struct resource *res;
drvdata = of_device_get_match_data(&pdev->dev);
if (!drvdata) return -EINVAL;
efuse = devm_kz... | 724 |
--- initial
+++ final
@@ -1,30 +1,28 @@
static int meson_mx_efuse_probe(struct platform_device *pdev) {
const struct meson_mx_efuse_platform_data *drvdata;
struct meson_mx_efuse *efuse;
struct resource *res;
drvdata = of_device_get_match_data(&pdev->dev);
if (!drvdata) return -EINVAL;
efuse = devm_kz... | 725 |
--- initial
+++ final
@@ -1,12 +1,10 @@
static int meson_efuse_probe(struct platform_device *pdev) {
struct nvmem_device *nvmem;
unsigned int size;
if (meson_sm_call(SM_EFUSE_USER_MAX, &size, 0, 0, 0, 0, 0) < 0) return -EINVAL;
econfig.dev = &pdev->dev;
econfig.reg_read = meson_efuse_read;
econfig.si... | 726 |
--- initial
+++ final
@@ -1,12 +1,10 @@
static int meson_efuse_probe(struct platform_device *pdev) {
struct nvmem_device *nvmem;
unsigned int size;
if (meson_sm_call(SM_EFUSE_USER_MAX, &size, 0, 0, 0, 0, 0) < 0) return -EINVAL;
econfig.dev = &pdev->dev;
econfig.reg_read = meson_efuse_read;
econfig.si... | 727 |
--- initial
+++ final
@@ -1,17 +1,15 @@
static int lpc18xx_otp_probe(struct platform_device *pdev) {
struct nvmem_device *nvmem;
struct lpc18xx_otp *otp;
struct resource *res;
otp = devm_kzalloc(&pdev->dev, sizeof(*otp), GFP_KERNEL);
if (!otp) return -ENOMEM;
res = platform_get_resource(pdev, IORESOU... | 728 |
--- initial
+++ final
@@ -1,17 +1,15 @@
static int lpc18xx_otp_probe(struct platform_device *pdev) {
struct nvmem_device *nvmem;
struct lpc18xx_otp *otp;
struct resource *res;
otp = devm_kzalloc(&pdev->dev, sizeof(*otp), GFP_KERNEL);
if (!otp) return -ENOMEM;
res = platform_get_resource(pdev, IORESOU... | 729 |
--- initial
+++ final
@@ -1,26 +1,24 @@
static int imx_iim_probe(struct platform_device *pdev) {
const struct of_device_id *of_id;
struct device *dev = &pdev->dev;
struct resource *res;
struct iim_priv *iim;
struct nvmem_device *nvmem;
struct nvmem_config cfg = {};
const struct imx_iim_drvdata *dr... | 730 |
--- initial
+++ final
@@ -1,26 +1,24 @@
static int imx_iim_probe(struct platform_device *pdev) {
const struct of_device_id *of_id;
struct device *dev = &pdev->dev;
struct resource *res;
struct iim_priv *iim;
struct nvmem_device *nvmem;
struct nvmem_config cfg = {};
const struct imx_iim_drvdata *dr... | 731 |
--- initial
+++ final
@@ -1,53 +1,52 @@
static int bcm_otpc_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
struct device_node *dn = dev->of_node;
struct resource *res;
struct otpc_priv *priv;
struct nvmem_device *nvmem;
int err;
u32 num_words;
priv = devm_kzalloc(dev, si... | 732 |
--- initial
+++ final
@@ -1,53 +1,52 @@
static int bcm_otpc_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
struct device_node *dn = dev->of_node;
struct resource *res;
struct otpc_priv *priv;
struct nvmem_device *nvmem;
int err;
u32 num_words;
priv = devm_kzalloc(dev, si... | 733 |
--- initial
+++ final
@@ -1,18 +1,16 @@
static int qfprom_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
struct resource *res;
struct nvmem_device *nvmem;
struct qfprom_priv *priv;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv) return -ENOMEM;
res = platfor... | 734 |
--- initial
+++ final
@@ -1,18 +1,16 @@
static int qfprom_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
struct resource *res;
struct nvmem_device *nvmem;
struct qfprom_priv *priv;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv) return -ENOMEM;
res = platfor... | 735 |
--- initial
+++ final
@@ -1,22 +1,22 @@
int ll_d_init(struct dentry *de) {
LASSERT(de != NULL);
CDEBUG(D_DENTRY, "ldd on dentry %.*s (%p) parent %p inode %p refc %d\n", de->d_name.len, de->d_name.name, de, de->d_parent, de->d_inode, d_count(de));
if (de->d_fsdata == NULL) {
struct ll_dentry_data *lld;
- ... | 736 |
--- initial
+++ final
@@ -1,77 +1,77 @@
static int ll_dir_filler(void *_hash, struct page *page0) {
struct inode *inode = page0->mapping->host;
int hash64 = ll_i2sbi(inode)->ll_flags & LL_SBI_64BIT_HASH;
struct obd_export *exp = ll_i2sbi(inode)->ll_md_exp;
struct ptlrpc_request *request;
struct mdt_body... | 738 |
--- initial
+++ final
@@ -1,80 +1,80 @@
int ll_fill_super(struct super_block *sb, struct vfsmount *mnt) {
struct lustre_profile *lprof = NULL;
struct lustre_sb_info *lsi = s2lsi(sb);
struct ll_sb_info *sbi;
char *dt = NULL, *md = NULL;
char *profilenm = get_profile_name(sb);
struct config_llog_instan... | 757 |
--- initial
+++ final
@@ -1,42 +1,42 @@
struct md_op_data *ll_prep_md_op_data(struct md_op_data *op_data, struct inode *i1, struct inode *i2, const char *name, int namelen, int mode, __u32 opc, void *data) {
LASSERT(i1 != NULL);
if (namelen > ll_i2sbi(i1)->ll_namelen) return ERR_PTR(-ENAMETOOLONG);
- if (op_dat... | 759 |
--- initial
+++ final
@@ -1,29 +1,29 @@
void ll_umount_begin(struct super_block *sb) {
struct ll_sb_info *sbi = ll_s2sbi(sb);
struct obd_device *obd;
struct obd_ioctl_data *ioc_data;
CDEBUG(D_VFSTRACE, "VFS Op: superblock %p count %d active %d\n", sb, sb->s_count, atomic_read(&sb->s_active));
obd = clas... | 761 |
--- initial
+++ final
@@ -1,63 +1,63 @@
static int __init lloop_init(void) {
int i;
unsigned int cmdlist[] = {
LL_IOC_LLOOP_ATTACH,
LL_IOC_LLOOP_DETACH_BYDEV,
};
if (max_loop < 1 || max_loop > 256) {
max_loop = MAX_LOOP_DEFAULT;
CWARN("lloop: invalid max_loop (must be between"
... | 765 |
--- initial
+++ final
@@ -1,57 +1,57 @@
static int ll_readlink_internal(struct inode *inode, struct ptlrpc_request **request, char **symname) {
struct ll_inode_info *lli = ll_i2info(inode);
struct ll_sb_info *sbi = ll_i2sbi(inode);
int rc, symlen = i_size_read(inode) + 1;
struct mdt_body *body;
struct m... | 770 |
--- initial
+++ final
@@ -1,4 +1,4 @@
static int __net_init if6_proc_net_init(struct net *net) {
- if (!proc_net_fops_create(net, "if_inet6", S_IRUGO, &if6_fops)) return -ENOMEM;
+ if (!proc_create("if_inet6", S_IRUGO, net->proc_net, &if6_fops)) return -ENOMEM;
return 0;
}<sep>@@
expression net,e1,e2,e3;
@@
- p... | 1,131 |
--- initial
+++ final
@@ -1,12 +1,12 @@
static int __init ax25_init(void) {
int rc = proto_register(&ax25_proto, 0);
if (rc != 0) goto out;
sock_register(&ax25_family_ops);
dev_add_pack(&ax25_packet_type);
register_netdevice_notifier(&ax25_dev_notifier);
- proc_net_fops_create(&init_net, "ax25_route", ... | 1,132 |
--- initial
+++ final
@@ -1,17 +1,17 @@
static int __init decnet_init(void) {
int rc;
printk(banner);
rc = proto_register(&dn_proto, 1);
if (rc != 0) goto out;
dn_neigh_init();
dn_dev_init();
dn_route_init();
dn_fib_init();
sock_register(&dn_family_ops);
dev_add_pack(&dn_dix_packet_type);... | 1,133 |
--- initial
+++ final
@@ -1,6 +1,6 @@
static int __net_init netlink_net_init(struct net *net) {
#ifdef CONFIG_PROC_FS
- if (!proc_net_fops_create(net, "netlink", 0, &netlink_seq_fops)) return -ENOMEM;
+ if (!proc_create("netlink", 0, net->proc_net, &netlink_seq_fops)) return -ENOMEM;
#endif
return 0;
}<sep>@@
... | 1,134 |
--- initial
+++ final
@@ -1,57 +1,57 @@
static int __init nr_proto_init(void) {
int i;
int rc = proto_register(&nr_proto, 0);
if (rc != 0) goto out;
if (nr_ndevs > 0x7fffffff / sizeof(struct net_device *)) {
printk(KERN_ERR "NET/ROM: nr_proto_init - nr_ndevs parameter to large\n");
return -1;
... | 1,135 |
--- initial
+++ final
@@ -1,6 +1,6 @@
static int __net_init packet_net_init(struct net *net) {
mutex_init(&net->packet.sklist_lock);
INIT_HLIST_HEAD(&net->packet.sklist);
- if (!proc_net_fops_create(net, "packet", 0, &packet_seq_fops)) return -ENOMEM;
+ if (!proc_create("packet", 0, net->proc_net, &packet_seq_... | 1,136 |
--- initial
+++ final
@@ -1,61 +1,61 @@
static int __init rose_proto_init(void) {
int i;
int rc;
if (rose_ndevs > 0x7FFFFFFF / sizeof(struct net_device *)) {
printk(KERN_ERR "ROSE: rose_proto_init - rose_ndevs parameter to large\n");
rc = -EINVAL;
goto out;
}
rc = proto_register(&rose_pro... | 1,137 |
--- initial
+++ final
@@ -1,53 +1,53 @@
static int __init af_rxrpc_init(void) {
int ret = -1;
BUILD_BUG_ON(sizeof(struct rxrpc_skb_priv) > FIELD_SIZEOF(struct sk_buff, cb));
rxrpc_epoch = htonl(get_seconds());
ret = -ENOMEM;
rxrpc_call_jar = kmem_cache_create("rxrpc_call_jar", sizeof(struct rxrpc_call),... | 1,138 |
--- initial
+++ final
@@ -1,14 +1,14 @@
static int __net_init unix_net_init(struct net *net) {
int error = -ENOMEM;
net->unx.sysctl_max_dgram_qlen = 10;
if (unix_sysctl_register(net)) goto out;
#ifdef CONFIG_PROC_FS
- if (!proc_net_fops_create(net, "unix", 0, &unix_seq_fops)) {
+ if (!proc_create("unix", 0... | 1,139 |
--- initial
+++ final
@@ -1,4 +1,4 @@
int __net_init ac6_proc_init(struct net *net) {
- if (!proc_net_fops_create(net, "anycast6", S_IRUGO, &ac6_seq_fops)) return -ENOMEM;
+ if (!proc_create("anycast6", S_IRUGO, net->proc_net, &ac6_seq_fops)) return -ENOMEM;
return 0;
}<sep>@@
expression net,e1,e2,e3;
@@
- proc... | 1,140 |
--- initial
+++ final
@@ -1,4 +1,4 @@
static int __net_init arp_net_init(struct net *net) {
- if (!proc_net_fops_create(net, "arp", S_IRUGO, &arp_seq_fops)) return -ENOMEM;
+ if (!proc_create("arp", S_IRUGO, net->proc_net, &arp_seq_fops)) return -ENOMEM;
return 0;
}<sep>@@
expression net,e1,e2,e3;
@@
- proc_net... | 1,141 |
--- initial
+++ final
@@ -1,12 +1,12 @@
static int __init bpq_init_driver(void) {
#ifdef CONFIG_PROC_FS
- if (!proc_net_fops_create(&init_net, "bpqether", S_IRUGO, &bpq_info_fops)) {
+ if (!proc_create("bpqether", S_IRUGO, init_net.proc_net, &bpq_info_fops)) {
printk(KERN_ERR "bpq: cannot create /proc/net/bpqe... | 1,142 |
--- initial
+++ final
@@ -1,17 +1,17 @@
static int cn_init(void) {
struct cn_dev *dev = &cdev;
struct netlink_kernel_cfg cfg = {
.groups = CN_NETLINK_USERS + 0xf,
.input = dev->input,
};
dev->nls = netlink_kernel_create(&init_net, NETLINK_CONNECTOR, &cfg);
if (!dev->nls) return -EIO;
de... | 1,143 |
--- initial
+++ final
@@ -1,16 +1,16 @@
static __init int dccpprobe_init(void) {
int ret = -ENOMEM;
init_waitqueue_head(&dccpw.wait);
spin_lock_init(&dccpw.lock);
if (kfifo_alloc(&dccpw.fifo, bufsize, GFP_KERNEL)) return ret;
- if (!proc_net_fops_create(&init_net, procname, S_IRUSR, &dccpprobe_fops)) goto... | 1,144 |
--- initial
+++ final
@@ -1,4 +1,4 @@
static int __net_init dev_mc_net_init(struct net *net) {
- if (!proc_net_fops_create(net, "dev_mcast", 0, &dev_mc_seq_fops)) return -ENOMEM;
+ if (!proc_create("dev_mcast", 0, net->proc_net, &dev_mc_seq_fops)) return -ENOMEM;
return 0;
}<sep>@@
expression net,e1,e2,e3;
@@
-... | 1,145 |
--- initial
+++ final
@@ -1,17 +1,17 @@
static int __net_init dev_proc_net_init(struct net *net) {
int rc = -ENOMEM;
- if (!proc_net_fops_create(net, "dev", S_IRUGO, &dev_seq_fops)) goto out;
- if (!proc_net_fops_create(net, "softnet_stat", S_IRUGO, &softnet_seq_fops)) goto out_dev;
- if (!proc_net_fops_create(n... | 1,146 |
--- initial
+++ final
@@ -1,23 +1,23 @@
void __init dn_dev_init(void) {
if (addr[0] > 63 || addr[0] < 0) {
printk(KERN_ERR "DECnet: Area must be between 0 and 63");
return;
}
if (addr[1] > 1023 || addr[1] < 0) {
printk(KERN_ERR "DECnet: Node must be between 0 and 1023");
return;
}
de... | 1,147 |
--- initial
+++ final
@@ -1,4 +1,4 @@
void __init dn_neigh_init(void) {
neigh_table_init(&dn_neigh_table);
- proc_net_fops_create(&init_net, "decnet_neigh", S_IRUGO, &dn_neigh_seq_fops);
+ proc_create("decnet_neigh", S_IRUGO, init_net.proc_net, &dn_neigh_seq_fops);
}<sep>@@
expression net,e1,e2,e3;
@@
- proc_ne... | 1,148 |
--- initial
+++ final
@@ -1,37 +1,37 @@
void __init dn_route_init(void) {
int i, goal, order;
dn_dst_ops.kmem_cachep = kmem_cache_create("dn_dst_cache", sizeof(struct dn_route), 0, SLAB_HWCACHE_ALIGN | SLAB_PANIC, NULL);
dst_entries_init(&dn_dst_ops);
setup_timer(&dn_route_timer, dn_dst_check_expire, 0);
... | 1,149 |
--- initial
+++ final
@@ -1,12 +1,12 @@
int __net_init fib_proc_init(struct net *net) {
- if (!proc_net_fops_create(net, "fib_trie", S_IRUGO, &fib_trie_fops)) goto out1;
- if (!proc_net_fops_create(net, "fib_triestat", S_IRUGO, &fib_triestat_fops)) goto out2;
- if (!proc_net_fops_create(net, "route", S_IRUGO, &fib_... | 1,150 |
--- initial
+++ final
@@ -1,12 +1,12 @@
static int __net_init igmp_net_init(struct net *net) {
struct proc_dir_entry *pde;
- pde = proc_net_fops_create(net, "igmp", S_IRUGO, &igmp_mc_seq_fops);
+ pde = proc_create("igmp", S_IRUGO, net->proc_net, &igmp_mc_seq_fops);
if (!pde) goto out_igmp;
- pde = proc_net_fo... | 1,151 |
--- initial
+++ final
@@ -1,19 +1,19 @@
static int __net_init ip6mr_net_init(struct net *net) {
int err;
err = ip6mr_rules_init(net);
if (err < 0) goto fail;
#ifdef CONFIG_PROC_FS
err = -ENOMEM;
- if (!proc_net_fops_create(net, "ip6_mr_vif", 0, &ip6mr_vif_fops)) goto proc_vif_fail;
- if (!proc_net_fops_... | 1,152 |
--- initial
+++ final
@@ -1,6 +1,6 @@
int __net_init ip_vs_app_net_init(struct net *net) {
struct netns_ipvs *ipvs = net_ipvs(net);
INIT_LIST_HEAD(&ipvs->app_list);
- proc_net_fops_create(net, "ip_vs_app", 0, &ip_vs_app_fops);
+ proc_create("ip_vs_app", 0, net->proc_net, &ip_vs_app_fops);
return 0;
}<sep>@... | 1,153 |
--- initial
+++ final
@@ -1,7 +1,7 @@
int __net_init ip_vs_conn_net_init(struct net *net) {
struct netns_ipvs *ipvs = net_ipvs(net);
atomic_set(&ipvs->conn_count, 0);
- proc_net_fops_create(net, "ip_vs_conn", 0, &ip_vs_conn_fops);
- proc_net_fops_create(net, "ip_vs_conn_sync", 0, &ip_vs_conn_sync_fops);
+ pro... | 1,154 |
--- initial
+++ final
@@ -1,23 +1,23 @@
int __net_init ip_vs_control_net_init(struct net *net) {
int idx;
struct netns_ipvs *ipvs = net_ipvs(net);
rwlock_init(&ipvs->rs_lock);
/* Initialize rs_table */
for (idx = 0; idx < IP_VS_RTAB_SIZE; idx++)
INIT_LIST_HEAD(&ipvs->rs_table[idx]);
INIT_LIST_HE... | 1,155 |
--- initial
+++ final
@@ -1,111 +1,111 @@
static int __init ip_auto_config(void) {
__be32 addr;
#ifdef IPCONFIG_DYNAMIC
int retries = CONF_OPEN_RETRIES;
#endif
int err;
unsigned int i;
#ifdef CONFIG_PROC_FS
- proc_net_fops_create(&init_net, "pnp", S_IRUGO, &pnp_seq_fops);
+ proc_create("pnp", S_IRUGO,... | 1,156 |
--- initial
+++ final
@@ -1,19 +1,19 @@
static int __net_init ipmr_net_init(struct net *net) {
int err;
err = ipmr_rules_init(net);
if (err < 0) goto fail;
#ifdef CONFIG_PROC_FS
err = -ENOMEM;
- if (!proc_net_fops_create(net, "ip_mr_vif", 0, &ipmr_vif_fops)) goto proc_vif_fail;
- if (!proc_net_fops_crea... | 1,157 |
--- initial
+++ final
@@ -1,12 +1,12 @@
static __net_init int ip_proc_init_net(struct net *net) {
- if (!proc_net_fops_create(net, "sockstat", S_IRUGO, &sockstat_seq_fops)) goto out_sockstat;
- if (!proc_net_fops_create(net, "netstat", S_IRUGO, &netstat_seq_fops)) goto out_netstat;
- if (!proc_net_fops_create(net, ... | 1,158 |
--- initial
+++ final
@@ -1,4 +1,4 @@
static __net_init int raw_init_net(struct net *net) {
- if (!proc_net_fops_create(net, "raw", S_IRUGO, &raw_seq_fops)) return -ENOMEM;
+ if (!proc_create("raw", S_IRUGO, net->proc_net, &raw_seq_fops)) return -ENOMEM;
return 0;
}<sep>@@
expression net,e1,e2,e3;
@@
- proc_net... | 1,159 |
--- initial
+++ final
@@ -1,20 +1,20 @@
static int __net_init ip_rt_do_proc_init(struct net *net) {
struct proc_dir_entry *pde;
- pde = proc_net_fops_create(net, "rt_cache", S_IRUGO, &rt_cache_seq_fops);
+ pde = proc_create("rt_cache", S_IRUGO, net->proc_net, &rt_cache_seq_fops);
if (!pde) goto err1;
pde = ... | 1,160 |
--- initial
+++ final
@@ -1,11 +1,11 @@
static __net_init int pppol2tp_init_net(struct net *net) {
struct proc_dir_entry *pde;
int err = 0;
- pde = proc_net_fops_create(net, "pppol2tp", S_IRUGO, &pppol2tp_proc_fops);
+ pde = proc_create("pppol2tp", S_IRUGO, net->proc_net, &pppol2tp_proc_fops);
if (!pde) {
... | 1,161 |
--- initial
+++ final
@@ -1,8 +1,8 @@
static int exp_proc_init(struct net *net) {
#ifdef CONFIG_NF_CONNTRACK_PROCFS
struct proc_dir_entry *proc;
- proc = proc_net_fops_create(net, "nf_conntrack_expect", 0440, &exp_file_ops);
+ proc = proc_create("nf_conntrack_expect", 0440, net->proc_net, &exp_file_ops);
if (... | 1,162 |
--- initial
+++ final
@@ -1,16 +1,16 @@
static int __net_init ip_conntrack_net_init(struct net *net) {
struct proc_dir_entry *proc, *proc_exp, *proc_stat;
- proc = proc_net_fops_create(net, "ip_conntrack", 0440, &ct_file_ops);
+ proc = proc_create("ip_conntrack", 0440, net->proc_net, &ct_file_ops);
if (!proc) ... | 1,163 |
--- initial
+++ final
@@ -1,7 +1,7 @@
static int ping_proc_register(struct net *net) {
struct proc_dir_entry *p;
int rc = 0;
- p = proc_net_fops_create(net, "icmp", S_IRUGO, &ping_seq_fops);
+ p = proc_create("icmp", S_IRUGO, net->proc_net, &ping_seq_fops);
if (!p) rc = -ENOMEM;
return rc;
}<sep>@@
expr... | 1,164 |
--- initial
+++ final
@@ -1,9 +1,9 @@
int __init phonet_device_init(void) {
int err = register_pernet_subsys(&phonet_net_ops);
if (err) return err;
- proc_net_fops_create(&init_net, "pnresource", 0, &pn_res_seq_fops);
+ proc_create("pnresource", 0, init_net.proc_net, &pn_res_seq_fops);
register_netdevice_no... | 1,165 |
--- initial
+++ final
@@ -1,8 +1,8 @@
static int __net_init phonet_init_net(struct net *net) {
struct phonet_net *pnn = phonet_pernet(net);
- if (!proc_net_fops_create(net, "phonet", 0, &pn_sock_seq_fops)) return -ENOMEM;
+ if (!proc_create("phonet", 0, net->proc_net, &pn_sock_seq_fops)) return -ENOMEM;
INIT_L... | 1,166 |
--- initial
+++ final
@@ -1,10 +1,10 @@
static __net_init int pppoe_init_net(struct net *net) {
struct pppoe_net *pn = pppoe_pernet(net);
struct proc_dir_entry *pde;
rwlock_init(&pn->hash_lock);
- pde = proc_net_fops_create(net, "pppoe", S_IRUGO, &pppoe_seq_fops);
+ pde = proc_create("pppoe", S_IRUGO, net->... | 1,167 |
--- initial
+++ final
@@ -1,21 +1,21 @@
static __init int sctpprobe_init(void) {
int ret = -ENOMEM;
/* Warning: if the function signature of sctp_sf_eat_sack_6_2,
* has been changed, you also have to change the signature of
* jsctp_sf_eat_sack, otherwise you end up right here!
*/
BUILD_BUG_ON(__sa... | 1,168 |
--- initial
+++ final
@@ -1,12 +1,12 @@
static int __net_init ipv6_proc_init_net(struct net *net) {
- if (!proc_net_fops_create(net, "sockstat6", S_IRUGO, &sockstat6_seq_fops)) return -ENOMEM;
- if (!proc_net_fops_create(net, "snmp6", S_IRUGO, &snmp6_seq_fops)) goto proc_snmp6_fail;
+ if (!proc_create("sockstat6", ... | 1,169 |
--- initial
+++ final
@@ -1,4 +1,4 @@
static int __net_init raw6_init_net(struct net *net) {
- if (!proc_net_fops_create(net, "raw6", S_IRUGO, &raw6_seq_fops)) return -ENOMEM;
+ if (!proc_create("raw6", S_IRUGO, net->proc_net, &raw6_seq_fops)) return -ENOMEM;
return 0;
}<sep>@@
expression net,e1,e2,e3;
@@
- pro... | 1,170 |
--- initial
+++ final
@@ -1,7 +1,7 @@
static int __net_init ip6_route_net_init_late(struct net *net) {
#ifdef CONFIG_PROC_FS
- proc_net_fops_create(net, "ipv6_route", 0, &ipv6_route_proc_fops);
- proc_net_fops_create(net, "rt6_stats", S_IRUGO, &rt6_stats_seq_fops);
+ proc_create("ipv6_route", 0, net->proc_net, &ip... | 1,171 |
--- initial
+++ final
@@ -1,17 +1,17 @@
static int __init scc_init_driver(void) {
char devname[IFNAMSIZ];
printk(banner);
sprintf(devname, "%s0", SCC_DriverName);
rtnl_lock();
if (scc_net_alloc(devname, SCC_Info)) {
rtnl_unlock();
printk(KERN_ERR "z8530drv: cannot initialize module\n");
... | 1,172 |
--- initial
+++ final
@@ -1,4 +1,4 @@
static __net_init int proto_init_net(struct net *net) {
- if (!proc_net_fops_create(net, "protocols", S_IRUGO, &proto_seq_fops)) return -ENOMEM;
+ if (!proc_create("protocols", S_IRUGO, net->proc_net, &proto_seq_fops)) return -ENOMEM;
return 0;
}<sep>@@
expression net,e1,e2,... | 1,173 |
--- initial
+++ final
@@ -1,19 +1,19 @@
static __init int tcpprobe_init(void) {
int ret = -ENOMEM;
init_waitqueue_head(&tcp_probe.wait);
spin_lock_init(&tcp_probe.lock);
if (bufsize == 0) return -EINVAL;
bufsize = roundup_pow_of_two(bufsize);
tcp_probe.log = kcalloc(bufsize, sizeof(struct tcp_log), G... | 1,174 |
--- initial
+++ final
@@ -1,5 +1,5 @@
int __net_init wext_proc_init(struct net *net) {
/* Create /proc/net/wireless entry */
- if (!proc_net_fops_create(net, "wireless", S_IRUGO, &wireless_seq_fops)) return -ENOMEM;
+ if (!proc_create("wireless", S_IRUGO, net->proc_net, &wireless_seq_fops)) return -ENOMEM;
ret... | 1,175 |
--- initial
+++ final
@@ -1,4 +1,4 @@
int __net_init xfrm_proc_init(struct net *net) {
- if (!proc_net_fops_create(net, "xfrm_stat", S_IRUGO, &xfrm_statistics_seq_fops)) return -ENOMEM;
+ if (!proc_create("xfrm_stat", S_IRUGO, net->proc_net, &xfrm_statistics_seq_fops)) return -ENOMEM;
return 0;
}<sep>@@
expressi... | 1,176 |
--- initial
+++ final
@@ -1,34 +1,34 @@
static int __init yam_init_driver(void) {
struct net_device *dev;
int i, err;
char name[IFNAMSIZ];
printk(yam_drvinfo);
for (i = 0; i < NR_PORTS; i++) {
sprintf(name, "yam%d", i);
dev = alloc_netdev(sizeof(struct yam_port), name, yam_setup);
if (!... | 1,177 |
--- initial
+++ final
@@ -1,16 +1,15 @@
static int set_tcb_field(struct adapter *adap, struct filter_entry *f, unsigned int ftid, u16 word, u64 mask, u64 val, int no_reply) {
struct cpl_set_tcb_field *req;
struct sk_buff *skb;
skb = alloc_skb(sizeof(struct cpl_set_tcb_field), GFP_ATOMIC);
if (!skb) return ... | 1,250 |
--- initial
+++ final
@@ -1,29 +1,28 @@
int cxgb4_get_srq_entry(struct net_device *dev, int srq_idx, struct srq_entry *entryp) {
struct cpl_srq_table_req *req;
struct adapter *adap;
struct sk_buff *skb;
struct srq_data *s;
int rc = -ENODEV;
adap = netdev2adap(dev);
s = adap->srq;
if (!(adap->fl... | 1,251 |
--- initial
+++ final
@@ -1,22 +1,21 @@
static void post_terminate(struct c4iw_qp *qhp, struct t4_cqe *err_cqe, gfp_t gfp) {
struct fw_ri_wr *wqe;
struct sk_buff *skb;
struct terminate_message *term;
pr_debug("qhp %p qid 0x%x tid %u\n", qhp, qhp->wq.sq.qid, qhp->ep->hwtid);
skb = skb_dequeue(&qhp->ep->c... | 1,252 |
--- initial
+++ final
@@ -1,18 +1,17 @@
static int rdma_fini(struct c4iw_dev *rhp, struct c4iw_qp *qhp, struct c4iw_ep *ep) {
struct fw_ri_wr *wqe;
int ret;
struct sk_buff *skb;
pr_debug("qhp %p qid 0x%x tid %u\n", qhp, qhp->wq.sq.qid, ep->hwtid);
skb = skb_dequeue(&ep->com.ep_skb_list);
if (WARN_ON(... | 1,253 |
--- initial
+++ final
@@ -1,51 +1,50 @@
static int rdma_init(struct c4iw_dev *rhp, struct c4iw_qp *qhp) {
struct fw_ri_wr *wqe;
int ret;
struct sk_buff *skb;
pr_debug("qhp %p qid 0x%x tid %u ird %u ord %u\n", qhp, qhp->wq.sq.qid, qhp->ep->hwtid, qhp->ep->ird, qhp->ep->ord);
skb = alloc_skb(sizeof *wqe, ... | 1,254 |
--- initial
+++ final
@@ -1,29 +1,28 @@
struct sk_buff *rxe_init_packet(struct rxe_dev *rxe, struct rxe_av *av, int paylen, struct rxe_pkt_info *pkt) {
unsigned int hdr_len;
struct sk_buff *skb;
struct net_device *ndev;
const int port_num = 1;
ndev = rxe_netdev_from_av(rxe, port_num, av);
if (av->net... | 1,255 |
--- initial
+++ final
@@ -1,13 +1,13 @@
static int mt2701_afe_i2s_set_sysclk(struct snd_soc_dai *dai, int clk_id, unsigned int freq, int dir) {
- struct mtk_base_afe *afe = dev_get_drvdata(dai->dev);
+ struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
struct mt2701_afe_private *afe_priv = afe->platform_pri... | 1,258 |
--- initial
+++ final
@@ -1,13 +1,13 @@
int mtk_afe_dai_resume(struct snd_soc_dai *dai) {
- struct mtk_base_afe *afe = dev_get_drvdata(dai->dev);
+ struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
struct device *dev = afe->dev;
struct regmap *regmap = afe->regmap;
int i = 0;
if (pm_runtime_status... | 1,278 |
--- initial
+++ final
@@ -1,13 +1,13 @@
int mtk_afe_dai_suspend(struct snd_soc_dai *dai) {
- struct mtk_base_afe *afe = dev_get_drvdata(dai->dev);
+ struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
struct device *dev = afe->dev;
struct regmap *regmap = afe->regmap;
int i;
if (pm_runtime_status_su... | 1,279 |
--- initial
+++ final
@@ -1,37 +1,35 @@
static int dsa_slave_add_cls_matchall(struct net_device *dev, struct tc_cls_matchall_offload *cls, bool ingress) {
struct dsa_port *dp = dsa_slave_to_port(dev);
struct dsa_slave_priv *p = netdev_priv(dev);
struct dsa_mall_tc_entry *mall_tc_entry;
__be16 protocol = cl... | 1,294 |
--- initial
+++ final
@@ -1,33 +1,31 @@
static int mlxsw_sp_port_add_cls_matchall(struct mlxsw_sp_port *mlxsw_sp_port, struct tc_cls_matchall_offload *f, bool ingress) {
struct mlxsw_sp_port_mall_tc_entry *mall_tc_entry;
__be16 protocol = f->common.protocol;
const struct tc_action *a;
- LIST_HEAD(actions);
... | 1,296 |
--- initial
+++ final
@@ -1,4 +1,4 @@
static void ulite_console_putchar(struct uart_port *port, int ch) {
ulite_console_wait_tx(port);
- iowrite32be(ch, port->membase + ULITE_TX);
+ uart_out32(ch, ULITE_TX, port);
}<sep>@@
expression e1,e2,port;
@@
- iowrite32be(e1, port->membase + e2);
+ uart_out32... | 7,078 |
--- initial
+++ final
@@ -1,18 +1,18 @@
static void ulite_console_write(struct console *co, const char *s, unsigned int count) {
struct uart_port *port = &ulite_ports[co->index];
unsigned long flags;
unsigned int ier;
int locked = 1;
if (oops_in_progress) {
locked = spin_trylock_irqsave(&port->lock... | 7,080 |
--- initial
+++ final
@@ -1,6 +1,6 @@
static void ulite_put_poll_char(struct uart_port *port, unsigned char ch) {
- while (ioread32be(port->membase + ULITE_STATUS) & ULITE_STATUS_TXFULL)
+ while (uart_in32(ULITE_STATUS, port) & ULITE_STATUS_TXFULL)
cpu_relax();
/* write char to device */
- iowrite32be(ch, p... | 7,083 |
--- initial
+++ final
@@ -1,5 +1,5 @@
static void ulite_shutdown(struct uart_port *port) {
- iowrite32be(0, port->membase + ULITE_CONTROL);
- ioread32be(port->membase + ULITE_CONTROL); /* dummy */
+ uart_out32(0, ULITE_CONTROL, port);
+ uart_in32(ULITE_CONTROL, port); /* dummy */
free_irq(port->irq, port);
}<s... | 7,085 |
--- initial
+++ final
@@ -1,8 +1,8 @@
static int ulite_startup(struct uart_port *port) {
int ret;
ret = request_irq(port->irq, ulite_isr, IRQF_SHARED, "uartlite", port);
if (ret) return ret;
- iowrite32be(ULITE_CONTROL_RST_RX | ULITE_CONTROL_RST_TX, port->membase + ULITE_CONTROL);
- iowrite32be(ULITE_CONTRO... | 7,087 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.