imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,34 +1,34 @@
 static int osc_statfs_async(struct obd_export *exp, struct obd_info *oinfo, __u64 max_age, struct ptlrpc_request_set *rqset) {
   struct obd_device *obd = class_exp2obd(exp);
   struct ptlrpc_request *req;
   struct osc_async_args *aa;
   int rc;
   /* We could possibly pass max_age in the request (as an absolute
    * timestamp or a "seconds.usec ago") so the target can avoid doing
    * extra calls into the filesystem if that isn't necessary (e.g.
    * during mount that would help a bit).  Having relative timestamps
    * is not so great if request processing is slow, while absolute
    * timestamps are not ideal because they need time synchronization.
    */
   req = ptlrpc_request_alloc(obd->u.cli.cl_import, &RQF_OST_STATFS);
   if (!req) return -ENOMEM;
   rc = ptlrpc_request_pack(req, LUSTRE_OST_VERSION, OST_STATFS);
   if (rc) {
     ptlrpc_request_free(req);
     return rc;
   }
   ptlrpc_request_set_replen(req);
   req->rq_request_portal = OST_CREATE_PORTAL;
   ptlrpc_at_set_req_timeout(req);
   if (oinfo->oi_flags & OBD_STATFS_NODELAY) {
     /* procfs requests not want stat in wait for avoid deadlock */
     req->rq_no_resend = 1;
     req->rq_no_delay = 1;
   }
   req->rq_interpret_reply = (ptlrpc_interpterer_t)osc_statfs_interpret;
-  CLASSERT(sizeof(*aa) <= sizeof(req->rq_async_args));
+  BUILD_BUG_ON(sizeof(*aa) > sizeof(req->rq_async_args));
   aa = ptlrpc_req_async_args(req);
   aa->aa_oi = oinfo;
   ptlrpc_set_add_req(rqset, req);
   return 0;
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 <= e2);
+               BUILD_BUG_ON(e1 > e2);
--- initial
+++ final
@@ -1,31 +1,31 @@
 int osc_sync_base(struct osc_object *obj, struct obdo *oa, obd_enqueue_update_f upcall, void *cookie, struct ptlrpc_request_set *rqset) {
   struct obd_export *exp = osc_export(obj);
   struct ptlrpc_request *req;
   struct ost_body *body;
   struct osc_fsync_args *fa;
   int rc;
   req = ptlrpc_request_alloc(class_exp2cliimp(exp), &RQF_OST_SYNC);
   if (!req) return -ENOMEM;
   rc = ptlrpc_request_pack(req, LUSTRE_OST_VERSION, OST_SYNC);
   if (rc) {
     ptlrpc_request_free(req);
     return rc;
   }
   /* overload the size and blocks fields in the oa with start/end */
   body = req_capsule_client_get(&req->rq_pill, &RMF_OST_BODY);
   LASSERT(body);
   lustre_set_wire_obdo(&req->rq_import->imp_connect_data, &body->oa, oa);
   ptlrpc_request_set_replen(req);
   req->rq_interpret_reply = osc_sync_interpret;
-  CLASSERT(sizeof(*fa) <= sizeof(req->rq_async_args));
+  BUILD_BUG_ON(sizeof(*fa) > sizeof(req->rq_async_args));
   fa = ptlrpc_req_async_args(req);
   fa->fa_obj = obj;
   fa->fa_oa = oa;
   fa->fa_upcall = upcall;
   fa->fa_cookie = cookie;
   if (rqset == PTLRPCD_SET)
     ptlrpcd_add_req(req);
   else
     ptlrpc_set_add_req(rqset, req);
   return 0;
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 <= e2);
+               BUILD_BUG_ON(e1 > e2);
--- initial
+++ final
@@ -1,41 +1,41 @@
 void lustre_swab_connect(struct obd_connect_data *ocd) {
   __swab64s(&ocd->ocd_connect_flags);
   __swab32s(&ocd->ocd_version);
   __swab32s(&ocd->ocd_grant);
   __swab64s(&ocd->ocd_ibits_known);
   __swab32s(&ocd->ocd_index);
   __swab32s(&ocd->ocd_brw_size);
   /* ocd_blocksize and ocd_inodespace don't need to be swabbed because
    * they are 8-byte values
    */
   __swab16s(&ocd->ocd_grant_extent);
   __swab32s(&ocd->ocd_unused);
   __swab64s(&ocd->ocd_transno);
   __swab32s(&ocd->ocd_group);
   __swab32s(&ocd->ocd_cksum_types);
   __swab32s(&ocd->ocd_instance);
   /* Fields after ocd_cksum_types are only accessible by the receiver
    * if the corresponding flag in ocd_connect_flags is set. Accessing
    * any field after ocd_maxbytes on the receiver without a valid flag
    * may result in out-of-bound memory access and kernel oops.
    */
   if (ocd->ocd_connect_flags & OBD_CONNECT_MAX_EASIZE) __swab32s(&ocd->ocd_max_easize);
   if (ocd->ocd_connect_flags & OBD_CONNECT_MAXBYTES) __swab64s(&ocd->ocd_maxbytes);
   if (ocd->ocd_connect_flags & OBD_CONNECT_MULTIMODRPCS) __swab16s(&ocd->ocd_maxmodrpcs);
-  CLASSERT(offsetof(typeof(*ocd), padding0));
-  CLASSERT(offsetof(typeof(*ocd), padding1) != 0);
+  BUILD_BUG_ON(!offsetof(typeof(*ocd), padding0));
+  BUILD_BUG_ON(offsetof(typeof(*ocd), padding1) == 0);
   if (ocd->ocd_connect_flags & OBD_CONNECT_FLAGS2) __swab64s(&ocd->ocd_connect_flags2);
-  CLASSERT(offsetof(typeof(*ocd), padding3) != 0);
-  CLASSERT(offsetof(typeof(*ocd), padding4) != 0);
-  CLASSERT(offsetof(typeof(*ocd), padding5) != 0);
-  CLASSERT(offsetof(typeof(*ocd), padding6) != 0);
-  CLASSERT(offsetof(typeof(*ocd), padding7) != 0);
-  CLASSERT(offsetof(typeof(*ocd), padding8) != 0);
-  CLASSERT(offsetof(typeof(*ocd), padding9) != 0);
-  CLASSERT(offsetof(typeof(*ocd), paddingA) != 0);
-  CLASSERT(offsetof(typeof(*ocd), paddingB) != 0);
-  CLASSERT(offsetof(typeof(*ocd), paddingC) != 0);
-  CLASSERT(offsetof(typeof(*ocd), paddingD) != 0);
-  CLASSERT(offsetof(typeof(*ocd), paddingE) != 0);
-  CLASSERT(offsetof(typeof(*ocd), paddingF) != 0);
+  BUILD_BUG_ON(offsetof(typeof(*ocd), padding3) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*ocd), padding4) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*ocd), padding5) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*ocd), padding6) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*ocd), padding7) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*ocd), padding8) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*ocd), padding9) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*ocd), paddingA) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*ocd), paddingB) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*ocd), paddingC) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*ocd), paddingD) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*ocd), paddingE) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*ocd), paddingF) == 0);
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 != e2);
+               BUILD_BUG_ON(e1 == e2);

