imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,22 +1,22 @@
 static struct ksock_proto *ksocknal_parse_proto_version(ksock_hello_msg_t *hello) {
   __u32 version = 0;
   if (hello->kshm_magic == LNET_PROTO_MAGIC)
     version = hello->kshm_version;
   else if (hello->kshm_magic == __swab32(LNET_PROTO_MAGIC))
     version = __swab32(hello->kshm_version);
   if (version) {
 #if SOCKNAL_VERSION_DEBUG
     if (*ksocknal_tunables.ksnd_protocol == 1) return NULL;
     if (*ksocknal_tunables.ksnd_protocol == 2 && version == KSOCK_PROTO_V3) return NULL;
 #endif
     if (version == KSOCK_PROTO_V2) return &ksocknal_protocol_v2x;
     if (version == KSOCK_PROTO_V3) return &ksocknal_protocol_v3x;
     return NULL;
   }
   if (hello->kshm_magic == le32_to_cpu(LNET_PROTO_TCP_MAGIC)) {
     struct lnet_magicversion *hmv = (struct lnet_magicversion *)hello;
-    CLASSERT(sizeof(struct lnet_magicversion) == offsetof(ksock_hello_msg_t, kshm_src_nid));
+    BUILD_BUG_ON(sizeof(struct lnet_magicversion) != offsetof(ksock_hello_msg_t, kshm_src_nid));
     if (hmv->version_major == cpu_to_le16(KSOCK_PROTO_V1_MAJOR) && hmv->version_minor == cpu_to_le16(KSOCK_PROTO_V1_MINOR)) return &ksocknal_protocol_v1x;
   }
   return NULL;
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 == e2);
+               BUILD_BUG_ON(e1 != e2);
--- initial
+++ final
@@ -1,20 +1,20 @@
 static int __init ksocklnd_init(void) {
   int rc;
   /* check ksnr_connected/connecting field large enough */
-  CLASSERT(SOCKLND_CONN_NTYPES <= 4);
-  CLASSERT(SOCKLND_CONN_ACK == SOCKLND_CONN_BULK_IN);
+  BUILD_BUG_ON(SOCKLND_CONN_NTYPES > 4);
+  BUILD_BUG_ON(SOCKLND_CONN_ACK != SOCKLND_CONN_BULK_IN);
   /* initialize the_ksocklnd */
   the_ksocklnd.lnd_type = SOCKLND;
   the_ksocklnd.lnd_startup = ksocknal_startup;
   the_ksocklnd.lnd_shutdown = ksocknal_shutdown;
   the_ksocklnd.lnd_ctl = ksocknal_ctl;
   the_ksocklnd.lnd_send = ksocknal_send;
   the_ksocklnd.lnd_recv = ksocknal_recv;
   the_ksocklnd.lnd_notify = ksocknal_notify;
   the_ksocklnd.lnd_query = ksocknal_query;
   the_ksocklnd.lnd_accept = ksocknal_accept;
   rc = ksocknal_tunables_init();
   if (rc) return rc;
   lnet_register_lnd(&the_ksocklnd);
   return 0;
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 == e2);
+               BUILD_BUG_ON(e1 != e2);

