LCOV - code coverage report
Current view: top level - avtg/fs/fat/fat.ko/linux:drivers:clk2/weaver - dir.c.aux (source / functions) Hit Total Coverage
Test: coverage.info Lines: 149 151 98.7 %
Date: 2017-01-25 Functions: 5 5 100.0 %

          Line data    Source code
       1             : 
       2             : struct device;
       3             : 
       4             : void *ldv_dev_get_drvdata(const struct device *dev);
       5             : int ldv_dev_set_drvdata(struct device *dev, void *data);
       6             : 
       7             : struct spi_master;
       8             : struct device;
       9             : struct spi_master *ldv_spi_alloc_master(struct device *host, unsigned size);
      10             : 
      11             : #include <linux/ldv/err.h>
      12             : 
      13             : #include <linux/types.h>
      14             : void *ldv_kzalloc(size_t size, gfp_t flags);
      15             : 
      16             : struct clk;
      17             : 
      18             : extern void ldv_clk_disable(struct clk *clk);
      19             : extern int ldv_clk_enable(void);
      20             : 
      21             : #include <linux/ldv/common.h>
      22             : #include <linux/ldv/irq.h>
      23             : #include <verifier/common.h>
      24             : #include <verifier/nondet.h>
      25             : #include <verifier/memory.h>
      26             : #include <verifier/thread.h>
      27             : 
      28             : #include <linux/cdev.h>
      29             : #include <linux/miscdevice.h>
      30             : #include <linux/seq_file.h>
      31             : #include <linux/fs.h>
      32             : #include <linux/pagemap.h>
      33             : 
      34             : 
      35             : struct ldv_struct_insmod_8 {
      36             :  int signal_pending;
      37             : };
      38             : 
      39             : /* EMG Function declarations */
      40             : void ldv_character_driver_scenario_1(void *);
      41             : extern void ldv_character_driver_scenario_callback_1_22(ssize_t (*)(struct kiocb *, struct iovec *, long unsigned int, loff_t ), struct kiocb *, struct iovec *, long unsigned int, long long int);
      42             : void ldv_character_driver_scenario_callback_1_25(long int (*)(struct file *, unsigned int, long unsigned int), struct file *, unsigned int, long unsigned int);
      43             : extern void ldv_character_driver_scenario_callback_1_28(int (*)(struct file *, struct dentry *, int), struct file *, struct dentry *, int);
      44             : void ldv_character_driver_scenario_callback_1_31(int (*)(struct inode *, struct file *, unsigned int, long unsigned int), struct inode *, struct file *, unsigned int, long unsigned int);
      45             : extern void ldv_character_driver_scenario_callback_1_34(loff_t (*)(struct file *, loff_t , int), struct file *, long long int, int);
      46             : extern void ldv_character_driver_scenario_callback_1_37(int (*)(struct file *, struct vm_area_struct *), struct file *, struct vm_area_struct *);
      47             : void ldv_character_driver_scenario_callback_1_38(ssize_t (*)(struct file *, char *, long unsigned int, loff_t *), struct file *, char *, long unsigned int, loff_t *);
      48             : void ldv_character_driver_scenario_callback_1_41(int (*)(struct file *, void *, filldir_t ), struct file *, void *, int (*)(void *, char *, int, loff_t , u64 , unsigned int));
      49             : extern void ldv_character_driver_scenario_callback_1_42(ssize_t (*)(struct file *, loff_t *, struct pipe_inode_info *, long unsigned int, unsigned int), struct file *, loff_t *, struct pipe_inode_info *, long unsigned int, unsigned int);
      50             : extern void ldv_character_driver_scenario_callback_1_5(ssize_t (*)(struct kiocb *, struct iovec *, long unsigned int, loff_t ), struct kiocb *, struct iovec *, long unsigned int, long long int);
      51             : extern int ldv_character_driver_scenario_probe_1_13(int (*)(struct inode *, struct file *), struct inode *, struct file *);
      52             : extern void ldv_character_driver_scenario_release_1_2(int (*)(struct inode *, struct file *), struct inode *, struct file *);
      53             : extern void ldv_character_driver_scenario_write_1_4(ssize_t (*)(struct file *, char *, long unsigned int, loff_t *), struct file *, char *, long unsigned int, loff_t *);
      54             : 
      55             : /* EMG variable declarations */
      56           1 : struct ldv_thread ldv_thread_1;
      57             : 
      58             : /* EMG variable initialization */
      59             : 
      60             : /* EMG function definitions */
      61             : /* AUX_FUNC ldv_character_driver_scenario_1 */
      62             : void ldv_character_driver_scenario_1(void *arg0) {
      63             :  /* LDV {"thread": 1, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'character_driver_scenario(file_operations)'", "function": "ldv_character_driver_scenario_1"} */
      64           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
      65             :  ssize_t (*ldv_1_callback_aio_read)(struct kiocb *, struct iovec *, long unsigned int, loff_t );
      66           1 :  ssize_t (*ldv_1_callback_aio_write)(struct kiocb *, struct iovec *, long unsigned int, loff_t );
      67             :  long int (*ldv_1_callback_compat_ioctl)(struct file *, unsigned int, long unsigned int);
      68           1 :  int (*ldv_1_callback_fsync)(struct file *, struct dentry *, int);
      69           1 :  int (*ldv_1_callback_ioctl)(struct inode *, struct file *, unsigned int, long unsigned int);
      70           1 :  loff_t (*ldv_1_callback_llseek)(struct file *, loff_t , int);
      71           1 :  int (*ldv_1_callback_mmap)(struct file *, struct vm_area_struct *);
      72           1 :  ssize_t (*ldv_1_callback_read)(struct file *, char *, long unsigned int, loff_t *);
      73           1 :  int (*ldv_1_callback_readdir)(struct file *, void *, filldir_t );
      74           1 :  ssize_t (*ldv_1_callback_splice_read)(struct file *, loff_t *, struct pipe_inode_info *, long unsigned int, unsigned int);
      75             :  struct file_operations *ldv_1_container_file_operations;
      76             :  long long int ldv_1_ldv_param_22_3_default;
      77           1 :  unsigned int ldv_1_ldv_param_25_1_default;
      78             :  int ldv_1_ldv_param_28_2_default;
      79           1 :  unsigned int ldv_1_ldv_param_31_2_default;
      80           1 :  long long int ldv_1_ldv_param_34_1_default;
      81           1 :  int ldv_1_ldv_param_34_2_default;
      82           1 :  char *ldv_1_ldv_param_38_1_default;
      83           1 :  long long int *ldv_1_ldv_param_38_3_default;
      84           1 :  long long int *ldv_1_ldv_param_42_1_default;
      85           1 :  unsigned int ldv_1_ldv_param_42_4_default;
      86           1 :  char *ldv_1_ldv_param_4_1_default;
      87           1 :  long long int *ldv_1_ldv_param_4_3_default;
      88           1 :  long long int ldv_1_ldv_param_5_3_default;
      89           1 :  struct file *ldv_1_resource_file;
      90           1 :  struct inode *ldv_1_resource_inode;
      91           1 :  struct kiocb *ldv_1_resource_struct_kiocb_ptr;
      92           1 :  int ldv_1_ret_default;
      93           1 :  int (*ldv_1_size_cnt_func_1_ptr)(void *, char *, int, loff_t , u64 , unsigned int);
      94           1 :  struct dentry *ldv_1_size_cnt_struct_dentry_ptr;
      95           1 :  struct iovec *ldv_1_size_cnt_struct_iovec_ptr;
      96           1 :  struct pipe_inode_info *ldv_1_size_cnt_struct_pipe_inode_info_ptr;
      97           1 :  struct vm_area_struct *ldv_1_size_cnt_struct_vm_area_struct_ptr;
      98           1 :  long unsigned int ldv_1_size_cnt_write_size;
      99           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     100           1 :  /* Initialize automaton variables */
     101           2 :  ldv_1_ret_default = 1;
     102           1 :  /* LDV {"action": "DEFAULT_REGISTER_1", "type": "RECEIVE_BEGIN", "comment": "Begin FILE_OPERATIONS callbacks invocations scenario."} */
     103           3 :  ldv_free(arg0);
     104           1 :  /* LDV {"action": "DEFAULT_REGISTER_1", "type": "RECEIVE_END"} */
     105           1 : 
     106           1 :  /* LDV {"action": "DEFAULT_ALLOC_1", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
     107           4 :  ldv_1_container_file_operations = ldv_xmalloc_unknown_size(0);
     108           1 :  /* LDV {"action": "DEFAULT_ALLOC_1", "type": "CONDITION_END"} */
     109           1 : 
     110           1 :  /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Allocate memory for file and inode structures."} */
     111           4 :  ldv_1_resource_file = ldv_xmalloc(sizeof(struct file));
     112           4 :  ldv_1_resource_inode = ldv_xmalloc(sizeof(struct inode));
     113           4 :  ldv_1_resource_struct_kiocb_ptr = ldv_xmalloc_unknown_size(0);
     114           4 :  ldv_1_size_cnt_func_1_ptr = ldv_undef_int();
     115           1 :  /* LDV {"action": "INIT", "type": "CONDITION_END"} */
     116           1 : 
     117             :  /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
     118             :  /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
     119             : 
     120             :  /* Jump to a subprocess 'main' initial state */
     121           1 :  goto ldv_main_1;
     122             :  /* End of the process */
     123             :  return;
     124           1 : 
     125             :  /* Sbprocess main */
     126             :  ldv_main_1:
     127             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     128             : 
     129           4 :  if (ldv_undef_int()) {
     130             :   /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Open the device file. Invoke callback probe from FILE_OPERATIONS."} */
     131           3 :   if (ldv_1_container_file_operations->open) {
     132             :   /* LDV {"type": "CALLBACK", "call": "ldv_1_ret_default = (ldv_1_container_file_operations->open)(ldv_1_resource_inode, ldv_1_resource_file);", "comment": "probe"} */
     133           2 :    ldv_1_ret_default = ldv_character_driver_scenario_probe_1_13(ldv_1_container_file_operations->open, ldv_1_resource_inode, ldv_1_resource_file);
     134             :   }
     135             :   /* Callback post-call */
     136           4 :   ldv_1_ret_default = ldv_filter_err_code(ldv_1_ret_default);
     137             :   /* LDV {"action": "PROBE", "type": "CALL_END"} */
     138             : 
     139           4 :   if (ldv_undef_int()) {
     140             :    /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Device file is opened successfully."} */
     141           2 :    ldv_assume(ldv_1_ret_default == 0);
     142             :    /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_END"} */
     143             : 
     144             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
     145             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     146             : 
     147             :    /* Jump to a subprocess 'call' initial state */
     148           1 :    goto ldv_call_1;
     149             :   }
     150             :   else {
     151             :    /* LDV {"action": "PROBE_FAIL", "type": "CONDITION_BEGIN", "comment": "Failed to open devices file."} */
     152           2 :    ldv_assume(ldv_1_ret_default != 0);
     153             :    /* LDV {"action": "PROBE_FAIL", "type": "CONDITION_END"} */
     154             : 
     155             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
     156             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
     157             : 
     158             :    /* Jump to a subprocess 'main' initial state */
     159           1 :    goto ldv_main_1;
     160             :   }
     161             :  }
     162             :  else {
     163             :   /* LDV {"action": "FREE", "type": "CONDITION_BEGIN", "comment": "Free memory of file and inode structures."} */
     164           2 :   ldv_free(ldv_1_resource_file);
     165           2 :   ldv_free(ldv_1_resource_inode);
     166           2 :   ldv_free(ldv_1_resource_struct_kiocb_ptr);
     167             :   /* LDV {"action": "FREE", "type": "CONDITION_END"} */
     168             : 
     169             :   /* LDV {"action": "DEFAULT_FREE_1", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
     170           2 :   ldv_free(ldv_1_container_file_operations);
     171             :   /* LDV {"action": "DEFAULT_FREE_1", "type": "CONDITION_END"} */
     172             : 
     173             :   /* LDV {"action": "DEFAULT_DEREGISTER_1", "type": "RECEIVE_BEGIN", "comment": "Finish FILE_OPERATIONS callbacks invocations scenario."} */
     174             :   /* Skip a non-replicative signal receiving */
     175             :   /* LDV {"action": "DEFAULT_DEREGISTER_1", "type": "RECEIVE_END"} */
     176             : 
     177             :   /* Exit function at a terminal state */
     178           1 :   return;
     179             :  }
     180             :  /* End of the subprocess 'main' */
     181             :  return;
     182           1 : 
     183             :  /* Sbprocess call */
     184             :  ldv_call_1:
     185             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     186             : 
     187           2 :  switch (ldv_undef_int()) {
     188           3 :   case 1: {
     189             :    /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     190           3 :    ldv_1_ldv_param_4_1_default = ldv_xmalloc_unknown_size(0);
     191           3 :    ldv_1_ldv_param_4_3_default = ldv_xmalloc_unknown_size(0);
     192             :    /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
     193             : 
     194             :    /* LDV {"action": "WRITE", "type": "CALL_BEGIN", "callback": true, "comment": "Write data to the device. Invoke callback write from FILE_OPERATIONS."} */
     195             :    /* Callback pre-call */
     196           2 :    ldv_assume(ldv_1_size_cnt_func_1_ptr <= (INT_MAX & PAGE_CACHE_MASK));
     197           3 :    if (ldv_1_container_file_operations->write) {
     198             :    /* LDV {"type": "CALLBACK", "call": "(ldv_1_container_file_operations->write)(ldv_1_resource_file, ldv_1_ldv_param_4_1_default, ldv_1_size_cnt_write_size, ldv_1_ldv_param_4_3_default);", "comment": "write"} */
     199           3 :     ldv_character_driver_scenario_write_1_4(ldv_1_container_file_operations->write, ldv_1_resource_file, ldv_1_ldv_param_4_1_default, ldv_1_size_cnt_write_size, ldv_1_ldv_param_4_3_default);
     200             :    }
     201             :    /* LDV {"action": "WRITE", "type": "CALL_END"} */
     202             : 
     203             :    /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     204           4 :    ldv_free(ldv_1_ldv_param_4_1_default);
     205           2 :    ldv_free(ldv_1_ldv_param_4_3_default);
     206             :    /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
     207             : 
     208             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
     209             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     210             : 
     211             :    /* Jump to a subprocess 'call' initial state */
     212           1 :    goto ldv_call_1;
     213           1 :    break;
     214             :   }
     215           3 :   case 2: {
     216             :    /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "File structure is released. Invoke callback release from FILE_OPERATIONS."} */
     217           3 :    if (ldv_1_container_file_operations->release) {
     218             :    /* LDV {"type": "CALLBACK", "call": "(ldv_1_container_file_operations->release)(ldv_1_resource_inode, ldv_1_resource_file);", "comment": "release"} */
     219           2 :     ldv_character_driver_scenario_release_1_2(ldv_1_container_file_operations->release, ldv_1_resource_inode, ldv_1_resource_file);
     220             :    }
     221             :    /* LDV {"action": "RELEASE", "type": "CALL_END"} */
     222             : 
     223             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
     224             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
     225             : 
     226             :    /* Jump to a subprocess 'main' initial state */
     227           2 :    goto ldv_main_1;
     228           1 :    break;
     229             :   }
     230           3 :   case 3: {
     231             :    /* LDV {"action": "PRE_CALL_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     232             :    /* LDV {"action": "PRE_CALL_5", "type": "CONDITION_END"} */
     233             : 
     234           2 :    switch (ldv_undef_int()) {
     235           3 :     case 1: {
     236             :      /* LDV {"action": "PRE_CALL_42", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     237           3 :      ldv_1_ldv_param_42_1_default = ldv_xmalloc_unknown_size(0);
     238             :      /* LDV {"action": "PRE_CALL_42", "type": "CONDITION_END"} */
     239             : 
     240             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback callback from FILE_OPERATIONS."} */
     241           2 :      if (ldv_1_callback_splice_read) {
     242             :      /* LDV {"type": "CALLBACK", "call": "(ldv_1_callback_splice_read)(ldv_1_resource_file, ldv_1_ldv_param_42_1_default, ldv_1_size_cnt_struct_pipe_inode_info_ptr, ldv_1_size_cnt_write_size, ldv_1_ldv_param_42_4_default);", "comment": "callback"} */
     243           2 :       ldv_character_driver_scenario_callback_1_42(ldv_1_callback_splice_read, ldv_1_resource_file, ldv_1_ldv_param_42_1_default, ldv_1_size_cnt_struct_pipe_inode_info_ptr, ldv_1_size_cnt_write_size, ldv_1_ldv_param_42_4_default);
     244             :      }
     245             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     246             : 
     247             :      /* LDV {"action": "POST_CALL_42", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     248           4 :      ldv_free(ldv_1_ldv_param_42_1_default);
     249             :      /* LDV {"action": "POST_CALL_42", "type": "CONDITION_END"} */
     250             : 
     251           1 :      break;
     252           1 :     }
     253           3 :     case 2: {
     254             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback readdir from file_operations."} */
     255             :      /* LDV {"type": "CALLBACK", "call": "((& fat_readdir))(ldv_1_resource_file, ldv_1_resource_inode, ldv_1_size_cnt_func_1_ptr);", "comment": "callback"} */
     256           2 :      ldv_character_driver_scenario_callback_1_41(ldv_1_callback_readdir, ldv_1_resource_file, ldv_1_resource_inode, ldv_1_size_cnt_func_1_ptr);
     257             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     258             : 
     259           1 :      break;
     260           1 :     }
     261           3 :     case 3: {
     262             :      /* LDV {"action": "PRE_CALL_38", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     263           3 :      ldv_1_ldv_param_38_1_default = ldv_xmalloc_unknown_size(0);
     264           3 :      ldv_1_ldv_param_38_3_default = ldv_xmalloc_unknown_size(0);
     265             :      /* LDV {"action": "PRE_CALL_38", "type": "CONDITION_END"} */
     266             : 
     267             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback read from file_operations."} */
     268             :      /* LDV {"type": "CALLBACK", "call": "((& generic_read_dir))(ldv_1_resource_file, ldv_1_ldv_param_38_1_default, ldv_1_size_cnt_write_size, ldv_1_ldv_param_38_3_default);", "comment": "callback"} */
     269           2 :      ldv_character_driver_scenario_callback_1_38(ldv_1_callback_read, ldv_1_resource_file, ldv_1_ldv_param_38_1_default, ldv_1_size_cnt_write_size, ldv_1_ldv_param_38_3_default);
     270             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     271             : 
     272             :      /* LDV {"action": "POST_CALL_38", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     273           2 :      ldv_free(ldv_1_ldv_param_38_1_default);
     274           2 :      ldv_free(ldv_1_ldv_param_38_3_default);
     275             :      /* LDV {"action": "POST_CALL_38", "type": "CONDITION_END"} */
     276             : 
     277           1 :      break;
     278           1 :     }
     279           3 :     case 4: {
     280             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback callback from FILE_OPERATIONS."} */
     281           2 :      if (ldv_1_callback_mmap) {
     282             :      /* LDV {"type": "CALLBACK", "call": "(ldv_1_callback_mmap)(ldv_1_resource_file, ldv_1_size_cnt_struct_vm_area_struct_ptr);", "comment": "callback"} */
     283           2 :       ldv_character_driver_scenario_callback_1_37(ldv_1_callback_mmap, ldv_1_resource_file, ldv_1_size_cnt_struct_vm_area_struct_ptr);
     284             :      }
     285             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     286             : 
     287           2 :      break;
     288           1 :     }
     289           3 :     case 5: {
     290             :      /* LDV {"action": "PRE_CALL_34", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     291             :      /* LDV {"action": "PRE_CALL_34", "type": "CONDITION_END"} */
     292             : 
     293             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback llseek from file_operations."} */
     294             :      /* LDV {"type": "CALLBACK", "call": "((& generic_file_llseek))(ldv_1_resource_file, ldv_1_ldv_param_34_1_default, ldv_1_ldv_param_34_2_default);", "comment": "callback"} */
     295           2 :      ldv_character_driver_scenario_callback_1_34(ldv_1_callback_llseek, ldv_1_resource_file, ldv_1_ldv_param_34_1_default, ldv_1_ldv_param_34_2_default);
     296             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     297             : 
     298             :      /* LDV {"action": "POST_CALL_34", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     299             :      /* LDV {"action": "POST_CALL_34", "type": "CONDITION_END"} */
     300             : 
     301           1 :      break;
     302           1 :     }
     303           3 :     case 6: {
     304             :      /* LDV {"action": "PRE_CALL_31", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     305             :      /* LDV {"action": "PRE_CALL_31", "type": "CONDITION_END"} */
     306             : 
     307             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback ioctl from file_operations."} */
     308             :      /* LDV {"type": "CALLBACK", "call": "((& fat_dir_ioctl))(ldv_1_resource_inode, ldv_1_resource_file, ldv_1_ldv_param_31_2_default, ldv_1_size_cnt_write_size);", "comment": "callback"} */
     309           2 :      ldv_character_driver_scenario_callback_1_31(ldv_1_callback_ioctl, ldv_1_resource_inode, ldv_1_resource_file, ldv_1_ldv_param_31_2_default, ldv_1_size_cnt_write_size);
     310             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     311             : 
     312             :      /* LDV {"action": "POST_CALL_31", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     313             :      /* LDV {"action": "POST_CALL_31", "type": "CONDITION_END"} */
     314             : 
     315           1 :      break;
     316           1 :     }
     317           3 :     case 7: {
     318             :      /* LDV {"action": "PRE_CALL_28", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     319             :      /* LDV {"action": "PRE_CALL_28", "type": "CONDITION_END"} */
     320             : 
     321             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback fsync from file_operations."} */
     322             :      /* LDV {"type": "CALLBACK", "call": "((& fat_file_fsync))(ldv_1_resource_file, ldv_1_size_cnt_struct_dentry_ptr, ldv_1_ldv_param_28_2_default);", "comment": "callback"} */
     323           2 :      ldv_character_driver_scenario_callback_1_28(ldv_1_callback_fsync, ldv_1_resource_file, ldv_1_size_cnt_struct_dentry_ptr, ldv_1_ldv_param_28_2_default);
     324             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     325             : 
     326             :      /* LDV {"action": "POST_CALL_28", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     327             :      /* LDV {"action": "POST_CALL_28", "type": "CONDITION_END"} */
     328             : 
     329           1 :      break;
     330           1 :     }
     331           3 :     case 8: {
     332             :      /* LDV {"action": "PRE_CALL_25", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     333             :      /* LDV {"action": "PRE_CALL_25", "type": "CONDITION_END"} */
     334             : 
     335             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback compat_ioctl from file_operations."} */
     336             :      /* LDV {"type": "CALLBACK", "call": "((& fat_compat_dir_ioctl))(ldv_1_resource_file, ldv_1_ldv_param_25_1_default, ldv_1_size_cnt_write_size);", "comment": "callback"} */
     337           2 :      ldv_character_driver_scenario_callback_1_25(ldv_1_callback_compat_ioctl, ldv_1_resource_file, ldv_1_ldv_param_25_1_default, ldv_1_size_cnt_write_size);
     338             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     339             : 
     340             :      /* LDV {"action": "POST_CALL_25", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     341             :      /* LDV {"action": "POST_CALL_25", "type": "CONDITION_END"} */
     342             : 
     343           1 :      break;
     344           1 :     }
     345           3 :     case 9: {
     346             :      /* LDV {"action": "PRE_CALL_22", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     347             :      /* LDV {"action": "PRE_CALL_22", "type": "CONDITION_END"} */
     348             : 
     349             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback callback from FILE_OPERATIONS."} */
     350           2 :      if (ldv_1_callback_aio_write) {
     351             :      /* LDV {"type": "CALLBACK", "call": "(ldv_1_callback_aio_write)(ldv_1_resource_struct_kiocb_ptr, ldv_1_size_cnt_struct_iovec_ptr, ldv_1_size_cnt_write_size, ldv_1_ldv_param_22_3_default);", "comment": "callback"} */
     352           2 :       ldv_character_driver_scenario_callback_1_22(ldv_1_callback_aio_write, ldv_1_resource_struct_kiocb_ptr, ldv_1_size_cnt_struct_iovec_ptr, ldv_1_size_cnt_write_size, ldv_1_ldv_param_22_3_default);
     353             :      }
     354             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     355             : 
     356             :      /* LDV {"action": "POST_CALL_22", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     357             :      /* LDV {"action": "POST_CALL_22", "type": "CONDITION_END"} */
     358             : 
     359           2 :      break;
     360           1 :     }
     361           3 :     case 10: {
     362             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback callback from FILE_OPERATIONS."} */
     363           2 :      if (ldv_1_callback_aio_read) {
     364             :      /* LDV {"type": "CALLBACK", "call": "(ldv_1_callback_aio_read)(ldv_1_resource_struct_kiocb_ptr, ldv_1_size_cnt_struct_iovec_ptr, ldv_1_size_cnt_write_size, ldv_1_ldv_param_5_3_default);", "comment": "callback"} */
     365           2 :       ldv_character_driver_scenario_callback_1_5(ldv_1_callback_aio_read, ldv_1_resource_struct_kiocb_ptr, ldv_1_size_cnt_struct_iovec_ptr, ldv_1_size_cnt_write_size, ldv_1_ldv_param_5_3_default);
     366             :      }
     367             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     368             : 
     369           2 :      break;
     370           1 :     }
     371           2 :     default: ldv_stop();
     372           1 :    }
     373          11 :    break;
     374           1 :   }
     375           2 :   default: ldv_stop();
     376           1 :  }
     377           0 :  /* LDV {"action": "POST_CALL_5", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     378             :  /* LDV {"action": "POST_CALL_5", "type": "CONDITION_END"} */
     379           0 : 
     380             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
     381             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     382             : 
     383             :  /* Jump to a subprocess 'call' initial state */
     384          11 :  goto ldv_call_1;
     385             :  /* Jump to a subprocess 'call' initial state */
     386             :  goto ldv_call_1;
     387             :  /* End of the subprocess 'call' */
     388             :  return;
     389             :  /* LDV {"comment": "End of control function based on process 'character_driver_scenario(file_operations)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_character_driver_scenario_1"} */
     390             : }
     391             : 
     392             : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_1_25 */
     393             : void ldv_character_driver_scenario_callback_1_25(long int (*arg0)(struct file *, unsigned int, long unsigned int), struct file *arg1, unsigned int arg2, long unsigned int arg3) {
     394           5 :  ((& fat_compat_dir_ioctl))(arg1, arg2, arg3);
     395           1 : }
     396             : 
     397             : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_1_31 */
     398             : void ldv_character_driver_scenario_callback_1_31(int (*arg0)(struct inode *, struct file *, unsigned int, long unsigned int), struct inode *arg1, struct file *arg2, unsigned int arg3, long unsigned int arg4) {
     399           5 :  ((& fat_dir_ioctl))(arg1, arg2, arg3, arg4);
     400           1 : }
     401             : 
     402             : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_1_38 */
     403             : void ldv_character_driver_scenario_callback_1_38(ssize_t (*arg0)(struct file *, char *, long unsigned int, loff_t *), struct file *arg1, char *arg2, long unsigned int arg3, long long int *arg4) {
     404           1 :  ((& generic_read_dir))(arg1, arg2, arg3, arg4);
     405           1 : }
     406             : 
     407             : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_1_41 */
     408             : void ldv_character_driver_scenario_callback_1_41(int (*arg0)(struct file *, void *, filldir_t ), struct file *arg1, void *arg2, int (*arg3)(void *, char *, int, loff_t , u64 , unsigned int)) {
     409           2 :  ((& fat_readdir))(arg1, arg2, arg3);
     410           1 : }
     411             : 
     412             : 
     413             : /* AUX_FUNC  ERR_PTR */
     414             : static inline void *ERR_PTR (long int error)
     415             : {
     416             : 
     417             :  return ldv_err_ptr(error);
     418             : }
     419             : 
     420             : /* AUX_FUNC  PTR_ERR */
     421             : static inline long int PTR_ERR (void const *ptr)
     422             : {
     423             : 
     424             :  return ldv_ptr_err(ptr);
     425             : }
     426             : 
     427             : /* AUX_FUNC  IS_ERR */
     428             : static inline long int IS_ERR (void const *ptr)
     429             : {
     430             : 
     431             :  return ldv_is_err(ptr);
     432             : }
     433             : 
     434             : /* AUX_FUNC  IS_ERR_OR_NULL */
     435             : static inline long int IS_ERR_OR_NULL (void const *ptr)
     436             : {
     437             : 
     438             :  return ldv_is_err_or_null(ptr);
     439             : }
     440             : 
     441             : /* AUX_FUNC  kzalloc */
     442             : static inline void *kzalloc (size_t size, gfp_t flags)
     443             : {
     444             : 
     445             :  return ldv_kzalloc(size, flags);
     446             : }

Generated by: LCOV version 1.10