Merge "drivers: Warning fixes to disable CC_OPTIMIZE_FOR_SIZE"

This commit is contained in:
Linux Build Service Account 2017-06-07 13:13:32 -07:00 committed by Gerrit - the friendly Code Review server
commit e3954e1572
26 changed files with 40 additions and 38 deletions

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2009-2010, 2013-2016 The Linux Foundation. All rights reserved.
/* Copyright (c) 2009-2010, 2013-2017 The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@ -682,7 +682,7 @@ int bt_register_slimdev(struct device *dev)
static long bt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
int ret, pwr_cntrl = 0;
int ret = 0, pwr_cntrl = 0;
switch (cmd) {
case BT_CMD_SLIM_TEST:

View file

@ -296,9 +296,9 @@ static int btfm_slim_dai_get_channel_map(struct snd_soc_dai *dai,
unsigned int *tx_num, unsigned int *tx_slot,
unsigned int *rx_num, unsigned int *rx_slot)
{
int i, ret = -EINVAL, *slot, j = 0, num = 1;
int i, ret = -EINVAL, *slot = NULL, j = 0, num = 1;
struct btfmslim *btfmslim = dai->dev->platform_data;
struct btfmslim_ch *ch;
struct btfmslim_ch *ch = NULL;
if (!btfmslim)
return ret;

View file

@ -1541,8 +1541,8 @@ static int clk_osm_setup_hw_table(struct clk_osm *c)
{
struct osm_entry *entry = c->osm_table;
int i;
u32 freq_val, volt_val, override_val, spare_val;
u32 table_entry_offset, last_spare, last_virtual_corner = 0;
u32 freq_val = 0, volt_val = 0, override_val = 0, spare_val = 0;
u32 table_entry_offset = 0, last_spare = 0, last_virtual_corner = 0;
for (i = 0; i < OSM_TABLE_SIZE; i++) {
if (i < c->num_entries) {
@ -2758,7 +2758,7 @@ static ssize_t debugfs_trace_method_get(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
struct clk_osm *c = file->private_data;
int len, rc;
int len = 0, rc;
if (IS_ERR(file) || file == NULL) {
pr_err("input error %ld\n", PTR_ERR(file));

View file

@ -597,7 +597,7 @@ int acpi_dev_gpio_irq_get(struct acpi_device *adev, int index)
int idx, i;
for (i = 0, idx = 0; idx <= index; i++) {
struct acpi_gpio_info info;
struct acpi_gpio_info info = {0, 0};
struct gpio_desc *desc;
desc = acpi_get_gpiod_by_index(adev, NULL, i, &info);

View file

@ -721,7 +721,8 @@ static int qpnp_flash_led_get_voltage_headroom(struct qpnp_flash_led *led)
#define VIN_FLASH_MIN_UV 3300000LL
static int qpnp_flash_led_calc_max_current(struct qpnp_flash_led *led)
{
int ocv_uv, rbatt_uohm, ibat_now, voltage_hdrm_mv, rc;
int ocv_uv = 0, rbatt_uohm = 0, ibat_now = 0, voltage_hdrm_mv = 0;
int rc = 0;
int64_t ibat_flash_ua, avail_flash_ua, avail_flash_power_fw;
int64_t ibat_safe_ua, vin_flash_uv, vph_flash_uv, vph_flash_vdip;

View file

@ -691,7 +691,7 @@ static int android_verity_ctr(struct dm_target *ti, unsigned argc, char **argv)
dev_t uninitialized_var(dev);
struct android_metadata *metadata = NULL;
int err = 0, i, mode;
char *key_id, *table_ptr, dummy, *target_device,
char *key_id = NULL, *table_ptr, dummy, *target_device,
*verity_table_args[VERITY_TABLE_ARGS + 2 + VERITY_TABLE_OPT_FEC_ARGS];
/* One for specifying number of opt args and one for mode */
sector_t data_sectors;

View file