@@
expression e;
@@
-               CLASSERT(e);
+               BUILD_BUG_ON(!e);
--- initial
+++ final
@@ -1,9 +1,9 @@
 void lustre_swab_gl_desc(union ldlm_gl_desc *desc) {
   lustre_swab_lu_fid(&desc->lquota_desc.gl_id.qid_fid);
   __swab64s(&desc->lquota_desc.gl_flags);
   __swab64s(&desc->lquota_desc.gl_ver);
   __swab64s(&desc->lquota_desc.gl_hardlimit);
   __swab64s(&desc->lquota_desc.gl_softlimit);
   __swab64s(&desc->lquota_desc.gl_time);
-  CLASSERT(offsetof(typeof(desc->lquota_desc), gl_pad2) != 0);
+  BUILD_BUG_ON(offsetof(typeof(desc->lquota_desc), gl_pad2) == 0);
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 != e2);
+               BUILD_BUG_ON(e1 == e2);
--- initial
+++ final
@@ -1,8 +1,8 @@
 void lustre_swab_ldlm_reply(struct ldlm_reply *r) {
   __swab32s(&r->lock_flags);
-  CLASSERT(offsetof(typeof(*r), lock_padding) != 0);
+  BUILD_BUG_ON(offsetof(typeof(*r), lock_padding) == 0);
   lustre_swab_ldlm_lock_desc(&r->lock_desc);
   /* lock_handle opaque */
   __swab64s(&r->lock_policy_res1);
   __swab64s(&r->lock_policy_res2);
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 != e2);
+               BUILD_BUG_ON(e1 == e2);
--- initial
+++ final
@@ -1,5 +1,5 @@
 static void lustre_swab_ldlm_resource_desc(struct ldlm_resource_desc *r) {
   __swab32s(&r->lr_type);
-  CLASSERT(offsetof(typeof(*r), lr_padding) != 0);
+  BUILD_BUG_ON(offsetof(typeof(*r), lr_padding) == 0);
   lustre_swab_ldlm_res_id(&r->lr_name);
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 != e2);
+               BUILD_BUG_ON(e1 == e2);
--- initial
+++ final
@@ -1,8 +1,8 @@
 void lustre_swab_lmv_user_md(struct lmv_user_md *lum) {
   __swab32s(&lum->lum_magic);
   __swab32s(&lum->lum_stripe_count);
   __swab32s(&lum->lum_stripe_offset);
   __swab32s(&lum->lum_hash_type);
   __swab32s(&lum->lum_type);
-  CLASSERT(offsetof(typeof(*lum), lum_padding1));
+  BUILD_BUG_ON(!offsetof(typeof(*lum), lum_padding1));
 }<sep>@@
