@@ -578,7 +578,7 @@ static rt_err_t nvme_blk_sync(struct rt_blk_disk *disk)
578578
579579static rt_err_t nvme_blk_erase (struct rt_blk_disk * disk )
580580{
581- rt_err_t err ;
581+ rt_err_t err = RT_EOK ;
582582 rt_ssize_t slba , lbas , max_lbas ;
583583 struct rt_nvme_command cmd ;
584584 struct rt_nvme_device * ndev = rt_disk_to_nvme_device (disk );
@@ -955,7 +955,7 @@ static rt_err_t nvme_setup_io_queues(struct rt_nvme_controller *nvme)
955955 int irq , cpuid = 0 ;
956956 char name [RT_NAME_MAX ];
957957 rt_bool_t affinity_fixup = RT_FALSE ;
958- RT_DECLARE_IRQ_AFFINITY (affinity ) = { 0 };
958+ RT_IRQ_AFFINITY_DECLARE (affinity ) = { 0 };
959959 struct rt_nvme_queue * queue ;
960960
961961 nvme -> io_queue_max = nvme -> irqs_nr > 1 ? nvme -> irqs_nr - 1 : 1 ;
@@ -1052,7 +1052,7 @@ static void nvme_remove_devices(struct rt_nvme_controller *nvme)
10521052static rt_err_t nvme_scan_device (struct rt_nvme_controller * nvme ,
10531053 rt_size_t number_of_ns )
10541054{
1055- rt_err_t err ;
1055+ rt_err_t err = RT_EOK ;
10561056 rt_uint32_t lbaf ;
10571057 struct rt_nvme_id_ns * id = RT_NULL ;
10581058
@@ -1272,8 +1272,8 @@ static int nvme_queue_affinify_fixup(void)
12721272{
12731273 int cpuid = rt_hw_cpu_id ();
12741274 struct rt_nvme_controller * nvme ;
1275- RT_DECLARE_IRQ_AFFINITY (affinity ) = { 0 };
1276- RT_DECLARE_IRQ_AFFINITY (current_affinity ) = { 0 };
1275+ RT_IRQ_AFFINITY_DECLARE (affinity ) = { 0 };
1276+ RT_IRQ_AFFINITY_DECLARE (current_affinity ) = { 0 };
12771277
12781278 RT_IRQ_AFFINITY_SET (affinity , cpuid );
12791279
0 commit comments