@ -1259,7 +1259,7 @@ void msm_isp_get_avtimer_ts(
int msm_isp_request_axi_stream(struct vfe_device *vfe_dev, void *arg)
{
int rc = 0, i;
int rc = 0, i = 0;
uint32_t io_format = 0;
struct msm_vfe_axi_stream_request_cmd *stream_cfg_cmd = arg;
struct msm_vfe_axi_stream *stream_info;
@ -1395,7 +1395,7 @@ done:
int msm_isp_release_axi_stream(struct vfe_device *vfe_dev, void *arg)
{
int rc = 0, i;
int rc = 0, i = 0;
struct msm_vfe_axi_stream_release_cmd *stream_release_cmd = arg;
struct msm_vfe_axi_stream *stream_info;
struct msm_vfe_axi_stream_cfg_cmd stream_cfg;

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@ -145,7 +145,7 @@ static struct sde_mdp_hw_resource *sde_rotator_hw_alloc(
struct sde_mdp_hw_resource *mdp_hw;
struct sde_rot_data_type *mdata = sde_rot_get_mdata();
int pipe_ndx, offset = ctl_id;
int ret;
int ret = 0;
mdp_hw = devm_kzalloc(&mgr->pdev->dev,
sizeof(struct sde_mdp_hw_resource), GFP_KERNEL);

View file

@ -1017,7 +1017,7 @@ static int mmc_blk_ioctl_rpmb_cmd(struct block_device *bdev,
{
struct mmc_blk_ioc_rpmb_data *idata;
struct mmc_blk_data *md;
struct mmc_card *card;
struct mmc_card *card = NULL;
struct mmc_command cmd = {0};
struct mmc_data data = {0};
struct mmc_request mrq = {NULL};

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@ -288,8 +288,8 @@ static const struct file_operations msm_core_ptable_ops = {
int msm_core_debug_init(void)
{
struct dentry *dir;
struct dentry *file;
struct dentry *dir = NULL;
struct dentry *file = NULL;
int i;
msm_core_data = get_cpu_pwr_stats();

View file

@ -1505,7 +1505,7 @@ static int cpr3_hmss_init_regulator(struct cpr3_regulator *vreg)
static int cpr3_hmss_init_aging(struct cpr3_controller *ctrl)
{
struct cpr3_msm8996_hmss_fuses *fuse = NULL;
struct cpr3_regulator *vreg;
struct cpr3_regulator *vreg = NULL;
u32 aging_ro_scale;
int i, j, rc;
@ -1710,7 +1710,7 @@ static int cpr3_hmss_regulator_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
const struct of_device_id *match;
struct cpr3_controller *ctrl;
struct cpr3_regulator *vreg;
struct cpr3_regulator *vreg = NULL;
int i, j, rc;
if (!dev->of_node) {

View file

@ -3117,7 +3117,8 @@ static int _cpr3_regulator_update_ctrl_state(struct cpr3_controller *ctrl)
struct cpr4_sdelta *sdelta;
bool valid = false;
bool thread_valid;
int i, j, rc, new_volt, vdd_volt, dynamic_floor_volt, last_corner_volt;
int i, j, rc;
int new_volt, vdd_volt, dynamic_floor_volt, last_corner_volt = 0;
u32 reg_last_measurement = 0, sdelta_size;
int *sdelta_table, *boost_table;

View file

@ -1975,7 +1975,7 @@ static int cprh_kbss_init_regulator(struct cpr3_regulator *vreg)
static int cprh_kbss_init_aging(struct cpr3_controller *ctrl)
{
struct cprh_kbss_fuses *fuse = NULL;
struct cpr3_regulator *vreg;
struct cpr3_regulator *vreg = NULL;
u32 aging_ro_scale;
int i, j, rc = 0;

View file

@ -597,7 +597,7 @@ void msm_rule_register(int num_rules, struct bus_rule_type *rule,
static bool __rule_unregister(int num_rules, struct bus_rule_type *rule,
struct notifier_block *nb)
{
int i;
int i = 0;
struct rule_node_info *node = NULL;
struct rule_node_info *node_tmp = NULL;
struct rules_def *node_rule;

View file

@ -540,7 +540,7 @@ static int swrm_read(struct swr_master *master, u8 dev_num, u16 reg_addr,
{
struct swr_mstr_ctrl *swrm = swr_get_ctrl_data(master);
int ret = 0;
int val;
int val = 0;
u8 *reg_val = (u8 *)buf;
if (!swrm) {

View file

@ -146,7 +146,7 @@ int adjust_minadj(short *min_score_adj)
static int lmk_vmpressure_notifier(struct notifier_block *nb,
unsigned long action, void *data)
{
int other_free, other_file;
int other_free = 0, other_file = 0;
unsigned long pressure = action;
int array_size = ARRAY_SIZE(lowmem_adj);

View file

@ -2119,7 +2119,7 @@ static int get_device_tree_data(struct platform_device *pdev,
{
struct device_node *of_node = pdev->dev.of_node;
struct resource *res_mem = NULL;
u32 *tsens_slope_data, *sensor_id, *client_id;
u32 *tsens_slope_data = NULL, *sensor_id, *client_id;
u32 *temp1_calib_offset_factor, *temp2_calib_offset_factor;
u32 rc = 0, i, tsens_num_sensors = 0;
u32 cycle_monitor = 0, wd_bark = 0;

View file

@ -311,7 +311,7 @@ static void mdss_dp_calc_tu_parameters(u8 link_rate, u8 ln_cnt,
bool n_err_neg, nn_err_neg;
u8 hblank_margin = 16;
u8 tu_size, tu_size_desired, tu_size_minus1;
u8 tu_size, tu_size_desired = 0, tu_size_minus1;
int valid_boundary_link;
u64 resulting_valid;
u64 total_valid;

View file

@ -2091,7 +2091,7 @@ static int __mdss_dsi_dfps_update_clks(struct mdss_panel_data *pdata,
{
struct mdss_dsi_ctrl_pdata *ctrl_pdata = NULL;
struct mdss_dsi_ctrl_pdata *sctrl_pdata = NULL;
struct mdss_panel_info *pinfo, *spinfo;
struct mdss_panel_info *pinfo, *spinfo = NULL;
int rc = 0;
if (pdata == NULL) {

View file

@ -857,7 +857,7 @@ static int hdmi_ddc_read_retry(struct hdmi_tx_ddc_ctrl *ddc_ctrl)
u32 reg_val, ndx, time_out_count, wait_time;
struct hdmi_tx_ddc_data *ddc_data;
int status;
int busy_wait_us;
int busy_wait_us = 0;
if (!ddc_ctrl || !ddc_ctrl->io) {
pr_err("invalid input\n");
@ -1335,7 +1335,7 @@ int hdmi_ddc_write(struct hdmi_tx_ddc_ctrl *ddc_ctrl)
u32 time_out_count;
struct hdmi_tx_ddc_data *ddc_data;
u32 wait_time;
int busy_wait_us;
int busy_wait_us = 0;
if (!ddc_ctrl || !ddc_ctrl->io) {
pr_err("invalid input\n");

View file

@ -2410,14 +2410,14 @@ static int __validate_layers(struct msm_fb_data_type *mfd,
int layer_count = commit->input_layer_cnt;
u32 ds_mode = 0;
struct mdss_mdp_pipe *pipe, *tmp, *left_blend_pipe;
struct mdss_mdp_pipe *pipe = NULL, *tmp, *left_blend_pipe;
struct mdss_mdp_pipe *right_plist[MAX_PIPES_PER_LM] = {0};
struct mdss_mdp_pipe *left_plist[MAX_PIPES_PER_LM] = {0};
struct mdss_overlay_private *mdp5_data = mfd_to_mdp5_data(mfd);
struct mdss_data_type *mdata = mfd_to_mdata(mfd);
struct mdss_mdp_mixer *mixer = NULL;
struct mdp_input_layer *layer, *layer_list;
struct mdp_input_layer *layer = NULL, *layer_list;
struct mdss_mdp_validate_info_t *validate_info_list = NULL;
bool is_single_layer = false, force_validate;
enum layer_pipe_q pipe_q_type;

View file

@ -428,8 +428,8 @@ static int mdss_mdp_get_ubwc_plane_size(struct mdss_mdp_format_params *fmt,
if (fmt->format == MDP_Y_CBCR_H2V2_UBWC ||
fmt->format == MDP_Y_CBCR_H2V2_TP10_UBWC) {
uint32_t y_stride_alignment, uv_stride_alignment;
uint32_t y_height_alignment, uv_height_alignment;
uint32_t y_stride_alignment = 0, uv_stride_alignment = 0;
uint32_t y_height_alignment = 0, uv_height_alignment = 0;
uint32_t y_tile_width = fmt_ubwc->micro.tile_width;
uint32_t y_tile_height = fmt_ubwc->micro.tile_height;
uint32_t uv_tile_width = y_tile_width / 2;

View file

@ -687,7 +687,7 @@ static struct mdss_rot_hw_resource *mdss_rotator_hw_alloc(
struct mdss_rot_hw_resource *hw;
struct mdss_data_type *mdata = mdss_mdp_get_mdata();
u32 pipe_ndx, offset = mdss_mdp_get_wb_ctl_support(mdata, true);
int ret;
int ret = 0;
hw = devm_kzalloc(&mgr->pdev->dev, sizeof(struct mdss_rot_hw_resource),
GFP_KERNEL);

View file

@ -268,7 +268,7 @@ int msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev,
struct msi_domain_ops *ops = info->ops;
msi_alloc_info_t arg;
struct msi_desc *desc;
int i, ret, virq;
int i, ret, virq = 0;
ret = ops->msi_check(domain, info, dev);
if (ret == 0)

View file

@ -1250,7 +1250,7 @@ void run_posix_cpu_timers(struct task_struct *tsk)
void set_process_cpu_timer(struct task_struct *tsk, unsigned int clock_idx,
cputime_t *newval, cputime_t *oldval)
{
unsigned long long now;
unsigned long long now = 0;
WARN_ON_ONCE(clock_idx == CPUCLOCK_SCHED);
cpu_timer_sample_group(clock_idx, tsk, &now);

View file

@ -991,7 +991,7 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
struct sockaddr_un *sunaddr = (struct sockaddr_un *)uaddr;
char *sun_path = sunaddr->sun_path;
int err;
unsigned int hash;
unsigned int hash = 0;
struct unix_address *addr;
struct hlist_head *list;
struct path path = { NULL, NULL };