LCOV - code coverage report
Current view: top level - avtg/drivers/rtc/rtc-cmos.ko/linux:drivers:clk2/weaver - rtc-cmos.c.aux (source / functions) Hit Total Coverage
Test: coverage.info Lines: 474 484 97.9 %
Date: 2017-01-25 Functions: 77 77 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/platform_device.h>
      29             : #include <linux/pm.h>
      30             : #include <linux/device.h>
      31             : #include <linux/rtc.h>
      32             : #include <linux/interrupt.h>
      33             : 
      34             : 
      35             : struct ldv_struct_free_irq_7 {
      36             :  int arg0;
      37             :  int signal_pending;
      38             : };
      39           1 : 
      40             : struct ldv_struct_interrupt_scenario_1 {
      41             :  int arg0;
      42             :  irqreturn_t (*arg1)(int, void *);
      43             :  irqreturn_t (*arg2)(int, void *);
      44             :  void *arg3;
      45             :  int signal_pending;
      46             : };
      47           1 : 
      48             : struct ldv_struct_platform_instance_2 {
      49             :  struct platform_driver *arg0;
      50             :  int signal_pending;
      51             : };
      52           1 : 
      53             : struct ldv_struct_rtc_class_scenario_4 {
      54             :  struct rtc_device *arg0;
      55             :  struct rtc_class_ops *arg1;
      56             :  struct device *arg2;
      57             :  int signal_pending;
      58             : };
      59           1 : 
      60             : struct ldv_struct_rtc_device_unregister_12 {
      61             :  struct rtc_device *arg0;
      62             :  int signal_pending;
      63             : };
      64             : 
      65             : /* EMG Function declarations */
      66             : void ldv_dispatch_default_deregister_11_6_4(void);
      67             : void ldv_dispatch_default_register_11_6_5(void);
      68             : void ldv_dispatch_deregister_12_1(struct rtc_device *);
      69             : void ldv_dispatch_deregister_9_1(struct platform_driver *);
      70             : void ldv_dispatch_insmod_deregister_13_2(void);
      71             : void ldv_dispatch_insmod_register_13_3(void);
      72             : void ldv_dispatch_irq_deregister_7_1(int);
      73             : void ldv_dispatch_irq_register_10_3(int, irqreturn_t (*)(int, void *), irqreturn_t (*)(int, void *), void *);
      74             : void ldv_dispatch_pm_deregister_2_5(void);
      75             : void ldv_dispatch_pm_register_2_6(void);
      76             : void ldv_dispatch_register_11_3(struct rtc_device *, struct rtc_class_ops *, struct device *);
      77             : void ldv_dispatch_register_8_3(struct platform_driver *);
      78             : void ldv_emg_free_irq(int, void *);
      79             : int ldv_emg_platform_driver_probe(struct platform_driver *, int (*)(struct platform_device *));
      80             : void ldv_emg_platform_driver_unregister(struct platform_driver *);
      81             : int ldv_emg_request_irq(unsigned int, irq_handler_t , long unsigned int, char *, void *);
      82             : struct rtc_device *ldv_emg_rtc_device_register(char *, struct device *, struct rtc_class_ops *, struct module *);
      83             : void ldv_emg_rtc_device_unregister(struct rtc_device *);
      84             : void ldv_insmod_6(void *);
      85             : void ldv_insmod_cmos_exit_6_2(void (*)(void));
      86             : int ldv_insmod_cmos_init_6_9(int (*)(void));
      87             : void ldv_interrupt_scenario_1(void *);
      88             : enum irqreturn ldv_interrupt_scenario_handler_1_5(irqreturn_t (*)(int, void *), int, void *);
      89             : void ldv_interrupt_scenario_thread_1_3(irqreturn_t (*)(int, void *), int, void *);
      90             : void ldv_main_13(void *);
      91             : void ldv_platform_instance_2(void *);
      92             : void ldv_platform_instance_callback_2_7(void (*)(struct platform_device *), struct platform_device *);
      93             : int ldv_platform_instance_probe_2_14(int (*)(struct platform_device *), struct platform_device *);
      94             : void ldv_platform_instance_release_2_3(int (*)(struct platform_device *), struct platform_device *);
      95             : void ldv_pm_ops_scenario_3(void *);
      96             : void ldv_pm_ops_scenario_complete_3_3(void (*)(struct device *), struct device *);
      97             : void ldv_pm_ops_scenario_freeze_3_13(int (*)(struct device *), struct device *);
      98             : void ldv_pm_ops_scenario_freeze_noirq_3_11(int (*)(struct device *), struct device *);
      99             : void ldv_pm_ops_scenario_poweroff_3_8(int (*)(struct device *), struct device *);
     100             : void ldv_pm_ops_scenario_poweroff_noirq_3_7(int (*)(struct device *), struct device *);
     101             : void ldv_pm_ops_scenario_prepare_3_19(int (*)(struct device *), struct device *);
     102             : void ldv_pm_ops_scenario_restore_3_4(int (*)(struct device *), struct device *);
     103             : void ldv_pm_ops_scenario_restore_noirq_3_6(int (*)(struct device *), struct device *);
     104             : void ldv_pm_ops_scenario_resume_3_14(int (*)(struct device *), struct device *);
     105             : void ldv_pm_ops_scenario_resume_noirq_3_16(int (*)(struct device *), struct device *);
     106             : void ldv_pm_ops_scenario_runtime_idle_3_24(int (*)(struct device *), struct device *);
     107             : void ldv_pm_ops_scenario_runtime_resume_3_21(int (*)(struct device *), struct device *);
     108             : void ldv_pm_ops_scenario_runtime_suspend_3_22(int (*)(struct device *), struct device *);
     109             : void ldv_pm_ops_scenario_suspend_3_18(int (*)(struct device *), struct device *);
     110             : void ldv_pm_ops_scenario_suspend_noirq_3_17(int (*)(struct device *), struct device *);
     111             : void ldv_pm_ops_scenario_thaw_3_9(int (*)(struct device *), struct device *);
     112             : void ldv_pm_ops_scenario_thaw_noirq_3_10(int (*)(struct device *), struct device *);
     113             : void ldv_random_containerless_scenario_5(void *);
     114             : void ldv_random_containerless_scenario_callback_5_10(ssize_t (*)(struct kobject *, struct bin_attribute *, char *, loff_t , size_t ), struct kobject *, struct bin_attribute *, char *, long long int, long unsigned int);
     115             : void ldv_random_containerless_scenario_callback_5_4(ssize_t (*)(struct kobject *, struct bin_attribute *, char *, loff_t , size_t ), struct kobject *, struct bin_attribute *, char *, long long int, long unsigned int);
     116             : void ldv_rtc_class_scenario_4(void *);
     117             : void ldv_rtc_class_scenario_callback_4_15(int (*)(struct device *, int), struct device *, int);
     118             : void ldv_rtc_class_scenario_callback_4_18(int (*)(struct device *, int), struct device *, int);
     119             : void ldv_rtc_class_scenario_callback_4_21(int (*)(struct device *, struct rtc_wkalrm *), struct device *, struct rtc_wkalrm *);
     120             : void ldv_rtc_class_scenario_callback_4_22(int (*)(struct device *, struct rtc_time *), struct device *, struct rtc_time *);
     121             : void ldv_rtc_class_scenario_callback_4_23(int (*)(struct device *, struct rtc_wkalrm *), struct device *, struct rtc_wkalrm *);
     122             : void ldv_rtc_class_scenario_callback_4_24(int (*)(struct device *, struct rtc_time *), struct device *, struct rtc_time *);
     123             : void ldv_rtc_class_scenario_callback_4_25(int (*)(struct device *, unsigned int), struct device *, unsigned int);
     124             : void ldv_rtc_class_scenario_callback_4_4(int (*)(struct device *, unsigned int), struct device *, unsigned int);
     125             : int ldv_rtc_class_scenario_probe_4_10(int (*)(struct device *), struct device *);
     126             : void ldv_rtc_class_scenario_release_4_2(void (*)(struct device *), struct device *);
     127             : int main(void);
     128             : 
     129             : /* EMG variable declarations */
     130           1 : struct ldv_thread ldv_thread_1;
     131           1 : struct ldv_thread ldv_thread_13;
     132           1 : struct ldv_thread ldv_thread_2;
     133           1 : struct ldv_thread ldv_thread_3;
     134           1 : struct ldv_thread ldv_thread_4;
     135           1 : struct ldv_thread ldv_thread_5;
     136           1 : struct ldv_thread ldv_thread_6;
     137             : 
     138             : /* EMG variable initialization */
     139             : 
     140             : /* EMG function definitions */
     141             : /* AUX_FUNC ldv_dispatch_default_deregister_11_6_4 */
     142             : void ldv_dispatch_default_deregister_11_6_4() {
     143             :  struct ldv_struct_platform_instance_2 *cf_arg_5;
     144             :  /* Skip thread join call */
     145           1 :  return;
     146             : }
     147             : 
     148             : /* AUX_FUNC ldv_dispatch_default_register_11_6_5 */
     149             : void ldv_dispatch_default_register_11_6_5() {
     150             :  struct ldv_struct_platform_instance_2 *cf_arg_5;
     151           4 :  cf_arg_5 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
     152           3 :  ldv_random_containerless_scenario_5(cf_arg_5);
     153           1 :  return;
     154             : }
     155             : 
     156             : /* AUX_FUNC ldv_dispatch_deregister_12_1 */
     157             : void ldv_dispatch_deregister_12_1(struct rtc_device *arg0) {
     158             :  struct ldv_struct_rtc_device_unregister_12 *cf_arg_4;
     159             :  /* Skip thread join call */
     160           4 :  return;
     161             : }
     162             : 
     163             : /* AUX_FUNC ldv_dispatch_deregister_9_1 */
     164             : void ldv_dispatch_deregister_9_1(struct platform_driver *arg0) {
     165             :  struct ldv_struct_platform_instance_2 *cf_arg_2;
     166             :  /* Skip thread join call */
     167           2 :  return;
     168             : }
     169             : 
     170             : /* AUX_FUNC ldv_dispatch_insmod_deregister_13_2 */
     171             : void ldv_dispatch_insmod_deregister_13_2() {
     172             :  struct ldv_struct_platform_instance_2 *cf_arg_6;
     173             :  /* Skip thread join call */
     174           1 :  return;
     175             : }
     176             : 
     177             : /* AUX_FUNC ldv_dispatch_insmod_register_13_3 */
     178             : void ldv_dispatch_insmod_register_13_3() {
     179             :  struct ldv_struct_platform_instance_2 *cf_arg_6;
     180           4 :  cf_arg_6 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
     181           4 :  ldv_insmod_6(cf_arg_6);
     182           1 :  return;
     183             : }
     184             : 
     185             : /* AUX_FUNC ldv_dispatch_irq_deregister_7_1 */
     186             : void ldv_dispatch_irq_deregister_7_1(int arg0) {
     187             :  struct ldv_struct_free_irq_7 *cf_arg_1;
     188             :  /* Skip thread join call */
     189           3 :  return;
     190             : }
     191             : 
     192             : /* AUX_FUNC ldv_dispatch_irq_register_10_3 */
     193             : void ldv_dispatch_irq_register_10_3(int arg0, irqreturn_t (*arg1)(int, void *), irqreturn_t (*arg2)(int, void *), void *arg3) {
     194             :  struct ldv_struct_interrupt_scenario_1 *cf_arg_1;
     195           6 :  cf_arg_1 = ldv_xmalloc(sizeof(struct ldv_struct_interrupt_scenario_1));
     196           4 :  cf_arg_1->arg0 = arg0;
     197           4 :  cf_arg_1->arg1 = arg1;
     198           2 :  cf_arg_1->arg2 = arg2;
     199           2 :  cf_arg_1->arg3 = arg3;
     200           6 :  ldv_interrupt_scenario_1(cf_arg_1);
     201           2 :  return;
     202             : }
     203             : 
     204             : /* AUX_FUNC ldv_dispatch_pm_deregister_2_5 */
     205             : void ldv_dispatch_pm_deregister_2_5() {
     206             :  struct ldv_struct_platform_instance_2 *cf_arg_3;
     207             :  /* Skip thread join call */
     208           1 :  return;
     209             : }
     210             : 
     211             : /* AUX_FUNC ldv_dispatch_pm_register_2_6 */
     212             : void ldv_dispatch_pm_register_2_6() {
     213             :  struct ldv_struct_platform_instance_2 *cf_arg_3;
     214           4 :  cf_arg_3 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
     215           3 :  ldv_pm_ops_scenario_3(cf_arg_3);
     216           1 :  return;
     217             : }
     218             : 
     219             : /* AUX_FUNC ldv_dispatch_register_11_3 */
     220             : void ldv_dispatch_register_11_3(struct rtc_device *arg0, struct rtc_class_ops *arg1, struct device *arg2) {
     221             :  struct ldv_struct_rtc_class_scenario_4 *cf_arg_4;
     222           3 :  cf_arg_4 = ldv_xmalloc(sizeof(struct ldv_struct_rtc_class_scenario_4));
     223           2 :  cf_arg_4->arg0 = arg0;
     224           2 :  cf_arg_4->arg1 = arg1;
     225           1 :  cf_arg_4->arg2 = arg2;
     226           2 :  ldv_rtc_class_scenario_4(cf_arg_4);
     227           1 :  return;
     228             : }
     229             : 
     230             : /* AUX_FUNC ldv_dispatch_register_8_3 */
     231             : void ldv_dispatch_register_8_3(struct platform_driver *arg0) {
     232             :  struct ldv_struct_platform_instance_2 *cf_arg_2;
     233           4 :  cf_arg_2 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
     234           2 :  cf_arg_2->arg0 = arg0;
     235           2 :  ldv_platform_instance_2(cf_arg_2);
     236           1 :  return;
     237             : }
     238             : 
     239             : /* AUX_FUNC ldv_emg_free_irq */
     240             : void ldv_emg_free_irq(int arg0, void *arg1) {
     241             :  /* LDV {"comment": "Control function 'free_irq'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_free_irq"} */
     242           3 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     243             :  int ldv_7_line_line;
     244             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     245             :  /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Get an interrupt line argument."} */
     246           3 :  ldv_7_line_line = arg0;
     247             :  /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
     248             : 
     249             :  /* LDV {"action": "IRQ_DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "The interrupt line is freed."} */
     250           6 :  ldv_dispatch_irq_deregister_7_1(ldv_7_line_line);
     251             :  /* LDV {"action": "IRQ_DEREGISTER", "type": "DISPATCH_END"} */
     252             : 
     253             :  /* Exit function at a terminal state */
     254           3 :  return;
     255             :  /* End of the process */
     256             :  return;
     257             :  /* LDV {"comment": "End of control function based on process 'free_irq'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_free_irq"} */
     258             : }
     259             : 
     260             : /* AUX_FUNC ldv_emg_platform_driver_probe */
     261             : int ldv_emg_platform_driver_probe(struct platform_driver *arg0, int (*arg1)(struct platform_device *)) {
     262             :  /* LDV {"comment": "Control function 'platform_driver_probe'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_platform_driver_probe"} */
     263           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     264           1 :  struct platform_driver *ldv_8_platform_driver_platform_driver;
     265           1 :  int (*ldv_8_probe_probe)(struct platform_device *);
     266           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     267             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     268             : 
     269           4 :  if (ldv_undef_int()) {
     270             :   /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Get 'platform_driver' and 'probe' arguments."} */
     271           1 :   ldv_8_platform_driver_platform_driver = arg0;
     272           1 :   ldv_8_probe_probe = arg1;
     273           1 :   ldv_8_platform_driver_platform_driver->probe=ldv_8_probe_probe;
     274             :   /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
     275             : 
     276             :   /* LDV {"action": "REGISTER", "type": "DISPATCH_BEGIN", "comment": "Register 'platform_driver' callbacks and 'probe' routine."} */
     277           2 :   ldv_dispatch_register_8_3(ldv_8_platform_driver_platform_driver);
     278             :   /* LDV {"action": "REGISTER", "type": "DISPATCH_END"} */
     279             : 
     280             :   /* LDV {"action": "SUCCESS", "type": "CONDITION_BEGIN", "comment": "Successfully registered a driver for non-hotpluggable platform-level device."} */
     281           1 :   return 0;
     282             :   /* LDV {"action": "SUCCESS", "type": "CONDITION_END"} */
     283             : 
     284             :   /* Exit function at a terminal state */
     285             :  }
     286             :  else {
     287             :   /* LDV {"action": "FAIL", "type": "CONDITION_BEGIN", "comment": "Failed to register a driver for non-hotpluggable platform-level device."} */
     288           3 :   return ldv_undef_int_negative();
     289             :   /* LDV {"action": "FAIL", "type": "CONDITION_END"} */
     290             : 
     291             :   /* Exit function at a terminal state */
     292             :  }
     293             :  /* End of the process */
     294             :  /* LDV {"comment": "End of control function based on process 'platform_driver_probe'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_platform_driver_probe"} */
     295             : }
     296             : 
     297             : /* AUX_FUNC ldv_emg_platform_driver_unregister */
     298             : void ldv_emg_platform_driver_unregister(struct platform_driver *arg0) {
     299             :  /* LDV {"comment": "Control function 'platform_driver_unregister'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_platform_driver_unregister"} */
     300           2 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     301             :  struct platform_driver *ldv_9_platform_driver_platform_driver;
     302             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     303             :  /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Get 'platform_driver' argument."} */
     304           2 :  ldv_9_platform_driver_platform_driver = arg0;
     305             :  /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
     306             : 
     307             :  /* LDV {"action": "DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Deregister 'platform_driver' callbacks."} */
     308           4 :  ldv_dispatch_deregister_9_1(ldv_9_platform_driver_platform_driver);
     309             :  /* LDV {"action": "DEREGISTER", "type": "DISPATCH_END"} */
     310             : 
     311             :  /* Exit function at a terminal state */
     312           2 :  return;
     313             :  /* End of the process */
     314             :  return;
     315             :  /* LDV {"comment": "End of control function based on process 'platform_driver_unregister'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_platform_driver_unregister"} */
     316             : }
     317             : 
     318             : /* AUX_FUNC ldv_emg_request_irq */
     319             : int ldv_emg_request_irq(unsigned int arg0, irqreturn_t (*arg1)(int, void *), long unsigned int arg2, char *arg3, void *arg4) {
     320             :  /* LDV {"comment": "Control function 'request_irq'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_request_irq"} */
     321             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     322           2 :  irqreturn_t (*ldv_10_callback_handler)(int, void *);
     323           2 :  void *ldv_10_data_data;
     324           2 :  int ldv_10_line_line;
     325           2 :  irqreturn_t (*ldv_10_thread_thread)(int, void *);
     326           2 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     327           2 :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     328             : 
     329           8 :  if (ldv_undef_int()) {
     330             :   /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Get line, callbacks and data arguments."} */
     331           2 :   ldv_10_line_line = arg0;
     332           2 :   ldv_10_callback_handler = arg1;
     333           2 :   ldv_10_thread_thread = 0;
     334           2 :   ldv_10_data_data = arg4;
     335             :   /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
     336             : 
     337             :   /* LDV {"action": "IRQ_REGISTER", "type": "DISPATCH_BEGIN", "comment": "Register interrupt callback (callbacks)."} */
     338           4 :   ldv_dispatch_irq_register_10_3(ldv_10_line_line, ldv_10_callback_handler, ldv_10_thread_thread, ldv_10_data_data);
     339             :   /* LDV {"action": "IRQ_REGISTER", "type": "DISPATCH_END"} */
     340             : 
     341             :   /* LDV {"action": "SUCCESS", "type": "CONDITION_BEGIN", "comment": "Successfully allocated an interrupt line for a managed device."} */
     342           2 :   return 0;
     343             :   /* LDV {"action": "SUCCESS", "type": "CONDITION_END"} */
     344             : 
     345             :   /* Exit function at a terminal state */
     346             :  }
     347             :  else {
     348             :   /* LDV {"action": "FAIL", "type": "CONDITION_BEGIN", "comment": "Failed to allocate an interrupt line for a managed device."} */
     349           6 :   return ldv_undef_int_negative();
     350             :   /* LDV {"action": "FAIL", "type": "CONDITION_END"} */
     351             : 
     352             :   /* Exit function at a terminal state */
     353             :  }
     354             :  /* End of the process */
     355             :  /* LDV {"comment": "End of control function based on process 'request_irq'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_request_irq"} */
     356             : }
     357             : 
     358             : /* AUX_FUNC ldv_emg_rtc_device_register */
     359             : struct rtc_device * ldv_emg_rtc_device_register(char *arg0, struct device *arg1, struct rtc_class_ops *arg2, struct module *arg3) {
     360             :  /* LDV {"comment": "Control function 'rtc_device_register'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_rtc_device_register"} */
     361             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     362           1 :  struct device *ldv_11_device_device;
     363           1 :  struct rtc_class_ops *ldv_11_rtc_class_ops_rtc_class_ops;
     364           1 :  struct rtc_device *ldv_11_rtc_device_rtc_device;
     365           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     366           1 :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     367             : 
     368           4 :  if (ldv_undef_int()) {
     369             :   /* LDV {"action": "ALLOC", "type": "CONDITION_BEGIN", "comment": "Alloc memory for rtc_device structure and initialize it."} */
     370           3 :   ldv_11_rtc_device_rtc_device = ldv_xmalloc(sizeof(struct rtc_device));
     371           1 :   ldv_11_device_device = arg1;
     372           1 :   ldv_11_rtc_class_ops_rtc_class_ops = arg2;
     373           1 :   ldv_11_rtc_device_rtc_device->ops = ldv_11_rtc_class_ops_rtc_class_ops;
     374           1 :   ldv_11_rtc_device_rtc_device->dev.parent = ldv_11_device_device;
     375             :   /* LDV {"action": "ALLOC", "type": "CONDITION_END"} */
     376             : 
     377             :   /* LDV {"action": "REGISTER", "type": "DISPATCH_BEGIN", "comment": "Register RTC callbacks."} */
     378           2 :   ldv_dispatch_register_11_3(ldv_11_rtc_device_rtc_device, ldv_11_rtc_class_ops_rtc_class_ops, ldv_11_device_device);
     379             :   /* LDV {"action": "REGISTER", "type": "DISPATCH_END"} */
     380             : 
     381             :   /* LDV {"action": "SUCCESS", "type": "CONDITION_BEGIN", "comment": "RTC device has been registered successfully."} */
     382           1 :   return ldv_11_rtc_device_rtc_device;
     383             :   /* LDV {"action": "SUCCESS", "type": "CONDITION_END"} */
     384             : 
     385             :   /* Exit function at a terminal state */
     386             :  }
     387             :  else {
     388             :   /* LDV {"action": "FAIL", "type": "CONDITION_BEGIN", "comment": "RTC device registration has failed."} */
     389           1 :   return 0;
     390             :   /* LDV {"action": "FAIL", "type": "CONDITION_END"} */
     391             : 
     392             :   /* Exit function at a terminal state */
     393             :  }
     394             :  /* End of the process */
     395             :  /* LDV {"comment": "End of control function based on process 'rtc_device_register'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_rtc_device_register"} */
     396             : }
     397             : 
     398             : /* AUX_FUNC ldv_emg_rtc_device_unregister */
     399             : void ldv_emg_rtc_device_unregister(struct rtc_device *arg0) {
     400             :  /* LDV {"comment": "Control function 'rtc_device_unregister'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_rtc_device_unregister"} */
     401           4 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     402             :  struct rtc_device *ldv_12_rtc_device_rtc_device;
     403             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     404             :  /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Get rtc_device structure argument."} */
     405           4 :  ldv_12_rtc_device_rtc_device = arg0;
     406             :  /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
     407             : 
     408             :  /* LDV {"action": "DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Deregister RTC callbacks."} */
     409           8 :  ldv_dispatch_deregister_12_1(ldv_12_rtc_device_rtc_device);
     410             :  /* LDV {"action": "DEREGISTER", "type": "DISPATCH_END"} */
     411             : 
     412             :  /* Exit function at a terminal state */
     413           4 :  return;
     414             :  /* End of the process */
     415             :  return;
     416             :  /* LDV {"comment": "End of control function based on process 'rtc_device_unregister'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_rtc_device_unregister"} */
     417             : }
     418             : 
     419             : /* AUX_FUNC ldv_insmod_6 */
     420             : void ldv_insmod_6(void *arg0) {
     421             :  /* LDV {"thread": 6, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'insmod(artificial)'", "function": "ldv_insmod_6"} */
     422           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     423           1 :  void (*ldv_6_cmos_exit_default)(void);
     424           1 :  int (*ldv_6_cmos_init_default)(void);
     425           1 :  int ldv_6_ret_default;
     426           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     427             :  /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module initialization."} */
     428           2 :  ldv_free(arg0);
     429             :  /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_END"} */
     430             : 
     431             :  /* LDV {"action": "CMOS_INIT", "type": "CALL_BEGIN", "callback": true, "comment": "Initialize the module after insmod with 'cmos_init' function. Invoke callback cmos_init from ARTIFICIAL."} */
     432             :  /* LDV {"type": "CALLBACK", "call": "ldv_6_ret_default = (cmos_init)();", "comment": "cmos_init"} */
     433           2 :  ldv_6_ret_default = ldv_insmod_cmos_init_6_9(ldv_6_cmos_init_default);
     434             :  /* Callback post-call */
     435           2 :  ldv_6_ret_default = ldv_post_init(ldv_6_ret_default);
     436             :  /* LDV {"action": "CMOS_INIT", "type": "CALL_END"} */
     437             : 
     438           4 :  if (ldv_undef_int()) {
     439             :   /* LDV {"action": "INIT_FAILED", "type": "CONDITION_BEGIN", "comment": "Failed to initialize the module."} */
     440           2 :   ldv_assume(ldv_6_ret_default != 0);
     441             :   /* LDV {"action": "INIT_FAILED", "type": "CONDITION_END"} */
     442             : 
     443             :   /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
     444             :   /* Skip a non-replicative signal receiving */
     445             :   /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
     446             : 
     447             :   /* Exit function at a terminal state */
     448           1 :   return;
     449             :  }
     450             :  else {
     451             :   /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Module has been initialized."} */
     452           2 :   ldv_assume(ldv_6_ret_default == 0);
     453             :   /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_END"} */
     454             : 
     455           4 :   if (ldv_undef_int()) {
     456             :    /* LDV {"action": "DEFAULT_REGISTER_11", "type": "DISPATCH_BEGIN", "comment": "Register 'STRUCT_BIN_ATTRIBUTE' callbacks with unknown registration function."} */
     457           2 :    ldv_dispatch_default_register_11_6_5();
     458             :    /* LDV {"action": "DEFAULT_REGISTER_11", "type": "DISPATCH_END"} */
     459             : 
     460             :    /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "DISPATCH_BEGIN", "comment": "Deregister 'STRUCT_BIN_ATTRIBUTE' callbacks with unknown deregistration function."} */
     461           2 :    ldv_dispatch_default_deregister_11_6_4();
     462             :    /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "DISPATCH_END"} */
     463             : 
     464             :   }
     465             :   else {
     466             :    /* LDV {"action": "NONE", "type": "CONDITION_BEGIN", "comment": "Skip default callbacks registrations and deregistrations."} */
     467             :    /* LDV {"action": "NONE", "type": "CONDITION_END"} */
     468             : 
     469             :   }
     470             :   /* LDV {"action": "CMOS_EXIT", "type": "CALL_BEGIN", "callback": true, "comment": "Exit the module before its unloading with 'cmos_exit' function. Invoke callback cmos_exit from ARTIFICIAL."} */
     471             :   /* LDV {"type": "CALLBACK", "call": "(cmos_exit)();", "comment": "cmos_exit"} */
     472           4 :   ldv_insmod_cmos_exit_6_2(ldv_6_cmos_exit_default);
     473             :   /* LDV {"action": "CMOS_EXIT", "type": "CALL_END"} */
     474             : 
     475             :   /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
     476             :   /* Skip a non-replicative signal receiving */
     477             :   /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
     478             : 
     479             :   /* Exit function at a terminal state */
     480           1 :   return;
     481             :  }
     482             :  /* End of the process */
     483             :  return;
     484             :  /* LDV {"comment": "End of control function based on process 'insmod(artificial)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_insmod_6"} */
     485             : }
     486             : 
     487             : /* AUX_FUNC_CALLBACK ldv_insmod_cmos_exit_6_2 */
     488             : void ldv_insmod_cmos_exit_6_2(void (*arg0)(void)) {
     489           6 :  (cmos_exit)();
     490           2 : }
     491             : 
     492             : /* AUX_FUNC_CALLBACK ldv_insmod_cmos_init_6_9 */
     493             : int ldv_insmod_cmos_init_6_9(int (*arg0)(void)) {
     494           4 :  return (cmos_init)();
     495           1 : }
     496             : 
     497             : /* AUX_FUNC ldv_interrupt_scenario_1 */
     498             : void ldv_interrupt_scenario_1(void *arg0) {
     499             :  /* LDV {"thread": 1, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'interrupt_scenario(interrupt)'", "function": "ldv_interrupt_scenario_1"} */
     500           2 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     501           2 :  irqreturn_t (*ldv_1_callback_handler)(int, void *);
     502           2 :  void *ldv_1_data_data;
     503           2 :  int ldv_1_line_line;
     504           2 :  enum irqreturn ldv_1_ret_val_default;
     505           2 :  irqreturn_t (*ldv_1_thread_thread)(int, void *);
     506           2 :  /* Received labels */
     507           2 :  struct ldv_struct_interrupt_scenario_1 *data = (struct ldv_struct_interrupt_scenario_1*) arg0;
     508             : 
     509             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     510             :  /* LDV {"action": "IRQ_REGISTER", "type": "RECEIVE_BEGIN", "comment": "An interrupt is registered."} */
     511             :  /* Assign recieved labels */
     512           4 :  if (data) {
     513           2 :   ldv_1_line_line = data->arg0;
     514           2 :   ldv_1_callback_handler = data->arg1;
     515           2 :   ldv_1_thread_thread = data->arg2;
     516           2 :   ldv_1_data_data = data->arg3;
     517           4 :   ldv_free(data);
     518             :  }
     519             :  /* LDV {"action": "IRQ_REGISTER", "type": "RECEIVE_END"} */
     520             : 
     521             :  /* LDV {"action": "HANDLER", "type": "CALL_BEGIN", "callback": true, "comment": "An interrupt happens, execute the bottom half function to handle it. Invoke callback handler from INTERRUPT."} */
     522             :  /* Callback pre-call */
     523           4 :  ldv_switch_to_interrupt_context();
     524             :  /* LDV {"type": "CALLBACK", "call": "ldv_1_ret_val_default = ((cmos_interrupt))(ldv_1_line_line, ldv_1_data_data);", "comment": "handler"} */
     525           8 :  ldv_1_ret_val_default = ldv_interrupt_scenario_handler_1_5(ldv_1_callback_handler, ldv_1_line_line, ldv_1_data_data);
     526             :  /* Callback post-call */
     527           2 :  ldv_switch_to_process_context();
     528             :  /* LDV {"action": "HANDLER", "type": "CALL_END"} */
     529             : 
     530           8 :  if (ldv_undef_int()) {
     531             :   /* LDV {"action": "NEED_THREAD", "type": "CONDITION_BEGIN", "comment": "Wake a thread to continue an interrupt handling."} */
     532           4 :   ldv_assume(ldv_1_ret_val_default == IRQ_WAKE_THREAD);
     533             :   /* LDV {"action": "NEED_THREAD", "type": "CONDITION_END"} */
     534             : 
     535             :   /* LDV {"action": "THREAD", "type": "CALL_BEGIN", "callback": true, "comment": "Proceed with the interrupt handling, execute the top half function. Invoke callback thread from INTERRUPT."} */
     536             :   /* LDV {"type": "CALLBACK", "call": "((cmos_interrupt))(ldv_1_line_line, ldv_1_data_data);", "comment": "thread"} */
     537           4 :   ldv_interrupt_scenario_thread_1_3(ldv_1_thread_thread, ldv_1_line_line, ldv_1_data_data);
     538             :   /* LDV {"action": "THREAD", "type": "CALL_END"} */
     539             : 
     540             :  }
     541             :  else {
     542             :   /* LDV {"action": "HANDLED", "type": "CONDITION_BEGIN", "comment": "An interrupt has been handled."} */
     543           4 :   ldv_assume(ldv_1_ret_val_default != IRQ_WAKE_THREAD);
     544             :   /* LDV {"action": "HANDLED", "type": "CONDITION_END"} */
     545             : 
     546             :  }
     547             :  /* LDV {"action": "IRQ_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "An interrupt is deregistered."} */
     548             :  /* Skip a non-replicative signal receiving */
     549             :  /* LDV {"action": "IRQ_DEREGISTER", "type": "RECEIVE_END"} */
     550             : 
     551             :  /* Exit function at a terminal state */
     552           4 :  return;
     553             :  /* End of the process */
     554             :  return;
     555             :  /* LDV {"comment": "End of control function based on process 'interrupt_scenario(interrupt)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_interrupt_scenario_1"} */
     556             : }
     557             : 
     558             : /* AUX_FUNC_CALLBACK ldv_interrupt_scenario_handler_1_5 */
     559             : enum irqreturn ldv_interrupt_scenario_handler_1_5(irqreturn_t (*arg0)(int, void *), int arg1, void *arg2) {
     560          12 :  return ((cmos_interrupt))(arg1, arg2);
     561             : }
     562           4 : 
     563             : /* AUX_FUNC_CALLBACK ldv_interrupt_scenario_thread_1_3 */
     564             : void ldv_interrupt_scenario_thread_1_3(irqreturn_t (*arg0)(int, void *), int arg1, void *arg2) {
     565           4 :  ((cmos_interrupt))(arg1, arg2);
     566           2 : }
     567             : 
     568             : /* AUX_FUNC ldv_main_13 */
     569             : void ldv_main_13(void *arg0) {
     570             :  /* LDV {"thread": 13, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'main(main)'", "function": "ldv_main_13"} */
     571             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     572             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     573             :  /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Initialize rule models."} */
     574           1 :  ldv_initialize();
     575             :  /* LDV {"action": "INIT", "type": "CONDITION_END"} */
     576             : 
     577             :  /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_BEGIN", "comment": "Start environment model scenarios."} */
     578           2 :  ldv_dispatch_insmod_register_13_3();
     579             :  /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_END"} */
     580             : 
     581             :  /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Stop environment model scenarios."} */
     582           2 :  ldv_dispatch_insmod_deregister_13_2();
     583             :  /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_END"} */
     584             : 
     585             :  /* LDV {"action": "FINAL", "type": "CONDITION_BEGIN", "comment": "Check rule model state at the exit."} */
     586           1 :  ldv_check_final_state();
     587           1 :  ldv_stop();
     588             :  /* LDV {"action": "FINAL", "type": "CONDITION_END"} */
     589             : 
     590             :  /* Exit function at a terminal state */
     591           0 :  return;
     592             :  /* End of the process */
     593             :  return;
     594             :  /* LDV {"comment": "End of control function based on process 'main(main)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_main_13"} */
     595             : }
     596             : 
     597             : /* AUX_FUNC ldv_platform_instance_2 */
     598             : void ldv_platform_instance_2(void *arg0) {
     599             :  /* LDV {"thread": 2, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'platform_instance(platform)'", "function": "ldv_platform_instance_2"} */
     600           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     601           1 :  void (*ldv_2_callback_shutdown)(struct platform_device *);
     602           1 :  struct platform_driver *ldv_2_container_platform_driver;
     603           1 :  int ldv_2_probed_default;
     604           1 :  struct platform_device *ldv_2_resource_platform_device;
     605           1 :  /* Received labels */
     606           2 :  struct ldv_struct_platform_instance_2 *data = (struct ldv_struct_platform_instance_2*) arg0;
     607           1 : 
     608           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     609             :  /* Initialize automaton variables */
     610           1 :  ldv_2_probed_default = 1;
     611             :  /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Register a driver callbacks for platform-level device."} */
     612             :  /* Assign recieved labels */
     613           2 :  if (data) {
     614           1 :   ldv_2_container_platform_driver = data->arg0;
     615           2 :   ldv_free(data);
     616             :  }
     617             :  /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
     618             : 
     619             :  /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Alloc memory for 'platform_device' structure."} */
     620           5 :  ldv_2_resource_platform_device = ldv_xmalloc(sizeof(struct platform_device));
     621             :  /* LDV {"action": "INIT", "type": "CONDITION_END"} */
     622             : 
     623             :  /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Check that device is truely in the system and begin callback invocations."} */
     624             :  /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
     625             : 
     626             :  /* Jump to a subprocess 'main' initial state */
     627           1 :  goto ldv_main_2;
     628             :  /* End of the process */
     629             :  return;
     630           1 : 
     631             :  /* Sbprocess main */
     632             :  ldv_main_2:
     633             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     634             : 
     635           4 :  if (ldv_undef_int()) {
     636             :   /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Check that the device in the system and do driver initializations. Invoke callback probe from PLATFORM."} */
     637             :   /* Callback pre-call */
     638           1 :   ldv_pre_probe();
     639             :   /* LDV {"type": "CALLBACK", "call": "ldv_2_probed_default = ((cmos_platform_probe))(ldv_2_resource_platform_device);", "comment": "probe"} */
     640           2 :   ldv_2_probed_default = ldv_platform_instance_probe_2_14(ldv_2_container_platform_driver->probe, ldv_2_resource_platform_device);
     641             :   /* Callback post-call */
     642           2 :   ldv_2_probed_default = ldv_post_probe(ldv_2_probed_default);
     643             :   /* LDV {"action": "PROBE", "type": "CALL_END"} */
     644             : 
     645           4 :   if (ldv_undef_int()) {
     646             :    /* LDV {"action": "POSITIVE_PROBE", "type": "CONDITION_BEGIN", "comment": "Platform device is probed successfully now."} */
     647           2 :    ldv_assume(ldv_2_probed_default == 0);
     648             :    /* LDV {"action": "POSITIVE_PROBE", "type": "CONDITION_END"} */
     649             : 
     650             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Driver is probed. Call power management callbacks or release the device."} */
     651             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     652             : 
     653             :    /* Jump to a subprocess 'call' initial state */
     654           1 :    goto ldv_call_2;
     655             :   }
     656             :   else {
     657             :    /* LDV {"action": "NEGATIVE_PROBE", "type": "CONDITION_BEGIN", "comment": "Failed to probe the device."} */
     658           2 :    ldv_assume(ldv_2_probed_default != 0);
     659             :    /* LDV {"action": "NEGATIVE_PROBE", "type": "CONDITION_END"} */
     660             : 
     661             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Check that device is truely in the system and begin callback invocations."} */
     662             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
     663             : 
     664             :    /* Jump to a subprocess 'main' initial state */
     665           1 :    goto ldv_main_2;
     666             :   }
     667             :  }
     668             :  else {
     669             :   /* LDV {"action": "FREE", "type": "CONDITION_BEGIN", "comment": "Free memory for 'platform_device' structure."} */
     670           2 :   ldv_free(ldv_2_resource_platform_device);
     671             :   /* LDV {"action": "FREE", "type": "CONDITION_END"} */
     672             : 
     673             :   /* LDV {"action": "DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Finish PLATFORM callbacks invocations scenario."} */
     674             :   /* Skip a non-replicative signal receiving */
     675             :   /* LDV {"action": "DEREGISTER", "type": "RECEIVE_END"} */
     676             : 
     677             :   /* Exit function at a terminal state */
     678           1 :   return;
     679             :  }
     680             :  /* End of the subprocess 'main' */
     681             :  return;
     682           1 : 
     683             :  /* Sbprocess call */
     684             :  ldv_call_2:
     685             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     686             : 
     687           2 :  switch (ldv_undef_int()) {
     688           3 :   case 1: {
     689             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback shutdown from platform_driver."} */
     690             :    /* LDV {"type": "CALLBACK", "call": "((& cmos_platform_shutdown))(ldv_2_resource_platform_device);", "comment": "callback"} */
     691           2 :    ldv_platform_instance_callback_2_7(ldv_2_callback_shutdown, ldv_2_resource_platform_device);
     692             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     693             : 
     694             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Driver is probed. Call power management callbacks or release the device."} */
     695             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     696             : 
     697             :    /* Jump to a subprocess 'call' initial state */
     698           1 :    goto ldv_call_2;
     699           1 :    break;
     700             :   }
     701           3 :   case 2: {
     702             :    /* LDV {"action": "PM_REGISTER", "type": "DISPATCH_BEGIN", "comment": "Proceed to a power management scenario."} */
     703           2 :    ldv_dispatch_pm_register_2_6();
     704             :    /* LDV {"action": "PM_REGISTER", "type": "DISPATCH_END"} */
     705             : 
     706             :    /* LDV {"action": "PM_DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Finish the power management scenario."} */
     707           2 :    ldv_dispatch_pm_deregister_2_5();
     708             :    /* LDV {"action": "PM_DEREGISTER", "type": "DISPATCH_END"} */
     709             : 
     710             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Driver is probed. Call power management callbacks or release the device."} */
     711             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     712             : 
     713             :    /* Jump to a subprocess 'call' initial state */
     714           1 :    goto ldv_call_2;
     715             :    /* Jump to a subprocess 'call' initial state */
     716             :    goto ldv_call_2;
     717           1 :    break;
     718             :   }
     719           3 :   case 3: {
     720             :    /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "Remove device from the system. Invoke callback release from PLATFORM."} */
     721           3 :    if (ldv_2_container_platform_driver->remove) {
     722             :    /* LDV {"type": "CALLBACK", "call": "(ldv_2_container_platform_driver->remove)(ldv_2_resource_platform_device);", "comment": "release"} */
     723           2 :     ldv_platform_instance_release_2_3(ldv_2_container_platform_driver->remove, ldv_2_resource_platform_device);
     724             :    }
     725             :    /* LDV {"action": "RELEASE", "type": "CALL_END"} */
     726             : 
     727             :    /* LDV {"action": "AFTER_RELEASE", "type": "CONDITION_BEGIN", "comment": "Platform device is released now."} */
     728           2 :    ldv_2_probed_default = 1;
     729             :    /* LDV {"action": "AFTER_RELEASE", "type": "CONDITION_END"} */
     730             : 
     731             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Check that device is truely in the system and begin callback invocations."} */
     732             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
     733             : 
     734             :    /* Jump to a subprocess 'main' initial state */
     735           2 :    goto ldv_main_2;
     736           1 :    break;
     737             :   }
     738           2 :   default: ldv_stop();
     739           1 :  }
     740           0 :  /* End of the subprocess 'call' */
     741           0 :  return;
     742             :  /* LDV {"comment": "End of control function based on process 'platform_instance(platform)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_platform_instance_2"} */
     743             : }
     744             : 
     745             : /* AUX_FUNC_CALLBACK ldv_platform_instance_callback_2_7 */
     746             : void ldv_platform_instance_callback_2_7(void (*arg0)(struct platform_device *), struct platform_device *arg1) {
     747           3 :  ((& cmos_platform_shutdown))(arg1);
     748           1 : }
     749             : 
     750             : /* AUX_FUNC_CALLBACK ldv_platform_instance_probe_2_14 */
     751             : int ldv_platform_instance_probe_2_14(int (*arg0)(struct platform_device *), struct platform_device *arg1) {
     752           3 :  return ((cmos_platform_probe))(arg1);
     753           1 : }
     754             : 
     755             : /* AUX_FUNC_CALLBACK ldv_platform_instance_release_2_3 */
     756             : void ldv_platform_instance_release_2_3(int (*arg0)(struct platform_device *), struct platform_device *arg1) {
     757           2 :  (*arg0)(arg1);
     758           1 : }
     759             : 
     760             : /* AUX_FUNC ldv_pm_ops_scenario_3 */
     761             : void ldv_pm_ops_scenario_3(void *arg0) {
     762             :  /* LDV {"thread": 3, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'pm_ops_scenario(platform)'", "function": "ldv_pm_ops_scenario_3"} */
     763           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     764           1 :  struct device *ldv_3_device_device;
     765           1 :  struct dev_pm_ops *ldv_3_pm_ops_dev_pm_ops;
     766           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     767           1 :  /* LDV {"action": "PM_REGISTER", "type": "RECEIVE_BEGIN", "comment": "Ready for a power management scenarios."} */
     768           3 :  ldv_free(arg0);
     769           1 :  /* LDV {"action": "PM_REGISTER", "type": "RECEIVE_END"} */
     770             : 
     771             :  /* LDV {"action": "DO", "type": "SUBPROCESS_BEGIN", "comment": "Begin a power management scenario."} */
     772             :  /* LDV {"action": "DO", "type": "SUBPROCESS_END"} */
     773             : 
     774             :  /* Jump to a subprocess 'do' initial state */
     775           1 :  goto ldv_do_3;
     776             :  /* End of the process */
     777             :  return;
     778           1 : 
     779             :  /* Sbprocess do */
     780             :  ldv_do_3:
     781             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     782             : 
     783           2 :  switch (ldv_undef_int()) {
     784           3 :   case 1: {
     785             :    /* LDV {"action": "RUNTIME_IDLE", "type": "CALL_BEGIN", "callback": true, "comment": "Device appears to be inactive and it might be put into a low-power state if all of the necessary conditions are satisfied. Invoke callback runtime_idle from PLATFORM."} */
     786           3 :    if (ldv_3_pm_ops_dev_pm_ops->runtime_idle) {
     787             :    /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->runtime_idle)(ldv_3_device_device);", "comment": "runtime_idle"} */
     788           2 :     ldv_pm_ops_scenario_runtime_idle_3_24(ldv_3_pm_ops_dev_pm_ops->runtime_idle, ldv_3_device_device);
     789             :    }
     790             :    /* LDV {"action": "RUNTIME_IDLE", "type": "CALL_END"} */
     791             : 
     792             :    /* LDV {"action": "DO", "type": "SUBPROCESS_BEGIN", "comment": "Begin a power management scenario."} */
     793             :    /* LDV {"action": "DO", "type": "SUBPROCESS_END"} */
     794             : 
     795             :    /* Jump to a subprocess 'do' initial state */
     796           2 :    goto ldv_do_3;
     797           1 :    break;
     798             :   }
     799           3 :   case 2: {
     800             :    /* LDV {"action": "RUNTIME_SUSPEND", "type": "CALL_BEGIN", "callback": true, "comment": "The device should be put into a low-power state to prevent communication of the device with the CPU(s) and RAM. Invoke callback runtime_suspend from PLATFORM."} */
     801           3 :    if (ldv_3_pm_ops_dev_pm_ops->runtime_suspend) {
     802             :    /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->runtime_suspend)(ldv_3_device_device);", "comment": "runtime_suspend"} */
     803           2 :     ldv_pm_ops_scenario_runtime_suspend_3_22(ldv_3_pm_ops_dev_pm_ops->runtime_suspend, ldv_3_device_device);
     804             :    }
     805             :    /* LDV {"action": "RUNTIME_SUSPEND", "type": "CALL_END"} */
     806             : 
     807             :    /* LDV {"action": "RUNTIME_RESUME", "type": "CALL_BEGIN", "callback": true, "comment": "Put the device into the fully active state in response to a wakeup event generated by hardware or at the request of software. Invoke callback runtime_resume from PLATFORM."} */
     808           6 :    if (ldv_3_pm_ops_dev_pm_ops->runtime_resume) {
     809             :    /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->runtime_resume)(ldv_3_device_device);", "comment": "runtime_resume"} */
     810           4 :     ldv_pm_ops_scenario_runtime_resume_3_21(ldv_3_pm_ops_dev_pm_ops->runtime_resume, ldv_3_device_device);
     811             :    }
     812             :    /* LDV {"action": "RUNTIME_RESUME", "type": "CALL_END"} */
     813             : 
     814             :    /* LDV {"action": "DO", "type": "SUBPROCESS_BEGIN", "comment": "Begin a power management scenario."} */
     815             :    /* LDV {"action": "DO", "type": "SUBPROCESS_END"} */
     816             : 
     817             :    /* Jump to a subprocess 'do' initial state */
     818           3 :    goto ldv_do_3;
     819           1 :    break;
     820             :   }
     821           3 :   case 3: {
     822             :    /* LDV {"action": "PREPARE", "type": "CALL_BEGIN", "callback": true, "comment": "Prevent new children of the device from being registered. Invoke callback prepare from PLATFORM."} */
     823           3 :    if (ldv_3_pm_ops_dev_pm_ops->prepare) {
     824             :    /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->prepare)(ldv_3_device_device);", "comment": "prepare"} */
     825           2 :     ldv_pm_ops_scenario_prepare_3_19(ldv_3_pm_ops_dev_pm_ops->prepare, ldv_3_device_device);
     826             :    }
     827             :    /* LDV {"action": "PREPARE", "type": "CALL_END"} */
     828             : 
     829           4 :    switch (ldv_undef_int()) {
     830           3 :     case 1: {
     831             :      /* LDV {"action": "SUSPEND", "type": "CALL_BEGIN", "callback": true, "comment": "Quiesce subsystem-level device before suspend. Invoke callback suspend from PLATFORM."} */
     832           3 :      if (ldv_3_pm_ops_dev_pm_ops->suspend) {
     833             :      /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->suspend)(ldv_3_device_device);", "comment": "suspend"} */
     834           2 :       ldv_pm_ops_scenario_suspend_3_18(ldv_3_pm_ops_dev_pm_ops->suspend, ldv_3_device_device);
     835             :      }
     836             :      /* LDV {"action": "SUSPEND", "type": "CALL_END"} */
     837             : 
     838           6 :      if (ldv_undef_int()) {
     839             :       /* LDV {"action": "SUSPEND_NOIRQ", "type": "CALL_BEGIN", "callback": true, "comment": "Expect that the device will be in a low-power state. Invoke callback suspend_noirq from PLATFORM."} */
     840           3 :       if (ldv_3_pm_ops_dev_pm_ops->suspend_noirq) {
     841             :       /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->suspend_noirq)(ldv_3_device_device);", "comment": "suspend_noirq"} */
     842           2 :        ldv_pm_ops_scenario_suspend_noirq_3_17(ldv_3_pm_ops_dev_pm_ops->suspend_noirq, ldv_3_device_device);
     843             :       }
     844             :       /* LDV {"action": "SUSPEND_NOIRQ", "type": "CALL_END"} */
     845             : 
     846             :       /* LDV {"action": "RESUME_NOIRQ", "type": "CALL_BEGIN", "callback": true, "comment": "Prepare for the #resume() performing actions that might be racing with device's interrupt handler. Invoke callback resume_noirq from PLATFORM."} */
     847           6 :       if (ldv_3_pm_ops_dev_pm_ops->resume_noirq) {
     848             :       /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->resume_noirq)(ldv_3_device_device);", "comment": "resume_noirq"} */
     849           4 :        ldv_pm_ops_scenario_resume_noirq_3_16(ldv_3_pm_ops_dev_pm_ops->resume_noirq, ldv_3_device_device);
     850             :       }
     851             :       /* LDV {"action": "RESUME_NOIRQ", "type": "CALL_END"} */
     852             : 
     853             :      }
     854             :      else {
     855             :       /* LDV {"action": "SKIP_NOIRQ", "type": "CONDITION_BEGIN", "comment": "Skip noirq callbacks"} */
     856             :       /* LDV {"action": "SKIP_NOIRQ", "type": "CONDITION_END"} */
     857             : 
     858             :      }
     859             :      /* LDV {"action": "RESUME", "type": "CALL_BEGIN", "callback": true, "comment": "Make the device start working again after resume. Invoke callback resume from PLATFORM."} */
     860           9 :      if (ldv_3_pm_ops_dev_pm_ops->resume) {
     861             :      /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->resume)(ldv_3_device_device);", "comment": "resume"} */
     862           6 :       ldv_pm_ops_scenario_resume_3_14(ldv_3_pm_ops_dev_pm_ops->resume, ldv_3_device_device);
     863             :      }
     864             :      /* LDV {"action": "RESUME", "type": "CALL_END"} */
     865             : 
     866           4 :      break;
     867           1 :     }
     868           3 :     case 2: {
     869             :      /* LDV {"action": "FREEZE", "type": "CALL_BEGIN", "callback": true, "comment": "Prepare for creating a hibernation image. Invoke callback freeze from PLATFORM."} */
     870           3 :      if (ldv_3_pm_ops_dev_pm_ops->freeze) {
     871             :      /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->freeze)(ldv_3_device_device);", "comment": "freeze"} */
     872           2 :       ldv_pm_ops_scenario_freeze_3_13(ldv_3_pm_ops_dev_pm_ops->freeze, ldv_3_device_device);
     873             :      }
     874             :      /* LDV {"action": "FREEZE", "type": "CALL_END"} */
     875             : 
     876           6 :      if (ldv_undef_int()) {
     877             :       /* LDV {"action": "SKIP_NOIRQ", "type": "CONDITION_BEGIN", "comment": "Skip noirq callbacks"} */
     878             :       /* LDV {"action": "SKIP_NOIRQ", "type": "CONDITION_END"} */
     879             : 
     880             :      }
     881             :      else {
     882             :       /* LDV {"action": "FREEZE_NOIRQ", "type": "CALL_BEGIN", "callback": true, "comment": "Complete the actions started by #freeze() that might be racing with device's interrupt handler. Invoke callback freeze_noirq from PLATFORM."} */
     883           3 :       if (ldv_3_pm_ops_dev_pm_ops->freeze_noirq) {
     884             :       /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->freeze_noirq)(ldv_3_device_device);", "comment": "freeze_noirq"} */
     885           2 :        ldv_pm_ops_scenario_freeze_noirq_3_11(ldv_3_pm_ops_dev_pm_ops->freeze_noirq, ldv_3_device_device);
     886             :       }
     887             :       /* LDV {"action": "FREEZE_NOIRQ", "type": "CALL_END"} */
     888             : 
     889             :       /* LDV {"action": "THAW_NOIRQ", "type": "CALL_BEGIN", "callback": true, "comment": "Prepare for the execution of #thaw() performing actions that might be racing with device's interrupt handler. Invoke callback thaw_noirq from PLATFORM."} */
     890           6 :       if (ldv_3_pm_ops_dev_pm_ops->thaw_noirq) {
     891             :       /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->thaw_noirq)(ldv_3_device_device);", "comment": "thaw_noirq"} */
     892           4 :        ldv_pm_ops_scenario_thaw_noirq_3_10(ldv_3_pm_ops_dev_pm_ops->thaw_noirq, ldv_3_device_device);
     893             :       }
     894             :       /* LDV {"action": "THAW_NOIRQ", "type": "CALL_END"} */
     895             : 
     896             :      }
     897             :      /* LDV {"action": "THAW", "type": "CALL_BEGIN", "callback": true, "comment": "The hibernation image has created or creation has failed. Invoke callback thaw from PLATFORM."} */
     898           9 :      if (ldv_3_pm_ops_dev_pm_ops->thaw) {
     899             :      /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->thaw)(ldv_3_device_device);", "comment": "thaw"} */
     900           6 :       ldv_pm_ops_scenario_thaw_3_9(ldv_3_pm_ops_dev_pm_ops->thaw, ldv_3_device_device);
     901             :      }
     902             :      /* LDV {"action": "THAW", "type": "CALL_END"} */
     903             : 
     904           4 :      break;
     905           1 :     }
     906           3 :     case 3: {
     907             :      /* LDV {"action": "POWEROFF", "type": "CALL_BEGIN", "callback": true, "comment": "Hibernation image has been created. Invoke callback poweroff from PLATFORM."} */
     908           3 :      if (ldv_3_pm_ops_dev_pm_ops->poweroff) {
     909             :      /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->poweroff)(ldv_3_device_device);", "comment": "poweroff"} */
     910           2 :       ldv_pm_ops_scenario_poweroff_3_8(ldv_3_pm_ops_dev_pm_ops->poweroff, ldv_3_device_device);
     911             :      }
     912             :      /* LDV {"action": "POWEROFF", "type": "CALL_END"} */
     913             : 
     914           6 :      if (ldv_undef_int()) {
     915             :       /* LDV {"action": "POWEROFF_NOIRQ", "type": "CALL_BEGIN", "callback": true, "comment": "Complete the actions started by #poweroff(). Invoke callback poweroff_noirq from PLATFORM."} */
     916           3 :       if (ldv_3_pm_ops_dev_pm_ops->poweroff_noirq) {
     917             :       /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->poweroff_noirq)(ldv_3_device_device);", "comment": "poweroff_noirq"} */
     918           2 :        ldv_pm_ops_scenario_poweroff_noirq_3_7(ldv_3_pm_ops_dev_pm_ops->poweroff_noirq, ldv_3_device_device);
     919             :       }
     920             :       /* LDV {"action": "POWEROFF_NOIRQ", "type": "CALL_END"} */
     921             : 
     922             :       /* LDV {"action": "RESTORE_NOIRQ", "type": "CALL_BEGIN", "callback": true, "comment": "Prepare for the execution of #restore() performing actions that might be racing with device's interrupt handler. Invoke callback restore_noirq from PLATFORM."} */
     923           6 :       if (ldv_3_pm_ops_dev_pm_ops->restore_noirq) {
     924             :       /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->restore_noirq)(ldv_3_device_device);", "comment": "restore_noirq"} */
     925           4 :        ldv_pm_ops_scenario_restore_noirq_3_6(ldv_3_pm_ops_dev_pm_ops->restore_noirq, ldv_3_device_device);
     926             :       }
     927             :       /* LDV {"action": "RESTORE_NOIRQ", "type": "CALL_END"} */
     928             : 
     929             :      }
     930             :      else {
     931             :       /* LDV {"action": "SKIP_NOIRQ", "type": "CONDITION_BEGIN", "comment": "Skip noirq callbacks"} */
     932             :       /* LDV {"action": "SKIP_NOIRQ", "type": "CONDITION_END"} */
     933             : 
     934             :      }
     935             :      /* LDV {"action": "RESTORE", "type": "CALL_BEGIN", "callback": true, "comment": "Restoration of the contents of main memory from a hibernation image has been done. Invoke callback restore from PLATFORM."} */
     936           9 :      if (ldv_3_pm_ops_dev_pm_ops->restore) {
     937             :      /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->restore)(ldv_3_device_device);", "comment": "restore"} */
     938           6 :       ldv_pm_ops_scenario_restore_3_4(ldv_3_pm_ops_dev_pm_ops->restore, ldv_3_device_device);
     939             :      }
     940             :      /* LDV {"action": "RESTORE", "type": "CALL_END"} */
     941             : 
     942           4 :      break;
     943           1 :     }
     944           2 :     default: ldv_stop();
     945           1 :    }
     946           0 :    /* LDV {"action": "COMPLETE", "type": "CALL_BEGIN", "callback": true, "comment": "Undo the changes made by #prepare(). Invoke callback complete from PLATFORM."} */
     947          36 :    if (ldv_3_pm_ops_dev_pm_ops->complete) {
     948           0 :    /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->complete)(ldv_3_device_device);", "comment": "complete"} */
     949          24 :     ldv_pm_ops_scenario_complete_3_3(ldv_3_pm_ops_dev_pm_ops->complete, ldv_3_device_device);
     950             :    }
     951             :    /* LDV {"action": "COMPLETE", "type": "CALL_END"} */
     952             : 
     953             :    /* LDV {"action": "DO", "type": "SUBPROCESS_BEGIN", "comment": "Begin a power management scenario."} */
     954             :    /* LDV {"action": "DO", "type": "SUBPROCESS_END"} */
     955             : 
     956             :    /* Jump to a subprocess 'do' initial state */
     957          13 :    goto ldv_do_3;
     958           1 :    break;
     959             :   }
     960           3 :   case 4: {
     961             :    /* LDV {"action": "PM_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Do not expect power management scenarios."} */
     962             :    /* Skip a non-replicative signal receiving */
     963             :    /* LDV {"action": "PM_DEREGISTER", "type": "RECEIVE_END"} */
     964             : 
     965             :    /* Exit function at a terminal state */
     966           1 :    return;
     967           1 :    break;
     968             :   }
     969           2 :   default: ldv_stop();
     970           1 :  }
     971           0 :  /* End of the subprocess 'do' */
     972           0 :  return;
     973             :  /* LDV {"comment": "End of control function based on process 'pm_ops_scenario(platform)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_pm_ops_scenario_3"} */
     974             : }
     975             : 
     976             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_complete_3_3 */
     977             : void ldv_pm_ops_scenario_complete_3_3(void (*arg0)(struct device *), struct device *arg1) {
     978          12 :  (*arg0)(arg1);
     979          12 : }
     980             : 
     981             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_freeze_3_13 */
     982             : void ldv_pm_ops_scenario_freeze_3_13(int (*arg0)(struct device *), struct device *arg1) {
     983           1 :  (*arg0)(arg1);
     984           1 : }
     985             : 
     986             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_freeze_noirq_3_11 */
     987             : void ldv_pm_ops_scenario_freeze_noirq_3_11(int (*arg0)(struct device *), struct device *arg1) {
     988           1 :  (*arg0)(arg1);
     989           1 : }
     990             : 
     991             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_poweroff_3_8 */
     992             : void ldv_pm_ops_scenario_poweroff_3_8(int (*arg0)(struct device *), struct device *arg1) {
     993           1 :  (*arg0)(arg1);
     994           1 : }
     995             : 
     996             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_poweroff_noirq_3_7 */
     997             : void ldv_pm_ops_scenario_poweroff_noirq_3_7(int (*arg0)(struct device *), struct device *arg1) {
     998           1 :  (*arg0)(arg1);
     999           1 : }
    1000             : 
    1001             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_prepare_3_19 */
    1002             : void ldv_pm_ops_scenario_prepare_3_19(int (*arg0)(struct device *), struct device *arg1) {
    1003           1 :  (*arg0)(arg1);
    1004           1 : }
    1005             : 
    1006             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_restore_3_4 */
    1007             : void ldv_pm_ops_scenario_restore_3_4(int (*arg0)(struct device *), struct device *arg1) {
    1008           3 :  (*arg0)(arg1);
    1009           3 : }
    1010             : 
    1011             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_restore_noirq_3_6 */
    1012             : void ldv_pm_ops_scenario_restore_noirq_3_6(int (*arg0)(struct device *), struct device *arg1) {
    1013           2 :  (*arg0)(arg1);
    1014           2 : }
    1015             : 
    1016             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_resume_3_14 */
    1017             : void ldv_pm_ops_scenario_resume_3_14(int (*arg0)(struct device *), struct device *arg1) {
    1018           3 :  (*arg0)(arg1);
    1019           3 : }
    1020             : 
    1021             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_resume_noirq_3_16 */
    1022             : void ldv_pm_ops_scenario_resume_noirq_3_16(int (*arg0)(struct device *), struct device *arg1) {
    1023           2 :  (*arg0)(arg1);
    1024           2 : }
    1025             : 
    1026             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_runtime_idle_3_24 */
    1027             : void ldv_pm_ops_scenario_runtime_idle_3_24(int (*arg0)(struct device *), struct device *arg1) {
    1028           1 :  (*arg0)(arg1);
    1029           1 : }
    1030             : 
    1031             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_runtime_resume_3_21 */
    1032             : void ldv_pm_ops_scenario_runtime_resume_3_21(int (*arg0)(struct device *), struct device *arg1) {
    1033           2 :  (*arg0)(arg1);
    1034           2 : }
    1035             : 
    1036             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_runtime_suspend_3_22 */
    1037             : void ldv_pm_ops_scenario_runtime_suspend_3_22(int (*arg0)(struct device *), struct device *arg1) {
    1038           1 :  (*arg0)(arg1);
    1039           1 : }
    1040             : 
    1041             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_suspend_3_18 */
    1042             : void ldv_pm_ops_scenario_suspend_3_18(int (*arg0)(struct device *), struct device *arg1) {
    1043           1 :  (*arg0)(arg1);
    1044           1 : }
    1045             : 
    1046             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_suspend_noirq_3_17 */
    1047             : void ldv_pm_ops_scenario_suspend_noirq_3_17(int (*arg0)(struct device *), struct device *arg1) {
    1048           1 :  (*arg0)(arg1);
    1049           1 : }
    1050             : 
    1051             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_thaw_3_9 */
    1052             : void ldv_pm_ops_scenario_thaw_3_9(int (*arg0)(struct device *), struct device *arg1) {
    1053           3 :  (*arg0)(arg1);
    1054           3 : }
    1055             : 
    1056             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_thaw_noirq_3_10 */
    1057             : void ldv_pm_ops_scenario_thaw_noirq_3_10(int (*arg0)(struct device *), struct device *arg1) {
    1058           2 :  (*arg0)(arg1);
    1059           2 : }
    1060             : 
    1061             : /* AUX_FUNC ldv_random_containerless_scenario_5 */
    1062             : void ldv_random_containerless_scenario_5(void *arg0) {
    1063             :  /* LDV {"thread": 5, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_bin_attribute)'", "function": "ldv_random_containerless_scenario_5"} */
    1064           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
    1065             :  ssize_t (*ldv_5_callback_read)(struct kobject *, struct bin_attribute *, char *, loff_t , size_t );
    1066           1 :  ssize_t (*ldv_5_callback_write)(struct kobject *, struct bin_attribute *, char *, loff_t , size_t );
    1067             :  struct bin_attribute *ldv_5_container_struct_bin_attribute;
    1068           1 :  struct kobject *ldv_5_container_struct_kobject_ptr;
    1069           1 :  char *ldv_5_ldv_param_10_2_default;
    1070           1 :  long long int ldv_5_ldv_param_10_3_default;
    1071           1 :  long unsigned int ldv_5_ldv_param_10_4_default;
    1072           1 :  char *ldv_5_ldv_param_4_2_default;
    1073           1 :  long long int ldv_5_ldv_param_4_3_default;
    1074           1 :  long unsigned int ldv_5_ldv_param_4_4_default;
    1075           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
    1076           1 :  /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_BIN_ATTRIBUTE callbacks invocations scenario."} */
    1077           3 :  ldv_free(arg0);
    1078           1 :  /* LDV {"action": "DEFAULT_REGISTER_11", "type": "RECEIVE_END"} */
    1079           1 : 
    1080           1 :  /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
    1081           4 :  ldv_5_container_struct_bin_attribute = ldv_xmalloc_unknown_size(0);
    1082           3 :  ldv_5_container_struct_kobject_ptr = ldv_xmalloc_unknown_size(0);
    1083             :  /* LDV {"action": "DEFAULT_ALLOC_11", "type": "CONDITION_END"} */
    1084             : 
    1085             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
    1086             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
    1087             : 
    1088             :  /* Jump to a subprocess 'call' initial state */
    1089           1 :  goto ldv_call_5;
    1090             :  /* End of the process */
    1091             :  return;
    1092           1 : 
    1093             :  /* Sbprocess call */
    1094             :  ldv_call_5:
    1095             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
    1096             : 
    1097           4 :  if (ldv_undef_int()) {
    1098             :   /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
    1099           3 :   ldv_5_ldv_param_4_2_default = ldv_xmalloc_unknown_size(0);
    1100             :   /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
    1101             : 
    1102           4 :   if (ldv_undef_int()) {
    1103             :    /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
    1104           3 :    ldv_5_ldv_param_10_2_default = ldv_xmalloc_unknown_size(0);
    1105             :    /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_END"} */
    1106             : 
    1107             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback write from bin_attribute."} */
    1108             :    /* LDV {"type": "CALLBACK", "call": "((& cmos_nvram_write))(ldv_5_container_struct_kobject_ptr, ldv_5_container_struct_bin_attribute, ldv_5_ldv_param_10_2_default, ldv_5_ldv_param_10_3_default, ldv_5_ldv_param_10_4_default);", "comment": "callback"} */
    1109           2 :    ldv_random_containerless_scenario_callback_5_10(ldv_5_callback_write, ldv_5_container_struct_kobject_ptr, ldv_5_container_struct_bin_attribute, ldv_5_ldv_param_10_2_default, ldv_5_ldv_param_10_3_default, ldv_5_ldv_param_10_4_default);
    1110             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1111             : 
    1112             :    /* LDV {"action": "POST_CALL_10", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
    1113           2 :    ldv_free(ldv_5_ldv_param_10_2_default);
    1114             :    /* LDV {"action": "POST_CALL_10", "type": "CONDITION_END"} */
    1115             : 
    1116             :   }
    1117             :   else {
    1118             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback read from bin_attribute."} */
    1119             :    /* LDV {"type": "CALLBACK", "call": "((& cmos_nvram_read))(ldv_5_container_struct_kobject_ptr, ldv_5_container_struct_bin_attribute, ldv_5_ldv_param_4_2_default, ldv_5_ldv_param_4_3_default, ldv_5_ldv_param_4_4_default);", "comment": "callback"} */
    1120           2 :    ldv_random_containerless_scenario_callback_5_4(ldv_5_callback_read, ldv_5_container_struct_kobject_ptr, ldv_5_container_struct_bin_attribute, ldv_5_ldv_param_4_2_default, ldv_5_ldv_param_4_3_default, ldv_5_ldv_param_4_4_default);
    1121             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1122             : 
    1123             :   }
    1124             :   /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
    1125           4 :   ldv_free(ldv_5_ldv_param_4_2_default);
    1126             :   /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
    1127             : 
    1128             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
    1129             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
    1130             : 
    1131             :   /* Jump to a subprocess 'call' initial state */
    1132           1 :   goto ldv_call_5;
    1133             :  }
    1134             :  else {
    1135             :   /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
    1136           2 :   ldv_free(ldv_5_container_struct_bin_attribute);
    1137           2 :   ldv_free(ldv_5_container_struct_kobject_ptr);
    1138             :   /* LDV {"action": "DEFAULT_FREE_11", "type": "CONDITION_END"} */
    1139             : 
    1140             :   /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_BIN_ATTRIBUTE callbacks invocations scenario."} */
    1141             :   /* Skip a non-replicative signal receiving */
    1142             :   /* LDV {"action": "DEFAULT_DEREGISTER_11", "type": "RECEIVE_END"} */
    1143             : 
    1144             :   /* Exit function at a terminal state */
    1145           1 :   return;
    1146             :  }
    1147             :  /* End of the subprocess 'call' */
    1148             :  return;
    1149             :  /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_bin_attribute)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_5"} */
    1150             : }
    1151             : 
    1152             : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_5_10 */
    1153             : void ldv_random_containerless_scenario_callback_5_10(ssize_t (*arg0)(struct kobject *, struct bin_attribute *, char *, loff_t , size_t ), struct kobject *arg1, struct bin_attribute *arg2, char *arg3, long long int arg4, long unsigned int arg5) {
    1154           4 :  ((& cmos_nvram_write))(arg1, arg2, arg3, arg4, arg5);
    1155           1 : }
    1156             : 
    1157             : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_5_4 */
    1158             : void ldv_random_containerless_scenario_callback_5_4(ssize_t (*arg0)(struct kobject *, struct bin_attribute *, char *, loff_t , size_t ), struct kobject *arg1, struct bin_attribute *arg2, char *arg3, long long int arg4, long unsigned int arg5) {
    1159           4 :  ((& cmos_nvram_read))(arg1, arg2, arg3, arg4, arg5);
    1160           1 : }
    1161             : 
    1162             : /* AUX_FUNC ldv_rtc_class_scenario_4 */
    1163             : void ldv_rtc_class_scenario_4(void *arg0) {
    1164             :  /* LDV {"thread": 4, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'rtc_class_scenario(rtc)'", "function": "ldv_rtc_class_scenario_4"} */
    1165           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
    1166           1 :  int (*ldv_4_callback_alarm_irq_enable)(struct device *, unsigned int);
    1167           1 :  int (*ldv_4_callback_irq_set_freq)(struct device *, int);
    1168           1 :  int (*ldv_4_callback_irq_set_state)(struct device *, int);
    1169           1 :  int (*ldv_4_callback_read_alarm)(struct device *, struct rtc_wkalrm *);
    1170           1 :  int (*ldv_4_callback_read_time)(struct device *, struct rtc_time *);
    1171           1 :  int (*ldv_4_callback_set_alarm)(struct device *, struct rtc_wkalrm *);
    1172           1 :  int (*ldv_4_callback_set_time)(struct device *, struct rtc_time *);
    1173           1 :  int (*ldv_4_callback_update_irq_enable)(struct device *, unsigned int);
    1174           1 :  struct device *ldv_4_device_device;
    1175           1 :  struct rtc_time *ldv_4_device_struct_rtc_time_ptr;
    1176           1 :  struct rtc_wkalrm *ldv_4_device_struct_rtc_wkalrm_ptr;
    1177           1 :  int ldv_4_ldv_param_15_1_default;
    1178           1 :  int ldv_4_ldv_param_18_1_default;
    1179           1 :  unsigned int ldv_4_ldv_param_25_1_default;
    1180           1 :  unsigned int ldv_4_ldv_param_4_1_default;
    1181           1 :  int ldv_4_ret_default;
    1182           1 :  struct rtc_class_ops *ldv_4_rtc_class_ops_rtc_class_ops;
    1183           1 :  struct rtc_device *ldv_4_rtc_device_rtc_device;
    1184           1 :  /* Received labels */
    1185           2 :  struct ldv_struct_rtc_class_scenario_4 *data = (struct ldv_struct_rtc_class_scenario_4*) arg0;
    1186           1 : 
    1187           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
    1188             :  /* Initialize automaton variables */
    1189           1 :  ldv_4_ret_default = 1;
    1190             :  /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin RTC callbacks invocations scenario."} */
    1191             :  /* Assign recieved labels */
    1192           2 :  if (data) {
    1193           1 :   ldv_4_rtc_device_rtc_device = data->arg0;
    1194           1 :   ldv_4_rtc_class_ops_rtc_class_ops = data->arg1;
    1195           1 :   ldv_4_device_device = data->arg2;
    1196           2 :   ldv_free(data);
    1197             :  }
    1198             :  /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
    1199             : 
    1200             :  /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "The RTC device is inserted in the system."} */
    1201             :  /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
    1202             : 
    1203             :  /* Jump to a subprocess 'main' initial state */
    1204           2 :  goto ldv_main_4;
    1205             :  /* End of the process */
    1206             :  return;
    1207           1 : 
    1208             :  /* Sbprocess main */
    1209             :  ldv_main_4:
    1210             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
    1211             : 
    1212           4 :  if (ldv_undef_int()) {
    1213             :   /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Probe a new RTC device. Invoke callback probe from RTC."} */
    1214             :   /* Callback pre-call */
    1215           1 :   ldv_pre_probe();
    1216           3 :   if (ldv_4_rtc_class_ops_rtc_class_ops->open) {
    1217             :   /* LDV {"type": "CALLBACK", "call": "ldv_4_ret_default = (ldv_4_rtc_class_ops_rtc_class_ops->open)(ldv_4_device_device);", "comment": "probe"} */
    1218           2 :    ldv_4_ret_default = ldv_rtc_class_scenario_probe_4_10(ldv_4_rtc_class_ops_rtc_class_ops->open, ldv_4_device_device);
    1219             :   }
    1220             :   /* Callback post-call */
    1221           4 :   ldv_4_ret_default = ldv_post_probe(ldv_4_ret_default);
    1222             :   /* LDV {"action": "PROBE", "type": "CALL_END"} */
    1223             : 
    1224           4 :   if (ldv_undef_int()) {
    1225             :    /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_BEGIN", "comment": "The RTC device has been successfully probed."} */
    1226           2 :    ldv_assume(ldv_4_ret_default == 0);
    1227             :    /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_END"} */
    1228             : 
    1229             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "The RTC device is probed."} */
    1230             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
    1231             : 
    1232             :    /* Jump to a subprocess 'call' initial state */
    1233           1 :    goto ldv_call_4;
    1234             :   }
    1235             :   else {
    1236             :    /* LDV {"action": "PROBE_FAILED", "type": "CONDITION_BEGIN", "comment": "Failed to probe the RTC device."} */
    1237           2 :    ldv_assume(ldv_4_ret_default != 0);
    1238             :    /* LDV {"action": "PROBE_FAILED", "type": "CONDITION_END"} */
    1239             : 
    1240             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "The RTC device is inserted in the system."} */
    1241             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
    1242             : 
    1243             :    /* Jump to a subprocess 'main' initial state */
    1244           1 :    goto ldv_main_4;
    1245             :   }
    1246             :  }
    1247             :  else {
    1248             :   /* LDV {"action": "DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Finish RTC callbacks invocations scenario."} */
    1249             :   /* Skip a non-replicative signal receiving */
    1250             :   /* LDV {"action": "DEREGISTER", "type": "RECEIVE_END"} */
    1251             : 
    1252             :   /* Exit function at a terminal state */
    1253           1 :   return;
    1254             :  }
    1255             :  /* End of the subprocess 'main' */
    1256             :  return;
    1257           1 : 
    1258             :  /* Sbprocess call */
    1259             :  ldv_call_4:
    1260             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
    1261             : 
    1262           4 :  if (ldv_undef_int()) {
    1263             :   /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback release from RTC."} */
    1264           3 :   if (ldv_4_rtc_class_ops_rtc_class_ops->release) {
    1265             :   /* LDV {"type": "CALLBACK", "call": "(ldv_4_rtc_class_ops_rtc_class_ops->release)(ldv_4_device_device);", "comment": "release"} */
    1266           2 :    ldv_rtc_class_scenario_release_4_2(ldv_4_rtc_class_ops_rtc_class_ops->release, ldv_4_device_device);
    1267             :   }
    1268             :   /* LDV {"action": "RELEASE", "type": "CALL_END"} */
    1269             : 
    1270             :   /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "The RTC device is inserted in the system."} */
    1271             :   /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
    1272             : 
    1273             :   /* Jump to a subprocess 'main' initial state */
    1274           2 :   goto ldv_main_4;
    1275             :  }
    1276             :  else {
    1277             :   /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
    1278             :   /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
    1279             : 
    1280           2 :   switch (ldv_undef_int()) {
    1281           3 :    case 1: {
    1282             :     /* LDV {"action": "PRE_CALL_25", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
    1283             :     /* LDV {"action": "PRE_CALL_25", "type": "CONDITION_END"} */
    1284             : 
    1285             :     /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback update_irq_enable from rtc_class_ops."} */
    1286             :     /* LDV {"type": "CALLBACK", "call": "((& cmos_update_irq_enable))(ldv_4_device_device, ldv_4_ldv_param_25_1_default);", "comment": "callback"} */
    1287           2 :     ldv_rtc_class_scenario_callback_4_25(ldv_4_callback_update_irq_enable, ldv_4_device_device, ldv_4_ldv_param_25_1_default);
    1288             :     /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1289             : 
    1290             :     /* LDV {"action": "POST_CALL_25", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
    1291             :     /* LDV {"action": "POST_CALL_25", "type": "CONDITION_END"} */
    1292             : 
    1293           1 :     break;
    1294           1 :    }
    1295           3 :    case 2: {
    1296             :     /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback set_time from rtc_class_ops."} */
    1297             :     /* LDV {"type": "CALLBACK", "call": "((& cmos_set_time))(ldv_4_device_device, ldv_4_device_struct_rtc_time_ptr);", "comment": "callback"} */
    1298           2 :     ldv_rtc_class_scenario_callback_4_24(ldv_4_callback_set_time, ldv_4_device_device, ldv_4_device_struct_rtc_time_ptr);
    1299             :     /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1300             : 
    1301           1 :     break;
    1302           1 :    }
    1303           3 :    case 3: {
    1304             :     /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback set_alarm from rtc_class_ops."} */
    1305             :     /* LDV {"type": "CALLBACK", "call": "((& cmos_set_alarm))(ldv_4_device_device, ldv_4_device_struct_rtc_wkalrm_ptr);", "comment": "callback"} */
    1306           2 :     ldv_rtc_class_scenario_callback_4_23(ldv_4_callback_set_alarm, ldv_4_device_device, ldv_4_device_struct_rtc_wkalrm_ptr);
    1307             :     /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1308             : 
    1309           1 :     break;
    1310           1 :    }
    1311           3 :    case 4: {
    1312             :     /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback read_time from rtc_class_ops."} */
    1313             :     /* LDV {"type": "CALLBACK", "call": "((& cmos_read_time))(ldv_4_device_device, ldv_4_device_struct_rtc_time_ptr);", "comment": "callback"} */
    1314           2 :     ldv_rtc_class_scenario_callback_4_22(ldv_4_callback_read_time, ldv_4_device_device, ldv_4_device_struct_rtc_time_ptr);
    1315             :     /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1316             : 
    1317           1 :     break;
    1318           1 :    }
    1319           3 :    case 5: {
    1320             :     /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback read_alarm from rtc_class_ops."} */
    1321             :     /* LDV {"type": "CALLBACK", "call": "((& cmos_read_alarm))(ldv_4_device_device, ldv_4_device_struct_rtc_wkalrm_ptr);", "comment": "callback"} */
    1322           2 :     ldv_rtc_class_scenario_callback_4_21(ldv_4_callback_read_alarm, ldv_4_device_device, ldv_4_device_struct_rtc_wkalrm_ptr);
    1323             :     /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1324             : 
    1325           1 :     break;
    1326           1 :    }
    1327           3 :    case 6: {
    1328             :     /* LDV {"action": "PRE_CALL_18", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
    1329             :     /* LDV {"action": "PRE_CALL_18", "type": "CONDITION_END"} */
    1330             : 
    1331             :     /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback irq_set_state from rtc_class_ops."} */
    1332             :     /* LDV {"type": "CALLBACK", "call": "((& cmos_irq_set_state))(ldv_4_device_device, ldv_4_ldv_param_18_1_default);", "comment": "callback"} */
    1333           2 :     ldv_rtc_class_scenario_callback_4_18(ldv_4_callback_irq_set_state, ldv_4_device_device, ldv_4_ldv_param_18_1_default);
    1334             :     /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1335             : 
    1336             :     /* LDV {"action": "POST_CALL_18", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
    1337             :     /* LDV {"action": "POST_CALL_18", "type": "CONDITION_END"} */
    1338             : 
    1339           1 :     break;
    1340           1 :    }
    1341           3 :    case 7: {
    1342             :     /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
    1343             :     /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_END"} */
    1344             : 
    1345             :     /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback irq_set_freq from rtc_class_ops."} */
    1346             :     /* LDV {"type": "CALLBACK", "call": "((& cmos_irq_set_freq))(ldv_4_device_device, ldv_4_ldv_param_15_1_default);", "comment": "callback"} */
    1347           2 :     ldv_rtc_class_scenario_callback_4_15(ldv_4_callback_irq_set_freq, ldv_4_device_device, ldv_4_ldv_param_15_1_default);
    1348             :     /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1349             : 
    1350             :     /* LDV {"action": "POST_CALL_15", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
    1351             :     /* LDV {"action": "POST_CALL_15", "type": "CONDITION_END"} */
    1352             : 
    1353           1 :     break;
    1354           1 :    }
    1355           3 :    case 8: {
    1356             :     /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback alarm_irq_enable from rtc_class_ops."} */
    1357             :     /* LDV {"type": "CALLBACK", "call": "((& cmos_alarm_irq_enable))(ldv_4_device_device, ldv_4_ldv_param_4_1_default);", "comment": "callback"} */
    1358           2 :     ldv_rtc_class_scenario_callback_4_4(ldv_4_callback_alarm_irq_enable, ldv_4_device_device, ldv_4_ldv_param_4_1_default);
    1359             :     /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1360             : 
    1361           1 :     break;
    1362           1 :    }
    1363           2 :    default: ldv_stop();
    1364           1 :   }
    1365           0 :  }
    1366             :  /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
    1367           0 :  /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
    1368             : 
    1369             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "The RTC device is probed."} */
    1370             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
    1371             : 
    1372             :  /* Jump to a subprocess 'call' initial state */
    1373           8 :  goto ldv_call_4;
    1374             :  /* End of the subprocess 'call' */
    1375             :  return;
    1376             :  /* LDV {"comment": "End of control function based on process 'rtc_class_scenario(rtc)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_rtc_class_scenario_4"} */
    1377             : }
    1378             : 
    1379             : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_callback_4_15 */
    1380             : void ldv_rtc_class_scenario_callback_4_15(int (*arg0)(struct device *, int), struct device *arg1, int arg2) {
    1381           5 :  ((& cmos_irq_set_freq))(arg1, arg2);
    1382           1 : }
    1383             : 
    1384             : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_callback_4_18 */
    1385             : void ldv_rtc_class_scenario_callback_4_18(int (*arg0)(struct device *, int), struct device *arg1, int arg2) {
    1386           3 :  ((& cmos_irq_set_state))(arg1, arg2);
    1387           1 : }
    1388             : 
    1389             : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_callback_4_21 */
    1390             : void ldv_rtc_class_scenario_callback_4_21(int (*arg0)(struct device *, struct rtc_wkalrm *), struct device *arg1, struct rtc_wkalrm *arg2) {
    1391           3 :  ((& cmos_read_alarm))(arg1, arg2);
    1392           1 : }
    1393             : 
    1394             : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_callback_4_22 */
    1395             : void ldv_rtc_class_scenario_callback_4_22(int (*arg0)(struct device *, struct rtc_time *), struct device *arg1, struct rtc_time *arg2) {
    1396           2 :  ((& cmos_read_time))(arg1, arg2);
    1397           1 : }
    1398             : 
    1399             : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_callback_4_23 */
    1400             : void ldv_rtc_class_scenario_callback_4_23(int (*arg0)(struct device *, struct rtc_wkalrm *), struct device *arg1, struct rtc_wkalrm *arg2) {
    1401           3 :  ((& cmos_set_alarm))(arg1, arg2);
    1402           1 : }
    1403             : 
    1404             : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_callback_4_24 */
    1405             : void ldv_rtc_class_scenario_callback_4_24(int (*arg0)(struct device *, struct rtc_time *), struct device *arg1, struct rtc_time *arg2) {
    1406           2 :  ((& cmos_set_time))(arg1, arg2);
    1407           1 : }
    1408             : 
    1409             : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_callback_4_25 */
    1410             : void ldv_rtc_class_scenario_callback_4_25(int (*arg0)(struct device *, unsigned int), struct device *arg1, unsigned int arg2) {
    1411           3 :  ((& cmos_update_irq_enable))(arg1, arg2);
    1412           1 : }
    1413             : 
    1414             : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_callback_4_4 */
    1415             : void ldv_rtc_class_scenario_callback_4_4(int (*arg0)(struct device *, unsigned int), struct device *arg1, unsigned int arg2) {
    1416           3 :  ((& cmos_alarm_irq_enable))(arg1, arg2);
    1417           1 : }
    1418             : 
    1419             : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_probe_4_10 */
    1420             : int ldv_rtc_class_scenario_probe_4_10(int (*arg0)(struct device *), struct device *arg1) {
    1421           2 :  return (*arg0)(arg1);
    1422           1 : }
    1423             : 
    1424             : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_release_4_2 */
    1425             : void ldv_rtc_class_scenario_release_4_2(void (*arg0)(struct device *), struct device *arg1) {
    1426           1 :  (*arg0)(arg1);
    1427           1 : }
    1428             : 
    1429             : /* AUX_FUNC main */
    1430             : int main() {
    1431           1 :  ldv_main_13(0);
    1432           0 :  return 0;
    1433             : }
    1434             : 
    1435             : 
    1436             : /* AUX_FUNC  ERR_PTR */
    1437             : static inline void *ERR_PTR (long int error)
    1438             : {
    1439             : 
    1440             :  return ldv_err_ptr(error);
    1441             : }
    1442             : 
    1443             : /* AUX_FUNC  PTR_ERR */
    1444             : static inline long int PTR_ERR (void const *ptr)
    1445             : {
    1446           1 : 
    1447           3 :  return ldv_ptr_err(ptr);
    1448             : }
    1449             : 
    1450             : /* AUX_FUNC  IS_ERR */
    1451             : static inline long int IS_ERR (void const *ptr)
    1452             : {
    1453           1 : 
    1454           3 :  return ldv_is_err(ptr);
    1455             : }
    1456             : 
    1457             : /* AUX_FUNC  IS_ERR_OR_NULL */
    1458             : static inline long int IS_ERR_OR_NULL (void const *ptr)
    1459             : {
    1460             : 
    1461             :  return ldv_is_err_or_null(ptr);
    1462             : }
    1463             : 
    1464             : /* AUX_FUNC  kzalloc */
    1465             : static inline void *kzalloc (size_t size, gfp_t flags)
    1466             : {
    1467             : 
    1468             :  return ldv_kzalloc(size, flags);
    1469             : }
    1470             : 
    1471             : /* AUX_FUNC  ldv_dev_get_drvdata_6 */
    1472             : void *ldv_dev_get_drvdata_6 (struct device const *dev)
    1473             : {
    1474           1 : 
    1475           3 :  return ldv_dev_get_drvdata(dev);
    1476             : }
    1477             : 
    1478             : /* AUX_FUNC  ldv_dev_get_drvdata_7 */
    1479             : void *ldv_dev_get_drvdata_7 (struct device const *dev)
    1480             : {
    1481           1 : 
    1482           3 :  return ldv_dev_get_drvdata(dev);
    1483             : }
    1484             : 
    1485             : /* AUX_FUNC  ldv_dev_get_drvdata_8 */
    1486             : void *ldv_dev_get_drvdata_8 (struct device const *dev)
    1487             : {
    1488           1 : 
    1489           3 :  return ldv_dev_get_drvdata(dev);
    1490             : }
    1491             : 
    1492             : /* AUX_FUNC  ldv_dev_get_drvdata_9 */
    1493             : void *ldv_dev_get_drvdata_9 (struct device const *dev)
    1494             : {
    1495           1 : 
    1496           3 :  return ldv_dev_get_drvdata(dev);
    1497             : }
    1498             : 
    1499             : /* AUX_FUNC  ldv_dev_get_drvdata_10 */
    1500             : void *ldv_dev_get_drvdata_10 (struct device const *dev)
    1501             : {
    1502           1 : 
    1503           3 :  return ldv_dev_get_drvdata(dev);
    1504             : }
    1505             : 
    1506             : /* AUX_FUNC  ldv_dev_get_drvdata_11 */
    1507             : void *ldv_dev_get_drvdata_11 (struct device const *dev)
    1508             : {
    1509           1 : 
    1510           3 :  return ldv_dev_get_drvdata(dev);
    1511             : }
    1512             : 
    1513             : /* AUX_FUNC  ldv_dev_get_drvdata_12 */
    1514             : void *ldv_dev_get_drvdata_12 (struct device const *dev)
    1515             : {
    1516           1 : 
    1517           3 :  return ldv_dev_get_drvdata(dev);
    1518             : }
    1519             : 
    1520             : /* AUX_FUNC  ldv_rtc_device_register_13 */
    1521             : struct rtc_device *ldv_rtc_device_register_13 (char const *ldv_func_arg1, struct device *ldv_func_arg2, struct rtc_class_ops const *ldv_func_arg3, struct module *ldv_func_arg4)
    1522             : {
    1523             : 
    1524             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'rtc_device_register'"} */
    1525           4 :  return ldv_emg_rtc_device_register(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4);
    1526           1 : }
    1527             : 
    1528             : /* AUX_FUNC  ldv_request_irq_14 */
    1529             : static inline int ldv_request_irq_14 (unsigned int irq, irqreturn_t (*handler)(int, void *), long unsigned int flags, char const *name, void *dev)
    1530             : {
    1531             : 
    1532             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'request_irq'"} */
    1533           8 :  return ldv_emg_request_irq(irq, handler, flags, name, dev);
    1534           2 : }
    1535             : 
    1536             : /* AUX_FUNC  ldv_free_irq_15 */
    1537             : void ldv_free_irq_15 (unsigned int ldv_func_arg1, void *ldv_func_arg2)
    1538             : {
    1539             : 
    1540             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'free_irq'"} */
    1541           6 :  ldv_emg_free_irq(ldv_func_arg1, ldv_func_arg2);
    1542           3 : }
    1543             : 
    1544             : /* AUX_FUNC  ldv_rtc_device_unregister_16 */
    1545             : void ldv_rtc_device_unregister_16 (struct rtc_device *ldv_func_arg1)
    1546             : {
    1547             : 
    1548             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'rtc_device_unregister'"} */
    1549           8 :  ldv_emg_rtc_device_unregister(ldv_func_arg1);
    1550           4 : }
    1551             : 
    1552             : /* AUX_FUNC  ldv_dev_get_drvdata_17 */
    1553             : void *ldv_dev_get_drvdata_17 (struct device const *dev)
    1554             : {
    1555             : 
    1556             :  return ldv_dev_get_drvdata(dev);
    1557             : }
    1558             : 
    1559             : /* AUX_FUNC  ldv_free_irq_18 */
    1560             : void ldv_free_irq_18 (unsigned int ldv_func_arg1, void *ldv_func_arg2)
    1561             : {
    1562             : 
    1563             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'free_irq'"} */
    1564             :  ldv_emg_free_irq(ldv_func_arg1, ldv_func_arg2);
    1565             : }
    1566             : 
    1567             : /* AUX_FUNC  ldv_rtc_device_unregister_19 */
    1568             : void ldv_rtc_device_unregister_19 (struct rtc_device *ldv_func_arg1)
    1569             : {
    1570             : 
    1571             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'rtc_device_unregister'"} */
    1572             :  ldv_emg_rtc_device_unregister(ldv_func_arg1);
    1573             : }
    1574             : 
    1575             : /* AUX_FUNC  ldv_platform_driver_probe_20 */
    1576             : int ldv_platform_driver_probe_20 (struct platform_driver *ldv_func_arg1, int (*ldv_func_arg2)(struct platform_device *))
    1577             : {
    1578           1 : 
    1579             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'platform_driver_probe'"} */
    1580           4 :  return ldv_emg_platform_driver_probe(ldv_func_arg1, ldv_func_arg2);
    1581             : }
    1582             : 
    1583             : /* AUX_FUNC  ldv_platform_driver_unregister_21 */
    1584             : void ldv_platform_driver_unregister_21 (struct platform_driver *ldv_func_arg1)
    1585             : {
    1586             : 
    1587             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'platform_driver_unregister'"} */
    1588           4 :  ldv_emg_platform_driver_unregister(ldv_func_arg1);
    1589           2 : }

Generated by: LCOV version 1.10