]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
tegra: fuse: fix sparse warnings
authorShardar Shariff Md <smohammed@nvidia.com>
Sat, 1 Nov 2014 11:12:32 +0000 (16:42 +0530)
committerSachin Nikam <snikam@nvidia.com>
Mon, 3 Nov 2014 13:02:40 +0000 (05:02 -0800)
fix sparse warnings by declaring local
variables/functions as static

Bug 200032218

Change-Id: I05bc738f30d8571116f1e8bee7108aa11d8d3b55
Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com>
Reviewed-on: http://git-master/r/592314
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
drivers/misc/tegra-fuse/tegra21x_fuse_offsets.h
drivers/misc/tegra-fuse/tegra_fuse.c

index 0f9613372f045f9f4c04cb4c2a6513b2723eb6a7..d9e03467601599732b2eb0c93cc882f1a10e6c22 100644 (file)
@@ -347,7 +347,7 @@ static int fuse_override_option_regs(u32 *patch_buff, u32 num_entries)
        return 0;
 }
 
-int tegra_fuse_override_chip_option_regs(void)
+static int tegra_fuse_override_chip_option_regs(void)
 {
        u32 patch_record_size, patch_start_addr;
        u32 patch_header, num_cam_entries;
@@ -454,11 +454,11 @@ static inline int fuse_get_gpcpll_adc_intercept_uv(u32 val)
        return ((val >> 4) & 0x3ff) * 1000 + ((val >> 0) & 0xf) * 100;
 }
 
-DEVICE_ATTR(public_key, 0440, tegra_fuse_show, tegra_fuse_store);
-DEVICE_ATTR(pkc_disable, 0440, tegra_fuse_show, tegra_fuse_store);
-DEVICE_ATTR(odm_lock, 0440, tegra_fuse_show, tegra_fuse_store);
+static DEVICE_ATTR(public_key, 0440, tegra_fuse_show, tegra_fuse_store);
+static DEVICE_ATTR(pkc_disable, 0440, tegra_fuse_show, tegra_fuse_store);
+static DEVICE_ATTR(odm_lock, 0440, tegra_fuse_show, tegra_fuse_store);
 
-int tegra_fuse_add_sysfs_variables(struct platform_device *pdev,
+static int tegra_fuse_add_sysfs_variables(struct platform_device *pdev,
                                        bool odm_security_mode)
 {
        dev_attr_odm_lock.attr.mode = 0640;
@@ -479,7 +479,7 @@ int tegra_fuse_add_sysfs_variables(struct platform_device *pdev,
        return 0;
 }
 
-int tegra_fuse_rm_sysfs_variables(struct platform_device *pdev)
+static int tegra_fuse_rm_sysfs_variables(struct platform_device *pdev)
 {
        sysfs_remove_file(&pdev->dev.kobj, &dev_attr_public_key.attr);
        sysfs_remove_file(&pdev->dev.kobj, &dev_attr_pkc_disable.attr);
@@ -488,7 +488,7 @@ int tegra_fuse_rm_sysfs_variables(struct platform_device *pdev)
        return 0;
 }
 
-int tegra_fuse_ch_sysfs_perm(struct device *dev, struct kobject *kobj)
+static int tegra_fuse_ch_sysfs_perm(struct device *dev, struct kobject *kobj)
 {
        CHK_ERR(dev, sysfs_chmod_file(kobj,
                                &dev_attr_public_key.attr, 0440));
index 76c297a63d167018952e38fcb2eb91b1e964e70e..6176b423cf3eafbeb7907cdfce551327145ef81c 100644 (file)
 #include "tegra21x_fuse_offsets.h"
 #endif
 
-DEVICE_ATTR(device_key, 0440, tegra_fuse_show, tegra_fuse_store);
-DEVICE_ATTR(jtag_disable, 0440, tegra_fuse_show, tegra_fuse_store);
-DEVICE_ATTR(odm_production_mode, 0440, tegra_fuse_show, tegra_fuse_store);
-DEVICE_ATTR(sec_boot_dev_cfg, 0440, tegra_fuse_show, tegra_fuse_store);
-DEVICE_ATTR(sec_boot_dev_sel, 0440, tegra_fuse_show, tegra_fuse_store);
-DEVICE_ATTR(secure_boot_key, 0440, tegra_fuse_show, tegra_fuse_store);
-DEVICE_ATTR(sw_reserved, 0440, tegra_fuse_show, tegra_fuse_store);
-DEVICE_ATTR(ignore_dev_sel_straps, 0440, tegra_fuse_show, tegra_fuse_store);
-DEVICE_ATTR(odm_reserved, 0440, tegra_fuse_show, tegra_fuse_store);
+static DEVICE_ATTR(device_key, 0440, tegra_fuse_show, tegra_fuse_store);
+static DEVICE_ATTR(jtag_disable, 0440, tegra_fuse_show, tegra_fuse_store);
+static DEVICE_ATTR(odm_production_mode, 0440, tegra_fuse_show,
+               tegra_fuse_store);
+static DEVICE_ATTR(sec_boot_dev_cfg, 0440, tegra_fuse_show, tegra_fuse_store);
+static DEVICE_ATTR(sec_boot_dev_sel, 0440, tegra_fuse_show, tegra_fuse_store);
+static DEVICE_ATTR(secure_boot_key, 0440, tegra_fuse_show, tegra_fuse_store);
+static DEVICE_ATTR(sw_reserved, 0440, tegra_fuse_show, tegra_fuse_store);
+static DEVICE_ATTR(ignore_dev_sel_straps, 0440, tegra_fuse_show,
+               tegra_fuse_store);
+static DEVICE_ATTR(odm_reserved, 0440, tegra_fuse_show, tegra_fuse_store);
 #ifdef CONFIG_AID_FUSE
-DEVICE_ATTR(aid, 0444, tegra_fuse_show, NULL);
+static DEVICE_ATTR(aid, 0444, tegra_fuse_show, NULL);
 #endif
 
 #define MINOR_QT               0
@@ -139,7 +141,7 @@ struct param_info {
        char sysfs_name[FUSE_NAME_LEN];
 };
 
-DEFINE_MUTEX(fuse_lock);
+static DEFINE_MUTEX(fuse_lock);
 
 static enum tegra_platform tegra_platform;
 static bool cpu_is_asim;