arm: tegra: resolve compilation time warnings
Sanjay Singh Rawat [Mon, 16 Apr 2012 13:03:26 +0000 (18:03 +0530)]
Bug 949219

Change-Id: I875f8688a272c415ebf345b8f30e4afdf7551b29
Signed-off-by: Sanjay Singh Rawat <srawat@nvidia.com>
Reviewed-on: http://git-master/r/91523
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

arch/arm/mach-tegra/baseband-xmm-power.c
arch/arm/mach-tegra/board-cardhu-power.c
arch/arm/mach-tegra/board-enterprise-panel.c
arch/arm/mach-tegra/board-kai-sensors.c
arch/arm/mach-tegra/board-touch-raydium_spi.c
arch/arm/mach-tegra/board.h
arch/arm/mach-tegra/common.c
arch/arm/mach-tegra/iovmm-smmu.c
arch/arm/mach-tegra/tegra3_thermal.c
arch/arm/mach-tegra/usb_phy.c

index 2d41abc..13210bd 100644 (file)
@@ -217,8 +217,8 @@ static int baseband_xmm_power_on(struct platform_device *device)
        else
                ipc_ap_wake_state = IPC_AP_WAKE_INIT2;
 
-       pr_debug("%s wake_st(%d) modem version %d\n", __func__,
-                                       ipc_ap_wake_state, modem_ver);
+       pr_debug("%s wake_st(%d) modem version %lu\n", __func__,
+                               ipc_ap_wake_state, modem_ver);
 
        /* register usb host controller */
        if (!modem_flash) {
index 96ad7f2..237f4b8 100644 (file)
@@ -1151,17 +1151,6 @@ int __init cardhu_suspend_init(void)
        return 0;
 }
 
-static struct tegra_tsensor_pmu_data  tpdata = {
-       .poweroff_reg_addr = 0x3F,
-       .poweroff_reg_data = 0x80,
-       .reset_tegra = 1,
-       .controller_type = 0,
-       .i2c_controller_id = 4,
-       .pinmux = 0,
-       .pmu_16bit_ops = 0,
-       .pmu_i2c_addr = 0x2D,
-};
-
 #ifdef CONFIG_TEGRA_EDP_LIMITS
 
 int __init cardhu_edp_init(void)
index dbc1c48..8ac2e66 100644 (file)
@@ -150,7 +150,6 @@ static bool kernel_1st_panel_init = true;
 static int enterprise_backlight_notify(struct device *unused, int brightness)
 {
        int cur_sd_brightness = atomic_read(&sd_brightness);
-       int orig_brightness = brightness;
 
        /* SD brightness is a percentage, 8-bit value. */
        brightness = (brightness * cur_sd_brightness) / 255;
index 82784eb..df260a5 100644 (file)
@@ -83,7 +83,7 @@ static int kai_ov2710_power_on(void)
                kai_vdd_cam3 = regulator_get(NULL, "vdd_cam3");
                if (WARN_ON(IS_ERR(kai_vdd_cam3))) {
                        pr_err("%s: couldn't get regulator vdd_cam3: %d\n",
-                               __func__, PTR_ERR(kai_vdd_cam3));
+                               __func__, (int)PTR_ERR(kai_vdd_cam3));
                        goto reg_get_vdd_cam3_fail;
                }
        }
@@ -93,7 +93,7 @@ static int kai_ov2710_power_on(void)
                kai_1v8_cam3 = regulator_get(NULL, "vdd_1v8_cam3");
                if (WARN_ON(IS_ERR(kai_1v8_cam3))) {
                        pr_err("%s: couldn't get regulator vdd_1v8_cam3: %d\n",
-                               __func__, PTR_ERR(kai_1v8_cam3));
+                               __func__, (int)PTR_ERR(kai_1v8_cam3));
                        goto reg_get_vdd_1v8_cam3_fail;
                }
        }