@@
expression e1,e2;
@@
-               CLASSERT(e1 <= e2);
+               BUILD_BUG_ON(e1 > e2);
--- initial
+++ final
@@ -1,53 +1,53 @@
 static int ksocknal_send_hello_v1(struct ksock_conn *conn, ksock_hello_msg_t *hello) {
   struct socket *sock = conn->ksnc_sock;
   struct lnet_hdr *hdr;
   struct lnet_magicversion *hmv;
   int rc;
   int i;
-  CLASSERT(sizeof(struct lnet_magicversion) == offsetof(struct lnet_hdr, src_nid));
+  BUILD_BUG_ON(sizeof(struct lnet_magicversion) != offsetof(struct lnet_hdr, src_nid));
   LIBCFS_ALLOC(hdr, sizeof(*hdr));
   if (!hdr) {
     CERROR("Can't allocate struct lnet_hdr\n");
     return -ENOMEM;
   }
   hmv = (struct lnet_magicversion *)&hdr->dest_nid;
   /*
    * Re-organize V2.x message header to V1.x (struct lnet_hdr)
    * header and send out
    */
   hmv->magic = cpu_to_le32(LNET_PROTO_TCP_MAGIC);
   hmv->version_major = cpu_to_le16(KSOCK_PROTO_V1_MAJOR);
   hmv->version_minor = cpu_to_le16(KSOCK_PROTO_V1_MINOR);
   if (the_lnet.ln_testprotocompat) {
     /* single-shot proto check */
     LNET_LOCK();
     if (the_lnet.ln_testprotocompat & 1) {
       hmv->version_major++; /* just different! */
       the_lnet.ln_testprotocompat &= ~1;
     }
     if (the_lnet.ln_testprotocompat & 2) {
       hmv->magic = LNET_PROTO_MAGIC;
       the_lnet.ln_testprotocompat &= ~2;
     }
     LNET_UNLOCK();
   }
   hdr->src_nid = cpu_to_le64(hello->kshm_src_nid);
   hdr->src_pid = cpu_to_le32(hello->kshm_src_pid);
   hdr->type = cpu_to_le32(LNET_MSG_HELLO);
   hdr->payload_length = cpu_to_le32(hello->kshm_nips * sizeof(__u32));
   hdr->msg.hello.type = cpu_to_le32(hello->kshm_ctype);
   hdr->msg.hello.incarnation = cpu_to_le64(hello->kshm_src_incarnation);
   rc = lnet_sock_write(sock, hdr, sizeof(*hdr), lnet_acceptor_timeout());
   if (rc) {
     CNETERR("Error %d sending HELLO hdr to %pI4h/%d\n", rc, &conn->ksnc_ipaddr, conn->ksnc_port);
     goto out;
   }
   if (!hello->kshm_nips) goto out;
   for (i = 0; i < (int)hello->kshm_nips; i++)
     hello->kshm_ips[i] = __cpu_to_le32(hello->kshm_ips[i]);
   rc = lnet_sock_write(sock, hello->kshm_ips, hello->kshm_nips * sizeof(__u32), lnet_acceptor_timeout());
   if (rc) { CNETERR("Error %d sending HELLO payload (%d) to %pI4h/%d\n", rc, hello->kshm_nips, &conn->ksnc_ipaddr, conn->ksnc_port); }
 out:
   LIBCFS_FREE(hdr, sizeof(*hdr));
   return rc;
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 == e2);
+               BUILD_BUG_ON(e1 != e2);
--- initial
+++ final
@@ -1,63 +1,63 @@
 static int __init lustre_init(void) {
   lnet_process_id_t lnet_id;
   struct timespec64 ts;
   int i, rc, seed[2];
-  CLASSERT(sizeof(LUSTRE_VOLATILE_HDR) == LUSTRE_VOLATILE_HDR_LEN + 1);
+  BUILD_BUG_ON(sizeof(LUSTRE_VOLATILE_HDR) != LUSTRE_VOLATILE_HDR_LEN + 1);
   /* print an address of _any_ initialized kernel symbol from this
    * module, to allow debugging with gdb that doesn't support data
    * symbols from modules.
    */
   CDEBUG(D_INFO, "Lustre client module (%p).\n", &lustre_super_operations);
   rc = -ENOMEM;
   ll_inode_cachep = kmem_cache_create("lustre_inode_cache", sizeof(struct ll_inode_info), 0, SLAB_HWCACHE_ALIGN | SLAB_ACCOUNT, NULL);
   if (!ll_inode_cachep) goto out_cache;
   ll_file_data_slab = kmem_cache_create("ll_file_data", sizeof(struct ll_file_data), 0, SLAB_HWCACHE_ALIGN, NULL);
   if (!ll_file_data_slab) goto out_cache;
   llite_root = debugfs_create_dir("llite", debugfs_lustre_root);
   if (IS_ERR_OR_NULL(llite_root)) {
     rc = llite_root ? PTR_ERR(llite_root) : -ENOMEM;
     llite_root = NULL;
     goto out_cache;
   }
   llite_kset = kset_create_and_add("llite", NULL, lustre_kobj);
   if (!llite_kset) {
     rc = -ENOMEM;
     goto out_debugfs;
   }
   cfs_get_random_bytes(seed, sizeof(seed));
   /* Nodes with small feet have little entropy. The NID for this
    * node gives the most entropy in the low bits
    */
   for (i = 0;; i++) {
     if (LNetGetId(i, &lnet_id) == -ENOENT) break;
     if (LNET_NETTYP(LNET_NIDNET(lnet_id.nid)) != LOLND) seed[0] ^= LNET_NIDADDR(lnet_id.nid);
   }
   ktime_get_ts64(&ts);
   cfs_srand(ts.tv_sec ^ seed[0], ts.tv_nsec ^ seed[1]);
   rc = vvp_global_init();
   if (rc != 0) goto out_sysfs;
   cl_inode_fini_env = cl_env_alloc(&cl_inode_fini_refcheck, LCT_REMEMBER | LCT_NOREF);
   if (IS_ERR(cl_inode_fini_env)) {
     rc = PTR_ERR(cl_inode_fini_env);
     goto out_vvp;
   }
   cl_inode_fini_env->le_ctx.lc_cookie = 0x4;
   rc = ll_xattr_init();
   if (rc != 0) goto out_inode_fini_env;
   lustre_register_client_fill_super(ll_fill_super);
   lustre_register_kill_super_cb(ll_kill_super);
   lustre_register_client_process_config(ll_process_config);
   return 0;
 out_inode_fini_env:
   cl_env_put(cl_inode_fini_env, &cl_inode_fini_refcheck);
 out_vvp:
   vvp_global_fini();
 out_sysfs:
   kset_unregister(llite_kset);
 out_debugfs:
   debugfs_remove(llite_root);
 out_cache:
   kmem_cache_destroy(ll_inode_cachep);
   kmem_cache_destroy(ll_file_data_slab);
   return rc;
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 == e2);
+               BUILD_BUG_ON(e1 != e2);
--- initial
+++ final
@@ -1,6 +1,6 @@
 static void vvp_pgcache_id_unpack(loff_t pos, struct vvp_pgcache_id *id) {
-  CLASSERT(sizeof(pos) == sizeof(__u64));
+  BUILD_BUG_ON(sizeof(pos) != sizeof(__u64));
   id->vpi_index = pos & 0xffffffff;
   id->vpi_depth = (pos >> PGC_DEPTH_SHIFT) & 0xf;
   id->vpi_bucket = (unsigned long long)pos >> PGC_OBJ_SHIFT;
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 == e2);
+               BUILD_BUG_ON(e1 != e2);
--- initial
+++ final
@@ -1,30 +1,30 @@
 static int amd_iommu_add_device(struct device *dev) {
   struct iommu_dev_data *dev_data;
   struct iommu_domain *domain;
   struct amd_iommu *iommu;
   int ret, devid;
   if (!check_device(dev) || get_dev_data(dev)) return 0;
   devid = get_device_id(dev);
   if (devid < 0) return devid;
   iommu = amd_iommu_rlookup_table[devid];
   ret = iommu_init_device(dev);
   if (ret) {
     if (ret != -ENOTSUPP) pr_err("Failed to initialize device %s - trying to proceed anyway\n", dev_name(dev));
     iommu_ignore_device(dev);
-    dev->archdata.dma_ops = &nommu_dma_ops;
+    dev->dma_ops = &nommu_dma_ops;
     goto out;
   }
   init_iommu_group(dev);
   dev_data = get_dev_data(dev);
   BUG_ON(!dev_data);
   if (iommu_pass_through || dev_data->iommu_v2) iommu_request_dm_for_dev(dev);
   /* Domains are initialized for this device - have a look what we ended up with */
   domain = iommu_get_domain_for_dev(dev);
   if (domain->type == IOMMU_DOMAIN_IDENTITY)
     dev_data->passthrough = true;
   else
-    dev->archdata.dma_ops = &amd_iommu_dma_ops;
+    dev->dma_ops = &amd_iommu_dma_ops;
 out:
   iommu_completion_wait(iommu);
   return 0;
 }<sep>@@