expression e;
@@
-               CLASSERT(e);
+               BUILD_BUG_ON(!e);
--- initial
+++ final
@@ -1,31 +1,31 @@
 void lustre_swab_mdt_body(struct mdt_body *b) {
   lustre_swab_lu_fid(&b->mbo_fid1);
   lustre_swab_lu_fid(&b->mbo_fid2);
   /* handle is opaque */
   __swab64s(&b->mbo_valid);
   __swab64s(&b->mbo_size);
   __swab64s(&b->mbo_mtime);
   __swab64s(&b->mbo_atime);
   __swab64s(&b->mbo_ctime);
   __swab64s(&b->mbo_blocks);
   __swab64s(&b->mbo_ioepoch);
   __swab64s(&b->mbo_t_state);
   __swab32s(&b->mbo_fsuid);
   __swab32s(&b->mbo_fsgid);
   __swab32s(&b->mbo_capability);
   __swab32s(&b->mbo_mode);
   __swab32s(&b->mbo_uid);
   __swab32s(&b->mbo_gid);
   __swab32s(&b->mbo_flags);
   __swab32s(&b->mbo_rdev);
   __swab32s(&b->mbo_nlink);
-  CLASSERT(offsetof(typeof(*b), mbo_unused2) != 0);
+  BUILD_BUG_ON(offsetof(typeof(*b), mbo_unused2) == 0);
   __swab32s(&b->mbo_suppgid);
   __swab32s(&b->mbo_eadatasize);
   __swab32s(&b->mbo_aclsize);
   __swab32s(&b->mbo_max_mdsize);
-  CLASSERT(offsetof(typeof(*b), mbo_unused3));
+  BUILD_BUG_ON(!offsetof(typeof(*b), mbo_unused3));
   __swab32s(&b->mbo_uid_h);
   __swab32s(&b->mbo_gid_h);
-  CLASSERT(offsetof(typeof(*b), mbo_padding_5) != 0);
+  BUILD_BUG_ON(offsetof(typeof(*b), mbo_padding_5) == 0);
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 != e2);
+               BUILD_BUG_ON(e1 == e2);

@@
expression e;
@@
-               CLASSERT(e);
+               BUILD_BUG_ON(!e);
--- initial
+++ final
@@ -1,7 +1,7 @@
 void lustre_swab_mdt_ioepoch(struct mdt_ioepoch *b) {
   /* handle is opaque */
   /* mio_handle is opaque */
-  CLASSERT(offsetof(typeof(*b), mio_unused1));
-  CLASSERT(offsetof(typeof(*b), mio_unused2));
-  CLASSERT(offsetof(typeof(*b), mio_padding));
+  BUILD_BUG_ON(!offsetof(typeof(*b), mio_unused1));
+  BUILD_BUG_ON(!offsetof(typeof(*b), mio_unused2));
+  BUILD_BUG_ON(!offsetof(typeof(*b), mio_padding));
 }<sep>@@
