extern void abort(void); extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); void reach_error() { __assert_fail("0", "drivers--staging--comedi--drivers--comedi_bond.ko_029.fdb2a66.08_1a.cil_true-unreach-call.i", 3, "reach_error"); } /* Generated by CIL v. 1.5.1 */ /* print_CIL_Input is false */ typedef unsigned short __u16; typedef unsigned int __u32; typedef unsigned long long __u64; typedef unsigned char u8; typedef short s16; typedef unsigned short u16; typedef unsigned int u32; typedef long long s64; typedef unsigned long long u64; typedef long __kernel_long_t; typedef unsigned long __kernel_ulong_t; typedef __kernel_ulong_t __kernel_size_t; typedef __kernel_long_t __kernel_ssize_t; typedef long long __kernel_loff_t; typedef __u32 __kernel_dev_t; typedef __kernel_dev_t dev_t; typedef unsigned short umode_t; typedef _Bool bool; typedef __kernel_loff_t loff_t; typedef __kernel_size_t size_t; typedef __kernel_ssize_t ssize_t; typedef u64 dma_addr_t; typedef unsigned int gfp_t; typedef u64 phys_addr_t; typedef phys_addr_t resource_size_t; struct __anonstruct_atomic_t_6 { int counter ; }; typedef struct __anonstruct_atomic_t_6 atomic_t; struct __anonstruct_atomic64_t_7 { long counter ; }; typedef struct __anonstruct_atomic64_t_7 atomic64_t; struct list_head { struct list_head *next ; struct list_head *prev ; }; struct hlist_node; struct hlist_head { struct hlist_node *first ; }; struct hlist_node { struct hlist_node *next ; struct hlist_node **pprev ; }; struct module; typedef void (*ctor_fn_t)(void); struct device; struct completion; struct bug_entry { int bug_addr_disp ; int file_disp ; unsigned short line ; unsigned short flags ; }; struct page; struct task_struct; struct mm_struct; typedef unsigned long pgdval_t; typedef unsigned long pgprotval_t; struct pgprot { pgprotval_t pgprot ; }; typedef struct pgprot pgprot_t; struct __anonstruct_pgd_t_16 { pgdval_t pgd ; }; typedef struct __anonstruct_pgd_t_16 pgd_t; typedef struct page *pgtable_t; struct file; struct cpumask; struct arch_spinlock; struct cpumask { unsigned long bits[64U] ; }; typedef struct cpumask *cpumask_var_t; struct static_key; struct kmem_cache; typedef atomic64_t atomic_long_t; typedef u16 __ticket_t; typedef u32 __ticketpair_t; struct __raw_tickets { __ticket_t head ; __ticket_t tail ; }; union __anonunion_ldv_5906_29 { __ticketpair_t head_tail ; struct __raw_tickets tickets ; }; struct arch_spinlock { union __anonunion_ldv_5906_29 ldv_5906 ; }; typedef struct arch_spinlock arch_spinlock_t; struct lockdep_map; struct stack_trace { unsigned int nr_entries ; unsigned int max_entries ; unsigned long *entries ; int skip ; }; struct lockdep_subclass_key { char __one_byte ; }; struct lock_class_key { struct lockdep_subclass_key subkeys[8U] ; }; struct lock_class { struct list_head hash_entry ; struct list_head lock_entry ; struct lockdep_subclass_key *key ; unsigned int subclass ; unsigned int dep_gen_id ; unsigned long usage_mask ; struct stack_trace usage_traces[13U] ; struct list_head locks_after ; struct list_head locks_before ; unsigned int version ; unsigned long ops ; char const *name ; int name_version ; unsigned long contention_point[4U] ; unsigned long contending_point[4U] ; }; struct lockdep_map { struct lock_class_key *key ; struct lock_class *class_cache[2U] ; char const *name ; int cpu ; unsigned long ip ; }; struct raw_spinlock { arch_spinlock_t raw_lock ; unsigned int magic ; unsigned int owner_cpu ; void *owner ; struct lockdep_map dep_map ; }; typedef struct raw_spinlock raw_spinlock_t; struct __anonstruct_ldv_6129_33 { u8 __padding[24U] ; struct lockdep_map dep_map ; }; union __anonunion_ldv_6130_32 { struct raw_spinlock rlock ; struct __anonstruct_ldv_6129_33 ldv_6129 ; }; struct spinlock { union __anonunion_ldv_6130_32 ldv_6130 ; }; typedef struct spinlock spinlock_t; struct __wait_queue_head { spinlock_t lock ; struct list_head task_list ; }; typedef struct __wait_queue_head wait_queue_head_t; struct __anonstruct_nodemask_t_36 { unsigned long bits[16U] ; }; typedef struct __anonstruct_nodemask_t_36 nodemask_t; struct mutex { atomic_t count ; spinlock_t wait_lock ; struct list_head wait_list ; struct task_struct *owner ; char const *name ; void *magic ; struct lockdep_map dep_map ; }; struct rw_semaphore; struct rw_semaphore { long count ; raw_spinlock_t wait_lock ; struct list_head wait_list ; struct lockdep_map dep_map ; }; struct completion { unsigned int done ; wait_queue_head_t wait ; }; union ktime { s64 tv64 ; }; typedef union ktime ktime_t; struct tvec_base; struct timer_list { struct list_head entry ; unsigned long expires ; struct tvec_base *base ; void (*function)(unsigned long ) ; unsigned long data ; int slack ; int start_pid ; void *start_site ; char start_comm[16U] ; struct lockdep_map lockdep_map ; }; struct work_struct; struct work_struct { atomic_long_t data ; struct list_head entry ; void (*func)(struct work_struct * ) ; struct lockdep_map lockdep_map ; }; struct resource { resource_size_t start ; resource_size_t end ; char const *name ; unsigned long flags ; struct resource *parent ; struct resource *sibling ; struct resource *child ; }; struct pci_dev; struct pm_message { int event ; }; typedef struct pm_message pm_message_t; struct dev_pm_ops { int (*prepare)(struct device * ) ; void (*complete)(struct device * ) ; int (*suspend)(struct device * ) ; int (*resume)(struct device * ) ; int (*freeze)(struct device * ) ; int (*thaw)(struct device * ) ; int (*poweroff)(struct device * ) ; int (*restore)(struct device * ) ; int (*suspend_late)(struct device * ) ; int (*resume_early)(struct device * ) ; int (*freeze_late)(struct device * ) ; int (*thaw_early)(struct device * ) ; int (*poweroff_late)(struct device * ) ; int (*restore_early)(struct device * ) ; int (*suspend_noirq)(struct device * ) ; int (*resume_noirq)(struct device * ) ; int (*freeze_noirq)(struct device * ) ; int (*thaw_noirq)(struct device * ) ; int (*poweroff_noirq)(struct device * ) ; int (*restore_noirq)(struct device * ) ; int (*runtime_suspend)(struct device * ) ; int (*runtime_resume)(struct device * ) ; int (*runtime_idle)(struct device * ) ; }; enum rpm_status { RPM_ACTIVE = 0, RPM_RESUMING = 1, RPM_SUSPENDED = 2, RPM_SUSPENDING = 3 } ; enum rpm_request { RPM_REQ_NONE = 0, RPM_REQ_IDLE = 1, RPM_REQ_SUSPEND = 2, RPM_REQ_AUTOSUSPEND = 3, RPM_REQ_RESUME = 4 } ; struct wakeup_source; struct pm_subsys_data { spinlock_t lock ; unsigned int refcount ; }; struct dev_pm_qos_request; struct pm_qos_constraints; struct dev_pm_info { pm_message_t power_state ; unsigned char can_wakeup : 1 ; unsigned char async_suspend : 1 ; bool is_prepared ; bool is_suspended ; bool ignore_children ; spinlock_t lock ; struct list_head entry ; struct completion completion ; struct wakeup_source *wakeup ; bool wakeup_path ; struct timer_list suspend_timer ; unsigned long timer_expires ; struct work_struct work ; wait_queue_head_t wait_queue ; atomic_t usage_count ; atomic_t child_count ; unsigned char disable_depth : 3 ; unsigned char idle_notification : 1 ; unsigned char request_pending : 1 ; unsigned char deferred_resume : 1 ; unsigned char run_wake : 1 ; unsigned char runtime_auto : 1 ; unsigned char no_callbacks : 1 ; unsigned char irq_safe : 1 ; unsigned char use_autosuspend : 1 ; unsigned char timer_autosuspends : 1 ; enum rpm_request request ; enum rpm_status runtime_status ; int runtime_error ; int autosuspend_delay ; unsigned long last_busy ; unsigned long active_jiffies ; unsigned long suspended_jiffies ; unsigned long accounting_timestamp ; struct dev_pm_qos_request *pq_req ; struct pm_subsys_data *subsys_data ; struct pm_qos_constraints *constraints ; }; struct dev_pm_domain { struct dev_pm_ops ops ; }; struct pci_bus; struct __anonstruct_mm_context_t_101 { void *ldt ; int size ; unsigned short ia32_compat ; struct mutex lock ; void *vdso ; }; typedef struct __anonstruct_mm_context_t_101 mm_context_t; struct vm_area_struct; struct rb_node { unsigned long rb_parent_color ; struct rb_node *rb_right ; struct rb_node *rb_left ; }; struct rb_root { struct rb_node *rb_node ; }; typedef __u64 Elf64_Addr; typedef __u16 Elf64_Half; typedef __u32 Elf64_Word; typedef __u64 Elf64_Xword; struct elf64_sym { Elf64_Word st_name ; unsigned char st_info ; unsigned char st_other ; Elf64_Half st_shndx ; Elf64_Addr st_value ; Elf64_Xword st_size ; }; typedef struct elf64_sym Elf64_Sym; struct sock; struct kobject; enum kobj_ns_type { KOBJ_NS_TYPE_NONE = 0, KOBJ_NS_TYPE_NET = 1, KOBJ_NS_TYPES = 2 } ; struct kobj_ns_type_operations { enum kobj_ns_type type ; void *(*grab_current_ns)(void) ; void const *(*netlink_ns)(struct sock * ) ; void const *(*initial_ns)(void) ; void (*drop_ns)(void * ) ; }; struct attribute { char const *name ; umode_t mode ; bool ignore_lockdep ; struct lock_class_key *key ; struct lock_class_key skey ; }; struct attribute_group { char const *name ; umode_t (*is_visible)(struct kobject * , struct attribute * , int ) ; struct attribute **attrs ; }; struct bin_attribute { struct attribute attr ; size_t size ; void *private ; ssize_t (*read)(struct file * , struct kobject * , struct bin_attribute * , char * , loff_t , size_t ) ; ssize_t (*write)(struct file * , struct kobject * , struct bin_attribute * , char * , loff_t , size_t ) ; int (*mmap)(struct file * , struct kobject * , struct bin_attribute * , struct vm_area_struct * ) ; }; struct sysfs_ops { ssize_t (*show)(struct kobject * , struct attribute * , char * ) ; ssize_t (*store)(struct kobject * , struct attribute * , char const * , size_t ) ; void const *(*namespace)(struct kobject * , struct attribute const * ) ; }; struct sysfs_dirent; struct kref { atomic_t refcount ; }; struct kset; struct kobj_type; struct kobject { char const *name ; struct list_head entry ; struct kobject *parent ; struct kset *kset ; struct kobj_type *ktype ; struct sysfs_dirent *sd ; struct kref kref ; unsigned char state_initialized : 1 ; unsigned char state_in_sysfs : 1 ; unsigned char state_add_uevent_sent : 1 ; unsigned char state_remove_uevent_sent : 1 ; unsigned char uevent_suppress : 1 ; }; struct kobj_type { void (*release)(struct kobject * ) ; struct sysfs_ops const *sysfs_ops ; struct attribute **default_attrs ; struct kobj_ns_type_operations const *(*child_ns_type)(struct kobject * ) ; void const *(*namespace)(struct kobject * ) ; }; struct kobj_uevent_env { char *envp[32U] ; int envp_idx ; char buf[2048U] ; int buflen ; }; struct kset_uevent_ops { int (* const filter)(struct kset * , struct kobject * ) ; char const *(* const name)(struct kset * , struct kobject * ) ; int (* const uevent)(struct kset * , struct kobject * , struct kobj_uevent_env * ) ; }; struct kset { struct list_head list ; spinlock_t list_lock ; struct kobject kobj ; struct kset_uevent_ops const *uevent_ops ; }; struct kernel_param; struct kernel_param_ops { int (*set)(char const * , struct kernel_param const * ) ; int (*get)(char * , struct kernel_param const * ) ; void (*free)(void * ) ; }; struct kparam_string; struct kparam_array; union __anonunion_ldv_13517_134 { void *arg ; struct kparam_string const *str ; struct kparam_array const *arr ; }; struct kernel_param { char const *name ; struct kernel_param_ops const *ops ; u16 perm ; s16 level ; union __anonunion_ldv_13517_134 ldv_13517 ; }; struct kparam_string { unsigned int maxlen ; char *string ; }; struct kparam_array { unsigned int max ; unsigned int elemsize ; unsigned int *num ; struct kernel_param_ops const *ops ; void *elem ; }; struct static_key { atomic_t enabled ; }; struct tracepoint; struct tracepoint_func { void *func ; void *data ; }; struct tracepoint { char const *name ; struct static_key key ; void (*regfunc)(void) ; void (*unregfunc)(void) ; struct tracepoint_func *funcs ; }; struct kernel_symbol { unsigned long value ; char const *name ; }; struct mod_arch_specific { }; struct module_param_attrs; struct module_kobject { struct kobject kobj ; struct module *mod ; struct kobject *drivers_dir ; struct module_param_attrs *mp ; }; struct module_attribute { struct attribute attr ; ssize_t (*show)(struct module_attribute * , struct module_kobject * , char * ) ; ssize_t (*store)(struct module_attribute * , struct module_kobject * , char const * , size_t ) ; void (*setup)(struct module * , char const * ) ; int (*test)(struct module * ) ; void (*free)(struct module * ) ; }; struct exception_table_entry; enum module_state { MODULE_STATE_LIVE = 0, MODULE_STATE_COMING = 1, MODULE_STATE_GOING = 2 } ; struct module_ref { unsigned long incs ; unsigned long decs ; }; struct module_sect_attrs; struct module_notes_attrs; struct ftrace_event_call; struct module { enum module_state state ; struct list_head list ; char name[56U] ; struct module_kobject mkobj ; struct module_attribute *modinfo_attrs ; char const *version ; char const *srcversion ; struct kobject *holders_dir ; struct kernel_symbol const *syms ; unsigned long const *crcs ; unsigned int num_syms ; struct kernel_param *kp ; unsigned int num_kp ; unsigned int num_gpl_syms ; struct kernel_symbol const *gpl_syms ; unsigned long const *gpl_crcs ; struct kernel_symbol const *unused_syms ; unsigned long const *unused_crcs ; unsigned int num_unused_syms ; unsigned int num_unused_gpl_syms ; struct kernel_symbol const *unused_gpl_syms ; unsigned long const *unused_gpl_crcs ; struct kernel_symbol const *gpl_future_syms ; unsigned long const *gpl_future_crcs ; unsigned int num_gpl_future_syms ; unsigned int num_exentries ; struct exception_table_entry *extable ; int (*init)(void) ; void *module_init ; void *module_core ; unsigned int init_size ; unsigned int core_size ; unsigned int init_text_size ; unsigned int core_text_size ; unsigned int init_ro_size ; unsigned int core_ro_size ; struct mod_arch_specific arch ; unsigned int taints ; unsigned int num_bugs ; struct list_head bug_list ; struct bug_entry *bug_table ; Elf64_Sym *symtab ; Elf64_Sym *core_symtab ; unsigned int num_symtab ; unsigned int core_num_syms ; char *strtab ; char *core_strtab ; struct module_sect_attrs *sect_attrs ; struct module_notes_attrs *notes_attrs ; char *args ; void *percpu ; unsigned int percpu_size ; unsigned int num_tracepoints ; struct tracepoint * const *tracepoints_ptrs ; unsigned int num_trace_bprintk_fmt ; char const **trace_bprintk_fmt_start ; struct ftrace_event_call **trace_events ; unsigned int num_trace_events ; unsigned int num_ftrace_callsites ; unsigned long *ftrace_callsites ; struct list_head source_list ; struct list_head target_list ; struct task_struct *waiter ; void (*exit)(void) ; struct module_ref *refptr ; ctor_fn_t (**ctors)(void) ; unsigned int num_ctors ; }; struct kmem_cache_cpu { void **freelist ; unsigned long tid ; struct page *page ; struct page *partial ; unsigned int stat[26U] ; }; struct kmem_cache_node { spinlock_t list_lock ; unsigned long nr_partial ; struct list_head partial ; atomic_long_t nr_slabs ; atomic_long_t total_objects ; struct list_head full ; }; struct kmem_cache_order_objects { unsigned long x ; }; struct kmem_cache { struct kmem_cache_cpu *cpu_slab ; unsigned long flags ; unsigned long min_partial ; int size ; int object_size ; int offset ; int cpu_partial ; struct kmem_cache_order_objects oo ; struct kmem_cache_order_objects max ; struct kmem_cache_order_objects min ; gfp_t allocflags ; int refcount ; void (*ctor)(void * ) ; int inuse ; int align ; int reserved ; char const *name ; struct list_head list ; struct kobject kobj ; int remote_node_defrag_ratio ; struct kmem_cache_node *node[1024U] ; }; struct comedi_insn { unsigned int insn ; unsigned int n ; unsigned int *data ; unsigned int subdev ; unsigned int chanspec ; unsigned int unused[3U] ; }; struct comedi_cmd { unsigned int subdev ; unsigned int flags ; unsigned int start_src ; unsigned int start_arg ; unsigned int scan_begin_src ; unsigned int scan_begin_arg ; unsigned int convert_src ; unsigned int convert_arg ; unsigned int scan_end_src ; unsigned int scan_end_arg ; unsigned int stop_src ; unsigned int stop_arg ; unsigned int *chanlist ; unsigned int chanlist_len ; short *data ; unsigned int data_len ; }; struct comedi_krange { int min ; int max ; unsigned int flags ; }; struct comedi_devconfig { char board_name[20U] ; int options[32U] ; }; struct comedi_device; struct prio_tree_node; struct raw_prio_tree_node { struct prio_tree_node *left ; struct prio_tree_node *right ; struct prio_tree_node *parent ; }; struct prio_tree_node { struct prio_tree_node *left ; struct prio_tree_node *right ; struct prio_tree_node *parent ; unsigned long start ; unsigned long last ; }; struct xol_area { wait_queue_head_t wq ; atomic_t slot_count ; unsigned long *bitmap ; struct page *page ; unsigned long vaddr ; }; struct uprobes_state { struct xol_area *xol_area ; atomic_t count ; }; struct address_space; union __anonunion_ldv_14905_136 { unsigned long index ; void *freelist ; bool pfmemalloc ; }; struct __anonstruct_ldv_14915_140 { unsigned short inuse ; unsigned short objects : 15 ; unsigned char frozen : 1 ; }; union __anonunion_ldv_14917_139 { atomic_t _mapcount ; struct __anonstruct_ldv_14915_140 ldv_14915 ; int units ; }; struct __anonstruct_ldv_14919_138 { union __anonunion_ldv_14917_139 ldv_14917 ; atomic_t _count ; }; union __anonunion_ldv_14920_137 { unsigned long counters ; struct __anonstruct_ldv_14919_138 ldv_14919 ; }; struct __anonstruct_ldv_14921_135 { union __anonunion_ldv_14905_136 ldv_14905 ; union __anonunion_ldv_14920_137 ldv_14920 ; }; struct __anonstruct_ldv_14928_142 { struct page *next ; int pages ; int pobjects ; }; struct slab; struct __anonstruct_ldv_14934_143 { struct kmem_cache *slab_cache ; struct slab *slab_page ; }; union __anonunion_ldv_14935_141 { struct list_head lru ; struct __anonstruct_ldv_14928_142 ldv_14928 ; struct list_head list ; struct __anonstruct_ldv_14934_143 ldv_14934 ; }; union __anonunion_ldv_14940_144 { unsigned long private ; struct kmem_cache *slab ; struct page *first_page ; }; struct page { unsigned long flags ; struct address_space *mapping ; struct __anonstruct_ldv_14921_135 ldv_14921 ; union __anonunion_ldv_14935_141 ldv_14935 ; union __anonunion_ldv_14940_144 ldv_14940 ; unsigned long debug_flags ; }; struct __anonstruct_vm_set_146 { struct list_head list ; void *parent ; struct vm_area_struct *head ; }; union __anonunion_shared_145 { struct __anonstruct_vm_set_146 vm_set ; struct raw_prio_tree_node prio_tree_node ; }; struct anon_vma; struct vm_operations_struct; struct mempolicy; struct vm_area_struct { struct mm_struct *vm_mm ; unsigned long vm_start ; unsigned long vm_end ; struct vm_area_struct *vm_next ; struct vm_area_struct *vm_prev ; pgprot_t vm_page_prot ; unsigned long vm_flags ; struct rb_node vm_rb ; union __anonunion_shared_145 shared ; struct list_head anon_vma_chain ; struct anon_vma *anon_vma ; struct vm_operations_struct const *vm_ops ; unsigned long vm_pgoff ; struct file *vm_file ; void *vm_private_data ; struct mempolicy *vm_policy ; }; struct core_thread { struct task_struct *task ; struct core_thread *next ; }; struct core_state { atomic_t nr_threads ; struct core_thread dumper ; struct completion startup ; }; struct mm_rss_stat { atomic_long_t count[3U] ; }; struct linux_binfmt; struct mmu_notifier_mm; struct mm_struct { struct vm_area_struct *mmap ; struct rb_root mm_rb ; struct vm_area_struct *mmap_cache ; unsigned long (*get_unmapped_area)(struct file * , unsigned long , unsigned long , unsigned long , unsigned long ) ; void (*unmap_area)(struct mm_struct * , unsigned long ) ; unsigned long mmap_base ; unsigned long task_size ; unsigned long cached_hole_size ; unsigned long free_area_cache ; pgd_t *pgd ; atomic_t mm_users ; atomic_t mm_count ; int map_count ; spinlock_t page_table_lock ; struct rw_semaphore mmap_sem ; struct list_head mmlist ; unsigned long hiwater_rss ; unsigned long hiwater_vm ; unsigned long total_vm ; unsigned long locked_vm ; unsigned long pinned_vm ; unsigned long shared_vm ; unsigned long exec_vm ; unsigned long stack_vm ; unsigned long reserved_vm ; unsigned long def_flags ; unsigned long nr_ptes ; unsigned long start_code ; unsigned long end_code ; unsigned long start_data ; unsigned long end_data ; unsigned long start_brk ; unsigned long brk ; unsigned long start_stack ; unsigned long arg_start ; unsigned long arg_end ; unsigned long env_start ; unsigned long env_end ; unsigned long saved_auxv[44U] ; struct mm_rss_stat rss_stat ; struct linux_binfmt *binfmt ; cpumask_var_t cpu_vm_mask_var ; mm_context_t context ; unsigned long flags ; struct core_state *core_state ; spinlock_t ioctx_lock ; struct hlist_head ioctx_list ; struct task_struct *owner ; struct file *exe_file ; unsigned long num_exe_file_vmas ; struct mmu_notifier_mm *mmu_notifier_mm ; pgtable_t pmd_huge_pte ; struct cpumask cpumask_allocation ; struct uprobes_state uprobes_state ; }; struct vm_fault { unsigned int flags ; unsigned long pgoff ; void *virtual_address ; struct page *page ; }; struct vm_operations_struct { void (*open)(struct vm_area_struct * ) ; void (*close)(struct vm_area_struct * ) ; int (*fault)(struct vm_area_struct * , struct vm_fault * ) ; int (*page_mkwrite)(struct vm_area_struct * , struct vm_fault * ) ; int (*access)(struct vm_area_struct * , unsigned long , void * , int , int ) ; int (*set_policy)(struct vm_area_struct * , struct mempolicy * ) ; struct mempolicy *(*get_policy)(struct vm_area_struct * , unsigned long ) ; int (*migrate)(struct vm_area_struct * , nodemask_t const * , nodemask_t const * , unsigned long ) ; }; struct klist_node; struct klist_node { void *n_klist ; struct list_head n_node ; struct kref n_ref ; }; struct dma_map_ops; struct dev_archdata { void *acpi_handle ; struct dma_map_ops *dma_ops ; void *iommu ; }; struct device_private; struct device_driver; struct driver_private; struct class; struct subsys_private; struct bus_type; struct device_node; struct iommu_ops; struct iommu_group; struct bus_attribute { struct attribute attr ; ssize_t (*show)(struct bus_type * , char * ) ; ssize_t (*store)(struct bus_type * , char const * , size_t ) ; }; struct device_attribute; struct driver_attribute; struct bus_type { char const *name ; char const *dev_name ; struct device *dev_root ; struct bus_attribute *bus_attrs ; struct device_attribute *dev_attrs ; struct driver_attribute *drv_attrs ; int (*match)(struct device * , struct device_driver * ) ; int (*uevent)(struct device * , struct kobj_uevent_env * ) ; int (*probe)(struct device * ) ; int (*remove)(struct device * ) ; void (*shutdown)(struct device * ) ; int (*suspend)(struct device * , pm_message_t ) ; int (*resume)(struct device * ) ; struct dev_pm_ops const *pm ; struct iommu_ops *iommu_ops ; struct subsys_private *p ; }; struct device_type; struct of_device_id; struct device_driver { char const *name ; struct bus_type *bus ; struct module *owner ; char const *mod_name ; bool suppress_bind_attrs ; struct of_device_id const *of_match_table ; int (*probe)(struct device * ) ; int (*remove)(struct device * ) ; void (*shutdown)(struct device * ) ; int (*suspend)(struct device * , pm_message_t ) ; int (*resume)(struct device * ) ; struct attribute_group const **groups ; struct dev_pm_ops const *pm ; struct driver_private *p ; }; struct driver_attribute { struct attribute attr ; ssize_t (*show)(struct device_driver * , char * ) ; ssize_t (*store)(struct device_driver * , char const * , size_t ) ; }; struct class_attribute; struct class { char const *name ; struct module *owner ; struct class_attribute *class_attrs ; struct device_attribute *dev_attrs ; struct bin_attribute *dev_bin_attrs ; struct kobject *dev_kobj ; int (*dev_uevent)(struct device * , struct kobj_uevent_env * ) ; char *(*devnode)(struct device * , umode_t * ) ; void (*class_release)(struct class * ) ; void (*dev_release)(struct device * ) ; int (*suspend)(struct device * , pm_message_t ) ; int (*resume)(struct device * ) ; struct kobj_ns_type_operations const *ns_type ; void const *(*namespace)(struct device * ) ; struct dev_pm_ops const *pm ; struct subsys_private *p ; }; struct class_attribute { struct attribute attr ; ssize_t (*show)(struct class * , struct class_attribute * , char * ) ; ssize_t (*store)(struct class * , struct class_attribute * , char const * , size_t ) ; void const *(*namespace)(struct class * , struct class_attribute const * ) ; }; struct device_type { char const *name ; struct attribute_group const **groups ; int (*uevent)(struct device * , struct kobj_uevent_env * ) ; char *(*devnode)(struct device * , umode_t * ) ; void (*release)(struct device * ) ; struct dev_pm_ops const *pm ; }; struct device_attribute { struct attribute attr ; ssize_t (*show)(struct device * , struct device_attribute * , char * ) ; ssize_t (*store)(struct device * , struct device_attribute * , char const * , size_t ) ; }; struct device_dma_parameters { unsigned int max_segment_size ; unsigned long segment_boundary_mask ; }; struct dma_coherent_mem; struct device { struct device *parent ; struct device_private *p ; struct kobject kobj ; char const *init_name ; struct device_type const *type ; struct mutex mutex ; struct bus_type *bus ; struct device_driver *driver ; void *platform_data ; struct dev_pm_info power ; struct dev_pm_domain *pm_domain ; int numa_node ; u64 *dma_mask ; u64 coherent_dma_mask ; struct device_dma_parameters *dma_parms ; struct list_head dma_pools ; struct dma_coherent_mem *dma_mem ; struct dev_archdata archdata ; struct device_node *of_node ; dev_t devt ; u32 id ; spinlock_t devres_lock ; struct list_head devres_head ; struct klist_node knode_class ; struct class *class ; struct attribute_group const **groups ; void (*release)(struct device * ) ; struct iommu_group *iommu_group ; }; struct wakeup_source { char const *name ; struct list_head entry ; spinlock_t lock ; struct timer_list timer ; unsigned long timer_expires ; ktime_t total_time ; ktime_t max_time ; ktime_t last_time ; ktime_t start_prevent_time ; ktime_t prevent_sleep_time ; unsigned long event_count ; unsigned long active_count ; unsigned long relax_count ; unsigned long expire_count ; unsigned long wakeup_count ; bool active ; bool autosleep_enabled ; }; struct dma_attrs { unsigned long flags[1U] ; }; enum dma_data_direction { DMA_BIDIRECTIONAL = 0, DMA_TO_DEVICE = 1, DMA_FROM_DEVICE = 2, DMA_NONE = 3 } ; struct scatterlist { unsigned long sg_magic ; unsigned long page_link ; unsigned int offset ; unsigned int length ; dma_addr_t dma_address ; unsigned int dma_length ; }; struct sg_table { struct scatterlist *sgl ; unsigned int nents ; unsigned int orig_nents ; }; struct dma_map_ops { void *(*alloc)(struct device * , size_t , dma_addr_t * , gfp_t , struct dma_attrs * ) ; void (*free)(struct device * , size_t , void * , dma_addr_t , struct dma_attrs * ) ; int (*mmap)(struct device * , struct vm_area_struct * , void * , dma_addr_t , size_t , struct dma_attrs * ) ; int (*get_sgtable)(struct device * , struct sg_table * , void * , dma_addr_t , size_t , struct dma_attrs * ) ; dma_addr_t (*map_page)(struct device * , struct page * , unsigned long , size_t , enum dma_data_direction , struct dma_attrs * ) ; void (*unmap_page)(struct device * , dma_addr_t , size_t , enum dma_data_direction , struct dma_attrs * ) ; int (*map_sg)(struct device * , struct scatterlist * , int , enum dma_data_direction , struct dma_attrs * ) ; void (*unmap_sg)(struct device * , struct scatterlist * , int , enum dma_data_direction , struct dma_attrs * ) ; void (*sync_single_for_cpu)(struct device * , dma_addr_t , size_t , enum dma_data_direction ) ; void (*sync_single_for_device)(struct device * , dma_addr_t , size_t , enum dma_data_direction ) ; void (*sync_sg_for_cpu)(struct device * , struct scatterlist * , int , enum dma_data_direction ) ; void (*sync_sg_for_device)(struct device * , struct scatterlist * , int , enum dma_data_direction ) ; int (*mapping_error)(struct device * , dma_addr_t ) ; int (*dma_supported)(struct device * , u64 ) ; int (*set_dma_mask)(struct device * , u64 ) ; int is_phys ; }; struct exception_table_entry { int insn ; int fixup ; }; typedef unsigned long kernel_ulong_t; struct pci_device_id { __u32 vendor ; __u32 device ; __u32 subvendor ; __u32 subdevice ; __u32 class ; __u32 class_mask ; kernel_ulong_t driver_data ; }; struct of_device_id { char name[32U] ; char type[32U] ; char compatible[128U] ; void *data ; }; struct hotplug_slot; struct pci_slot { struct pci_bus *bus ; struct list_head list ; struct hotplug_slot *hotplug ; unsigned char number ; struct kobject kobj ; }; typedef int pci_power_t; typedef unsigned int pci_channel_state_t; enum pci_channel_state { pci_channel_io_normal = 1, pci_channel_io_frozen = 2, pci_channel_io_perm_failure = 3 } ; typedef unsigned short pci_dev_flags_t; typedef unsigned short pci_bus_flags_t; struct pcie_link_state; struct pci_vpd; struct pci_sriov; struct pci_ats; struct proc_dir_entry; struct pci_driver; union __anonunion_ldv_19713_148 { struct pci_sriov *sriov ; struct pci_dev *physfn ; }; struct pci_dev { struct list_head bus_list ; struct pci_bus *bus ; struct pci_bus *subordinate ; void *sysdata ; struct proc_dir_entry *procent ; struct pci_slot *slot ; unsigned int devfn ; unsigned short vendor ; unsigned short device ; unsigned short subsystem_vendor ; unsigned short subsystem_device ; unsigned int class ; u8 revision ; u8 hdr_type ; u8 pcie_cap ; unsigned char pcie_type : 4 ; unsigned char pcie_mpss : 3 ; u8 rom_base_reg ; u8 pin ; struct pci_driver *driver ; u64 dma_mask ; struct device_dma_parameters dma_parms ; pci_power_t current_state ; int pm_cap ; unsigned char pme_support : 5 ; unsigned char pme_interrupt : 1 ; unsigned char pme_poll : 1 ; unsigned char d1_support : 1 ; unsigned char d2_support : 1 ; unsigned char no_d1d2 : 1 ; unsigned char no_d3cold : 1 ; unsigned char d3cold_allowed : 1 ; unsigned char mmio_always_on : 1 ; unsigned char wakeup_prepared : 1 ; unsigned char runtime_d3cold : 1 ; unsigned int d3_delay ; unsigned int d3cold_delay ; struct pcie_link_state *link_state ; pci_channel_state_t error_state ; struct device dev ; int cfg_size ; unsigned int irq ; struct resource resource[17U] ; unsigned char transparent : 1 ; unsigned char multifunction : 1 ; unsigned char is_added : 1 ; unsigned char is_busmaster : 1 ; unsigned char no_msi : 1 ; unsigned char block_cfg_access : 1 ; unsigned char broken_parity_status : 1 ; unsigned char irq_reroute_variant : 2 ; unsigned char msi_enabled : 1 ; unsigned char msix_enabled : 1 ; unsigned char ari_enabled : 1 ; unsigned char is_managed : 1 ; unsigned char is_pcie : 1 ; unsigned char needs_freset : 1 ; unsigned char state_saved : 1 ; unsigned char is_physfn : 1 ; unsigned char is_virtfn : 1 ; unsigned char reset_fn : 1 ; unsigned char is_hotplug_bridge : 1 ; unsigned char __aer_firmware_first_valid : 1 ; unsigned char __aer_firmware_first : 1 ; unsigned char broken_intx_masking : 1 ; unsigned char io_window_1k : 1 ; pci_dev_flags_t dev_flags ; atomic_t enable_cnt ; u32 saved_config_space[16U] ; struct hlist_head saved_cap_space ; struct bin_attribute *rom_attr ; int rom_attr_enabled ; struct bin_attribute *res_attr[17U] ; struct bin_attribute *res_attr_wc[17U] ; struct list_head msi_list ; struct kset *msi_kset ; struct pci_vpd *vpd ; union __anonunion_ldv_19713_148 ldv_19713 ; struct pci_ats *ats ; }; struct pci_ops; struct pci_bus { struct list_head node ; struct pci_bus *parent ; struct list_head children ; struct list_head devices ; struct pci_dev *self ; struct list_head slots ; struct resource *resource[4U] ; struct list_head resources ; struct resource busn_res ; struct pci_ops *ops ; void *sysdata ; struct proc_dir_entry *procdir ; unsigned char number ; unsigned char primary ; unsigned char max_bus_speed ; unsigned char cur_bus_speed ; char name[48U] ; unsigned short bridge_ctl ; pci_bus_flags_t bus_flags ; struct device *bridge ; struct device dev ; struct bin_attribute *legacy_io ; struct bin_attribute *legacy_mem ; unsigned char is_added : 1 ; }; struct pci_ops { int (*read)(struct pci_bus * , unsigned int , int , int , u32 * ) ; int (*write)(struct pci_bus * , unsigned int , int , int , u32 ) ; }; struct pci_dynids { spinlock_t lock ; struct list_head list ; }; typedef unsigned int pci_ers_result_t; struct pci_error_handlers { pci_ers_result_t (*error_detected)(struct pci_dev * , enum pci_channel_state ) ; pci_ers_result_t (*mmio_enabled)(struct pci_dev * ) ; pci_ers_result_t (*link_reset)(struct pci_dev * ) ; pci_ers_result_t (*slot_reset)(struct pci_dev * ) ; void (*resume)(struct pci_dev * ) ; }; struct pci_driver { struct list_head node ; char const *name ; struct pci_device_id const *id_table ; int (*probe)(struct pci_dev * , struct pci_device_id const * ) ; void (*remove)(struct pci_dev * ) ; int (*suspend)(struct pci_dev * , pm_message_t ) ; int (*suspend_late)(struct pci_dev * , pm_message_t ) ; int (*resume_early)(struct pci_dev * ) ; int (*resume)(struct pci_dev * ) ; void (*shutdown)(struct pci_dev * ) ; struct pci_error_handlers *err_handler ; struct device_driver driver ; struct pci_dynids dynids ; }; struct comedi_async; struct comedi_lrange; struct comedi_subdevice { struct comedi_device *device ; int type ; int n_chan ; int subdev_flags ; int len_chanlist ; void *private ; struct comedi_async *async ; void *lock ; void *busy ; unsigned int runflags ; spinlock_t spin_lock ; unsigned int io_bits ; unsigned int maxdata ; unsigned int const *maxdata_list ; unsigned int flags ; unsigned int const *flaglist ; unsigned int settling_time_0 ; struct comedi_lrange const *range_table ; struct comedi_lrange const * const *range_table_list ; unsigned int *chanlist ; int (*insn_read)(struct comedi_device * , struct comedi_subdevice * , struct comedi_insn * , unsigned int * ) ; int (*insn_write)(struct comedi_device * , struct comedi_subdevice * , struct comedi_insn * , unsigned int * ) ; int (*insn_bits)(struct comedi_device * , struct comedi_subdevice * , struct comedi_insn * , unsigned int * ) ; int (*insn_config)(struct comedi_device * , struct comedi_subdevice * , struct comedi_insn * , unsigned int * ) ; int (*do_cmd)(struct comedi_device * , struct comedi_subdevice * ) ; int (*do_cmdtest)(struct comedi_device * , struct comedi_subdevice * , struct comedi_cmd * ) ; int (*poll)(struct comedi_device * , struct comedi_subdevice * ) ; int (*cancel)(struct comedi_device * , struct comedi_subdevice * ) ; int (*buf_change)(struct comedi_device * , struct comedi_subdevice * , unsigned long ) ; void (*munge)(struct comedi_device * , struct comedi_subdevice * , void * , unsigned int , unsigned int ) ; enum dma_data_direction async_dma_dir ; unsigned int state ; struct device *class_dev ; int minor ; }; struct comedi_buf_page { void *virt_addr ; dma_addr_t dma_addr ; }; struct comedi_async { struct comedi_subdevice *subdevice ; void *prealloc_buf ; unsigned int prealloc_bufsz ; struct comedi_buf_page *buf_page_list ; unsigned int n_buf_pages ; unsigned int max_bufsize ; unsigned int mmap_count ; unsigned int buf_write_count ; unsigned int buf_write_alloc_count ; unsigned int buf_read_count ; unsigned int buf_read_alloc_count ; unsigned int buf_write_ptr ; unsigned int buf_read_ptr ; unsigned int cur_chan ; unsigned int scan_progress ; unsigned int munge_chan ; unsigned int munge_count ; unsigned int munge_ptr ; unsigned int events ; struct comedi_cmd cmd ; wait_queue_head_t wait_head ; unsigned int cb_mask ; int (*cb_func)(unsigned int , void * ) ; void *cb_arg ; int (*inttrig)(struct comedi_device * , struct comedi_subdevice * , unsigned int ) ; }; struct usb_interface; struct comedi_driver { struct comedi_driver *next ; char const *driver_name ; struct module *module ; int (*attach)(struct comedi_device * , struct comedi_devconfig * ) ; void (*detach)(struct comedi_device * ) ; int (*attach_pci)(struct comedi_device * , struct pci_dev * ) ; int (*attach_usb)(struct comedi_device * , struct usb_interface * ) ; unsigned int num_names ; char const * const *board_name ; int offset ; }; struct fasync_struct; struct comedi_device { int use_count ; struct comedi_driver *driver ; void *private ; struct device *class_dev ; int minor ; struct device *hw_dev ; char const *board_name ; void const *board_ptr ; int attached ; spinlock_t spinlock ; struct mutex mutex ; int in_request_module ; int n_subdevices ; struct comedi_subdevice *subdevices ; unsigned long iobase ; unsigned int irq ; struct comedi_subdevice *read_subdev ; struct comedi_subdevice *write_subdev ; struct fasync_struct *async_queue ; int (*open)(struct comedi_device * ) ; void (*close)(struct comedi_device * ) ; }; struct comedi_lrange { int length ; struct comedi_krange range[] ; }; struct BondedDevice { struct comedi_device *dev ; unsigned int minor ; unsigned int subdev ; unsigned int subdev_type ; unsigned int nchans ; unsigned int chanid_offset ; }; struct comedi_bond_private { char name[256U] ; struct BondedDevice **devs ; unsigned int ndevs ; struct BondedDevice *chanIdDevMap[256U] ; unsigned int nchans ; }; void *memcpy(void * , void const * , unsigned long ) ; extern int snprintf(char * , size_t , char const * , ...) ; extern void *memset(void * , int , size_t ) ; extern size_t strlen(char const * ) ; extern char *strncat(char * , char const * , __kernel_size_t ) ; extern void kfree(void const * ) ; extern void *__kmalloc(size_t , gfp_t ) ; __inline static void *kmalloc(size_t size , gfp_t flags ) { void *tmp___2 ; { tmp___2 = __kmalloc(size, flags); return (tmp___2); } } __inline static void *kzalloc(size_t size , gfp_t flags ) { void *tmp ; { tmp = kmalloc(size, flags | 32768U); return (tmp); } } extern struct comedi_device *comedi_open(char const * ) ; extern int comedi_close(struct comedi_device * ) ; extern int comedi_dio_config(struct comedi_device * , unsigned int , unsigned int , unsigned int ) ; extern int comedi_dio_bitfield(struct comedi_device * , unsigned int , unsigned int , unsigned int * ) ; extern int comedi_find_subdevice_by_type(struct comedi_device * , int , unsigned int ) ; extern int comedi_get_n_channels(struct comedi_device * , unsigned int ) ; extern int dev_err(struct device const * , char const * , ...) ; extern int _dev_info(struct device const * , char const * , ...) ; extern int comedi_alloc_subdevices(struct comedi_device * , int ) ; extern struct comedi_lrange const range_unipolar5 ; __inline static int alloc_private(struct comedi_device *dev , int size ) { { dev->private = kzalloc((size_t )size, 208U); if ((unsigned long )dev->private == (unsigned long )((void *)0)) { return (-12); } else { } return (0); } } static int bonding_dio_insn_bits(struct comedi_device *dev , struct comedi_subdevice *s , struct comedi_insn *insn , unsigned int *data ) { struct comedi_bond_private *devpriv ; unsigned int nchans ; unsigned int num_done ; unsigned int i ; struct BondedDevice *bdev ; unsigned int subdevMask ; unsigned int writeMask ; unsigned int dataBits ; int tmp ; { devpriv = (struct comedi_bond_private *)dev->private; nchans = 32U; num_done = 0U; if (devpriv->nchans < nchans) { nchans = devpriv->nchans; } else { } i = 0U; goto ldv_21265; ldv_21264: bdev = *(devpriv->devs + (unsigned long )i); subdevMask = (unsigned int )((1 << (int )bdev->nchans) + -1); if (bdev->nchans > 31U) { subdevMask = 4294967295U; } else { } writeMask = (*data >> (int )num_done) & subdevMask; dataBits = (*(data + 1UL) >> (int )num_done) & subdevMask; tmp = comedi_dio_bitfield(bdev->dev, bdev->subdev, writeMask, & dataBits); if (tmp != 2) { return (-22); } else { } *(data + 1UL) = *(data + 1UL) & ~ (subdevMask << (int )num_done); *(data + 1UL) = *(data + 1UL) | ((dataBits & subdevMask) << (int )num_done); s->state = *(data + 1UL); num_done = bdev->nchans + num_done; i = i + 1U; ldv_21265: ; if (num_done < nchans && devpriv->ndevs > i) { goto ldv_21264; } else { } return ((int )insn->n); } } static int bonding_dio_insn_config(struct comedi_device *dev , struct comedi_subdevice *s , struct comedi_insn *insn , unsigned int *data ) { struct comedi_bond_private *devpriv ; int chan ; int ret ; int io_bits ; unsigned int io ; struct BondedDevice *bdev ; { devpriv = (struct comedi_bond_private *)dev->private; chan = (int )insn->chanspec & 65535; io_bits = (int )s->io_bits; if (chan < 0 || (unsigned int )chan >= devpriv->nchans) { return (-22); } else { } bdev = devpriv->chanIdDevMap[chan]; switch (*data) { case 1U: io = 1U; io_bits = (1 << chan) | io_bits; goto ldv_21280; case 0U: io = 0U; io_bits = ~ (1 << chan) & io_bits; goto ldv_21280; case 28U: *(data + 1UL) = (unsigned int )(io_bits >> chan) & 1U; return ((int )insn->n); default: ; return (-22); } ldv_21280: chan = (int )((unsigned int )chan - bdev->chanid_offset); ret = comedi_dio_config(bdev->dev, bdev->subdev, (unsigned int )chan, io); if (ret != 1) { return (-22); } else { } s->io_bits = (unsigned int )io_bits; return ((int )insn->n); } } static void *Realloc(void const *oldmem , size_t newlen , size_t oldlen ) { void *newmem ; void *tmp ; size_t __len ; size_t _min1 ; size_t _min2 ; void *__ret ; { tmp = kmalloc(newlen, 208U); newmem = tmp; if ((unsigned long )newmem != (unsigned long )((void *)0) && (unsigned long )oldmem != (unsigned long )((void const *)0)) { _min1 = oldlen; _min2 = newlen; __len = _min1 < _min2 ? _min1 : _min2; __ret = memcpy(newmem, oldmem, __len); } else { } kfree(oldmem); return (newmem); } } static int doDevConfig(struct comedi_device *dev , struct comedi_devconfig *it ) { struct comedi_bond_private *devpriv ; int i ; struct comedi_device *devs_opened[48U] ; char file[18U] ; int minor ; struct comedi_device *d ; int sdev ; int nchans ; int tmp ; struct BondedDevice *bdev ; struct comedi_device *tmp___0 ; void *tmp___1 ; unsigned int tmp___2 ; int tmp___3 ; void *tmp___4 ; char buf[20U] ; int left ; size_t tmp___5 ; { devpriv = (struct comedi_bond_private *)dev->private; memset((void *)(& devs_opened), 0, 384UL); devpriv->name[0] = 0; i = 0; goto ldv_21322; ldv_21321: file[0] = '/'; file[1] = 'd'; file[2] = 'e'; file[3] = 'v'; file[4] = '/'; file[5] = 'c'; file[6] = 'o'; file[7] = 'm'; file[8] = 'e'; file[9] = 'd'; file[10] = 'i'; file[11] = 'X'; file[12] = 'X'; file[13] = 'X'; file[14] = 'X'; file[15] = 'X'; file[16] = 'X'; file[17] = '\000'; minor = it->options[i]; sdev = -1; bdev = 0; if (minor < 0 || minor > 47) { dev_err((struct device const *)dev->class_dev, "Minor %d is invalid!\n", minor); return (0); } else { } if (dev->minor == minor) { dev_err((struct device const *)dev->class_dev, "Cannot bond this driver to itself!\n"); return (0); } else { } if ((unsigned long )devs_opened[minor] != (unsigned long )((struct comedi_device *)0)) { dev_err((struct device const *)dev->class_dev, "Minor %d specified more than once!\n", minor); return (0); } else { } snprintf((char *)(& file), 18UL, "/dev/comedi%u", minor); file[17UL] = 0; tmp___0 = comedi_open((char const *)(& file)); devs_opened[minor] = tmp___0; d = tmp___0; if ((unsigned long )d == (unsigned long )((struct comedi_device *)0)) { dev_err((struct device const *)dev->class_dev, "Minor %u could not be opened\n", minor); return (0); } else { } goto ldv_21319; ldv_21318: nchans = comedi_get_n_channels(d, (unsigned int )sdev); if (nchans <= 0) { dev_err((struct device const *)dev->class_dev, "comedi_get_n_channels() returned %d on minor %u subdev %d!\n", nchans, minor, sdev); return (0); } else { } tmp___1 = kmalloc(32UL, 208U); bdev = (struct BondedDevice *)tmp___1; if ((unsigned long )bdev == (unsigned long )((struct BondedDevice *)0)) { dev_err((struct device const *)dev->class_dev, "Out of memory\n"); return (0); } else { } bdev->dev = d; bdev->minor = (unsigned int )minor; bdev->subdev = (unsigned int )sdev; bdev->subdev_type = 5U; bdev->nchans = (unsigned int )nchans; bdev->chanid_offset = devpriv->nchans; goto ldv_21314; ldv_21313: tmp___2 = devpriv->nchans; devpriv->nchans = devpriv->nchans + 1U; devpriv->chanIdDevMap[tmp___2] = bdev; ldv_21314: tmp___3 = nchans; nchans = nchans - 1; if (tmp___3 != 0) { goto ldv_21313; } else { } tmp = (int )(devpriv->ndevs * 8U); devpriv->ndevs = devpriv->ndevs + 1U; tmp___4 = Realloc((void const *)devpriv->devs, (unsigned long )devpriv->ndevs * 8UL, (size_t )tmp); devpriv->devs = (struct BondedDevice **)tmp___4; if ((unsigned long )devpriv->devs == (unsigned long )((struct BondedDevice **)0)) { dev_err((struct device const *)dev->class_dev, "Could not allocate memory. Out of memory?\n"); return (0); } else { } *(devpriv->devs + (unsigned long )(devpriv->ndevs - 1U)) = bdev; tmp___5 = strlen((char const *)(& devpriv->name)); left = (int )(255U - (unsigned int )tmp___5); snprintf((char *)(& buf), 20UL, "%d:%d ", dev->minor, bdev->subdev); buf[19UL] = 0; strncat((char *)(& devpriv->name), (char const *)(& buf), (__kernel_size_t )left); ldv_21319: sdev = comedi_find_subdevice_by_type(d, 5, (unsigned int )(sdev + 1)); if (sdev >= 0) { goto ldv_21318; } else { } i = i + 1; ldv_21322: ; if (i <= 31 && (i == 0 || it->options[i] != 0)) { goto ldv_21321; } else { } if (devpriv->nchans == 0U) { dev_err((struct device const *)dev->class_dev, "No channels found!\n"); return (0); } else { } return (1); } } static int bonding_attach(struct comedi_device *dev , struct comedi_devconfig *it ) { struct comedi_bond_private *devpriv ; struct comedi_subdevice *s ; int ret ; int tmp ; { ret = alloc_private(dev, 2328); if (ret != 0) { return (ret); } else { } devpriv = (struct comedi_bond_private *)dev->private; tmp = doDevConfig(dev, it); if (tmp == 0) { return (-22); } else { } dev->board_name = (char const *)(& devpriv->name); ret = comedi_alloc_subdevices(dev, 1); if (ret != 0) { return (ret); } else { } s = dev->subdevices; s->type = 5; s->subdev_flags = 196608; s->n_chan = (int )devpriv->nchans; s->maxdata = 1U; s->range_table = & range_unipolar5; s->insn_bits = & bonding_dio_insn_bits; s->insn_config = & bonding_dio_insn_config; _dev_info((struct device const *)dev->class_dev, "%s: %s attached, %u channels from %u devices\n", (dev->driver)->driver_name, dev->board_name, devpriv->nchans, devpriv->ndevs); return (1); } } static void bonding_detach(struct comedi_device *dev ) { struct comedi_bond_private *devpriv ; unsigned long devs_closed ; struct BondedDevice *bdev ; unsigned int tmp ; { devpriv = (struct comedi_bond_private *)dev->private; devs_closed = 0UL; if ((unsigned long )devpriv != (unsigned long )((struct comedi_bond_private *)0)) { goto ldv_21337; ldv_21338: bdev = *(devpriv->devs + (unsigned long )devpriv->ndevs); if ((unsigned long )bdev == (unsigned long )((struct BondedDevice *)0)) { goto ldv_21337; } else { } if (((unsigned long )(1 << (int )bdev->minor) & devs_closed) == 0UL) { comedi_close(bdev->dev); devs_closed = (unsigned long )(1 << (int )bdev->minor) | devs_closed; } else { } kfree((void const *)bdev); ldv_21337: tmp = devpriv->ndevs; devpriv->ndevs = devpriv->ndevs - 1U; if (tmp != 0U && (unsigned long )devpriv->devs != (unsigned long )((struct BondedDevice **)0)) { goto ldv_21338; } else { } kfree((void const *)devpriv->devs); devpriv->devs = 0; kfree((void const *)devpriv); dev->private = 0; } else { } return; } } void ldv_check_final_state(void) ; extern void ldv_initialize(void) ; extern void ldv_handler_precall(void) ; extern int nondet_int(void) ; int LDV_IN_INTERRUPT ; int main(void) { struct comedi_device *var_group1 ; struct comedi_devconfig *var_group2 ; int tmp ; int tmp___0 ; { LDV_IN_INTERRUPT = 1; ldv_initialize(); goto ldv_21383; ldv_21382: tmp = nondet_int(); switch (tmp) { case 0: ldv_handler_precall(); bonding_attach(var_group1, var_group2); goto ldv_21379; case 1: ldv_handler_precall(); bonding_detach(var_group1); goto ldv_21379; default: ; goto ldv_21379; } ldv_21379: ; ldv_21383: tmp___0 = nondet_int(); if (tmp___0 != 0) { goto ldv_21382; } else { } ldv_check_final_state(); return 0; } } long ldv__builtin_expect(long exp , long c ) ; __inline static void ldv_error(void) { { LDV_ERROR: {reach_error();abort();} } } extern int ldv_undef_int(void) ; long ldv__builtin_expect(long exp , long c ) { { return (exp); } } int ldv_module_refcounter = 1; void ldv_module_get(struct module *module ) { { if (module) { ldv_module_refcounter = ldv_module_refcounter + 1; } else { } return; } } int ldv_try_module_get(struct module *module ) { int module_get_succeeded ; { if (module) { module_get_succeeded = ldv_undef_int(); if (module_get_succeeded == 1) { ldv_module_refcounter = ldv_module_refcounter + 1; return (1); } else { return (0); } } else { } return (0); } } void ldv_module_put(struct module *module ) { { if (module) { if (ldv_module_refcounter > 1) { } else { ldv_error(); } ldv_module_refcounter = ldv_module_refcounter - 1; } else { } return; } } void ldv_module_put_and_exit(void) { { ldv_module_put((struct module *)1); LDV_STOP: goto LDV_STOP; } } unsigned int ldv_module_refcount(void) { { return (ldv_module_refcounter - 1); } } void ldv_check_final_state(void) { { if (ldv_module_refcounter == 1) { } else { ldv_error(); } return; } }