struct device *dev;
@@
- dev->archdata.dma_ops
+ dev->dma_ops
--- initial
+++ final
@@ -1,17 +1,17 @@
 static void iommu_uninit_device(struct device *dev) {
   int devid;
   struct iommu_dev_data *dev_data;
   devid = get_device_id(dev);
   if (devid < 0) return;
   dev_data = search_dev_data(devid);
   if (!dev_data) return;
   if (dev_data->domain) detach_device(dev);
   iommu_device_unlink(amd_iommu_rlookup_table[dev_data->devid]->iommu_dev, dev);
   iommu_group_remove_device(dev);
   /* Remove dma-ops */
-  dev->archdata.dma_ops = NULL;
+  dev->dma_ops = NULL;
   /*
    * We keep dev_data around for unplugged devices and reuse it when the
    * device is re-plugged - not doing so would introduce a ton of races.
    */
 }<sep>@@
struct device *dev;
@@
- dev->archdata.dma_ops
+ dev->dma_ops
--- initial
+++ final
@@ -1,9 +1,9 @@
 static int cell_of_bus_notify(struct notifier_block *nb, unsigned long action, void *data) {
   struct device *dev = data;
   /* We are only intereted in device addition */
   if (action != BUS_NOTIFY_ADD_DEVICE) return 0;
   /* We use the PCI DMA ops */
-  dev->archdata.dma_ops = get_pci_dma_ops();
+  dev->dma_ops = get_pci_dma_ops();
   cell_dma_dev_setup(dev);
   return 0;
 }<sep>@@