expression e;
@@
-               CLASSERT(e);
+               BUILD_BUG_ON(!e);
--- initial
+++ final
@@ -1,25 +1,25 @@
 void lustre_swab_mdt_rec_reint(struct mdt_rec_reint *rr) {
   __swab32s(&rr->rr_opcode);
   __swab32s(&rr->rr_cap);
   __swab32s(&rr->rr_fsuid);
   /* rr_fsuid_h is unused */
   __swab32s(&rr->rr_fsgid);
   /* rr_fsgid_h is unused */
   __swab32s(&rr->rr_suppgid1);
   /* rr_suppgid1_h is unused */
   __swab32s(&rr->rr_suppgid2);
   /* rr_suppgid2_h is unused */
   lustre_swab_lu_fid(&rr->rr_fid1);
   lustre_swab_lu_fid(&rr->rr_fid2);
   __swab64s(&rr->rr_mtime);
   __swab64s(&rr->rr_atime);
   __swab64s(&rr->rr_ctime);
   __swab64s(&rr->rr_size);
   __swab64s(&rr->rr_blocks);
   __swab32s(&rr->rr_bias);
   __swab32s(&rr->rr_mode);
   __swab32s(&rr->rr_flags);
   __swab32s(&rr->rr_flags_h);
   __swab32s(&rr->rr_umask);
-  CLASSERT(offsetof(typeof(*rr), rr_padding_4) != 0);
+  BUILD_BUG_ON(offsetof(typeof(*rr), rr_padding_4) == 0);
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 != e2);
+               BUILD_BUG_ON(e1 == e2);
--- initial
+++ final
@@ -1,17 +1,17 @@
 void lustre_swab_mgs_nidtbl_entry(struct mgs_nidtbl_entry *entry) {
   __u8 i;
   __swab64s(&entry->mne_version);
   __swab32s(&entry->mne_instance);
   __swab32s(&entry->mne_index);
   __swab32s(&entry->mne_length);
   /* mne_nid_(count|type) must be one byte size because we're gonna
    * access it w/o swapping. */
-  CLASSERT(sizeof(entry->mne_nid_count) == sizeof(__u8));
-  CLASSERT(sizeof(entry->mne_nid_type) == sizeof(__u8));
+  BUILD_BUG_ON(sizeof(entry->mne_nid_count) != sizeof(__u8));
+  BUILD_BUG_ON(sizeof(entry->mne_nid_type) != sizeof(__u8));
   /* remove this assertion if ipv6 is supported. */
   LASSERT(entry->mne_nid_type == 0);
   for (i = 0; i < entry->mne_nid_count; i++) {
-    CLASSERT(sizeof(lnet_nid_t) == sizeof(__u64));
+    BUILD_BUG_ON(sizeof(lnet_nid_t) != sizeof(__u64));
     __swab64s(&entry->u.nids[i]);
   }
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 == e2);
+               BUILD_BUG_ON(e1 != e2);
--- initial
+++ final
@@ -1,12 +1,12 @@
 void lustre_swab_mgs_target_info(struct mgs_target_info *mti) {
   int i;
   __swab32s(&mti->mti_lustre_ver);
   __swab32s(&mti->mti_stripe_index);
   __swab32s(&mti->mti_config_ver);
   __swab32s(&mti->mti_flags);
   __swab32s(&mti->mti_instance);
   __swab32s(&mti->mti_nid_count);
-  CLASSERT(sizeof(lnet_nid_t) == sizeof(__u64));
+  BUILD_BUG_ON(sizeof(lnet_nid_t) != sizeof(__u64));
   for (i = 0; i < MTI_NIDS_MAX; i++)
     __swab64s(&mti->mti_nids[i]);
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 == e2);
+               BUILD_BUG_ON(e1 != e2);
--- initial
+++ final
@@ -1,12 +1,12 @@
 static void lustre_swab_obd_dqblk(struct obd_dqblk *b) {
   __swab64s(&b->dqb_ihardlimit);
   __swab64s(&b->dqb_isoftlimit);
   __swab64s(&b->dqb_curinodes);
   __swab64s(&b->dqb_bhardlimit);
   __swab64s(&b->dqb_bsoftlimit);
   __swab64s(&b->dqb_curspace);
   __swab64s(&b->dqb_btime);
   __swab64s(&b->dqb_itime);
   __swab32s(&b->dqb_valid);
-  CLASSERT(offsetof(typeof(*b), dqb_padding) != 0);
+  BUILD_BUG_ON(offsetof(typeof(*b), dqb_padding) == 0);
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 != e2);
+               BUILD_BUG_ON(e1 == e2);
--- initial
+++ final
@@ -1,22 +1,22 @@
 void lustre_swab_obd_statfs(struct obd_statfs *os) {
   __swab64s(&os->os_type);
   __swab64s(&os->os_blocks);
   __swab64s(&os->os_bfree);
   __swab64s(&os->os_bavail);
   __swab64s(&os->os_files);
   __swab64s(&os->os_ffree);
   /* no need to swab os_fsid */
   __swab32s(&os->os_bsize);
   __swab32s(&os->os_namelen);
   __swab64s(&os->os_maxbytes);
   __swab32s(&os->os_state);
-  CLASSERT(offsetof(typeof(*os), os_fprecreated) != 0);
-  CLASSERT(offsetof(typeof(*os), os_spare2) != 0);
-  CLASSERT(offsetof(typeof(*os), os_spare3) != 0);
-  CLASSERT(offsetof(typeof(*os), os_spare4) != 0);
-  CLASSERT(offsetof(typeof(*os), os_spare5) != 0);
-  CLASSERT(offsetof(typeof(*os), os_spare6) != 0);
-  CLASSERT(offsetof(typeof(*os), os_spare7) != 0);
-  CLASSERT(offsetof(typeof(*os), os_spare8) != 0);
-  CLASSERT(offsetof(typeof(*os), os_spare9) != 0);
+  BUILD_BUG_ON(offsetof(typeof(*os), os_fprecreated) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*os), os_spare2) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*os), os_spare3) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*os), os_spare4) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*os), os_spare5) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*os), os_spare6) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*os), os_spare7) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*os), os_spare8) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*os), os_spare9) == 0);
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 != e2);
+               BUILD_BUG_ON(e1 == e2);
--- initial
+++ final
@@ -1,30 +1,30 @@
 static void lustre_swab_obdo(struct obdo *o) {
   __swab64s(&o->o_valid);
   lustre_swab_ost_id(&o->o_oi);
   __swab64s(&o->o_parent_seq);
   __swab64s(&o->o_size);
   __swab64s(&o->o_mtime);
   __swab64s(&o->o_atime);
   __swab64s(&o->o_ctime);
   __swab64s(&o->o_blocks);
   __swab64s(&o->o_grant);
   __swab32s(&o->o_blksize);
   __swab32s(&o->o_mode);
   __swab32s(&o->o_uid);
   __swab32s(&o->o_gid);
   __swab32s(&o->o_flags);
   __swab32s(&o->o_nlink);
   __swab32s(&o->o_parent_oid);
   __swab32s(&o->o_misc);
   __swab64s(&o->o_ioepoch);
   __swab32s(&o->o_stripe_idx);
   __swab32s(&o->o_parent_ver);
   /* o_handle is opaque */
   /* o_lcookie is swabbed elsewhere */
   __swab32s(&o->o_uid_h);
   __swab32s(&o->o_gid_h);
   __swab64s(&o->o_data_version);
-  CLASSERT(offsetof(typeof(*o), o_padding_4) != 0);
-  CLASSERT(offsetof(typeof(*o), o_padding_5) != 0);
-  CLASSERT(offsetof(typeof(*o), o_padding_6) != 0);
+  BUILD_BUG_ON(offsetof(typeof(*o), o_padding_4) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*o), o_padding_5) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*o), o_padding_6) == 0);
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 != e2);
+               BUILD_BUG_ON(e1 == e2);
--- initial
+++ final
@@ -1,34 +1,34 @@
 void lustre_swab_ptlrpc_body(struct ptlrpc_body *b) {
   __swab32s(&b->pb_type);
   __swab32s(&b->pb_version);
   __swab32s(&b->pb_opc);
   __swab32s(&b->pb_status);
   __swab64s(&b->pb_last_xid);
   __swab16s(&b->pb_tag);
   __swab64s(&b->pb_last_committed);
   __swab64s(&b->pb_transno);
   __swab32s(&b->pb_flags);
   __swab32s(&b->pb_op_flags);
   __swab32s(&b->pb_conn_cnt);
   __swab32s(&b->pb_timeout);
   __swab32s(&b->pb_service_time);
   __swab32s(&b->pb_limit);
   __swab64s(&b->pb_slv);
   __swab64s(&b->pb_pre_versions[0]);
   __swab64s(&b->pb_pre_versions[1]);
   __swab64s(&b->pb_pre_versions[2]);
   __swab64s(&b->pb_pre_versions[3]);
   __swab64s(&b->pb_mbits);
-  CLASSERT(offsetof(typeof(*b), pb_padding0) != 0);
-  CLASSERT(offsetof(typeof(*b), pb_padding1) != 0);
-  CLASSERT(offsetof(typeof(*b), pb_padding64_0) != 0);
-  CLASSERT(offsetof(typeof(*b), pb_padding64_1) != 0);
-  CLASSERT(offsetof(typeof(*b), pb_padding64_2) != 0);
+  BUILD_BUG_ON(offsetof(typeof(*b), pb_padding0) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*b), pb_padding1) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*b), pb_padding64_0) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*b), pb_padding64_1) == 0);
+  BUILD_BUG_ON(offsetof(typeof(*b), pb_padding64_2) == 0);
   /* While we need to maintain compatibility between
    * clients and servers without ptlrpc_body_v2 (< 2.3)
    * do not swab any fields beyond pb_jobid, as we are
    * using this swab function for both ptlrpc_body
    * and ptlrpc_body_v2.
    */
