@@ -68,7 +68,7 @@ register!(NV_PFB_PRI_MMU_LOCAL_MEMORY_RANGE @ 0x00100ce0 {
6868impl NV_PFB_PRI_MMU_LOCAL_MEMORY_RANGE {
6969 /// Returns the usable framebuffer size, in bytes.
7070 pub ( crate ) fn usable_fb_size ( self ) -> u64 {
71- let size = ( ( self . lower_mag ( ) as u64 ) << ( self . lower_scale ( ) as u64 ) )
71+ let size = ( u64 :: from ( self . lower_mag ( ) ) << u64 :: from ( self . lower_scale ( ) ) )
7272 * kernel:: sizes:: SZ_1M as u64 ;
7373
7474 if self . ecc_mode_enabled ( ) {
@@ -87,7 +87,7 @@ register!(NV_PFB_PRI_MMU_WPR2_ADDR_LO@0x001fa824 {
8787impl NV_PFB_PRI_MMU_WPR2_ADDR_LO {
8888 /// Returns the lower (inclusive) bound of the WPR2 region.
8989 pub ( crate ) fn lower_bound ( self ) -> u64 {
90- ( self . lo_val ( ) as u64 ) << 12
90+ u64 :: from ( self . lo_val ( ) ) << 12
9191 }
9292}
9393
@@ -100,7 +100,7 @@ impl NV_PFB_PRI_MMU_WPR2_ADDR_HI {
100100 ///
101101 /// A value of zero means the WPR2 region is not set.
102102 pub ( crate ) fn higher_bound ( self ) -> u64 {
103- ( self . hi_val ( ) as u64 ) << 12
103+ u64 :: from ( self . hi_val ( ) ) << 12
104104 }
105105}
106106
@@ -158,7 +158,7 @@ impl NV_PDISP_VGA_WORKSPACE_BASE {
158158 /// Returns the base address of the VGA workspace, or `None` if none exists.
159159 pub ( crate ) fn vga_workspace_addr ( self ) -> Option < u64 > {
160160 if self . status_valid ( ) {
161- Some ( ( self . addr ( ) as u64 ) << 16 )
161+ Some ( u64 :: from ( self . addr ( ) ) << 16 )
162162 } else {
163163 None
164164 }
0 commit comments