struct device *dev;
@@
- dev->archdata.dma_ops
+ dev->dma_ops
--- initial
+++ final
@@ -1,5 +1,5 @@
 void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, const struct iommu_ops *iommu, bool coherent) {
-  if (!dev->archdata.dma_ops) dev->archdata.dma_ops = &swiotlb_dma_ops;
+  if (!dev->dma_ops) dev->dma_ops = &swiotlb_dma_ops;
   dev->archdata.dma_coherent = coherent;
   __iommu_setup_dma_ops(dev, dma_base, size, iommu);
 }<sep>@@
struct device *dev;
@@
- dev->archdata.dma_ops
+ dev->dma_ops
--- initial
+++ final
@@ -1 +1 @@
-void arch_teardown_dma_ops(struct device *dev) { dev->archdata.dma_ops = NULL; }
+void arch_teardown_dma_ops(struct device *dev) { dev->dma_ops = NULL; }<sep>@@
struct device *dev;
@@
- dev->archdata.dma_ops
+ dev->dma_ops
--- initial
+++ final
@@ -1,14 +1,14 @@
 static bool do_iommu_attach(struct device *dev, const struct iommu_ops *ops, u64 dma_base, u64 size) {
   struct iommu_domain *domain = iommu_get_domain_for_dev(dev);
   /*
    * If the IOMMU driver has the DMA domain support that we require,
    * then the IOMMU core will have already configured a group for this
    * device, and allocated the default domain for that group.
    */
   if (!domain || iommu_dma_init_domain(domain, dma_base, size, dev)) {
     pr_warn("Failed to set up IOMMU for device %s; retaining platform DMA ops\n", dev_name(dev));
     return false;
   }
-  dev->archdata.dma_ops = &iommu_dma_ops;
+  dev->dma_ops = &iommu_dma_ops;
   return true;
 }<sep>@@