-  CLASSERT(offsetof(typeof(*b), pb_jobid) != 0);
+  BUILD_BUG_ON(offsetof(typeof(*b), pb_jobid) == 0);
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 != e2);
+               BUILD_BUG_ON(e1 == e2);
--- initial
+++ final
@@ -1,39 +1,39 @@
 static int lustre_unpack_msg_v2(struct lustre_msg_v2 *m, int len) {
   int swabbed, required_len, i;
   /* Now we know the sender speaks my language. */
   required_len = lustre_msg_hdr_size_v2(0);
   if (len < required_len) {
     /* can't even look inside the message */
     CERROR("message length %d too small for lustre_msg\n", len);
     return -EINVAL;
   }
   swabbed = (m->lm_magic == LUSTRE_MSG_MAGIC_V2_SWABBED);
   if (swabbed) {
     __swab32s(&m->lm_magic);
     __swab32s(&m->lm_bufcount);
     __swab32s(&m->lm_secflvr);
     __swab32s(&m->lm_repsize);
     __swab32s(&m->lm_cksum);
     __swab32s(&m->lm_flags);
-    CLASSERT(offsetof(typeof(*m), lm_padding_2) != 0);
-    CLASSERT(offsetof(typeof(*m), lm_padding_3) != 0);
+    BUILD_BUG_ON(offsetof(typeof(*m), lm_padding_2) == 0);
+    BUILD_BUG_ON(offsetof(typeof(*m), lm_padding_3) == 0);
   }
   required_len = lustre_msg_hdr_size_v2(m->lm_bufcount);
   if (len < required_len) {
     /* didn't receive all the buffer lengths */
     CERROR("message length %d too small for %d buflens\n", len, m->lm_bufcount);
     return -EINVAL;
   }
   for (i = 0; i < m->lm_bufcount; i++) {
     if (swabbed) __swab32s(&m->lm_buflens[i]);
     required_len += cfs_size_round(m->lm_buflens[i]);
   }
   if (len < required_len) {
     CERROR("len: %d, required_len %d\n", len, required_len);
     CERROR("bufcount: %d\n", m->lm_bufcount);
     for (i = 0; i < m->lm_bufcount; i++)
       CERROR("buffer %d length %d\n", i, m->lm_buflens[i]);
     return -EINVAL;
   }
   return swabbed;
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 != e2);
+               BUILD_BUG_ON(e1 == e2);
--- initial
+++ final
@@ -1,22 +1,22 @@
 void ptlrpc_fill_bulk_md(lnet_md_t *md, struct ptlrpc_bulk_desc *desc, int mdidx) {
   int offset = mdidx * LNET_MAX_IOV;
-  CLASSERT(PTLRPC_MAX_BRW_PAGES < LI_POISON);
+  BUILD_BUG_ON(PTLRPC_MAX_BRW_PAGES >= LI_POISON);
   LASSERT(mdidx < desc->bd_md_max_brw);
   LASSERT(desc->bd_iov_count <= PTLRPC_MAX_BRW_PAGES);
   LASSERT(!(md->options & (LNET_MD_IOVEC | LNET_MD_KIOV | LNET_MD_PHYS)));
   md->length = max(0, desc->bd_iov_count - mdidx * LNET_MAX_IOV);
   md->length = min_t(unsigned int, LNET_MAX_IOV, md->length);
   if (ptlrpc_is_bulk_desc_kiov(desc->bd_type)) {
     md->options |= LNET_MD_KIOV;
     if (GET_ENC_KIOV(desc))
       md->start = &BD_GET_ENC_KIOV(desc, offset);
     else
       md->start = &BD_GET_KIOV(desc, offset);
   } else {
     md->options |= LNET_MD_IOVEC;
     if (GET_ENC_KVEC(desc))
       md->start = &BD_GET_ENC_KVEC(desc, offset);
     else
       md->start = &BD_GET_KVEC(desc, offset);
   }
 }<sep>@@
