sm8150: squashed commit for code-quality fixes using gcc-9.3.0 with -O3
Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
This commit is contained in:
@@ -1 +1,2 @@
|
||||
obj-$(CONFIG_MHI_BUS) +=mhi_init.o mhi_main.o mhi_pm.o mhi_boot.o mhi_dtr.o
|
||||
CFLAGS_mhi_init.o += $(call cc-disable-warning, unused-result)
|
||||
|
||||
@@ -2673,7 +2673,7 @@ void mhi_debug_reg_dump(struct mhi_controller *mhi_cntrl)
|
||||
enum mhi_dev_state state;
|
||||
enum mhi_ee ee;
|
||||
int i, ret;
|
||||
u32 val;
|
||||
u32 val = 0;
|
||||
void __iomem *mhi_base = mhi_cntrl->regs;
|
||||
void __iomem *bhi_base = mhi_cntrl->bhi;
|
||||
void __iomem *bhie_base = mhi_cntrl->bhie;
|
||||
|
||||
@@ -653,9 +653,9 @@ static int clk_alpha_pll_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
const struct pll_vco *vco;
|
||||
const struct pll_vco_data *data;
|
||||
bool is_enabled;
|
||||
u32 l, l_val, off = pll->offset;
|
||||
u32 l = 0, l_val, off = pll->offset;
|
||||
int ret;
|
||||
u64 a;
|
||||
u64 a = 0;
|
||||
unsigned long rrate;
|
||||
|
||||
rrate = alpha_pll_round_rate(pll, rate, prate, &l, &a);
|
||||
@@ -745,8 +745,8 @@ static long clk_alpha_pll_round_rate(struct clk_hw *hw, unsigned long rate,
|
||||
unsigned long *prate)
|
||||
{
|
||||
struct clk_alpha_pll *pll = to_clk_alpha_pll(hw);
|
||||
u32 l;
|
||||
u64 a;
|
||||
u32 l = 0;
|
||||
u64 a = 0;
|
||||
unsigned long min_freq, max_freq;
|
||||
|
||||
if (rate < pll->min_supported_freq)
|
||||
@@ -1070,8 +1070,8 @@ static int clk_trion_pll_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
{
|
||||
struct clk_alpha_pll *pll = to_clk_alpha_pll(hw);
|
||||
unsigned long rrate;
|
||||
u32 regval, l, off = pll->offset, cal_val;
|
||||
u64 a;
|
||||
u32 regval, l = 0, off = pll->offset, cal_val;
|
||||
u64 a = 0;
|
||||
int ret;
|
||||
|
||||
ret = regmap_read(pll->clkr.regmap, pll->offset + PLL_L_VAL, &l);
|
||||
@@ -1370,8 +1370,8 @@ static int clk_regera_pll_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
{
|
||||
struct clk_alpha_pll *pll = to_clk_alpha_pll(hw);
|
||||
unsigned long rrate;
|
||||
u32 l, regval, off = pll->offset;
|
||||
u64 a;
|
||||
u32 l = 0, regval, off = pll->offset;
|
||||
u64 a = 0;
|
||||
int ret;
|
||||
|
||||
ret = regmap_read(pll->clkr.regmap, off + PLL_L_VAL, &l);
|
||||
@@ -1777,9 +1777,9 @@ static int clk_alpha_pll_slew_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
struct clk_alpha_pll *pll = to_clk_alpha_pll(hw);
|
||||
unsigned long freq_hz;
|
||||
const struct pll_vco *curr_vco = NULL, *vco;
|
||||
u32 l, ctl, l_val;
|
||||
u64 a;
|
||||
int ret, i;
|
||||
u32 l = 0, ctl, l_val;
|
||||
u64 a = 0;
|
||||
int ret, i = 0;
|
||||
|
||||
freq_hz = alpha_pll_round_rate(pll, rate, parent_rate, &l, &a);
|
||||
if (freq_hz != rate) {
|
||||
@@ -1871,8 +1871,8 @@ static int clk_alpha_pll_calibrate(struct clk_hw *hw)
|
||||
struct clk_alpha_pll *pll = to_clk_alpha_pll(hw);
|
||||
struct clk_hw *parent;
|
||||
const struct pll_vco *vco = NULL;
|
||||
u64 a;
|
||||
u32 l, ctl, l_val;
|
||||
u64 a = 0;
|
||||
u32 l = 0, ctl, l_val;
|
||||
int rc, i = 0;
|
||||
|
||||
parent = clk_hw_get_parent(hw);
|
||||
@@ -2242,8 +2242,8 @@ static int clk_fabia_pll_prepare(struct clk_hw *hw)
|
||||
struct clk_alpha_pll *pll = to_clk_alpha_pll(hw);
|
||||
const struct pll_vco *vco;
|
||||
struct clk_hw *parent;
|
||||
u64 a;
|
||||
u32 cal_l, regval, off = pll->offset;
|
||||
u64 a = 0;
|
||||
u32 cal_l = 0, regval, off = pll->offset;
|
||||
int ret;
|
||||
|
||||
/* Check if calibration needs to be done i.e. PLL is in reset */
|
||||
@@ -2313,8 +2313,8 @@ static int clk_fabia_pll_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
{
|
||||
struct clk_alpha_pll *pll = to_clk_alpha_pll(hw);
|
||||
unsigned long rrate;
|
||||
u32 regval, l, off = pll->offset, cal_val;
|
||||
u64 a;
|
||||
u32 regval, l = 0, off = pll->offset, cal_val;
|
||||
u64 a = 0;
|
||||
int ret;
|
||||
|
||||
ret = regmap_read(pll->clkr.regmap, off + PLL_MODE, ®val);
|
||||
@@ -2566,7 +2566,7 @@ int clk_agera_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap,
|
||||
static unsigned long
|
||||
clk_agera_pll_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
|
||||
{
|
||||
u32 l, a;
|
||||
u32 l = 0, a = 0;
|
||||
u64 prate = parent_rate;
|
||||
struct clk_alpha_pll *pll = to_clk_alpha_pll(hw);
|
||||
u32 off = pll->offset;
|
||||
@@ -2583,8 +2583,8 @@ static int clk_agera_pll_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
struct clk_alpha_pll *pll = to_clk_alpha_pll(hw);
|
||||
unsigned long rrate;
|
||||
int ret;
|
||||
u32 l, off = pll->offset;
|
||||
u64 a;
|
||||
u32 l = 0, off = pll->offset;
|
||||
u64 a = 0;
|
||||
|
||||
rrate = alpha_pll_round_rate(pll, rate, prate, &l, &a);
|
||||
/*
|
||||
@@ -2891,8 +2891,8 @@ static int alpha_pll_lucid_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
{
|
||||
struct clk_alpha_pll *pll = to_clk_alpha_pll(hw);
|
||||
unsigned long rrate;
|
||||
u32 regval, l;
|
||||
u64 a;
|
||||
u32 regval, l = 0;
|
||||
u64 a = 0;
|
||||
int ret;
|
||||
|
||||
rrate = alpha_pll_round_rate(pll, rate, prate, &l, &a);
|
||||
|
||||
@@ -834,7 +834,7 @@ static int qpnp_flash_led_get_voltage_headroom(struct qpnp_flash_led *led)
|
||||
static int qpnp_flash_led_calc_max_current(struct qpnp_flash_led *led,
|
||||
int *max_current)
|
||||
{
|
||||
int ocv_uv, ibat_now, voltage_hdrm_mv, rc;
|
||||
int ocv_uv = 0, ibat_now = 0, voltage_hdrm_mv, rc;
|
||||
int rbatt_uohm = 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;
|
||||
@@ -968,7 +968,7 @@ static int qpnp_flash_led_calc_bharger_max_current(struct qpnp_flash_led *led,
|
||||
int *max_current)
|
||||
{
|
||||
union power_supply_propval pval = {0, };
|
||||
int ocv_uv, ibat_now, voltage_hdrm_mv, flash_led_max_total_curr_ma, rc;
|
||||
int ocv_uv = 0, ibat_now = 0, voltage_hdrm_mv, flash_led_max_total_curr_ma, rc;
|
||||
int rbatt_uohm = 0, usb_present, otg_enable;
|
||||
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;
|
||||
|
||||
@@ -2662,20 +2662,22 @@ static int __cam_req_mgr_setup_link_info(struct cam_req_mgr_core_link *link,
|
||||
rc = dev->ops->get_dev_info(&dev->dev_info);
|
||||
|
||||
trace_cam_req_mgr_connect_device(link, &dev->dev_info);
|
||||
if (link_info->version == VERSION_1)
|
||||
if (link_info->version == VERSION_1) {
|
||||
CAM_DBG(CAM_CRM,
|
||||
"%x: connected: %s, id %d, delay %d, trigger %x",
|
||||
link_info->u.link_info_v1.session_hdl,
|
||||
dev->dev_info.name,
|
||||
dev->dev_info.dev_id, dev->dev_info.p_delay,
|
||||
dev->dev_info.trigger);
|
||||
else if (link_info->version == VERSION_2)
|
||||
}
|
||||
else if (link_info->version == VERSION_2) {
|
||||
CAM_DBG(CAM_CRM,
|
||||
"%x: connected: %s, id %d, delay %d, trigger %x",
|
||||
link_info->u.link_info_v2.session_hdl,
|
||||
dev->dev_info.name,
|
||||
dev->dev_info.dev_id, dev->dev_info.p_delay,
|
||||
dev->dev_info.trigger);
|
||||
}
|
||||
if (rc < 0 ||
|
||||
dev->dev_info.p_delay >=
|
||||
CAM_PIPELINE_DELAY_MAX ||
|
||||
|
||||
@@ -47,8 +47,10 @@ void cam_ir_led_shutdown(struct cam_ir_led_ctrl *ictrl)
|
||||
}
|
||||
|
||||
rc = cam_ir_led_release_dev(ictrl);
|
||||
if (rc)
|
||||
if (rc) {
|
||||
CAM_ERR(CAM_IR_LED, "Release failed rc: %d", rc);
|
||||
else
|
||||
}
|
||||
else {
|
||||
ictrl->ir_led_state = CAM_IR_LED_STATE_INIT;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2479,7 +2479,7 @@ static void handle_ebd(enum hal_command_response cmd, void *data)
|
||||
struct vb2_buffer *vb;
|
||||
struct msm_vidc_inst *inst;
|
||||
struct vidc_hal_ebd *empty_buf_done;
|
||||
struct vidc_tag_data tag_data;
|
||||
struct vidc_tag_data tag_data = {0};
|
||||
u32 planes[VIDEO_MAX_PLANES] = {0};
|
||||
u32 extra_idx = 0;
|
||||
|
||||
@@ -4206,7 +4206,7 @@ static void populate_frame_data(struct vidc_frame_data *data,
|
||||
int extra_idx;
|
||||
struct vb2_buffer *vb;
|
||||
struct vb2_v4l2_buffer *vbuf;
|
||||
struct vidc_tag_data tag_data;
|
||||
struct vidc_tag_data tag_data = { 0 };
|
||||
|
||||
if (!inst || !mbuf || !data) {
|
||||
dprintk(VIDC_ERR, "%s: invalid params %pK %pK %pK\n",
|
||||
|
||||
@@ -936,7 +936,7 @@ static int check_firmware(struct dvb_frontend *fe, unsigned int type,
|
||||
struct xc4000_priv *priv = fe->tuner_priv;
|
||||
struct firmware_properties new_fw;
|
||||
int rc = 0, is_retry = 0;
|
||||
u16 hwmodel;
|
||||
u16 hwmodel = 0;
|
||||
v4l2_std_id std0;
|
||||
u8 hw_major = 0, hw_minor = 0, fw_major = 0, fw_minor = 0;
|
||||
|
||||
@@ -1096,12 +1096,12 @@ fail:
|
||||
|
||||
static void xc_debug_dump(struct xc4000_priv *priv)
|
||||
{
|
||||
u16 adc_envelope;
|
||||
u16 adc_envelope = 0;
|
||||
u32 freq_error_hz = 0;
|
||||
u16 lock_status;
|
||||
u16 lock_status = 0;
|
||||
u32 hsync_freq_hz = 0;
|
||||
u16 frame_lines;
|
||||
u16 quality;
|
||||
u16 frame_lines = 0;
|
||||
u16 quality = 0;
|
||||
u16 signal = 0;
|
||||
u16 noise = 0;
|
||||
u8 hw_majorversion = 0, hw_minorversion = 0;
|
||||
|
||||
@@ -632,18 +632,18 @@ static int xc5000_fwupload(struct dvb_frontend *fe,
|
||||
|
||||
static void xc_debug_dump(struct xc5000_priv *priv)
|
||||
{
|
||||
u16 adc_envelope;
|
||||
u16 adc_envelope = 0;
|
||||
u32 freq_error_hz = 0;
|
||||
u16 lock_status;
|
||||
u16 lock_status = 0;
|
||||
u32 hsync_freq_hz = 0;
|
||||
u16 frame_lines;
|
||||
u16 quality;
|
||||
u16 snr;
|
||||
u16 totalgain;
|
||||
u16 frame_lines = 0;
|
||||
u16 quality = 0;
|
||||
u16 snr = 0;
|
||||
u16 totalgain = 0;
|
||||
u8 hw_majorversion = 0, hw_minorversion = 0;
|
||||
u8 fw_majorversion = 0, fw_minorversion = 0;
|
||||
u16 fw_buildversion = 0;
|
||||
u16 regval;
|
||||
u16 regval = 0;
|
||||
|
||||
/* Wait for stats to stabilize.
|
||||
* Frame Lines needs two frame times after initial lock
|
||||
|
||||
@@ -675,7 +675,7 @@ static int lan78xx_eeprom_confirm_not_busy(struct lan78xx_net *dev)
|
||||
static int lan78xx_read_raw_eeprom(struct lan78xx_net *dev, u32 offset,
|
||||
u32 length, u8 *data)
|
||||
{
|
||||
u32 val;
|
||||
u32 val = 0;
|
||||
u32 saved;
|
||||
int i, ret;
|
||||
int retval;
|
||||
@@ -743,7 +743,7 @@ static int lan78xx_read_eeprom(struct lan78xx_net *dev, u32 offset,
|
||||
static int lan78xx_write_raw_eeprom(struct lan78xx_net *dev, u32 offset,
|
||||
u32 length, u8 *data)
|
||||
{
|
||||
u32 val;
|
||||
u32 val = 0;
|
||||
u32 saved;
|
||||
int i, ret;
|
||||
int retval;
|
||||
@@ -812,7 +812,7 @@ static int lan78xx_read_raw_otp(struct lan78xx_net *dev, u32 offset,
|
||||
{
|
||||
int i;
|
||||
int ret;
|
||||
u32 buf;
|
||||
u32 buf = 0;
|
||||
unsigned long timeout;
|
||||
|
||||
ret = lan78xx_read_reg(dev, OTP_PWR_DN, &buf);
|
||||
@@ -866,7 +866,7 @@ static int lan78xx_write_raw_otp(struct lan78xx_net *dev, u32 offset,
|
||||
{
|
||||
int i;
|
||||
int ret;
|
||||
u32 buf;
|
||||
u32 buf = 0;
|
||||
unsigned long timeout;
|
||||
|
||||
ret = lan78xx_read_reg(dev, OTP_PWR_DN, &buf);
|
||||
@@ -960,7 +960,7 @@ static int lan78xx_dataport_write(struct lan78xx_net *dev, u32 ram_select,
|
||||
u32 addr, u32 length, u32 *buf)
|
||||
{
|
||||
struct lan78xx_priv *pdata = (struct lan78xx_priv *)(dev->data[0]);
|
||||
u32 dp_sel;
|
||||
u32 dp_sel = 0;
|
||||
int i, ret;
|
||||
|
||||
if (usb_autopm_get_interface(dev->intf) < 0)
|
||||
@@ -1149,7 +1149,7 @@ static int lan78xx_link_reset(struct lan78xx_net *dev)
|
||||
struct phy_device *phydev = dev->net->phydev;
|
||||
struct ethtool_link_ksettings ecmd;
|
||||
int ladv, radv, ret;
|
||||
u32 buf;
|
||||
u32 buf = 0;
|
||||
|
||||
/* clear LAN78xx interrupt status */
|
||||
ret = lan78xx_write_reg(dev, INT_STS, INT_STS_PHY_INT_);
|
||||
@@ -1340,7 +1340,7 @@ static void lan78xx_get_wol(struct net_device *netdev,
|
||||
{
|
||||
struct lan78xx_net *dev = netdev_priv(netdev);
|
||||
int ret;
|
||||
u32 buf;
|
||||
u32 buf = 0;
|
||||
struct lan78xx_priv *pdata = (struct lan78xx_priv *)(dev->data[0]);
|
||||
|
||||
if (usb_autopm_get_interface(dev->intf) < 0)
|
||||
@@ -1393,7 +1393,7 @@ static int lan78xx_get_eee(struct net_device *net, struct ethtool_eee *edata)
|
||||
struct lan78xx_net *dev = netdev_priv(net);
|
||||
struct phy_device *phydev = net->phydev;
|
||||
int ret;
|
||||
u32 buf;
|
||||
u32 buf = 0;
|
||||
|
||||
ret = usb_autopm_get_interface(dev->intf);
|
||||
if (ret < 0)
|
||||
@@ -1430,7 +1430,7 @@ static int lan78xx_set_eee(struct net_device *net, struct ethtool_eee *edata)
|
||||
{
|
||||
struct lan78xx_net *dev = netdev_priv(net);
|
||||
int ret;
|
||||
u32 buf;
|
||||
u32 buf = 0;
|
||||
|
||||
ret = usb_autopm_get_interface(dev->intf);
|
||||
if (ret < 0)
|
||||
@@ -1629,7 +1629,7 @@ static int lan78xx_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd)
|
||||
|
||||
static void lan78xx_init_mac_address(struct lan78xx_net *dev)
|
||||
{
|
||||
u32 addr_lo, addr_hi;
|
||||
u32 addr_lo = 0, addr_hi = 0;
|
||||
int ret;
|
||||
u8 addr[6];
|
||||
|
||||
@@ -1681,7 +1681,7 @@ static void lan78xx_init_mac_address(struct lan78xx_net *dev)
|
||||
static int lan78xx_mdiobus_read(struct mii_bus *bus, int phy_id, int idx)
|
||||
{
|
||||
struct lan78xx_net *dev = bus->priv;
|
||||
u32 val, addr;
|
||||
u32 val = 0, addr;
|
||||
int ret;
|
||||
|
||||
ret = usb_autopm_get_interface(dev->intf);
|
||||
@@ -1880,7 +1880,7 @@ static void lan78xx_irq_bus_sync_unlock(struct irq_data *irqd)
|
||||
struct irq_domain_data *data = irq_data_get_irq_chip_data(irqd);
|
||||
struct lan78xx_net *dev =
|
||||
container_of(data, struct lan78xx_net, domain_data);
|
||||
u32 buf;
|
||||
u32 buf = 0;
|
||||
int ret;
|
||||
|
||||
/* call register access here because irq_bus_lock & irq_bus_sync_unlock
|
||||
@@ -1906,7 +1906,7 @@ static int lan78xx_setup_irq_domain(struct lan78xx_net *dev)
|
||||
struct device_node *of_node;
|
||||
struct irq_domain *irqdomain;
|
||||
unsigned int irqmap = 0;
|
||||
u32 buf;
|
||||
u32 buf = 0;
|
||||
int ret = 0;
|
||||
|
||||
of_node = dev->udev->dev.parent->of_node;
|
||||
@@ -1954,7 +1954,7 @@ static void lan78xx_remove_irq_domain(struct lan78xx_net *dev)
|
||||
|
||||
static int lan8835_fixup(struct phy_device *phydev)
|
||||
{
|
||||
int buf;
|
||||
int buf = 0;
|
||||
int ret;
|
||||
struct lan78xx_net *dev = netdev_priv(phydev->attached_dev);
|
||||
|
||||
@@ -2085,7 +2085,7 @@ error:
|
||||
static int lan78xx_set_rx_max_frame_length(struct lan78xx_net *dev, int size)
|
||||
{
|
||||
int ret = 0;
|
||||
u32 buf;
|
||||
u32 buf = 0;
|
||||
bool rxenabled;
|
||||
|
||||
ret = lan78xx_read_reg(dev, MAC_RX, &buf);
|
||||
@@ -2300,7 +2300,7 @@ static int lan78xx_vlan_rx_kill_vid(struct net_device *netdev,
|
||||
static void lan78xx_init_ltm(struct lan78xx_net *dev)
|
||||
{
|
||||
int ret;
|
||||
u32 buf;
|
||||
u32 buf = 0;
|
||||
u32 regs[6] = { 0 };
|
||||
|
||||
ret = lan78xx_read_reg(dev, USB_CFG1, &buf);
|
||||
@@ -2339,7 +2339,7 @@ static void lan78xx_init_ltm(struct lan78xx_net *dev)
|
||||
static int lan78xx_reset(struct lan78xx_net *dev)
|
||||
{
|
||||
struct lan78xx_priv *pdata = (struct lan78xx_priv *)(dev->data[0]);
|
||||
u32 buf;
|
||||
u32 buf = 0;
|
||||
int ret = 0;
|
||||
unsigned long timeout;
|
||||
u8 sig;
|
||||
@@ -3708,7 +3708,7 @@ static u16 lan78xx_wakeframe_crc16(const u8 *buf, int len)
|
||||
|
||||
static int lan78xx_set_suspend(struct lan78xx_net *dev, u32 wol)
|
||||
{
|
||||
u32 buf;
|
||||
u32 buf = 0;
|
||||
int ret;
|
||||
int mask_index;
|
||||
u16 crc;
|
||||
@@ -3853,7 +3853,7 @@ static int lan78xx_suspend(struct usb_interface *intf, pm_message_t message)
|
||||
{
|
||||
struct lan78xx_net *dev = usb_get_intfdata(intf);
|
||||
struct lan78xx_priv *pdata = (struct lan78xx_priv *)(dev->data[0]);
|
||||
u32 buf;
|
||||
u32 buf = 0;
|
||||
int ret;
|
||||
int event;
|
||||
|
||||
@@ -3951,7 +3951,7 @@ static int lan78xx_resume(struct usb_interface *intf)
|
||||
struct sk_buff *skb;
|
||||
struct urb *res;
|
||||
int ret;
|
||||
u32 buf;
|
||||
u32 buf = 0;
|
||||
|
||||
if (!timer_pending(&dev->stat_monitor)) {
|
||||
dev->delta = 1;
|
||||
|
||||
@@ -944,7 +944,7 @@ static int ipa_wigig_store_client_smmu_info
|
||||
(struct ipa_wigig_conn_tx_in_params_smmu *in, enum ipa_client_type client)
|
||||
{
|
||||
int ret;
|
||||
unsigned int idx;
|
||||
unsigned int idx = 0;
|
||||
|
||||
IPA_WIGIG_DBG("\n");
|
||||
|
||||
@@ -991,7 +991,7 @@ static int ipa_wigig_get_tx_smmu_info(
|
||||
struct ipa_wigig_tx_pipe_data_buffer_info_smmu **dbuff_smmu,
|
||||
enum ipa_client_type client)
|
||||
{
|
||||
unsigned int idx;
|
||||
unsigned int idx = 0;
|
||||
int ret;
|
||||
|
||||
ret = ipa_wigig_client_to_idx(client, &idx);
|
||||
@@ -1019,7 +1019,7 @@ static int ipa_wigig_clean_smmu_info(enum ipa_client_type client)
|
||||
return ret;
|
||||
ipa_wigig_clean_rx_buff_smmu_info();
|
||||
} else {
|
||||
unsigned int idx;
|
||||
unsigned int idx = 0;
|
||||
|
||||
ret = ipa_wigig_client_to_idx(client, &idx);
|
||||
if (ret)
|
||||
@@ -1152,7 +1152,7 @@ EXPORT_SYMBOL(ipa_wigig_set_perf_profile);
|
||||
static int ipa_wigig_store_client_mac(enum ipa_client_type client,
|
||||
const char *mac)
|
||||
{
|
||||
unsigned int idx;
|
||||
unsigned int idx = 0;
|
||||
|
||||
if (ipa_wigig_client_to_idx(client, &idx)) {
|
||||
IPA_WIGIG_ERR("couldn't acquire idx\n");
|
||||
@@ -1164,7 +1164,7 @@ static int ipa_wigig_store_client_mac(enum ipa_client_type client,
|
||||
|
||||
static int ipa_wigig_get_client_mac(enum ipa_client_type client, char *mac)
|
||||
{
|
||||
unsigned int idx;
|
||||
unsigned int idx = 0;
|
||||
|
||||
if (ipa_wigig_client_to_idx(client, &idx)) {
|
||||
IPA_WIGIG_ERR("couldn't acquire idx\n");
|
||||
|
||||
@@ -2425,7 +2425,7 @@ int ipa_mpm_mhip_xdci_pipe_enable(enum ipa_usb_teth_prot xdci_teth_prot)
|
||||
int probe_id = IPA_MPM_MHIP_CH_ID_MAX;
|
||||
int i;
|
||||
enum ipa_mpm_mhip_client_type mhip_client;
|
||||
enum mhip_status_type status;
|
||||
enum mhip_status_type status = 0;
|
||||
int pipe_idx;
|
||||
bool is_acted = true;
|
||||
int ret = 0;
|
||||
|
||||
@@ -970,7 +970,7 @@ const char *fg_get_battery_type(struct fg_dev *fg)
|
||||
|
||||
int fg_get_battery_resistance(struct fg_dev *fg, int *val)
|
||||
{
|
||||
int rc, esr_uohms, rslow_uohms;
|
||||
int rc, esr_uohms = 0, rslow_uohms = 0;
|
||||
|
||||
rc = fg_get_sram_prop(fg, FG_SRAM_ESR, &esr_uohms);
|
||||
if (rc < 0) {
|
||||
|
||||
@@ -6259,7 +6259,7 @@ static int fg_gen4_probe(struct platform_device *pdev)
|
||||
struct fg_gen4_chip *chip;
|
||||
struct fg_dev *fg;
|
||||
struct power_supply_config fg_psy_cfg;
|
||||
int rc, msoc, volt_uv, batt_temp;
|
||||
int rc, msoc, volt_uv, batt_temp = 0;
|
||||
|
||||
chip = devm_kzalloc(&pdev->dev, sizeof(*chip), GFP_KERNEL);
|
||||
if (!chip)
|
||||
|
||||
@@ -768,7 +768,7 @@ static void __ufshcd_cmd_log(struct ufs_hba *hba, char *str, char *cmd_type,
|
||||
unsigned int tag, u8 cmd_id, u8 idn, u8 lun,
|
||||
sector_t lba, int transfer_len)
|
||||
{
|
||||
struct ufshcd_cmd_log_entry entry;
|
||||
struct ufshcd_cmd_log_entry entry = { 0 };
|
||||
|
||||
entry.str = str;
|
||||
entry.lba = lba;
|
||||
|
||||
@@ -477,7 +477,7 @@ static int usb_stor_bulk_transfer_sglist(struct us_data *us, unsigned int pipe,
|
||||
int usb_stor_bulk_srb(struct us_data* us, unsigned int pipe,
|
||||
struct scsi_cmnd* srb)
|
||||
{
|
||||
unsigned int partial;
|
||||
unsigned int partial = 0;
|
||||
int result = usb_stor_bulk_transfer_sglist(us, pipe, scsi_sglist(srb),
|
||||
scsi_sg_count(srb), scsi_bufflen(srb),
|
||||
&partial);
|
||||
|
||||
@@ -3433,7 +3433,7 @@ static int ext4_ext_convert_to_initialized(handle_t *handle,
|
||||
struct ext4_sb_info *sbi;
|
||||
struct ext4_extent_header *eh;
|
||||
struct ext4_map_blocks split_map;
|
||||
struct ext4_extent zero_ex1, zero_ex2;
|
||||
struct ext4_extent zero_ex1 = { 0 }, zero_ex2 = { 0 };
|
||||
struct ext4_extent *ex, *abut_ex;
|
||||
ext4_lblk_t ee_block, eof_block;
|
||||
unsigned int ee_len, depth, map_len = map->m_len;
|
||||
|
||||
@@ -107,7 +107,7 @@ int idr_alloc_cmn(struct idr *idr, void *ptr, unsigned long *index,
|
||||
static inline int idr_alloc(struct idr *idr, void *ptr,
|
||||
int start, int end, gfp_t gfp)
|
||||
{
|
||||
unsigned long id;
|
||||
unsigned long id = 0;
|
||||
int ret;
|
||||
|
||||
if (WARN_ON_ONCE(start < 0))
|
||||
|
||||
@@ -1464,7 +1464,7 @@ out:
|
||||
|
||||
SYSCALL_DEFINE3(shmat, int, shmid, char __user *, shmaddr, int, shmflg)
|
||||
{
|
||||
unsigned long ret;
|
||||
unsigned long ret = 0;
|
||||
long err;
|
||||
|
||||
err = do_shmat(shmid, shmaddr, shmflg, &ret, SHMLBA);
|
||||
@@ -1482,7 +1482,7 @@ SYSCALL_DEFINE3(shmat, int, shmid, char __user *, shmaddr, int, shmflg)
|
||||
|
||||
COMPAT_SYSCALL_DEFINE3(shmat, int, shmid, compat_uptr_t, shmaddr, int, shmflg)
|
||||
{
|
||||
unsigned long ret;
|
||||
unsigned long ret = 0;
|
||||
long err;
|
||||
|
||||
err = do_shmat(shmid, compat_ptr(shmaddr), shmflg, &ret, COMPAT_SHMLBA);
|
||||
|
||||
@@ -905,7 +905,7 @@ static inline int audit_add_rule(struct audit_entry *entry)
|
||||
struct audit_entry *e;
|
||||
struct audit_watch *watch = entry->rule.watch;
|
||||
struct audit_tree *tree = entry->rule.tree;
|
||||
struct list_head *list;
|
||||
struct list_head *list = NULL;
|
||||
int err = 0;
|
||||
#ifdef CONFIG_AUDITSYSCALL
|
||||
int dont_count = 0;
|
||||
|
||||
@@ -576,7 +576,7 @@ static int posix_cpu_timer_set(struct k_itimer *timer, int timer_flags,
|
||||
unsigned long flags;
|
||||
struct sighand_struct *sighand;
|
||||
struct task_struct *p = timer->it.cpu.task;
|
||||
u64 old_expires, new_expires, old_incr, val;
|
||||
u64 old_expires, new_expires, old_incr, val = 0;
|
||||
int ret;
|
||||
|
||||
WARN_ON_ONCE(p == NULL);
|
||||
@@ -716,7 +716,7 @@ static int posix_cpu_timer_set(struct k_itimer *timer, int timer_flags,
|
||||
|
||||
static void posix_cpu_timer_get(struct k_itimer *timer, struct itimerspec64 *itp)
|
||||
{
|
||||
u64 now;
|
||||
u64 now = 0;
|
||||
struct task_struct *p = timer->it.cpu.task;
|
||||
|
||||
WARN_ON_ONCE(p == NULL);
|
||||
@@ -993,7 +993,7 @@ static void posix_cpu_timer_rearm(struct k_itimer *timer)
|
||||
struct sighand_struct *sighand;
|
||||
unsigned long flags;
|
||||
struct task_struct *p = timer->it.cpu.task;
|
||||
u64 now;
|
||||
u64 now = 0;
|
||||
|
||||
WARN_ON_ONCE(p == NULL);
|
||||
|
||||
@@ -1187,7 +1187,7 @@ void run_posix_cpu_timers(struct task_struct *tsk)
|
||||
void set_process_cpu_timer(struct task_struct *tsk, unsigned int clock_idx,
|
||||
u64 *newval, u64 *oldval)
|
||||
{
|
||||
u64 now;
|
||||
u64 now = 0;
|
||||
|
||||
WARN_ON_ONCE(clock_idx == CPUCLOCK_SCHED);
|
||||
cpu_timer_sample_group(clock_idx, tsk, &now);
|
||||
|
||||
@@ -1591,7 +1591,7 @@ static void connectable_update_work(struct work_struct *work)
|
||||
{
|
||||
struct hci_dev *hdev = container_of(work, struct hci_dev,
|
||||
connectable_update);
|
||||
u8 status;
|
||||
u8 status = 0;
|
||||
|
||||
hci_req_sync(hdev, connectable_update, 0, HCI_CMD_TIMEOUT, &status);
|
||||
mgmt_set_connectable_complete(hdev, status);
|
||||
@@ -1700,7 +1700,7 @@ static void discoverable_update_work(struct work_struct *work)
|
||||
{
|
||||
struct hci_dev *hdev = container_of(work, struct hci_dev,
|
||||
discoverable_update);
|
||||
u8 status;
|
||||
u8 status = 0;
|
||||
|
||||
hci_req_sync(hdev, discoverable_update, 0, HCI_CMD_TIMEOUT, &status);
|
||||
mgmt_set_discoverable_complete(hdev, status);
|
||||
@@ -1812,7 +1812,7 @@ static void bg_scan_update(struct work_struct *work)
|
||||
struct hci_dev *hdev = container_of(work, struct hci_dev,
|
||||
bg_scan_update);
|
||||
struct hci_conn *conn;
|
||||
u8 status;
|
||||
u8 status = 0;
|
||||
int err;
|
||||
|
||||
err = hci_req_sync(hdev, update_bg_scan, 0, HCI_CMD_TIMEOUT, &status);
|
||||
@@ -1865,7 +1865,7 @@ static void le_scan_disable_work(struct work_struct *work)
|
||||
{
|
||||
struct hci_dev *hdev = container_of(work, struct hci_dev,
|
||||
le_scan_disable.work);
|
||||
u8 status;
|
||||
u8 status = 0;
|
||||
|
||||
BT_DBG("%s", hdev->name);
|
||||
|
||||
@@ -1943,7 +1943,7 @@ static void le_scan_restart_work(struct work_struct *work)
|
||||
struct hci_dev *hdev = container_of(work, struct hci_dev,
|
||||
le_scan_restart.work);
|
||||
unsigned long timeout, duration, scan_start, now;
|
||||
u8 status;
|
||||
u8 status = 0;
|
||||
|
||||
BT_DBG("%s", hdev->name);
|
||||
|
||||
|
||||
@@ -584,8 +584,8 @@ static int h245_help(struct sk_buff *skb, unsigned int protoff,
|
||||
{
|
||||
static MultimediaSystemControlMessage mscm;
|
||||
unsigned char *data = NULL;
|
||||
int datalen;
|
||||
int dataoff;
|
||||
int datalen = 0;
|
||||
int dataoff = 0;
|
||||
int ret;
|
||||
|
||||
/* Until there's been traffic both ways, don't look in packets. */
|
||||
@@ -1160,8 +1160,8 @@ static int q931_help(struct sk_buff *skb, unsigned int protoff,
|
||||
{
|
||||
static Q931 q931;
|
||||
unsigned char *data = NULL;
|
||||
int datalen;
|
||||
int dataoff;
|
||||
int datalen = 0;
|
||||
int dataoff = 0;
|
||||
int ret;
|
||||
|
||||
/* Until there's been traffic both ways, don't look in packets. */
|
||||
|
||||
@@ -67,7 +67,7 @@ __cfg80211_wdev_from_attrs(struct net *netns, struct nlattr **attrs)
|
||||
struct wireless_dev *result = NULL;
|
||||
bool have_ifidx = attrs[NL80211_ATTR_IFINDEX];
|
||||
bool have_wdev_id = attrs[NL80211_ATTR_WDEV];
|
||||
u64 wdev_id;
|
||||
u64 wdev_id = 0;
|
||||
int wiphy_idx = -1;
|
||||
int ifidx = -1;
|
||||
|
||||
|
||||
@@ -1210,7 +1210,7 @@ int __key_link_begin(struct key *keyring,
|
||||
__acquires(&keyring->sem)
|
||||
__acquires(&keyring_serialise_link_sem)
|
||||
{
|
||||
struct assoc_array_edit *edit;
|
||||
struct assoc_array_edit *edit = NULL;
|
||||
int ret;
|
||||
|
||||
kenter("%d,%s,%s,",
|
||||
@@ -1360,7 +1360,7 @@ static int __key_link_check_restriction(struct key *keyring, struct key *key)
|
||||
*/
|
||||
int key_link(struct key *keyring, struct key *key)
|
||||
{
|
||||
struct assoc_array_edit *edit;
|
||||
struct assoc_array_edit *edit = NULL;
|
||||
int ret;
|
||||
|
||||
kenter("{%d,%d}", keyring->serial, refcount_read(&keyring->usage));
|
||||
|
||||
@@ -475,7 +475,7 @@ static ssize_t smk_write_rules_list(struct file *file, const char __user *buf,
|
||||
struct list_head *rule_list,
|
||||
struct mutex *rule_lock, int format)
|
||||
{
|
||||
struct smack_parsed_rule rule;
|
||||
struct smack_parsed_rule rule = { 0 };
|
||||
char *data;
|
||||
int rc;
|
||||
int trunc = 0;
|
||||
@@ -2286,7 +2286,7 @@ static const struct file_operations smk_load_self_ops = {
|
||||
static ssize_t smk_user_access(struct file *file, const char __user *buf,
|
||||
size_t count, loff_t *ppos, int format)
|
||||
{
|
||||
struct smack_parsed_rule rule;
|
||||
struct smack_parsed_rule rule = { 0 };
|
||||
char *data;
|
||||
int res;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user