struct device *dev;
@@
- dev->archdata.dma_ops
+ dev->dma_ops
--- initial
+++ final
@@ -1,11 +1,11 @@
 static int ibmebus_create_device(struct device_node *dn) {
   struct platform_device *dev;
   int ret;
   dev = of_device_alloc(dn, NULL, &ibmebus_bus_device);
   if (!dev) return -ENOMEM;
   dev->dev.bus = &ibmebus_bus_type;
-  dev->dev.archdata.dma_ops = &ibmebus_dma_ops;
+  dev->dev.dma_ops = &ibmebus_dma_ops;
   ret = of_device_add(dev);
   if (ret) platform_device_put(dev);
   return ret;
 }<sep>@@
expression dev;
identifier f;
@@
- dev->f.archdata.dma_ops
+ dev->f.dma_ops
--- initial
+++ final
@@ -1,19 +1,19 @@
 static void pci_dma_dev_setup_pasemi(struct pci_dev *dev) {
   pr_debug("pci_dma_dev_setup, dev %p (%s)\n", dev, pci_name(dev));
 #if !defined(CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE)
   /* For non-LPAR environment, don't translate anything for the DMA
    * engine. The exception to this is if the user has enabled
    * CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE at build time.
    */
   if (dev->vendor == 0x1959 && dev->device == 0xa007 && !firmware_has_feature(FW_FEATURE_LPAR)) {
-    dev->dev.archdata.dma_ops = &dma_direct_ops;
+    dev->dev.dma_ops = &dma_direct_ops;
     /*
      * Set the coherent DMA mask to prevent the iommu
      * being used unnecessarily
      */
     dev->dev.coherent_dma_mask = DMA_BIT_MASK(44);
     return;
   }
 #endif
   set_iommu_table_base(&dev->dev, &iommu_table_iobmap);
 }<sep>@@
expression dev;
identifier f;
@@
- dev->f.archdata.dma_ops
+ dev->f.dma_ops
--- initial
+++ final
@@ -1,28 +1,28 @@
 struct mbus_device *mbus_register_device(struct device *pdev, int id, const struct dma_map_ops *dma_ops, struct mbus_hw_ops *hw_ops, int index, void __iomem *mmio_va) {
   int ret;
   struct mbus_device *mbdev;
   mbdev = kzalloc(sizeof(*mbdev), GFP_KERNEL);
   if (!mbdev) return ERR_PTR(-ENOMEM);
   mbdev->mmio_va = mmio_va;
   mbdev->dev.parent = pdev;
   mbdev->id.device = id;
   mbdev->id.vendor = MBUS_DEV_ANY_ID;
-  mbdev->dev.archdata.dma_ops = dma_ops;
+  mbdev->dev.dma_ops = dma_ops;
   mbdev->dev.dma_mask = &mbdev->dev.coherent_dma_mask;
   dma_set_mask(&mbdev->dev, DMA_BIT_MASK(64));
   mbdev->dev.release = mbus_release_dev;
   mbdev->hw_ops = hw_ops;
   mbdev->dev.bus = &mic_bus;
   mbdev->index = index;
   dev_set_name(&mbdev->dev, "mbus-dev%u", mbdev->index);
   /*
    * device_register() causes the bus infrastructure to look for a
    * matching driver.
    */
   ret = device_register(&mbdev->dev);
   if (ret) goto free_mbdev;
   return mbdev;
 free_mbdev:
   put_device(&mbdev->dev);
   return ERR_PTR(ret);
 }<sep>@@