index 9f5843a..eb13fc4 100644 (file)
@@ -220,15 +220,15 @@ int __init touch_init_raydium(int irq_gpio, int reset_gpio, int platform)
        switch (platform) {
        case 0:
                pr_info("Raydium Kai PCB based touch init\n");
-               rm31080ts_data.config = rm31080_config_kai_pcb;
+               rm31080ts_data.config = (char *) rm31080_config_kai_pcb;
                break;
        case 1:
                pr_info("Raydium Kai On-Board touch init\n");
-               rm31080ts_data.config = rm31080_config_kai_mainboard;
+               rm31080ts_data.config = (char *) rm31080_config_kai_mainboard;
                break;
        case 2:
                pr_info("Raydium cardhu touch init\n");
-               rm31080ts_data.config = rm31080_config_cardhu;
+               rm31080ts_data.config = (char *) rm31080_config_cardhu;
                break;
        default:
                pr_err("touch_id error, no touch\n");
index 6d5a93c..0c13555 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <linux/types.h>
 #include <linux/power_supply.h>
+#include <linux/memory.h>
 
 #define ADD_FIXED_VOLTAGE_REG(_name)   (&_name##_fixed_voltage_device)
 
index a1f1aeb..7798977 100644 (file)
@@ -298,8 +298,6 @@ void tegra_init_cache(bool init)
 {
        void __iomem *p = IO_ADDRESS(TEGRA_ARM_PERIF_BASE) + 0x3000;
        u32 aux_ctrl;
-       u32 speedo;
-       u32 tmp;
 
 #ifdef CONFIG_TRUSTED_FOUNDATIONS
        /* issue the SMC to enable the L2 */
@@ -326,6 +324,8 @@ void tegra_init_cache(bool init)
                writel(0x221, p + L2X0_TAG_LATENCY_CTRL);
                writel(0x221, p + L2X0_DATA_LATENCY_CTRL);
        } else {
+               u32 speedo;
+
                /* relax l2-cache latency for speedos 4,5,6 (T33's chips) */
                speedo = tegra_cpu_speedo_id();
                if (speedo == 4 || speedo == 5 || speedo == 6 ||
@@ -348,6 +348,8 @@ void tegra_init_cache(bool init)
        if (init) {
                l2x0_init(p, aux_ctrl, 0x8200c3fe);
        } else {
+               u32 tmp;
+
                tmp = aux_ctrl;
                aux_ctrl = readl(p + L2X0_AUX_CTRL);
                aux_ctrl &= 0x8200c3fe;
index 170afd1..31c7d48 100644 (file)
@@ -703,7 +703,7 @@ static void smmu_unmap(struct tegra_iovmm_domain *domain,
 }
 
 static void smmu_map_pfn(struct tegra_iovmm_domain *domain,
-       struct tegra_iovmm_area *iovma, tegra_iovmm_addr_t addr,
+       struct tegra_iovmm_area *iovma, unsigned long addr,
        unsigned long pfn)
 {
        struct smmu_as *as = container_of(domain, struct smmu_as, domain);
index 8ad7bd5..27f7a42 100644 (file)
@@ -107,7 +107,7 @@ static int tegra_thermal_zone_unbind(struct thermal_zone_device *thermal,
 }
 
 static int tegra_thermal_zone_get_temp(struct thermal_zone_device *thz,
-                                               long *temp)
+                                       unsigned long *temp)
 {
        struct tegra_thermal *thermal = thz->devdata;
        thermal->device->get_temp(thermal->device->data, temp);
@@ -130,8 +130,8 @@ static int tegra_thermal_zone_get_trip_type(
 }
 
 static int tegra_thermal_zone_get_trip_temp(struct thermal_zone_device *thz,
-                                               int trip,
-                                               long *temp) {
+                                       int trip,
+                                       unsigned long *temp) {
        struct tegra_thermal *thermal = thz->devdata;
 
        /* Support only Thermal Throttling (1 trip) for now */
index e1cfcce..9412094 100644 (file)
@@ -1667,8 +1667,11 @@ static int utmi_phy_preresume(struct tegra_usb_phy *phy, bool remote_wakeup)
 static int utmi_phy_postresume(struct tegra_usb_phy *phy, bool is_dpd)
 {
        unsigned long val;
+#if defined(CONFIG_ARCH_TEGRA_2x_SOC)
        void __iomem *base = phy->regs;
+#else
        void __iomem *pmc_base = IO_ADDRESS(TEGRA_PMC_BASE);
+#endif
        unsigned  int inst = phy->instance;
 
 #ifndef CONFIG_ARCH_TEGRA_2x_SOC