Skip to content
  • Amit Sharma's avatar
    media: platform: tegra: Fix sparse cast warning · 0af8c522
    Amit Sharma authored
    
    
    Fixed the follwoing sparse warning:
    warning: cast from pointer to integer
                 of different size [-Wpointer-to-int-cast]
    
    Sparse reports this warning because 'struct regulator*' pointer
    was typecasted to 'int' to print the values in function 'dev_err()'.
    This could create problem, since pointers size is different from
    the integer size. Therefore, fix this issue by using the "%p" format
    specifier instead of "%d" in function 'dev_err()' and removed the
    typecast. This will also make the code portable.
    
    Bug 200032218
    
    Change-Id: I02e56d25fc886cc4af31862bada7411efb70d10e
    Signed-off-by: default avatarAmit Sharma <amisharma@nvidia.com>
    Reviewed-on: http://git-master/r/559762
    
    
    Reviewed-by: Automatic_Commit_Validation_User
    GVS: Gerrit_Virtual_Submit
    Reviewed-by: default avatarShridhar Rasal <srasal@nvidia.com>
    Reviewed-by: default avatarSachin Nikam <snikam@nvidia.com>
    0af8c522