expression dev;
identifier f;
@@
- dev->f.archdata.dma_ops
+ dev->f.dma_ops
--- initial
+++ final
@@ -1,46 +1,46 @@
 static int __init calgary_init(void) {
   int ret;
   struct pci_dev *dev = NULL;
   struct calgary_bus_info *info;
   ret = calgary_locate_bbars();
   if (ret) return ret;
   /* Purely for kdump kernel case */
   if (is_kdump_kernel()) get_tce_space_from_tar();
   do {
     dev = pci_get_device(PCI_VENDOR_ID_IBM, PCI_ANY_ID, dev);
     if (!dev) break;
     if (!is_cal_pci_dev(dev->device)) continue;
     info = &bus_info[dev->bus->number];
     if (info->translation_disabled) {
       calgary_init_one_nontraslated(dev);
       continue;
     }
     if (!info->tce_space && !translate_empty_slots) continue;
     ret = calgary_init_one(dev);
     if (ret) goto error;
   } while (1);
   dev = NULL;
   for_each_pci_dev(dev) {
     struct iommu_table *tbl;
     tbl = find_iommu_table(&dev->dev);
-    if (translation_enabled(tbl)) dev->dev.archdata.dma_ops = &calgary_dma_ops;
+    if (translation_enabled(tbl)) dev->dev.dma_ops = &calgary_dma_ops;
   }
   return ret;
 error:
   do {
     dev = pci_get_device(PCI_VENDOR_ID_IBM, PCI_ANY_ID, dev);
     if (!dev) break;
     if (!is_cal_pci_dev(dev->device)) continue;
     info = &bus_info[dev->bus->number];
     if (info->translation_disabled) {
       pci_dev_put(dev);
       continue;
     }
     if (!info->tce_space && !translate_empty_slots) continue;
     calgary_disable_translation(dev);
     calgary_free_bus(dev);
     pci_dev_put(dev); /* Undo calgary_init_one()'s pci_dev_get() */
-    dev->dev.archdata.dma_ops = NULL;
+    dev->dev.dma_ops = NULL;
   } while (1);
   return ret;
 }<sep>@@
expression dev;
identifier f;
@@
- dev->f.archdata.dma_ops
+ dev->f.dma_ops
--- initial
+++ final
@@ -1,13 +1,13 @@
 int pcibios_add_device(struct pci_dev *pdev) {
   struct resource *res;
   int i;
   pdev->dev.groups = zpci_attr_groups;
-  pdev->dev.archdata.dma_ops = &s390_pci_dma_ops;
+  pdev->dev.dma_ops = &s390_pci_dma_ops;
   zpci_map_resources(pdev);
   for (i = 0; i < PCI_BAR_COUNT; i++) {
     res = &pdev->resource[i];
     if (res->parent || !res->flags) continue;
     pci_claim_resource(pdev, i);
   }
   return 0;
 }<sep>@@
expression dev;
identifier f;
@@
- dev->f.archdata.dma_ops
+ dev->f.dma_ops
--- initial
+++ final
@@ -1,36 +1,36 @@
 struct scif_hw_dev *scif_register_device(struct device *pdev, int id, const struct dma_map_ops *dma_ops, struct scif_hw_ops *hw_ops, u8 dnode, u8 snode, struct mic_mw *mmio, struct mic_mw *aper, void *dp, void __iomem *rdp, struct dma_chan **chan, int num_chan, bool card_rel_da) {
   int ret;
   struct scif_hw_dev *sdev;
   sdev = kzalloc(sizeof(*sdev), GFP_KERNEL);
   if (!sdev) return ERR_PTR(-ENOMEM);
   sdev->dev.parent = pdev;
   sdev->id.device = id;
   sdev->id.vendor = SCIF_DEV_ANY_ID;
-  sdev->dev.archdata.dma_ops = dma_ops;
+  sdev->dev.dma_ops = dma_ops;
   sdev->dev.release = scif_release_dev;
   sdev->hw_ops = hw_ops;
   sdev->dnode = dnode;
   sdev->snode = snode;
   dev_set_drvdata(&sdev->dev, sdev);
   sdev->dev.bus = &scif_bus;
   sdev->mmio = mmio;
   sdev->aper = aper;
   sdev->dp = dp;
   sdev->rdp = rdp;
   sdev->dev.dma_mask = &sdev->dev.coherent_dma_mask;
   dma_set_mask(&sdev->dev, DMA_BIT_MASK(64));
   sdev->dma_ch = chan;
   sdev->num_dma_ch = num_chan;
   sdev->card_rel_da = card_rel_da;
   dev_set_name(&sdev->dev, "scif-dev%u", sdev->dnode);
   /*
    * device_register() causes the bus infrastructure to look for a
    * matching driver.
    */
   ret = device_register(&sdev->dev);
   if (ret) goto free_sdev;
   return sdev;
 free_sdev:
   put_device(&sdev->dev);
   return ERR_PTR(ret);
 }<sep>@@
