mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-28 16:56:26 +00:00
treewide: Remove uninitialized_var() usage
commit 3f649ab728
upstream.
Using uninitialized_var() is dangerous as it papers over real bugs[1]
(or can in the future), and suppresses unrelated compiler warnings
(e.g. "unused variable"). If the compiler thinks it is uninitialized,
either simply initialize the variable or make compiler changes.
In preparation for removing[2] the[3] macro[4], remove all remaining
needless uses with the following script:
git grep '\buninitialized_var\b' | cut -d: -f1 | sort -u | \
xargs perl -pi -e \
's/\buninitialized_var\(([^\)]+)\)/\1/g;
s:\s*/\* (GCC be quiet|to make compiler happy) \*/$::g;'
drivers/video/fbdev/riva/riva_hw.c was manually tweaked to avoid
pathological white-space.
No outstanding warnings were found building allmodconfig with GCC 9.3.0
for x86_64, i386, arm64, arm, powerpc, powerpc64le, s390x, mips, sparc64,
alpha, and m68k.
[1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/
[2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/
[3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/
[4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/
Reviewed-by: Leon Romanovsky <leonro@mellanox.com> # drivers/infiniband and mlx4/mlx5
Acked-by: Jason Gunthorpe <jgg@mellanox.com> # IB
Acked-by: Kalle Valo <kvalo@codeaurora.org> # wireless drivers
Reviewed-by: Chao Yu <yuchao0@huawei.com> # erofs
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8f23778dce
commit
d68627697d
@ -518,7 +518,7 @@ static void __init map_sa1100_gpio_regs( void )
|
||||
*/
|
||||
static void __init get_assabet_scr(void)
|
||||
{
|
||||
unsigned long uninitialized_var(scr), i;
|
||||
unsigned long scr, i;
|
||||
|
||||
GPDR |= 0x3fc; /* Configure GPIO 9:2 as outputs */
|
||||
GPSR = 0x3fc; /* Write 0xFF to GPIO 9:2 */
|
||||
|
@ -448,7 +448,7 @@ static void
|
||||
do_copy_task_regs (struct task_struct *task, struct unw_frame_info *info, void *arg)
|
||||
{
|
||||
unsigned long mask, sp, nat_bits = 0, ar_rnat, urbs_end, cfm;
|
||||
unsigned long uninitialized_var(ip); /* GCC be quiet */
|
||||
unsigned long ip;
|
||||
elf_greg_t *dst = arg;
|
||||
struct pt_regs *pt;
|
||||
char nat;
|
||||
|
@ -185,7 +185,7 @@ static void *per_cpu_node_setup(void *cpu_data, int node)
|
||||
void __init setup_per_cpu_areas(void)
|
||||
{
|
||||
struct pcpu_alloc_info *ai;
|
||||
struct pcpu_group_info *uninitialized_var(gi);
|
||||
struct pcpu_group_info *gi;
|
||||
unsigned int *cpu_map;
|
||||
void *base;
|
||||
unsigned long base_offset;
|
||||
|
@ -339,7 +339,7 @@ EXPORT_SYMBOL(flush_tlb_range);
|
||||
|
||||
void ia64_tlb_init(void)
|
||||
{
|
||||
ia64_ptce_info_t uninitialized_var(ptce_info); /* GCC be quiet */
|
||||
ia64_ptce_info_t ptce_info;
|
||||
u64 tr_pgbits;
|
||||
long status;
|
||||
pal_vm_info_1_u_t vm_info_1;
|
||||
|
@ -340,7 +340,7 @@ static int mpc52xx_irqhost_map(struct irq_domain *h, unsigned int virq,
|
||||
{
|
||||
int l1irq;
|
||||
int l2irq;
|
||||
struct irq_chip *uninitialized_var(irqchip);
|
||||
struct irq_chip *irqchip;
|
||||
void *hndlr;
|
||||
int type;
|
||||
u32 reg;
|
||||
|
@ -147,7 +147,7 @@ static int pcpu_sigp_retry(struct pcpu *pcpu, u8 order, u32 parm)
|
||||
|
||||
static inline int pcpu_stopped(struct pcpu *pcpu)
|
||||
{
|
||||
u32 uninitialized_var(status);
|
||||
u32 status;
|
||||
|
||||
if (__pcpu_sigp(pcpu->address, SIGP_SENSE,
|
||||
0, &status) != SIGP_CC_STATUS_STORED)
|
||||
|
@ -96,7 +96,7 @@ static void ich_force_hpet_resume(void)
|
||||
static void ich_force_enable_hpet(struct pci_dev *dev)
|
||||
{
|
||||
u32 val;
|
||||
u32 uninitialized_var(rcba);
|
||||
u32 rcba;
|
||||
int err = 0;
|
||||
|
||||
if (hpet_address || force_hpet_address)
|
||||
@ -186,7 +186,7 @@ static void hpet_print_force_info(void)
|
||||
static void old_ich_force_hpet_resume(void)
|
||||
{
|
||||
u32 val;
|
||||
u32 uninitialized_var(gen_cntl);
|
||||
u32 gen_cntl;
|
||||
|
||||
if (!force_hpet_address || !cached_dev)
|
||||
return;
|
||||
@ -208,7 +208,7 @@ static void old_ich_force_hpet_resume(void)
|
||||
static void old_ich_force_enable_hpet(struct pci_dev *dev)
|
||||
{
|
||||
u32 val;
|
||||
u32 uninitialized_var(gen_cntl);
|
||||
u32 gen_cntl;
|
||||
|
||||
if (hpet_address || force_hpet_address)
|
||||
return;
|
||||
@ -299,7 +299,7 @@ static void vt8237_force_hpet_resume(void)
|
||||
|
||||
static void vt8237_force_enable_hpet(struct pci_dev *dev)
|
||||
{
|
||||
u32 uninitialized_var(val);
|
||||
u32 val;
|
||||
|
||||
if (hpet_address || force_hpet_address)
|
||||
return;
|
||||
@ -430,7 +430,7 @@ static void nvidia_force_hpet_resume(void)
|
||||
|
||||
static void nvidia_force_enable_hpet(struct pci_dev *dev)
|
||||
{
|
||||
u32 uninitialized_var(val);
|
||||
u32 val;
|
||||
|
||||
if (hpet_address || force_hpet_address)
|
||||
return;
|
||||
|
@ -95,7 +95,7 @@ static void round_robin_cpu(unsigned int tsk_index)
|
||||
cpumask_var_t tmp;
|
||||
int cpu;
|
||||
unsigned long min_weight = -1;
|
||||
unsigned long uninitialized_var(preferred_cpu);
|
||||
unsigned long preferred_cpu;
|
||||
|
||||
if (!alloc_cpumask_var(&tmp, GFP_KERNEL))
|
||||
return;
|
||||
|
@ -176,7 +176,7 @@ static ssize_t ata_scsi_park_show(struct device *device,
|
||||
struct ata_link *link;
|
||||
struct ata_device *dev;
|
||||
unsigned long now;
|
||||
unsigned int uninitialized_var(msecs);
|
||||
unsigned int msecs;
|
||||
int rc = 0;
|
||||
|
||||
ap = ata_shost_to_port(sdev->host);
|
||||
|
@ -939,7 +939,7 @@ static int open_tx_first(struct atm_vcc *vcc)
|
||||
vcc->qos.txtp.max_pcr >= ATM_OC3_PCR);
|
||||
if (unlimited && zatm_dev->ubr != -1) zatm_vcc->shaper = zatm_dev->ubr;
|
||||
else {
|
||||
int uninitialized_var(pcr);
|
||||
int pcr;
|
||||
|
||||
if (unlimited) vcc->qos.txtp.max_sdu = ATM_MAX_AAL5_PDU;
|
||||
if ((zatm_vcc->shaper = alloc_shaper(vcc->dev,&pcr,
|
||||
|
@ -3394,7 +3394,7 @@ int drbd_adm_dump_devices(struct sk_buff *skb, struct netlink_callback *cb)
|
||||
{
|
||||
struct nlattr *resource_filter;
|
||||
struct drbd_resource *resource;
|
||||
struct drbd_device *uninitialized_var(device);
|
||||
struct drbd_device *device;
|
||||
int minor, err, retcode;
|
||||
struct drbd_genlmsghdr *dh;
|
||||
struct device_info device_info;
|
||||
@ -3483,7 +3483,7 @@ int drbd_adm_dump_connections(struct sk_buff *skb, struct netlink_callback *cb)
|
||||
{
|
||||
struct nlattr *resource_filter;
|
||||
struct drbd_resource *resource = NULL, *next_resource;
|
||||
struct drbd_connection *uninitialized_var(connection);
|
||||
struct drbd_connection *connection;
|
||||
int err = 0, retcode;
|
||||
struct drbd_genlmsghdr *dh;
|
||||
struct connection_info connection_info;
|
||||
@ -3645,7 +3645,7 @@ int drbd_adm_dump_peer_devices(struct sk_buff *skb, struct netlink_callback *cb)
|
||||
{
|
||||
struct nlattr *resource_filter;
|
||||
struct drbd_resource *resource;
|
||||
struct drbd_device *uninitialized_var(device);
|
||||
struct drbd_device *device;
|
||||
struct drbd_peer_device *peer_device = NULL;
|
||||
int minor, err, retcode;
|
||||
struct drbd_genlmsghdr *dh;
|
||||
|
@ -43,7 +43,7 @@ static void clk_gate_endisable(struct clk_hw *hw, int enable)
|
||||
{
|
||||
struct clk_gate *gate = to_clk_gate(hw);
|
||||
int set = gate->flags & CLK_GATE_SET_TO_DISABLE ? 1 : 0;
|
||||
unsigned long uninitialized_var(flags);
|
||||
unsigned long flags;
|
||||
u32 reg;
|
||||
|
||||
set ^= enable;
|
||||
|
@ -1114,7 +1114,7 @@ static void context_tasklet(unsigned long data)
|
||||
static int context_add_buffer(struct context *ctx)
|
||||
{
|
||||
struct descriptor_buffer *desc;
|
||||
dma_addr_t uninitialized_var(bus_addr);
|
||||
dma_addr_t bus_addr;
|
||||
int offset;
|
||||
|
||||
/*
|
||||
@ -1304,7 +1304,7 @@ static int at_context_queue_packet(struct context *ctx,
|
||||
struct fw_packet *packet)
|
||||
{
|
||||
struct fw_ohci *ohci = ctx->ohci;
|
||||
dma_addr_t d_bus, uninitialized_var(payload_bus);
|
||||
dma_addr_t d_bus, payload_bus;
|
||||
struct driver_data *driver_data;
|
||||
struct descriptor *d, *last;
|
||||
__le32 *header;
|
||||
@ -2460,7 +2460,7 @@ static int ohci_set_config_rom(struct fw_card *card,
|
||||
{
|
||||
struct fw_ohci *ohci;
|
||||
__be32 *next_config_rom;
|
||||
dma_addr_t uninitialized_var(next_config_rom_bus);
|
||||
dma_addr_t next_config_rom_bus;
|
||||
|
||||
ohci = fw_ohci(card);
|
||||
|
||||
@ -2949,10 +2949,10 @@ static struct fw_iso_context *ohci_allocate_iso_context(struct fw_card *card,
|
||||
int type, int channel, size_t header_size)
|
||||
{
|
||||
struct fw_ohci *ohci = fw_ohci(card);
|
||||
struct iso_context *uninitialized_var(ctx);
|
||||
descriptor_callback_t uninitialized_var(callback);
|
||||
u64 *uninitialized_var(channels);
|
||||
u32 *uninitialized_var(mask), uninitialized_var(regs);
|
||||
struct iso_context *ctx;
|
||||
descriptor_callback_t callback;
|
||||
u64 *channels;
|
||||
u32 *mask, regs;
|
||||
int index, ret = -EBUSY;
|
||||
|
||||
spin_lock_irq(&ohci->lock);
|
||||
|
@ -1011,7 +1011,7 @@ static void sii8620_set_auto_zone(struct sii8620 *ctx)
|
||||
|
||||
static void sii8620_stop_video(struct sii8620 *ctx)
|
||||
{
|
||||
u8 uninitialized_var(val);
|
||||
u8 val;
|
||||
|
||||
sii8620_write_seq_static(ctx,
|
||||
REG_TPI_INTR_EN, 0,
|
||||
|
@ -2671,7 +2671,7 @@ static int drm_cvt_modes(struct drm_connector *connector,
|
||||
const u8 empty[3] = { 0, 0, 0 };
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
int uninitialized_var(width), height;
|
||||
int width, height;
|
||||
cvt = &(timing->data.other_data.data.cvt[i]);
|
||||
|
||||
if (!memcmp(cvt->code, empty, 3))
|
||||
|
@ -545,9 +545,9 @@ static unsigned long exynos_dsi_pll_find_pms(struct exynos_dsi *dsi,
|
||||
unsigned long best_freq = 0;
|
||||
u32 min_delta = 0xffffffff;
|
||||
u8 p_min, p_max;
|
||||
u8 _p, uninitialized_var(best_p);
|
||||
u16 _m, uninitialized_var(best_m);
|
||||
u8 _s, uninitialized_var(best_s);
|
||||
u8 _p, best_p;
|
||||
u16 _m, best_m;
|
||||
u8 _s, best_s;
|
||||
|
||||
p_min = DIV_ROUND_UP(fin, (12 * MHZ));
|
||||
p_max = fin / (6 * MHZ);
|
||||
|
@ -417,7 +417,7 @@ static void rk3x_i2c_handle_read(struct rk3x_i2c *i2c, unsigned int ipd)
|
||||
{
|
||||
unsigned int i;
|
||||
unsigned int len = i2c->msg->len - i2c->processed;
|
||||
u32 uninitialized_var(val);
|
||||
u32 val;
|
||||
u8 byte;
|
||||
|
||||
/* we only care for MBRF here. */
|
||||
|
@ -180,7 +180,7 @@ static int ide_get_dev_handle(struct device *dev, acpi_handle *handle,
|
||||
static acpi_handle ide_acpi_hwif_get_handle(ide_hwif_t *hwif)
|
||||
{
|
||||
struct device *dev = hwif->gendev.parent;
|
||||
acpi_handle uninitialized_var(dev_handle);
|
||||
acpi_handle dev_handle;
|
||||
u64 pcidevfn;
|
||||
acpi_handle chan_handle;
|
||||
int err;
|
||||
|
@ -591,7 +591,7 @@ static int ide_delayed_transfer_pc(ide_drive_t *drive)
|
||||
|
||||
static ide_startstop_t ide_transfer_pc(ide_drive_t *drive)
|
||||
{
|
||||
struct ide_atapi_pc *uninitialized_var(pc);
|
||||
struct ide_atapi_pc *pc;
|
||||
ide_hwif_t *hwif = drive->hwif;
|
||||
struct request *rq = hwif->rq;
|
||||
ide_expiry_t *expiry;
|
||||
|
@ -172,7 +172,7 @@ void ide_input_data(ide_drive_t *drive, struct ide_cmd *cmd, void *buf,
|
||||
u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0;
|
||||
|
||||
if (io_32bit) {
|
||||
unsigned long uninitialized_var(flags);
|
||||
unsigned long flags;
|
||||
|
||||
if ((io_32bit & 2) && !mmio) {
|
||||
local_irq_save(flags);
|
||||
@ -216,7 +216,7 @@ void ide_output_data(ide_drive_t *drive, struct ide_cmd *cmd, void *buf,
|
||||
u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0;
|
||||
|
||||
if (io_32bit) {
|
||||
unsigned long uninitialized_var(flags);
|
||||
unsigned long flags;
|
||||
|
||||
if ((io_32bit & 2) && !mmio) {
|
||||
local_irq_save(flags);
|
||||
|
@ -767,13 +767,13 @@ irqreturn_t ide_intr (int irq, void *dev_id)
|
||||
{
|
||||
ide_hwif_t *hwif = (ide_hwif_t *)dev_id;
|
||||
struct ide_host *host = hwif->host;
|
||||
ide_drive_t *uninitialized_var(drive);
|
||||
ide_drive_t *drive;
|
||||
ide_handler_t *handler;
|
||||
unsigned long flags;
|
||||
ide_startstop_t startstop;
|
||||
irqreturn_t irq_ret = IRQ_NONE;
|
||||
int plug_device = 0;
|
||||
struct request *uninitialized_var(rq_in_flight);
|
||||
struct request *rq_in_flight;
|
||||
|
||||
if (host->host_flags & IDE_HFLAG_SERIALIZE) {
|
||||
if (hwif != host->cur_port)
|
||||
|
@ -131,7 +131,7 @@ static struct device_attribute *ide_port_attrs[] = {
|
||||
|
||||
int ide_sysfs_register_port(ide_hwif_t *hwif)
|
||||
{
|
||||
int i, uninitialized_var(rc);
|
||||
int i, rc;
|
||||
|
||||
for (i = 0; ide_port_attrs[i]; i++) {
|
||||
rc = device_create_file(hwif->portdev, ide_port_attrs[i]);
|
||||
|
@ -107,7 +107,7 @@ static void umc_set_speeds(u8 speeds[])
|
||||
static void umc_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
|
||||
{
|
||||
ide_hwif_t *mate = hwif->mate;
|
||||
unsigned long uninitialized_var(flags);
|
||||
unsigned long flags;
|
||||
const u8 pio = drive->pio_mode - XFER_PIO_0;
|
||||
|
||||
printk("%s: setting umc8672 to PIO mode%d (speed %d)\n",
|
||||
|
@ -1738,7 +1738,7 @@ ssize_t ib_uverbs_open_qp(struct ib_uverbs_file *file,
|
||||
struct ib_udata udata;
|
||||
struct ib_uqp_object *obj;
|
||||
struct ib_xrcd *xrcd;
|
||||
struct ib_uobject *uninitialized_var(xrcd_uobj);
|
||||
struct ib_uobject *xrcd_uobj;
|
||||
struct ib_qp *qp;
|
||||
struct ib_qp_open_attr attr;
|
||||
int ret;
|
||||
@ -3538,7 +3538,7 @@ static int __uverbs_create_xsrq(struct ib_uverbs_file *file,
|
||||
struct ib_usrq_object *obj;
|
||||
struct ib_pd *pd;
|
||||
struct ib_srq *srq;
|
||||
struct ib_uobject *uninitialized_var(xrcd_uobj);
|
||||
struct ib_uobject *xrcd_uobj;
|
||||
struct ib_srq_init_attr attr;
|
||||
int ret;
|
||||
|
||||
|
@ -3168,7 +3168,7 @@ static int get_lladdr(struct net_device *dev, struct in6_addr *addr,
|
||||
|
||||
static int pick_local_ip6addrs(struct c4iw_dev *dev, struct iw_cm_id *cm_id)
|
||||
{
|
||||
struct in6_addr uninitialized_var(addr);
|
||||
struct in6_addr addr;
|
||||
struct sockaddr_in6 *la6 = (struct sockaddr_in6 *)&cm_id->m_local_addr;
|
||||
struct sockaddr_in6 *ra6 = (struct sockaddr_in6 *)&cm_id->m_remote_addr;
|
||||
|
||||
|
@ -1285,7 +1285,7 @@ int mlx5_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata)
|
||||
__be64 *pas;
|
||||
int page_shift;
|
||||
int inlen;
|
||||
int uninitialized_var(cqe_size);
|
||||
int cqe_size;
|
||||
unsigned long flags;
|
||||
|
||||
if (!MLX5_CAP_GEN(dev->mdev, cq_resize)) {
|
||||
|
@ -1630,8 +1630,8 @@ int mthca_tavor_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
|
||||
* without initializing f0 and size0, and they are in fact
|
||||
* never used uninitialized.
|
||||
*/
|
||||
int uninitialized_var(size0);
|
||||
u32 uninitialized_var(f0);
|
||||
int size0;
|
||||
u32 f0;
|
||||
int ind;
|
||||
u8 op0 = 0;
|
||||
|
||||
@ -1831,7 +1831,7 @@ int mthca_tavor_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr,
|
||||
* without initializing size0, and it is in fact never used
|
||||
* uninitialized.
|
||||
*/
|
||||
int uninitialized_var(size0);
|
||||
int size0;
|
||||
int ind;
|
||||
void *wqe;
|
||||
void *prev_wqe;
|
||||
@ -1945,8 +1945,8 @@ int mthca_arbel_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
|
||||
* without initializing f0 and size0, and they are in fact
|
||||
* never used uninitialized.
|
||||
*/
|
||||
int uninitialized_var(size0);
|
||||
u32 uninitialized_var(f0);
|
||||
int size0;
|
||||
u32 f0;
|
||||
int ind;
|
||||
u8 op0 = 0;
|
||||
|
||||
|
@ -162,7 +162,7 @@ static ssize_t serio_raw_read(struct file *file, char __user *buffer,
|
||||
{
|
||||
struct serio_raw_client *client = file->private_data;
|
||||
struct serio_raw *serio_raw = client->serio_raw;
|
||||
char uninitialized_var(c);
|
||||
char c;
|
||||
ssize_t read = 0;
|
||||
int error;
|
||||
|
||||
|
@ -306,7 +306,7 @@ static void do_region(int op, int op_flags, unsigned region,
|
||||
struct request_queue *q = bdev_get_queue(where->bdev);
|
||||
unsigned short logical_block_size = queue_logical_block_size(q);
|
||||
sector_t num_sectors;
|
||||
unsigned int uninitialized_var(special_cmd_max_sectors);
|
||||
unsigned int special_cmd_max_sectors;
|
||||
|
||||
/*
|
||||
* Reject unsupported discard and write same requests.
|
||||
|
@ -1821,7 +1821,7 @@ static int ctl_ioctl(struct file *file, uint command, struct dm_ioctl __user *us
|
||||
int ioctl_flags;
|
||||
int param_flags;
|
||||
unsigned int cmd;
|
||||
struct dm_ioctl *uninitialized_var(param);
|
||||
struct dm_ioctl *param;
|
||||
ioctl_fn fn = NULL;
|
||||
size_t input_param_size;
|
||||
struct dm_ioctl param_kernel;
|
||||
|
@ -613,7 +613,7 @@ static int persistent_read_metadata(struct dm_exception_store *store,
|
||||
chunk_t old, chunk_t new),
|
||||
void *callback_context)
|
||||
{
|
||||
int r, uninitialized_var(new_snapshot);
|
||||
int r, new_snapshot;
|
||||
struct pstore *ps = get_info(store);
|
||||
|
||||
/*
|
||||
|
@ -670,7 +670,7 @@ static int validate_hardware_logical_block_alignment(struct dm_table *table,
|
||||
*/
|
||||
unsigned short remaining = 0;
|
||||
|
||||
struct dm_target *uninitialized_var(ti);
|
||||
struct dm_target *ti;
|
||||
struct queue_limits ti_limits;
|
||||
unsigned i;
|
||||
|
||||
|
@ -2601,7 +2601,7 @@ static void raid5_end_write_request(struct bio *bi)
|
||||
struct stripe_head *sh = bi->bi_private;
|
||||
struct r5conf *conf = sh->raid_conf;
|
||||
int disks = sh->disks, i;
|
||||
struct md_rdev *uninitialized_var(rdev);
|
||||
struct md_rdev *rdev;
|
||||
sector_t first_bad;
|
||||
int bad_sectors;
|
||||
int replacement = 0;
|
||||
|
@ -653,7 +653,7 @@ static int rtl2832_read_status(struct dvb_frontend *fe, enum fe_status *status)
|
||||
struct i2c_client *client = dev->client;
|
||||
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
|
||||
int ret;
|
||||
u32 uninitialized_var(tmp);
|
||||
u32 tmp;
|
||||
u8 u8tmp, buf[2];
|
||||
u16 u16tmp;
|
||||
|
||||
|
@ -234,7 +234,7 @@ static int sd_init(struct gspca_dev *gspca_dev)
|
||||
{
|
||||
int ret;
|
||||
const struct ihex_binrec *rec;
|
||||
const struct firmware *uninitialized_var(fw);
|
||||
const struct firmware *fw;
|
||||
u8 *firmware_buf;
|
||||
|
||||
ret = request_ihex_firmware(&fw, VICAM_FIRMWARE,
|
||||
|
@ -766,9 +766,9 @@ static void uvc_video_stats_decode(struct uvc_streaming *stream,
|
||||
unsigned int header_size;
|
||||
bool has_pts = false;
|
||||
bool has_scr = false;
|
||||
u16 uninitialized_var(scr_sof);
|
||||
u32 uninitialized_var(scr_stc);
|
||||
u32 uninitialized_var(pts);
|
||||
u16 scr_sof;
|
||||
u32 scr_stc;
|
||||
u32 pts;
|
||||
|
||||
if (stream->stats.stream.nb_frames == 0 &&
|
||||
stream->stats.frame.nb_packets == 0)
|
||||
@ -1656,7 +1656,7 @@ static int uvc_init_video(struct uvc_streaming *stream, gfp_t gfp_flags)
|
||||
struct usb_host_endpoint *best_ep = NULL;
|
||||
unsigned int best_psize = UINT_MAX;
|
||||
unsigned int bandwidth;
|
||||
unsigned int uninitialized_var(altsetting);
|
||||
unsigned int altsetting;
|
||||
int intfnum = stream->intfnum;
|
||||
|
||||
/* Isochronous endpoint, select the alternate setting. */
|
||||
|
@ -315,7 +315,7 @@ static int jmb38x_ms_transfer_data(struct jmb38x_ms_host *host)
|
||||
}
|
||||
|
||||
while (length) {
|
||||
unsigned int uninitialized_var(p_off);
|
||||
unsigned int p_off;
|
||||
|
||||
if (host->req->long_data) {
|
||||
pg = nth_page(sg_page(&host->req->sg),
|
||||
|
@ -200,7 +200,7 @@ static unsigned int tifm_ms_transfer_data(struct tifm_ms *host)
|
||||
host->block_pos);
|
||||
|
||||
while (length) {
|
||||
unsigned int uninitialized_var(p_off);
|
||||
unsigned int p_off;
|
||||
|
||||
if (host->req->long_data) {
|
||||
pg = nth_page(sg_page(&host->req->sg),
|
||||
|
@ -374,7 +374,7 @@ static void sdhci_read_block_pio(struct sdhci_host *host)
|
||||
{
|
||||
unsigned long flags;
|
||||
size_t blksize, len, chunk;
|
||||
u32 uninitialized_var(scratch);
|
||||
u32 scratch;
|
||||
u8 *buf;
|
||||
|
||||
DBG("PIO reading\n");
|
||||
|
@ -595,7 +595,7 @@ int ubi_eba_read_leb(struct ubi_device *ubi, struct ubi_volume *vol, int lnum,
|
||||
int err, pnum, scrub = 0, vol_id = vol->vol_id;
|
||||
struct ubi_vid_io_buf *vidb;
|
||||
struct ubi_vid_hdr *vid_hdr;
|
||||
uint32_t uninitialized_var(crc);
|
||||
uint32_t crc;
|
||||
|
||||
err = leb_read_lock(ubi, vol_id, lnum);
|
||||
if (err)
|
||||
|
@ -1455,7 +1455,7 @@ static int ican3_napi(struct napi_struct *napi, int budget)
|
||||
|
||||
/* process all communication messages */
|
||||
while (true) {
|
||||
struct ican3_msg uninitialized_var(msg);
|
||||
struct ican3_msg msg;
|
||||
ret = ican3_recv_msg(mod, &msg);
|
||||
if (ret)
|
||||
break;
|
||||
|
@ -1460,7 +1460,7 @@ bnx2_test_and_disable_2g5(struct bnx2 *bp)
|
||||
static void
|
||||
bnx2_enable_forced_2g5(struct bnx2 *bp)
|
||||
{
|
||||
u32 uninitialized_var(bmcr);
|
||||
u32 bmcr;
|
||||
int err;
|
||||
|
||||
if (!(bp->phy_flags & BNX2_PHY_FLAG_2_5G_CAPABLE))
|
||||
@ -1504,7 +1504,7 @@ bnx2_enable_forced_2g5(struct bnx2 *bp)
|
||||
static void
|
||||
bnx2_disable_forced_2g5(struct bnx2 *bp)
|
||||
{
|
||||
u32 uninitialized_var(bmcr);
|
||||
u32 bmcr;
|
||||
int err;
|
||||
|
||||
if (!(bp->phy_flags & BNX2_PHY_FLAG_2_5G_CAPABLE))
|
||||
|
@ -471,8 +471,8 @@ void mlx5_core_req_pages_handler(struct mlx5_core_dev *dev, u16 func_id,
|
||||
|
||||
int mlx5_satisfy_startup_pages(struct mlx5_core_dev *dev, int boot)
|
||||
{
|
||||
u16 uninitialized_var(func_id);
|
||||
s32 uninitialized_var(npages);
|
||||
u16 func_id;
|
||||
s32 npages;
|
||||
int err;
|
||||
|
||||
err = mlx5_cmd_query_pages(dev, &func_id, &npages, boot);
|
||||
|
@ -7296,7 +7296,7 @@ static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp)
|
||||
int ring_no = ring_data->ring_no;
|
||||
u16 l3_csum, l4_csum;
|
||||
unsigned long long err = rxdp->Control_1 & RXD_T_CODE;
|
||||
struct lro *uninitialized_var(lro);
|
||||
struct lro *lro;
|
||||
u8 err_mask;
|
||||
struct swStat *swstats = &sp->mac_control.stats_info->sw_stat;
|
||||
|
||||
|
@ -3770,7 +3770,7 @@ static int ql3xxx_probe(struct pci_dev *pdev,
|
||||
struct net_device *ndev = NULL;
|
||||
struct ql3_adapter *qdev = NULL;
|
||||
static int cards_found;
|
||||
int uninitialized_var(pci_using_dac), err;
|
||||
int pci_using_dac, err;
|
||||
|
||||
err = pci_enable_device(pdev);
|
||||
if (err) {
|
||||
|
@ -2303,7 +2303,7 @@ static int cas_rx_ringN(struct cas *cp, int ring, int budget)
|
||||
drops = 0;
|
||||
while (1) {
|
||||
struct cas_rx_comp *rxc = rxcs + entry;
|
||||
struct sk_buff *uninitialized_var(skb);
|
||||
struct sk_buff *skb;
|
||||
int type, len;
|
||||
u64 words[4];
|
||||
int i, dring;
|
||||
|
@ -428,7 +428,7 @@ static int serdes_init_niu_1g_serdes(struct niu *np)
|
||||
struct niu_link_config *lp = &np->link_config;
|
||||
u16 pll_cfg, pll_sts;
|
||||
int max_retry = 100;
|
||||
u64 uninitialized_var(sig), mask, val;
|
||||
u64 sig, mask, val;
|
||||
u32 tx_cfg, rx_cfg;
|
||||
unsigned long i;
|
||||
int err;
|
||||
@ -525,7 +525,7 @@ static int serdes_init_niu_10g_serdes(struct niu *np)
|
||||
struct niu_link_config *lp = &np->link_config;
|
||||
u32 tx_cfg, rx_cfg, pll_cfg, pll_sts;
|
||||
int max_retry = 100;
|
||||
u64 uninitialized_var(sig), mask, val;
|
||||
u64 sig, mask, val;
|
||||
unsigned long i;
|
||||
int err;
|
||||
|
||||
@ -713,7 +713,7 @@ static int esr_write_glue0(struct niu *np, unsigned long chan, u32 val)
|
||||
|
||||
static int esr_reset(struct niu *np)
|
||||
{
|
||||
u32 uninitialized_var(reset);
|
||||
u32 reset;
|
||||
int err;
|
||||
|
||||
err = mdio_write(np, np->port, NIU_ESR_DEV_ADDR,
|
||||
|
@ -705,7 +705,7 @@ EXPORT_SYMBOL(z8530_nop);
|
||||
irqreturn_t z8530_interrupt(int irq, void *dev_id)
|
||||
{
|
||||
struct z8530_dev *dev=dev_id;
|
||||
u8 uninitialized_var(intr);
|
||||
u8 intr;
|
||||
static volatile int locker=0;
|
||||
int work=0;
|
||||
struct z8530_irqhandler *irqs;
|
||||
|
@ -1657,7 +1657,7 @@ static int ath10k_init_uart(struct ath10k *ar)
|
||||
|
||||
static int ath10k_init_hw_params(struct ath10k *ar)
|
||||
{
|
||||
const struct ath10k_hw_params *uninitialized_var(hw_params);
|
||||
const struct ath10k_hw_params *hw_params;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(ath10k_hw_params_list); i++) {
|
||||
|
@ -1575,7 +1575,7 @@ static int ath6kl_init_upload(struct ath6kl *ar)
|
||||
|
||||
int ath6kl_init_hw_params(struct ath6kl *ar)
|
||||
{
|
||||
const struct ath6kl_hw *uninitialized_var(hw);
|
||||
const struct ath6kl_hw *hw;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(hw_list); i++) {
|
||||
|
@ -175,7 +175,7 @@ static unsigned int ath9k_reg_rmw(void *hw_priv, u32 reg_offset, u32 set, u32 cl
|
||||
struct ath_hw *ah = (struct ath_hw *) hw_priv;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
struct ath_softc *sc = (struct ath_softc *) common->priv;
|
||||
unsigned long uninitialized_var(flags);
|
||||
unsigned long flags;
|
||||
u32 val;
|
||||
|
||||
if (NR_CPUS > 1 && ah->config.serialize_regmode == SER_REG_MODE_ON) {
|
||||
|
@ -506,7 +506,7 @@ static ssize_t b43_debugfs_read(struct file *file, char __user *userbuf,
|
||||
struct b43_wldev *dev;
|
||||
struct b43_debugfs_fops *dfops;
|
||||
struct b43_dfs_file *dfile;
|
||||
ssize_t uninitialized_var(ret);
|
||||
ssize_t ret;
|
||||
char *buf;
|
||||
const size_t bufsize = 1024 * 16; /* 16 kiB buffer */
|
||||
const size_t buforder = get_order(bufsize);
|
||||
|
@ -50,7 +50,7 @@
|
||||
static u32 b43_dma_address(struct b43_dma *dma, dma_addr_t dmaaddr,
|
||||
enum b43_addrtype addrtype)
|
||||
{
|
||||
u32 uninitialized_var(addr);
|
||||
u32 addr;
|
||||
|
||||
switch (addrtype) {
|
||||
case B43_DMA_ADDR_LOW:
|
||||
|
@ -742,7 +742,7 @@ struct b43_lo_calib *b43_calibrate_lo_setting(struct b43_wldev *dev,
|
||||
};
|
||||
int max_rx_gain;
|
||||
struct b43_lo_calib *cal;
|
||||
struct lo_g_saved_values uninitialized_var(saved_regs);
|
||||
struct lo_g_saved_values saved_regs;
|
||||
/* Values from the "TXCTL Register and Value Table" */
|
||||
u16 txctl_reg;
|
||||
u16 txctl_value;
|
||||
|
@ -5655,7 +5655,7 @@ static int b43_nphy_rev2_cal_rx_iq(struct b43_wldev *dev,
|
||||
u8 rfctl[2];
|
||||
u8 afectl_core;
|
||||
u16 tmp[6];
|
||||
u16 uninitialized_var(cur_hpf1), uninitialized_var(cur_hpf2), cur_lna;
|
||||
u16 cur_hpf1, cur_hpf2, cur_lna;
|
||||
u32 real, imag;
|
||||
enum nl80211_band band;
|
||||
|
||||
|
@ -435,10 +435,10 @@ int b43_generate_txhdr(struct b43_wldev *dev,
|
||||
if ((rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) ||
|
||||
(rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT)) {
|
||||
unsigned int len;
|
||||
struct ieee80211_hdr *uninitialized_var(hdr);
|
||||
struct ieee80211_hdr *hdr;
|
||||
int rts_rate, rts_rate_fb;
|
||||
int rts_rate_ofdm, rts_rate_fb_ofdm;
|
||||
struct b43_plcp_hdr6 *uninitialized_var(plcp);
|
||||
struct b43_plcp_hdr6 *plcp;
|
||||
struct ieee80211_rate *rts_cts_rate;
|
||||
|
||||
rts_cts_rate = ieee80211_get_rts_cts_rate(dev->wl->hw, info);
|
||||
@ -449,7 +449,7 @@ int b43_generate_txhdr(struct b43_wldev *dev,
|
||||
rts_rate_fb_ofdm = b43_is_ofdm_rate(rts_rate_fb);
|
||||
|
||||
if (rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT) {
|
||||
struct ieee80211_cts *uninitialized_var(cts);
|
||||
struct ieee80211_cts *cts;
|
||||
|
||||
switch (dev->fw.hdr_format) {
|
||||
case B43_FW_HDR_598:
|
||||
@ -471,7 +471,7 @@ int b43_generate_txhdr(struct b43_wldev *dev,
|
||||
mac_ctl |= B43_TXH_MAC_SENDCTS;
|
||||
len = sizeof(struct ieee80211_cts);
|
||||
} else {
|
||||
struct ieee80211_rts *uninitialized_var(rts);
|
||||
struct ieee80211_rts *rts;
|
||||
|
||||
switch (dev->fw.hdr_format) {
|
||||
case B43_FW_HDR_598:
|
||||
@ -663,8 +663,8 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
|
||||
const struct b43_rxhdr_fw4 *rxhdr = _rxhdr;
|
||||
__le16 fctl;
|
||||
u16 phystat0, phystat3;
|
||||
u16 uninitialized_var(chanstat), uninitialized_var(mactime);
|
||||
u32 uninitialized_var(macstat);
|
||||
u16 chanstat, mactime;
|
||||
u32 macstat;
|
||||
u16 chanid;
|
||||
int padding, rate_idx;
|
||||
|
||||
|
@ -203,7 +203,7 @@ static ssize_t b43legacy_debugfs_read(struct file *file, char __user *userbuf,
|
||||
struct b43legacy_wldev *dev;
|
||||
struct b43legacy_debugfs_fops *dfops;
|
||||
struct b43legacy_dfs_file *dfile;
|
||||
ssize_t uninitialized_var(ret);
|
||||
ssize_t ret;
|
||||
char *buf;
|
||||
const size_t bufsize = 1024 * 16; /* 16 KiB buffer */
|
||||
const size_t buforder = get_order(bufsize);
|
||||
|
@ -2612,7 +2612,7 @@ static void b43legacy_put_phy_into_reset(struct b43legacy_wldev *dev)
|
||||
static int b43legacy_switch_phymode(struct b43legacy_wl *wl,
|
||||
unsigned int new_mode)
|
||||
{
|
||||
struct b43legacy_wldev *uninitialized_var(up_dev);
|
||||
struct b43legacy_wldev *up_dev;
|
||||
struct b43legacy_wldev *down_dev;
|
||||
int err;
|
||||
bool gmode = false;
|
||||
|
@ -2117,7 +2117,7 @@ il3945_txpower_set_from_eeprom(struct il_priv *il)
|
||||
|
||||
/* set tx power value for all OFDM rates */
|
||||
for (rate_idx = 0; rate_idx < IL_OFDM_RATES; rate_idx++) {
|
||||
s32 uninitialized_var(power_idx);
|
||||
s32 power_idx;
|
||||
int rc;
|
||||
|
||||
/* use channel group's clip-power table,
|
||||
|
@ -2787,7 +2787,7 @@ il4965_hdl_tx(struct il_priv *il, struct il_rx_buf *rxb)
|
||||
struct ieee80211_tx_info *info;
|
||||
struct il4965_tx_resp *tx_resp = (void *)&pkt->u.raw[0];
|
||||
u32 status = le32_to_cpu(tx_resp->u.status);
|
||||
int uninitialized_var(tid);
|
||||
int tid;
|
||||
int sta_id;
|
||||
int freed;
|
||||
u8 *qc = NULL;
|
||||
|
@ -378,7 +378,7 @@ static ssize_t hdaps_variance_show(struct device *dev,
|
||||
static ssize_t hdaps_temp1_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
u8 uninitialized_var(temp);
|
||||
u8 temp;
|
||||
int ret;
|
||||
|
||||
ret = hdaps_readb_one(HDAPS_PORT_TEMP1, &temp);
|
||||
@ -391,7 +391,7 @@ static ssize_t hdaps_temp1_show(struct device *dev,
|
||||
static ssize_t hdaps_temp2_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
u8 uninitialized_var(temp);
|
||||
u8 temp;
|
||||
int ret;
|
||||
|
||||
ret = hdaps_readb_one(HDAPS_PORT_TEMP2, &temp);
|
||||
|
@ -4279,7 +4279,7 @@ static int adapter_sg_tables_alloc(struct AdapterCtlBlk *acb)
|
||||
const unsigned srbs_per_page = PAGE_SIZE/SEGMENTX_LEN;
|
||||
int srb_idx = 0;
|
||||
unsigned i = 0;
|
||||
struct SGentry *uninitialized_var(ptr);
|
||||
struct SGentry *ptr;
|
||||
|
||||
for (i = 0; i < DC395x_MAX_SRB_CNT; i++)
|
||||
acb->srb_array[i].segment_x = NULL;
|
||||
|
@ -4165,7 +4165,7 @@ static int process_oq(struct pm8001_hba_info *pm8001_ha, u8 vec)
|
||||
{
|
||||
struct outbound_queue_table *circularQ;
|
||||
void *pMsg1 = NULL;
|
||||
u8 uninitialized_var(bc);
|
||||
u8 bc;
|
||||
u32 ret = MPI_IO_STATUS_FAIL;
|
||||
unsigned long flags;
|
||||
|
||||
|
@ -3776,7 +3776,7 @@ static int process_oq(struct pm8001_hba_info *pm8001_ha, u8 vec)
|
||||
{
|
||||
struct outbound_queue_table *circularQ;
|
||||
void *pMsg1 = NULL;
|
||||
u8 uninitialized_var(bc);
|
||||
u8 bc;
|
||||
u32 ret = MPI_IO_STATUS_FAIL;
|
||||
unsigned long flags;
|
||||
u32 regval;
|
||||
|
@ -119,7 +119,7 @@ void ssb_chipco_set_clockmode(struct ssb_chipcommon *cc,
|
||||
static enum ssb_clksrc chipco_pctl_get_slowclksrc(struct ssb_chipcommon *cc)
|
||||
{
|
||||
struct ssb_bus *bus = cc->dev->bus;
|
||||
u32 uninitialized_var(tmp);
|
||||
u32 tmp;
|
||||
|
||||
if (cc->dev->id.revision < 6) {
|
||||
if (bus->bustype == SSB_BUSTYPE_SSB ||
|
||||
@ -149,7 +149,7 @@ static enum ssb_clksrc chipco_pctl_get_slowclksrc(struct ssb_chipcommon *cc)
|
||||
/* Get maximum or minimum (depending on get_max flag) slowclock frequency. */
|
||||
static int chipco_pctl_clockfreqlimit(struct ssb_chipcommon *cc, int get_max)
|
||||
{
|
||||
int uninitialized_var(limit);
|
||||
int limit;
|
||||
enum ssb_clksrc clocksrc;
|
||||
int divisor = 1;
|
||||
u32 tmp;
|
||||
|
@ -3651,7 +3651,7 @@ static int cy_pci_probe(struct pci_dev *pdev,
|
||||
struct cyclades_card *card;
|
||||
void __iomem *addr0 = NULL, *addr2 = NULL;
|
||||
char *card_name = NULL;
|
||||
u32 uninitialized_var(mailbox);
|
||||
u32 mailbox;
|
||||
unsigned int device_id, nchan = 0, card_no, i, j;
|
||||
unsigned char plx_ver;
|
||||
int retval, irq;
|
||||
|
@ -1545,7 +1545,7 @@ static unsigned int card_count;
|
||||
static int isicom_probe(struct pci_dev *pdev,
|
||||
const struct pci_device_id *ent)
|
||||
{
|
||||
unsigned int uninitialized_var(signature), index;
|
||||
unsigned int signature, index;
|
||||
int retval = -EPERM;
|
||||
struct isi_board *board = NULL;
|
||||
|
||||
|
@ -1145,7 +1145,7 @@ irqreturn_t cppi_interrupt(int irq, void *dev_id)
|
||||
struct musb_hw_ep *hw_ep = NULL;
|
||||
u32 rx, tx;
|
||||
int i, index;
|
||||
unsigned long uninitialized_var(flags);
|
||||
unsigned long flags;
|
||||
|
||||
cppi = container_of(musb->dma_controller, struct cppi, controller);
|
||||
if (cppi->irq)
|
||||
|
@ -566,8 +566,8 @@ static int sddr55_reset(struct us_data *us)
|
||||
|
||||
static unsigned long sddr55_get_capacity(struct us_data *us) {
|
||||
|
||||
unsigned char uninitialized_var(manufacturerID);
|
||||
unsigned char uninitialized_var(deviceID);
|
||||
unsigned char manufacturerID;
|
||||
unsigned char deviceID;
|
||||
int result;
|
||||
struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra;
|
||||
|
||||
|
@ -678,7 +678,7 @@ static int get_rx_bufs(struct vhost_virtqueue *vq,
|
||||
/* len is always initialized before use since we are always called with
|
||||
* datalen > 0.
|
||||
*/
|
||||
u32 uninitialized_var(len);
|
||||
u32 len;
|
||||
|
||||
while (datalen > 0 && headcount < quota) {
|
||||
if (unlikely(seg >= UIO_MAXIOV)) {
|
||||
@ -735,7 +735,7 @@ static void handle_rx(struct vhost_net *net)
|
||||
{
|
||||
struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_RX];
|
||||
struct vhost_virtqueue *vq = &nvq->vq;
|
||||
unsigned uninitialized_var(in), log;
|
||||
unsigned in, log;
|
||||
struct vhost_log *vq_log;
|
||||
struct msghdr msg = {
|
||||
.msg_name = NULL,
|
||||
|
@ -299,7 +299,7 @@ static int matroxfb_mavenclock(const struct matrox_pll_ctl *ctl,
|
||||
unsigned int* in, unsigned int* feed, unsigned int* post,
|
||||
unsigned int* htotal2) {
|
||||
unsigned int fvco;
|
||||
unsigned int uninitialized_var(p);
|
||||
unsigned int p;
|
||||
|
||||
fvco = matroxfb_PLL_mavenclock(&maven1000_pll, ctl, htotal, vtotal, in, feed, &p, htotal2);
|
||||
if (!fvco)
|
||||
@ -731,8 +731,8 @@ static int maven_find_exact_clocks(unsigned int ht, unsigned int vt,
|
||||
|
||||
for (x = 0; x < 8; x++) {
|
||||
unsigned int c;
|
||||
unsigned int uninitialized_var(a), uninitialized_var(b),
|
||||
uninitialized_var(h2);
|
||||
unsigned int a, b,
|
||||
h2;
|
||||
unsigned int h = ht + 2 + x;
|
||||
|
||||
if (!matroxfb_mavenclock((m->mode == MATROXFB_OUTPUT_MODE_PAL) ? &maven_PAL : &maven_NTSC, h, vt, &a, &b, &c, &h2)) {
|
||||
|
@ -821,9 +821,9 @@ static void pm3fb_write_mode(struct fb_info *info)
|
||||
|
||||
wmb();
|
||||
{
|
||||
unsigned char uninitialized_var(m); /* ClkPreScale */
|
||||
unsigned char uninitialized_var(n); /* ClkFeedBackScale */
|
||||
unsigned char uninitialized_var(p); /* ClkPostScale */
|
||||
unsigned char m; /* ClkPreScale */
|
||||
unsigned char n; /* ClkFeedBackScale */
|
||||
unsigned char p; /* ClkPostScale */
|
||||
unsigned long pixclock = PICOS2KHZ(info->var.pixclock);
|
||||
|
||||
(void)pm3fb_calculate_clock(pixclock, &m, &n, &p);
|
||||
|
@ -1242,8 +1242,7 @@ int CalcStateExt
|
||||
)
|
||||
{
|
||||
int pixelDepth;
|
||||
int uninitialized_var(VClk),uninitialized_var(m),
|
||||
uninitialized_var(n), uninitialized_var(p);
|
||||
int VClk, m, n, p;
|
||||
|
||||
/*
|
||||
* Save mode parameters.
|
||||
|
@ -269,7 +269,7 @@ static inline int virtqueue_add(struct virtqueue *_vq,
|
||||
struct vring_virtqueue *vq = to_vvq(_vq);
|
||||
struct scatterlist *sg;
|
||||
struct vring_desc *desc;
|
||||
unsigned int i, n, avail, descs_used, uninitialized_var(prev), err_idx;
|
||||
unsigned int i, n, avail, descs_used, prev, err_idx;
|
||||
int head;
|
||||
bool indirect;
|
||||
|
||||
|
@ -579,7 +579,7 @@ static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry,
|
||||
static int afs_d_revalidate(struct dentry *dentry, unsigned int flags)
|
||||
{
|
||||
struct afs_vnode *vnode, *dir;
|
||||
struct afs_fid uninitialized_var(fid);
|
||||
struct afs_fid fid;
|
||||
struct dentry *parent;
|
||||
struct key *key;
|
||||
void *dir_version;
|
||||
|
@ -288,7 +288,7 @@ static int afs_check_permit(struct afs_vnode *vnode, struct key *key,
|
||||
int afs_permission(struct inode *inode, int mask)
|
||||
{
|
||||
struct afs_vnode *vnode = AFS_FS_I(inode);
|
||||
afs_access_t uninitialized_var(access);
|
||||
afs_access_t access;
|
||||
struct key *key;
|
||||
int ret;
|
||||
|
||||
|
@ -115,7 +115,7 @@ static void fill_data(struct dlm_lock_data *data, struct dlm_lkb *lkb)
|
||||
|
||||
void dlm_timeout_warn(struct dlm_lkb *lkb)
|
||||
{
|
||||
struct sk_buff *uninitialized_var(send_skb);
|
||||
struct sk_buff *send_skb;
|
||||
struct dlm_lock_data *data;
|
||||
size_t size;
|
||||
int rv;
|
||||
|
@ -1287,7 +1287,7 @@ int fat_add_entries(struct inode *dir, void *slots, int nr_slots,
|
||||
struct super_block *sb = dir->i_sb;
|
||||
struct msdos_sb_info *sbi = MSDOS_SB(sb);
|
||||
struct buffer_head *bh, *prev, *bhs[3]; /* 32*slots (672bytes) */
|
||||
struct msdos_dir_entry *uninitialized_var(de);
|
||||
struct msdos_dir_entry *de;
|
||||
int err, free_slots, i, nr_bhs;
|
||||
loff_t pos, i_pos;
|
||||
|
||||
|
@ -117,7 +117,7 @@ static ssize_t fuse_conn_max_background_write(struct file *file,
|
||||
const char __user *buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
unsigned uninitialized_var(val);
|
||||
unsigned val;
|
||||
ssize_t ret;
|
||||
|
||||
ret = fuse_conn_limit_write(file, buf, count, ppos, &val,
|
||||
|
@ -268,7 +268,7 @@ static int cuse_parse_one(char **pp, char *end, char **keyp, char **valp)
|
||||
static int cuse_parse_devinfo(char *p, size_t len, struct cuse_devinfo *devinfo)
|
||||
{
|
||||
char *end = p + len;
|
||||
char *uninitialized_var(key), *uninitialized_var(val);
|
||||
char *key, *val;
|
||||
int rc;
|
||||
|
||||
while (true) {
|
||||
|
@ -2770,7 +2770,7 @@ static void fuse_register_polled_file(struct fuse_conn *fc,
|
||||
{
|
||||
spin_lock(&fc->lock);
|
||||
if (RB_EMPTY_NODE(&ff->polled_node)) {
|
||||
struct rb_node **link, *uninitialized_var(parent);
|
||||
struct rb_node **link, *parent;
|
||||
|
||||
link = fuse_find_polled_node(fc, ff->kh, &parent);
|
||||
BUG_ON(*link);
|
||||
|
@ -379,7 +379,7 @@ static int gfs2_write_cache_jdata(struct address_space *mapping,
|
||||
int done = 0;
|
||||
struct pagevec pvec;
|
||||
int nr_pages;
|
||||
pgoff_t uninitialized_var(writeback_index);
|
||||
pgoff_t writeback_index;
|
||||
pgoff_t index;
|
||||
pgoff_t end;
|
||||
pgoff_t done_index;
|
||||
|
@ -351,7 +351,7 @@ int hfsplus_hash_dentry(const struct dentry *dentry, struct qstr *str)
|
||||
astr = str->name;
|
||||
len = str->len;
|
||||
while (len > 0) {
|
||||
int uninitialized_var(dsize);
|
||||
int dsize;
|
||||
size = asc2unichar(sb, astr, len, &c);
|
||||
astr += size;
|
||||
len -= size;
|
||||
|
@ -153,8 +153,8 @@ isofs_find_entry(struct inode *dir, struct dentry *dentry,
|
||||
struct dentry *isofs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
|
||||
{
|
||||
int found;
|
||||
unsigned long uninitialized_var(block);
|
||||
unsigned long uninitialized_var(offset);
|
||||
unsigned long block;
|
||||
unsigned long offset;
|
||||
struct inode *inode;
|
||||
struct page *page;
|
||||
|
||||
|
@ -428,7 +428,7 @@ static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseb
|
||||
{
|
||||
size_t retlen;
|
||||
int ret;
|
||||
uint32_t uninitialized_var(bad_offset);
|
||||
uint32_t bad_offset;
|
||||
|
||||
switch (jffs2_block_check_erase(c, jeb, &bad_offset)) {
|
||||
case -EAGAIN: goto refile;
|
||||
|
@ -347,7 +347,7 @@ static ssize_t write_unlock_fs(struct file *file, char *buf, size_t size)
|
||||
static ssize_t write_filehandle(struct file *file, char *buf, size_t size)
|
||||
{
|
||||
char *dname, *path;
|
||||
int uninitialized_var(maxsize);
|
||||
int maxsize;
|
||||
char *mesg = buf;
|
||||
int len;
|
||||
struct auth_domain *dom;
|
||||
|
@ -4699,7 +4699,7 @@ int ocfs2_insert_extent(handle_t *handle,
|
||||
struct ocfs2_alloc_context *meta_ac)
|
||||
{
|
||||
int status;
|
||||
int uninitialized_var(free_records);
|
||||
int free_records;
|
||||
struct buffer_head *last_eb_bh = NULL;
|
||||
struct ocfs2_insert_type insert = {0, };
|
||||
struct ocfs2_extent_rec rec;
|
||||
@ -6889,7 +6889,7 @@ int ocfs2_convert_inline_data_to_extents(struct inode *inode,
|
||||
int need_free = 0;
|
||||
u32 bit_off, num;
|
||||
handle_t *handle;
|
||||
u64 uninitialized_var(block);
|
||||
u64 block;
|
||||
struct ocfs2_inode_info *oi = OCFS2_I(inode);
|
||||
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
|
||||
struct ocfs2_dinode *di = (struct ocfs2_dinode *)di_bh->b_data;
|
||||
|
@ -865,9 +865,9 @@ static int ocfs2_dx_dir_lookup(struct inode *inode,
|
||||
u64 *ret_phys_blkno)
|
||||
{
|
||||
int ret = 0;
|
||||
unsigned int cend, uninitialized_var(clen);
|
||||
u32 uninitialized_var(cpos);
|
||||
u64 uninitialized_var(blkno);
|
||||
unsigned int cend, clen;
|
||||
u32 cpos;
|
||||
u64 blkno;
|
||||
u32 name_hash = hinfo->major_hash;
|
||||
|
||||
ret = ocfs2_dx_dir_lookup_rec(inode, el, name_hash, &cpos, &blkno,
|
||||
@ -911,7 +911,7 @@ static int ocfs2_dx_dir_search(const char *name, int namelen,
|
||||
struct ocfs2_dir_lookup_result *res)
|
||||
{
|
||||
int ret, i, found;
|
||||
u64 uninitialized_var(phys);
|
||||
u64 phys;
|
||||
struct buffer_head *dx_leaf_bh = NULL;
|
||||
struct ocfs2_dx_leaf *dx_leaf;
|
||||
struct ocfs2_dx_entry *dx_entry = NULL;
|
||||
@ -4419,9 +4419,9 @@ static int ocfs2_dx_dir_remove_index(struct inode *dir,
|
||||
int ocfs2_dx_dir_truncate(struct inode *dir, struct buffer_head *di_bh)
|
||||
{
|
||||
int ret;
|
||||
unsigned int uninitialized_var(clen);
|
||||
u32 major_hash = UINT_MAX, p_cpos, uninitialized_var(cpos);
|
||||
u64 uninitialized_var(blkno);
|
||||
unsigned int clen;
|
||||
u32 major_hash = UINT_MAX, p_cpos, cpos;
|
||||
u64 blkno;
|
||||
struct ocfs2_super *osb = OCFS2_SB(dir->i_sb);
|
||||
struct buffer_head *dx_root_bh = NULL;
|
||||
struct ocfs2_dx_root_block *dx_root;
|
||||
|
@ -415,7 +415,7 @@ static int ocfs2_get_clusters_nocache(struct inode *inode,
|
||||
{
|
||||
int i, ret, tree_height, len;
|
||||
struct ocfs2_dinode *di;
|
||||
struct ocfs2_extent_block *uninitialized_var(eb);
|
||||
struct ocfs2_extent_block *eb;
|
||||
struct ocfs2_extent_list *el;
|
||||
struct ocfs2_extent_rec *rec;
|
||||
struct buffer_head *eb_bh = NULL;
|
||||
@ -612,7 +612,7 @@ int ocfs2_get_clusters(struct inode *inode, u32 v_cluster,
|
||||
unsigned int *extent_flags)
|
||||
{
|
||||
int ret;
|
||||
unsigned int uninitialized_var(hole_len), flags = 0;
|
||||
unsigned int hole_len, flags = 0;
|
||||
struct buffer_head *di_bh = NULL;
|
||||
struct ocfs2_extent_rec rec;
|
||||
|
||||
|
@ -2506,7 +2506,7 @@ int ocfs2_create_inode_in_orphan(struct inode *dir,
|
||||
struct buffer_head *new_di_bh = NULL;
|
||||
struct ocfs2_alloc_context *inode_ac = NULL;
|
||||
struct ocfs2_dir_lookup_result orphan_insert = { NULL, };
|
||||
u64 uninitialized_var(di_blkno), suballoc_loc;
|
||||
u64 di_blkno, suballoc_loc;
|
||||
u16 suballoc_bit;
|
||||
|
||||
status = ocfs2_inode_lock(dir, &parent_di_bh, 1);
|
||||
|
@ -1069,7 +1069,7 @@ static int ocfs2_get_refcount_rec(struct ocfs2_caching_info *ci,
|
||||
struct buffer_head **ret_bh)
|
||||
{
|
||||
int ret = 0, i, found;
|
||||
u32 low_cpos, uninitialized_var(cpos_end);
|
||||
u32 low_cpos, cpos_end;
|
||||
struct ocfs2_extent_list *el;
|
||||
struct ocfs2_extent_rec *rec = NULL;
|
||||
struct ocfs2_extent_block *eb = NULL;
|
||||
|
@ -1218,7 +1218,7 @@ static int ocfs2_xattr_block_get(struct inode *inode,
|
||||
struct ocfs2_xattr_value_root *xv;
|
||||
size_t size;
|
||||
int ret = -ENODATA, name_offset, name_len, i;
|
||||
int uninitialized_var(block_off);
|
||||
int block_off;
|
||||
|
||||
xs->bucket = ocfs2_xattr_bucket_new(inode);
|
||||
if (!xs->bucket) {
|
||||
|
@ -220,7 +220,7 @@ static int omfs_get_block(struct inode *inode, sector_t block,
|
||||
struct buffer_head *bh;
|
||||
sector_t next, offset;
|
||||
int ret;
|
||||
u64 uninitialized_var(new_block);
|
||||
u64 new_block;
|
||||
u32 max_extents;
|
||||
int extent_count;
|
||||
struct omfs_extent *oe;
|
||||
|
@ -564,11 +564,11 @@ int dbg_old_index_check_init(struct ubifs_info *c, struct ubifs_zbranch *zroot)
|
||||
*/
|
||||
int dbg_check_old_index(struct ubifs_info *c, struct ubifs_zbranch *zroot)
|
||||
{
|
||||
int lnum, offs, len, err = 0, uninitialized_var(last_level), child_cnt;
|
||||
int lnum, offs, len, err = 0, last_level, child_cnt;
|
||||
int first = 1, iip;
|
||||
struct ubifs_debug_info *d = c->dbg;
|
||||
union ubifs_key uninitialized_var(lower_key), upper_key, l_key, u_key;
|
||||
unsigned long long uninitialized_var(last_sqnum);
|
||||
union ubifs_key lower_key, upper_key, l_key, u_key;
|
||||
unsigned long long last_sqnum;
|
||||
struct ubifs_idx_node *idx;
|
||||
struct list_head list;
|
||||
struct idx_node *i;
|
||||
|
@ -233,7 +233,7 @@ static int write_begin_slow(struct address_space *mapping,
|
||||
struct ubifs_info *c = inode->i_sb->s_fs_info;
|
||||
pgoff_t index = pos >> PAGE_SHIFT;
|
||||
struct ubifs_budget_req req = { .new_page = 1 };
|
||||
int uninitialized_var(err), appending = !!(pos + len > inode->i_size);
|
||||
int err, appending = !!(pos + len > inode->i_size);
|
||||
struct page *page;
|
||||
|
||||
dbg_gen("ino %lu, pos %llu, len %u, i_size %lld",
|
||||
@ -437,7 +437,7 @@ static int ubifs_write_begin(struct file *file, struct address_space *mapping,
|
||||
struct ubifs_info *c = inode->i_sb->s_fs_info;
|
||||
struct ubifs_inode *ui = ubifs_inode(inode);
|
||||
pgoff_t index = pos >> PAGE_SHIFT;
|
||||
int uninitialized_var(err), appending = !!(pos + len > inode->i_size);
|
||||
int err, appending = !!(pos + len > inode->i_size);
|
||||
int skipped_read = 0;
|
||||
struct page *page;
|
||||
|
||||
|
@ -1355,7 +1355,7 @@ int ubifs_jnl_truncate(struct ubifs_info *c, const struct inode *inode,
|
||||
union ubifs_key key, to_key;
|
||||
struct ubifs_ino_node *ino;
|
||||
struct ubifs_trun_node *trun;
|
||||
struct ubifs_data_node *uninitialized_var(dn);
|
||||
struct ubifs_data_node *dn;
|
||||
int err, dlen, len, lnum, offs, bit, sz, sync = IS_SYNC(inode);
|
||||
struct ubifs_inode *ui = ubifs_inode(inode);
|
||||
ino_t inum = inode->i_ino;
|
||||
|
@ -285,7 +285,7 @@ uint32_t ubifs_unpack_bits(uint8_t **addr, int *pos, int nrbits)
|
||||
const int k = 32 - nrbits;
|
||||
uint8_t *p = *addr;
|
||||
int b = *pos;
|
||||
uint32_t uninitialized_var(val);
|
||||
uint32_t val;
|
||||
const int bytes = (nrbits + b + 7) >> 3;
|
||||
|
||||
ubifs_assert(nrbits > 0);
|
||||
|
@ -899,7 +899,7 @@ static int fallible_resolve_collision(struct ubifs_info *c,
|
||||
int adding)
|
||||
{
|
||||
struct ubifs_znode *o_znode = NULL, *znode = *zn;
|
||||
int uninitialized_var(o_n), err, cmp, unsure = 0, nn = *n;
|
||||
int o_n, err, cmp, unsure = 0, nn = *n;
|
||||
|
||||
cmp = fallible_matches_name(c, &znode->zbranch[nn], nm);
|
||||
if (unlikely(cmp < 0))
|
||||
@ -1520,8 +1520,8 @@ int ubifs_tnc_locate(struct ubifs_info *c, const union ubifs_key *key,
|
||||
*/
|
||||
int ubifs_tnc_get_bu_keys(struct ubifs_info *c, struct bu_info *bu)
|
||||
{
|
||||
int n, err = 0, lnum = -1, uninitialized_var(offs);
|
||||
int uninitialized_var(len);
|
||||
int n, err = 0, lnum = -1, offs;
|
||||
int len;
|
||||
unsigned int block = key_block(c, &bu->key);
|
||||
struct ubifs_znode *znode;
|
||||
|
||||
|
@ -136,8 +136,8 @@ int ubifs_search_zbranch(const struct ubifs_info *c,
|
||||
const struct ubifs_znode *znode,
|
||||
const union ubifs_key *key, int *n)
|
||||
{
|
||||
int beg = 0, end = znode->child_cnt, uninitialized_var(mid);
|
||||
int uninitialized_var(cmp);
|
||||
int beg = 0, end = znode->child_cnt, mid;
|
||||
int cmp;
|
||||
const struct ubifs_zbranch *zbr = &znode->zbranch[0];
|
||||
|
||||
ubifs_assert(end > beg);
|
||||
|
@ -552,7 +552,7 @@ static int udf_table_new_block(struct super_block *sb,
|
||||
uint32_t spread = 0xFFFFFFFF, nspread = 0xFFFFFFFF;
|
||||
uint32_t newblock = 0, adsize;
|
||||
uint32_t elen, goal_elen = 0;
|
||||
struct kernel_lb_addr eloc, uninitialized_var(goal_eloc);
|
||||
struct kernel_lb_addr eloc, goal_eloc;
|
||||
struct extent_position epos, goal_epos;
|
||||
int8_t etype;
|
||||
struct udf_inode_info *iinfo = UDF_I(table);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user