identifier e1,e2;
@@
-               CLASSERT(e1 < e2);
+               BUILD_BUG_ON(e1 >= e2);
--- initial
+++ final
@@ -1,83 +1,83 @@
 static int proc_lnet_routes(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) {
   const int tmpsiz = 256;
   char *tmpstr;
   char *s;
   int rc = 0;
   int len;
   int ver;
   int off;
-  CLASSERT(sizeof(loff_t) >= 4);
+  BUILD_BUG_ON(4 > sizeof(loff_t));
   off = LNET_PROC_HOFF_GET(*ppos);
   ver = LNET_PROC_VER_GET(*ppos);
   LASSERT(!write);
   if (!*lenp) return 0;
   LIBCFS_ALLOC(tmpstr, tmpsiz);
   if (!tmpstr) return -ENOMEM;
   s = tmpstr; /* points to current position in tmpstr[] */
   if (!*ppos) {
     s += snprintf(s, tmpstr + tmpsiz - s, "Routing %s\n", the_lnet.ln_routing ? "enabled" : "disabled");
     LASSERT(tmpstr + tmpsiz - s > 0);
     s += snprintf(s, tmpstr + tmpsiz - s, "%-8s %4s %8s %7s %s\n", "net", "hops", "priority", "state", "router");
     LASSERT(tmpstr + tmpsiz - s > 0);
     lnet_net_lock(0);
     ver = (unsigned int)the_lnet.ln_remote_nets_version;
     lnet_net_unlock(0);
     *ppos = LNET_PROC_POS_MAKE(0, ver, 0, off);
   } else {
     struct list_head *n;
     struct list_head *r;
     lnet_route_t *route = NULL;
     lnet_remotenet_t *rnet = NULL;
     int skip = off - 1;
     struct list_head *rn_list;
     int i;
     lnet_net_lock(0);
     if (ver != LNET_PROC_VERSION(the_lnet.ln_remote_nets_version)) {
       lnet_net_unlock(0);
       LIBCFS_FREE(tmpstr, tmpsiz);
       return -ESTALE;
     }
     for (i = 0; i < LNET_REMOTE_NETS_HASH_SIZE && !route; i++) {
       rn_list = &the_lnet.ln_remote_nets_hash[i];
       n = rn_list->next;
       while (n != rn_list && !route) {
         rnet = list_entry(n, lnet_remotenet_t, lrn_list);
         r = rnet->lrn_routes.next;
         while (r != &rnet->lrn_routes) {
           lnet_route_t *re = list_entry(r, lnet_route_t, lr_list);
           if (!skip) {
             route = re;
             break;
           }
           skip--;
           r = r->next;
         }
         n = n->next;
       }
     }
     if (route) {
       __u32 net = rnet->lrn_net;
       __u32 hops = route->lr_hops;
       unsigned int priority = route->lr_priority;
       lnet_nid_t nid = route->lr_gateway->lp_nid;
       int alive = lnet_is_route_alive(route);
       s += snprintf(s, tmpstr + tmpsiz - s, "%-8s %4u %8u %7s %s\n", libcfs_net2str(net), hops, priority, alive ? "up" : "down", libcfs_nid2str(nid));
       LASSERT(tmpstr + tmpsiz - s > 0);
     }
     lnet_net_unlock(0);
   }
   len = s - tmpstr;  /* how many bytes was written */
   if (len > *lenp) { /* linux-supplied buffer is too small */
     rc = -EINVAL;
   } else if (len > 0) { /* wrote something */
     if (copy_to_user(buffer, tmpstr, len)) {
       rc = -EFAULT;
     } else {
       off += 1;
       *ppos = LNET_PROC_POS_MAKE(0, ver, 0, off);
     }
   }
   LIBCFS_FREE(tmpstr, tmpsiz);
   if (!rc) *lenp = len;
   return rc;
 }<sep>@@
expression e1,e2;
@@
-               CLASSERT(e1 <= e2);
+               BUILD_BUG_ON(e1 > e2);