expression dev;
identifier f;
@@
- dev->f.archdata.dma_ops
+ dev->f.dma_ops
--- initial
+++ final
@@ -1,16 +1,16 @@
 static int pcmcia_notify(struct notifier_block *nb, unsigned long action, void *data) {
   struct device *dev = data;
   struct device *parent;
   struct pcmcia_device *pdev = to_pcmcia_dev(dev);
   /* We are only intereted in device addition */
   if (action != BUS_NOTIFY_ADD_DEVICE) return 0;
   parent = pdev->socket->dev.parent;
   /* We know electra_cf devices will always have of_node set, since
    * electra_cf is an of_platform driver.
    */
   if (!parent->of_node) return 0;
   if (!of_device_is_compatible(parent->of_node, "electra-cf")) return 0;
   /* We use the direct ops for localbus */
-  dev->archdata.dma_ops = &dma_direct_ops;
+  dev->dma_ops = &dma_direct_ops;
   return 0;
 }<sep>@@
struct device *dev;
@@
- dev->archdata.dma_ops
+ dev->dma_ops
--- initial
+++ final
@@ -1,11 +1,11 @@
 bool dma_capable(struct device *dev, dma_addr_t addr, size_t size) {
   struct sta2x11_mapping *map;
-  if (dev->archdata.dma_ops != &sta2x11_dma_ops) {
+  if (dev->dma_ops != &sta2x11_dma_ops) {
     if (!dev->dma_mask) return false;
     return addr + size - 1 <= *dev->dma_mask;
   }
   map = sta2x11_pdev_to_mapping(to_pci_dev(dev));
   if (!map || (addr < map->amba_base)) return false;
   if (addr + size >= map->amba_base + STA2X11_AMBA_SIZE) { return false; }
   return true;
 }<sep>@@
struct device *dev;
@@
- dev->archdata.dma_ops
+ dev->dma_ops
--- initial
+++ final
@@ -1,4 +1,4 @@
 phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr) {
-  if (dev->archdata.dma_ops != &sta2x11_dma_ops) return daddr;
+  if (dev->dma_ops != &sta2x11_dma_ops) return daddr;
   return a2p(daddr, to_pci_dev(dev));
 }<sep>@@
struct device *dev;
@@
- dev->archdata.dma_ops
+ dev->dma_ops
--- initial
+++ final
@@ -1,4 +1,4 @@
 dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) {
-  if (dev->archdata.dma_ops != &sta2x11_dma_ops) return paddr;
+  if (dev->dma_ops != &sta2x11_dma_ops) return paddr;
   return p2a(paddr, to_pci_dev(dev));
 }<sep>@@
struct device *dev;
@@
- dev->archdata.dma_ops
+ dev->dma_ops
--- initial
+++ final
@@ -1,10 +1,10 @@
 static void sta2x11_setup_pdev(struct pci_dev *pdev) {
   struct sta2x11_instance *instance = sta2x11_pdev_to_instance(pdev);
   if (!instance) /* either a sta2x11 bridge or another ST device */
     return;
   pci_set_consistent_dma_mask(pdev, STA2X11_AMBA_SIZE - 1);
   pci_set_dma_mask(pdev, STA2X11_AMBA_SIZE - 1);
-  pdev->dev.archdata.dma_ops = &sta2x11_dma_ops;
+  pdev->dev.dma_ops = &sta2x11_dma_ops;
   /* We must enable all devices as master, for audio DMA to work */
   pci_set_master(pdev);
 }<sep>@@
