text stringlengths 213 7.14k | idx int64 16 12.5k |
|---|---|
--- initial
+++ final
@@ -1,26 +1,26 @@
void *ptlrpcd_alloc_work(struct obd_import *imp, int (*cb)(const struct lu_env *, void *), void *cbdata) {
struct ptlrpc_request *req = NULL;
struct ptlrpc_work_async_args *args;
might_sleep();
if (!cb) return ERR_PTR(-EINVAL);
/* copy some code from deprecated fa... | 8,415 |
--- initial
+++ final
@@ -1,42 +1,42 @@
struct cfs_hash *cfs_hash_create(char *name, unsigned int cur_bits, unsigned int max_bits, unsigned int bkt_bits, unsigned int extra_bytes, unsigned int min_theta, unsigned int max_theta, struct cfs_hash_ops *ops, unsigned int flags) {
struct cfs_hash *hs;
int len;
- CLAS... | 8,416 |
--- initial
+++ final
@@ -1,94 +1,94 @@
int ptlrpc_connect_import(struct obd_import *imp) {
struct obd_device *obd = imp->imp_obd;
int initial_connect = 0;
int set_transno = 0;
__u64 committed_before_reconnect = 0;
struct ptlrpc_request *request;
char *bufs[] = {NULL, obd2cli_tgt(imp->imp_obd), obd->... | 8,417 |
--- initial
+++ final
@@ -1,67 +1,67 @@
static int replay_one_lock(struct obd_import *imp, struct ldlm_lock *lock) {
struct ptlrpc_request *req;
struct ldlm_async_args *aa;
struct ldlm_request *body;
int flags;
/* Bug 11974: Do not replay a lock which is actively being canceled */
if (ldlm_is_bl_done... | 8,418 |
--- initial
+++ final
@@ -1,21 +1,21 @@
void ldlm_resource_dump(int level, struct ldlm_resource *res) {
struct ldlm_lock *lock;
unsigned int granted = 0;
- CLASSERT(RES_NAME_SIZE == 4);
+ BUILD_BUG_ON(RES_NAME_SIZE != 4);
if (!((libcfs_debug | D_ERROR) & level)) return;
CDEBUG(level, "--- Resource: " DLD... | 8,419 |
--- initial
+++ final
@@ -1,47 +1,47 @@
int lnet_ipif_query(char *name, int *up, __u32 *ip, __u32 *mask) {
struct ifreq ifr;
int nob;
int rc;
__u32 val;
nob = strnlen(name, IFNAMSIZ);
if (nob == IFNAMSIZ) {
CERROR("Interface name %s too long\n", name);
return -EINVAL;
}
- CLASSERT(sizeo... | 8,420 |
--- initial
+++ final
@@ -1,99 +1,99 @@
int lov_getstripe(struct lov_object *obj, struct lov_stripe_md *lsm, struct lov_user_md __user *lump) {
/* we use lov_user_md_v3 because it is larger than lov_user_md_v1 */
struct lov_user_md_v3 lum;
struct lov_mds_md *lmmk;
u32 stripe_count;
ssize_t lmm_size;
... | 8,421 |
--- initial
+++ final
@@ -1,34 +1,34 @@
ssize_t lov_lsm_pack(const struct lov_stripe_md *lsm, void *buf, size_t buf_size) {
struct lov_ost_data_v1 *lmm_objects;
struct lov_mds_md_v1 *lmmv1 = buf;
struct lov_mds_md_v3 *lmmv3 = buf;
size_t lmm_size;
unsigned int i;
lmm_size = lov_mds_md_size(lsm->lsm_s... | 8,422 |
--- initial
+++ final
@@ -1,28 +1,28 @@
void mdc_create_pack(struct ptlrpc_request *req, struct md_op_data *op_data, const void *data, size_t datalen, umode_t mode, uid_t uid, gid_t gid, cfs_cap_t cap_effective, __u64 rdev) {
struct mdt_rec_create *rec;
char *tmp;
__u64 flags;
- CLASSERT(sizeof(struct mdt_re... | 8,423 |
--- initial
+++ final
@@ -1,16 +1,16 @@
void mdc_link_pack(struct ptlrpc_request *req, struct md_op_data *op_data) {
struct mdt_rec_link *rec;
- CLASSERT(sizeof(struct mdt_rec_reint) == sizeof(struct mdt_rec_link));
+ BUILD_BUG_ON(sizeof(struct mdt_rec_reint) != sizeof(struct mdt_rec_link));
rec = req_capsule_... | 8,424 |
--- initial
+++ final
@@ -1,33 +1,33 @@
void mdc_open_pack(struct ptlrpc_request *req, struct md_op_data *op_data, umode_t mode, __u64 rdev, __u64 flags, const void *lmm, size_t lmmlen) {
struct mdt_rec_create *rec;
char *tmp;
__u64 cr_flags;
- CLASSERT(sizeof(struct mdt_rec_reint) == sizeof(struct mdt_rec_c... | 8,425 |
--- initial
+++ final
@@ -1,26 +1,26 @@
void mdc_rename_pack(struct ptlrpc_request *req, struct md_op_data *op_data, const char *old, size_t oldlen, const char *new, size_t newlen) {
struct mdt_rec_rename *rec;
- CLASSERT(sizeof(struct mdt_rec_reint) == sizeof(struct mdt_rec_rename));
+ BUILD_BUG_ON(sizeof(struct... | 8,426 |
--- initial
+++ final
@@ -1,17 +1,17 @@
void mdc_setattr_pack(struct ptlrpc_request *req, struct md_op_data *op_data, void *ea, size_t ealen) {
struct mdt_rec_setattr *rec;
struct lov_user_md *lum = NULL;
- CLASSERT(sizeof(struct mdt_rec_reint) == sizeof(struct mdt_rec_setattr));
+ BUILD_BUG_ON(sizeof(struct m... | 8,427 |
--- initial
+++ final
@@ -1,17 +1,17 @@
void mdc_unlink_pack(struct ptlrpc_request *req, struct md_op_data *op_data) {
struct mdt_rec_unlink *rec;
- CLASSERT(sizeof(struct mdt_rec_reint) == sizeof(struct mdt_rec_unlink));
+ BUILD_BUG_ON(sizeof(struct mdt_rec_reint) != sizeof(struct mdt_rec_unlink));
rec = req_... | 8,428 |
--- initial
+++ final
@@ -1,38 +1,38 @@
int mdc_intent_getattr_async(struct obd_export *exp, struct md_enqueue_info *minfo, struct ldlm_enqueue_info *einfo) {
struct md_op_data *op_data = &minfo->mi_data;
struct lookup_intent *it = &minfo->mi_it;
struct ptlrpc_request *req;
struct mdc_getattr_args *ga;
... | 8,429 |
--- initial
+++ final
@@ -1,73 +1,73 @@
static int mdc_xattr_common(struct obd_export *exp, const struct req_format *fmt, const struct lu_fid *fid, int opcode, u64 valid, const char *xattr_name, const char *input, int input_size, int output_size, int flags, __u32 suppgid, struct ptlrpc_request **request) {
struct p... | 8,430 |
--- initial
+++ final
@@ -1,12 +1,12 @@
int lnet_fault_init(void) {
- CLASSERT(LNET_PUT_BIT == 1 << LNET_MSG_PUT);
- CLASSERT(LNET_ACK_BIT == 1 << LNET_MSG_ACK);
- CLASSERT(LNET_GET_BIT == 1 << LNET_MSG_GET);
- CLASSERT(LNET_REPLY_BIT == 1 << LNET_MSG_REPLY);
+ BUILD_BUG_ON(LNET_PUT_BIT != 1 << LNET_MSG_PUT);
+ ... | 8,431 |
--- initial
+++ final
@@ -1,34 +1,34 @@
static void kiblnd_map_tx_pool(struct kib_tx_pool *tpo) {
struct kib_pages *txpgs = tpo->tpo_tx_pages;
struct kib_pool *pool = &tpo->tpo_pool;
struct kib_net *net = pool->po_owner->ps_net;
struct kib_dev *dev;
struct page *page;
struct kib_tx *tx;
int page_o... | 8,432 |
--- initial
+++ final
@@ -1,62 +1,62 @@
static int kiblnd_startup(lnet_ni_t *ni) {
char *ifname;
struct kib_dev *ibdev = NULL;
struct kib_net *net;
struct timespec64 tv;
unsigned long flags;
int rc;
int newdev;
LASSERT(ni->ni_lnd == &the_o2iblnd);
if (kiblnd_data.kib_init == IBLND_INIT_NOTHI... | 8,433 |
--- initial
+++ final
@@ -1,88 +1,88 @@
int kiblnd_unpack_msg(struct kib_msg *msg, int nob) {
const int hdr_size = offsetof(struct kib_msg, ibm_u);
__u32 msg_cksum;
__u16 version;
int msg_nob;
int flip;
/* 6 bytes are enough to have received magic + version */
if (nob < 6) {
CERROR("Short mes... | 8,434 |
--- initial
+++ final
@@ -1,8 +1,8 @@
static int __init ko2iblnd_init(void) {
- CLASSERT(sizeof(struct kib_msg) <= IBLND_MSG_SIZE);
- CLASSERT(offsetof(struct kib_msg, ibm_u.get.ibgm_rd.rd_frags[IBLND_MAX_RDMA_FRAGS]) <= IBLND_MSG_SIZE);
- CLASSERT(offsetof(struct kib_msg, ibm_u.putack.ibpam_rd.rd_frags[IBLND_MAX_R... | 8,435 |
--- initial
+++ final
@@ -1,38 +1,38 @@
static int osc_io_data_version_start(const struct lu_env *env, const struct cl_io_slice *slice) {
struct cl_data_version_io *dv = &slice->cis_io->u.ci_data_version;
struct osc_io *oio = cl2osc_io(env, slice);
struct osc_async_cbargs *cbargs = &oio->oi_cbarg;
struct o... | 8,436 |
--- initial
+++ final
@@ -1,132 +1,132 @@
int osc_build_rpc(const struct lu_env *env, struct client_obd *cli, struct list_head *ext_list, int cmd) {
struct ptlrpc_request *req = NULL;
struct osc_extent *ext;
struct brw_page **pga = NULL;
struct osc_brw_async_args *aa = NULL;
struct obdo *oa = NULL;
s... | 8,438 |
--- initial
+++ final
@@ -1,115 +1,115 @@
int osc_enqueue_base(struct obd_export *exp, struct ldlm_res_id *res_id, __u64 *flags, union ldlm_policy_data *policy, struct ost_lvb *lvb, int kms_valid, osc_enqueue_upcall_f upcall, void *cookie, struct ldlm_enqueue_info *einfo, struct ptlrpc_request_set *rqset, int async, i... | 8,439 |
--- initial
+++ final
@@ -1,30 +1,30 @@
int osc_punch_base(struct obd_export *exp, struct obdo *oa, obd_enqueue_update_f upcall, void *cookie, struct ptlrpc_request_set *rqset) {
struct ptlrpc_request *req;
struct osc_setattr_args *sa;
struct ost_body *body;
int rc;
req = ptlrpc_request_alloc(class_exp2... | 8,440 |
--- initial
+++ final
@@ -1,86 +1,86 @@
static int osc_set_info_async(const struct lu_env *env, struct obd_export *exp, u32 keylen, void *key, u32 vallen, void *val, struct ptlrpc_request_set *set) {
struct ptlrpc_request *req;
struct obd_device *obd = exp->exp_obd;
struct obd_import *imp = class_exp2cliimp(e... | 8,441 |
--- initial
+++ final
@@ -1,31 +1,31 @@
int osc_setattr_async(struct obd_export *exp, struct obdo *oa, obd_enqueue_update_f upcall, void *cookie, struct ptlrpc_request_set *rqset) {
struct ptlrpc_request *req;
struct osc_setattr_args *sa;
int rc;
req = ptlrpc_request_alloc(class_exp2cliimp(exp), &RQF_OST_S... | 8,442 |
--- 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... | 8,443 |
--- 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... | 8,444 |
--- 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_blocksi... | 8,445 |
--- 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_softl... | 8,446 |
--- 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(... | 8,447 |
--- 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;
@@... | 8,448 |
--- 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));
+... | 8,449 |
--- 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-... | 8,450 |
--- 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(t... | 8,451 |
--- 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_supp... | 8,452 |
--- 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... | 8,453 |
--- 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_cou... | 8,454 |
--- 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_... | 8,455 |
--- 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->... | 8,456 |
--- 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);
__... | 8,457 |
--- 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... | 8,458 |
--- 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 */
C... | 8,459 |
--- 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->... | 8,460 |
--- initial
+++ final
@@ -1,117 +1,117 @@
static int proc_lnet_peers(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) {
const int tmpsiz = 256;
struct lnet_peer_table *ptable;
char *tmpstr;
char *s;
int cpt = LNET_PROC_CPT_GET(*ppos);
int ver = LNET_PROC_VER_GET(*p... | 8,461 |
--- 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 > siz... | 8,462 |
--- 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-... | 8,463 |
--- 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... | 8,464 |
--- 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_h... | 8,465 |
--- 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 a... | 8,466 |
--- 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 = (unsigne... | 8,467 |
--- 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) ret... | 8,622 |
--- 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_... | 8,623 |
--- 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 =... | 8,624 |
--- 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 = coher... | 8,625 |
--- 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
<|end_of_text|> | 8,626 |
--- 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 ... | 8,627 |
--- 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;
+ d... | 8,628 |
--- 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 t... | 8,629 |
--- 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) retur... | 8,630 |
--- 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... | 8,631 |
--- initial
+++ final
@@ -1,71 +1,71 @@
int pcibios_plat_dev_init(struct pci_dev *dev) {
uint16_t config;
uint32_t dconfig;
int pos;
/*
* Force the Cache line setting to 64 bytes. The standard
* Linux bus scan doesn't seem to set it. Octeon really has
* 128 byte lines, but Intel bridges get rea... | 8,632 |
--- 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... | 8,633 |
--- 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)... | 8,634 |
--- 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_D... | 8,635 |
--- 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_mas... | 8,636 |
--- 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
+ ... | 8,637 |
--- 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
+ ... | 8,638 |
--- 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... | 8,639 |
--- 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.pa... | 8,640 |
--- 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 (... | 8,641 |
--- initial
+++ final
@@ -1,44 +1,44 @@
static void psbfb_copyarea_accel(struct fb_info *info, const struct fb_copyarea *a) {
struct psb_fbdev *fbdev = info->par;
struct psb_framebuffer *psbfb = &fbdev->pfb;
struct drm_device *dev = psbfb->base.dev;
struct drm_framebuffer *fb = fbdev->psb_fb_helper.fb;
... | 8,642 |
--- initial
+++ final
@@ -1,74 +1,74 @@
static int amdgpufb_create(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes) {
struct amdgpu_fbdev *rfbdev = (struct amdgpu_fbdev *)helper;
struct amdgpu_device *adev = rfbdev->adev;
struct fb_info *info;
struct drm_framebuffer *fb = NULL;
st... | 8,643 |
--- initial
+++ final
@@ -1,53 +1,53 @@
static int astfb_create(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes) {
struct ast_fbdev *afbdev = container_of(helper, struct ast_fbdev, helper);
struct drm_device *dev = afbdev->helper.dev;
struct drm_mode_fb_cmd2 mode_cmd;
struct drm_fram... | 8,644 |
--- initial
+++ final
@@ -1,61 +1,61 @@
static int bochsfb_create(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes) {
struct bochs_device *bochs = container_of(helper, struct bochs_device, fb.helper);
struct fb_info *info;
struct drm_framebuffer *fb;
struct drm_mode_fb_cmd2 mode_cmd;
... | 8,645 |
--- initial
+++ final
@@ -1,58 +1,58 @@
static int cirrusfb_create(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes) {
struct cirrus_fbdev *gfbdev = container_of(helper, struct cirrus_fbdev, helper);
struct cirrus_device *cdev = gfbdev->helper.dev->dev_private;
struct fb_info *info;
s... | 8,646 |
--- initial
+++ final
@@ -1,58 +1,58 @@
static int nv04_crtc_do_mode_set_base(struct drm_crtc *crtc, struct drm_framebuffer *passed_fb, int x, int y, bool atomic) {
struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
struct drm_device *dev = crtc->dev;
struct nouveau_drm *drm = nouveau_drm(dev);
struct nv04... | 8,647 |
--- initial
+++ final
@@ -1,97 +1,97 @@
static void nv_crtc_mode_set_regs(struct drm_crtc *crtc, struct drm_display_mode *mode) {
struct drm_device *dev = crtc->dev;
struct nouveau_drm *drm = nouveau_drm(dev);
struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
struct nv04_crtc_reg *regp = &nv04_display(dev... | 8,648 |
--- initial
+++ final
@@ -1,59 +1,59 @@
int drm_fbdev_cma_create_with_funcs(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes, const struct drm_framebuffer_funcs *funcs) {
struct drm_fbdev_cma *fbdev_cma = to_fbdev_cma(helper);
struct drm_mode_fb_cmd2 mode_cmd = {0};
struct drm_device *de... | 8,650 |
--- initial
+++ final
@@ -1,67 +1,67 @@
void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper, uint32_t fb_width, uint32_t fb_height) {
struct drm_framebuffer *fb = fb_helper->fb;
info->pseudo_palette = fb_helper->pseudo_palette;
info->var.xres_virtual = fb->width;
info->var.yre... | 8,651 |
--- initial
+++ final
@@ -1,30 +1,30 @@
int drm_mode_getfb(struct drm_device *dev, void *data, struct drm_file *file_priv) {
struct drm_mode_fb_cmd *r = data;
struct drm_framebuffer *fb;
int ret;
if (!drm_core_check_feature(dev, DRIVER_MODESET)) return -EINVAL;
fb = drm_framebuffer_lookup(dev, r->fb_id)... | 8,652 |
--- initial
+++ final
@@ -1,25 +1,23 @@
void drm_helper_mode_fill_fb_struct(struct drm_device *dev, struct drm_framebuffer *fb, const struct drm_mode_fb_cmd2 *mode_cmd) {
const struct drm_format_info *info;
int i;
info = drm_format_info(mode_cmd->pixel_format);
if (!info || !info->depth) {
struct drm_... | 8,653 |
--- initial
+++ final
@@ -1,9 +1,9 @@
static int tegra_debugfs_framebuffers(struct seq_file *s, void *data) {
struct drm_info_node *node = (struct drm_info_node *)s->private;
struct drm_device *drm = node->minor->dev;
struct drm_framebuffer *fb;
mutex_lock(&drm->mode_config.fb_lock);
- list_for_each_entry... | 8,654 |
--- initial
+++ final
@@ -1,30 +1,30 @@
static int exynos_drm_fbdev_update(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes, struct exynos_drm_gem *exynos_gem) {
struct fb_info *fbi;
struct drm_framebuffer *fb = helper->fb;
unsigned int size = fb->width * fb->height * (fb->bits_per_pixel... | 8,655 |
--- initial
+++ final
@@ -1,63 +1,63 @@
static int tegra_fbdev_probe(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes) {
struct tegra_fbdev *fbdev = to_tegra_fbdev(helper);
struct tegra_drm *tegra = helper->dev->dev_private;
struct drm_device *drm = helper->dev;
struct drm_mode_fb_cmd... | 8,656 |
--- initial
+++ final
@@ -1,99 +1,99 @@
static int psbfb_create(struct psb_fbdev *fbdev, struct drm_fb_helper_surface_size *sizes) {
struct drm_device *dev = fbdev->psb_fb_helper.dev;
struct drm_psb_private *dev_priv = dev->dev_private;
struct fb_info *info;
struct drm_framebuffer *fb;
struct psb_frameb... | 8,657 |
--- initial
+++ final
@@ -1,62 +1,62 @@
int gma_pipe_set_base(struct drm_crtc *crtc, int x, int y, struct drm_framebuffer *old_fb) {
struct drm_device *dev = crtc->dev;
struct drm_psb_private *dev_priv = dev->dev_private;
struct gma_crtc *gma_crtc = to_gma_crtc(crtc);
struct drm_framebuffer *fb = crtc->pri... | 8,658 |
--- initial
+++ final
@@ -1,89 +1,89 @@
static int intelfb_create(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes) {
struct intel_fbdev *ifbdev = container_of(helper, struct intel_fbdev, helper);
struct intel_framebuffer *intel_fb = ifbdev->fb;
struct drm_device *dev = helper->dev;
s... | 8,659 |
--- initial
+++ final
@@ -1,50 +1,50 @@
static int mdfld__intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, struct drm_framebuffer *old_fb) {
struct drm_device *dev = crtc->dev;
struct drm_psb_private *dev_priv = dev->dev_private;
struct drm_framebuffer *fb = crtc->primary->fb;
struct gma_crtc *gma_... | 8,660 |
--- initial
+++ final
@@ -1,60 +1,60 @@
static int mgag200fb_create(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes) {
struct mga_fbdev *mfbdev = container_of(helper, struct mga_fbdev, helper);
struct drm_device *dev = mfbdev->helper.dev;
struct drm_mode_fb_cmd2 mode_cmd;
struct mga_... | 8,661 |
--- initial
+++ final
@@ -1,37 +1,37 @@
static void mga_crtc_load_lut(struct drm_crtc *crtc) {
struct mga_crtc *mga_crtc = to_mga_crtc(crtc);
struct drm_device *dev = crtc->dev;
struct mga_device *mdev = dev->dev_private;
struct drm_framebuffer *fb = crtc->primary->fb;
int i;
if (!crtc->enabled) retu... | 8,662 |
--- initial
+++ final
@@ -1,85 +1,85 @@
static int msm_fbdev_create(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes) {
struct msm_fbdev *fbdev = to_msm_fbdev(helper);
struct drm_device *dev = helper->dev;
struct drm_framebuffer *fb = NULL;
struct fb_info *fbi = NULL;
struct drm_mo... | 8,664 |
--- initial
+++ final
@@ -1,80 +1,80 @@
static int nouveau_fbcon_create(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes) {
struct nouveau_fbdev *fbcon = container_of(helper, struct nouveau_fbdev, helper);
struct drm_device *dev = fbcon->helper.dev;
struct nouveau_drm *drm = nouveau_drm(... | 8,665 |
--- initial
+++ final
@@ -1,46 +1,46 @@
static int oaktrail_pipe_set_base(struct drm_crtc *crtc, int x, int y, struct drm_framebuffer *old_fb) {
struct drm_device *dev = crtc->dev;
struct drm_psb_private *dev_priv = dev->dev_private;
struct gma_crtc *gma_crtc = to_gma_crtc(crtc);
struct drm_framebuffer *fb... | 8,666 |
--- initial
+++ final
@@ -1,102 +1,102 @@
static int omap_fbdev_create(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes) {
struct omap_fbdev *fbdev = to_omap_fbdev(helper);
struct drm_device *dev = helper->dev;
struct omap_drm_private *priv = dev->dev_private;
struct drm_framebuffer *... | 8,667 |
--- initial
+++ final
@@ -1,86 +1,86 @@
static int qxlfb_create(struct qxl_fbdev *qfbdev, struct drm_fb_helper_surface_size *sizes) {
struct qxl_device *qdev = qfbdev->qdev;
struct fb_info *info;
struct drm_framebuffer *fb = NULL;
struct drm_mode_fb_cmd2 mode_cmd;
struct drm_gem_object *gobj = NULL;
... | 8,668 |
--- initial
+++ final
@@ -1,75 +1,75 @@
static int radeonfb_create(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes) {
struct radeon_fbdev *rfbdev = container_of(helper, struct radeon_fbdev, helper);
struct radeon_device *rdev = rfbdev->rdev;
struct fb_info *info;
struct drm_framebuff... | 8,669 |
--- initial
+++ final
@@ -1,54 +1,54 @@
static int rockchip_drm_fbdev_create(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes) {
struct rockchip_drm_private *private = to_drm_private(helper);
struct drm_mode_fb_cmd2 mode_cmd = {0};
struct drm_device *dev = helper->dev;
struct rockchip... | 8,670 |
--- initial
+++ final
@@ -1,50 +1,50 @@
static int udlfb_create(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes) {
struct udl_fbdev *ufbdev = container_of(helper, struct udl_fbdev, helper);
struct drm_device *dev = ufbdev->helper.dev;
struct fb_info *info;
struct drm_framebuffer *fb;... | 8,671 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.