expression dev;
identifier f;
@@
- dev->f.archdata.dma_ops
+ dev->f.dma_ops
--- initial
+++ final
@@ -1,28 +1,28 @@
 int ps3_system_bus_device_register(struct ps3_system_bus_device *dev) {
   int result;
   static unsigned int dev_ioc0_count;
   static unsigned int dev_sb_count;
   static unsigned int dev_vuart_count;
   static unsigned int dev_lpm_count;
   if (!dev->core.parent) dev->core.parent = &ps3_system_bus;
   dev->core.bus = &ps3_system_bus_type;
   dev->core.release = ps3_system_bus_release_device;
   switch (dev->dev_type) {
   case PS3_DEVICE_TYPE_IOC0:
-    dev->core.archdata.dma_ops = &ps3_ioc0_dma_ops;
+    dev->core.dma_ops = &ps3_ioc0_dma_ops;
     dev_set_name(&dev->core, "ioc0_%02x", ++dev_ioc0_count);
     break;
   case PS3_DEVICE_TYPE_SB:
-    dev->core.archdata.dma_ops = &ps3_sb_dma_ops;
+    dev->core.dma_ops = &ps3_sb_dma_ops;
     dev_set_name(&dev->core, "sb_%02x", ++dev_sb_count);
     break;
   case PS3_DEVICE_TYPE_VUART: dev_set_name(&dev->core, "vuart_%02x", ++dev_vuart_count); break;
   case PS3_DEVICE_TYPE_LPM: dev_set_name(&dev->core, "lpm_%02x", ++dev_lpm_count); break;
   default: BUG();
   };
   dev->core.of_node = NULL;
   set_dev_node(&dev->core, 0);
   pr_debug("%s:%d add %s\n", __func__, __LINE__, dev_name(&dev->core));
   result = device_register(&dev->core);
   return result;
 }<sep>@@
expression dev;
identifier f;
@@
- dev->f.archdata.dma_ops
+ dev->f.dma_ops
--- initial
+++ final
@@ -1,30 +1,30 @@
 struct vop_device *vop_register_device(struct device *pdev, int id, const struct dma_map_ops *dma_ops, struct vop_hw_ops *hw_ops, u8 dnode, struct mic_mw *aper, struct dma_chan *chan) {
   int ret;
   struct vop_device *vdev;
   vdev = kzalloc(sizeof(*vdev), GFP_KERNEL);
   if (!vdev) return ERR_PTR(-ENOMEM);
   vdev->dev.parent = pdev;
   vdev->id.device = id;
   vdev->id.vendor = VOP_DEV_ANY_ID;
-  vdev->dev.archdata.dma_ops = dma_ops;
+  vdev->dev.dma_ops = dma_ops;
   vdev->dev.dma_mask = &vdev->dev.coherent_dma_mask;
   dma_set_mask(&vdev->dev, DMA_BIT_MASK(64));
   vdev->dev.release = vop_release_dev;
   vdev->hw_ops = hw_ops;
   vdev->dev.bus = &vop_bus;
   vdev->dnode = dnode;
   vdev->aper = aper;
   vdev->dma_ch = chan;
   vdev->index = dnode - 1;
   dev_set_name(&vdev->dev, "vop-dev%u", vdev->index);
   /*
    * device_register() causes the bus infrastructure to look for a
    * matching driver.
    */
   ret = device_register(&vdev->dev);
   if (ret) goto free_vdev;
   return vdev;
 free_vdev:
   kfree(vdev);
   return ERR_PTR(ret);
 }<sep>@@
expression dev;
identifier f;
@@
- dev->f.archdata.dma_ops
+ dev->f.dma_ops