mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:41:42 +00:00
treewide: Remove uninitialized_var() usage
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>
This commit is contained in:
parent
d8b44b58a7
commit
3f649ab728
@ -652,7 +652,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 */
|
||||
|
@ -799,7 +799,7 @@ static int alignment_get_thumb(struct pt_regs *regs, u16 *ip, u16 *inst)
|
||||
static int
|
||||
do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
|
||||
{
|
||||
union offset_union uninitialized_var(offset);
|
||||
union offset_union offset;
|
||||
unsigned long instrptr;
|
||||
int (*handler)(unsigned long addr, u32 instr, struct pt_regs *regs);
|
||||
unsigned int type;
|
||||
|
@ -445,7 +445,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;
|
||||
|
@ -180,7 +180,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;
|
||||
|
@ -369,7 +369,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;
|
||||
|
@ -79,7 +79,7 @@ static void dump_tlb(int first, int last)
|
||||
unsigned int pagemask, guestctl1 = 0, c0, c1, i;
|
||||
unsigned long asidmask = cpu_asid_mask(¤t_cpu_data);
|
||||
int asidwidth = DIV_ROUND_UP(ilog2(asidmask) + 1, 4);
|
||||
unsigned long uninitialized_var(s_mmid);
|
||||
unsigned long s_mmid;
|
||||
#ifdef CONFIG_32BIT
|
||||
bool xpa = cpu_has_xpa && (read_c0_pagegrain() & PG_ELPA);
|
||||
int pwidth = xpa ? 11 : 8;
|
||||
|
@ -83,7 +83,7 @@ void setup_zero_pages(void)
|
||||
static void *__kmap_pgprot(struct page *page, unsigned long addr, pgprot_t prot)
|
||||
{
|
||||
enum fixed_addresses idx;
|
||||
unsigned int uninitialized_var(old_mmid);
|
||||
unsigned int old_mmid;
|
||||
unsigned long vaddr, flags, entrylo;
|
||||
unsigned long old_ctx;
|
||||
pte_t pte;
|
||||
|
@ -119,7 +119,7 @@ void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
|
||||
if (size <= (current_cpu_data.tlbsizeftlbsets ?
|
||||
current_cpu_data.tlbsize / 8 :
|
||||
current_cpu_data.tlbsize / 2)) {
|
||||
unsigned long old_entryhi, uninitialized_var(old_mmid);
|
||||
unsigned long old_entryhi, old_mmid;
|
||||
int newpid = cpu_asid(cpu, mm);
|
||||
|
||||
old_entryhi = read_c0_entryhi();
|
||||
@ -213,7 +213,7 @@ void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
|
||||
int cpu = smp_processor_id();
|
||||
|
||||
if (cpu_context(cpu, vma->vm_mm) != 0) {
|
||||
unsigned long uninitialized_var(old_mmid);
|
||||
unsigned long old_mmid;
|
||||
unsigned long flags, old_entryhi;
|
||||
int idx;
|
||||
|
||||
@ -382,7 +382,7 @@ void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
|
||||
#ifdef CONFIG_XPA
|
||||
panic("Broken for XPA kernels");
|
||||
#else
|
||||
unsigned int uninitialized_var(old_mmid);
|
||||
unsigned int old_mmid;
|
||||
unsigned long flags;
|
||||
unsigned long wired;
|
||||
unsigned long old_pagemask;
|
||||
|
@ -33,7 +33,7 @@ unsigned long __kvmhv_copy_tofrom_guest_radix(int lpid, int pid,
|
||||
gva_t eaddr, void *to, void *from,
|
||||
unsigned long n)
|
||||
{
|
||||
int uninitialized_var(old_pid), old_lpid;
|
||||
int old_pid, old_lpid;
|
||||
unsigned long quadrant, ret = n;
|
||||
bool is_load = !!to;
|
||||
|
||||
|
@ -1110,7 +1110,7 @@ static inline u32 dp_to_sp(u64 fprd)
|
||||
static void kvmppc_complete_mmio_load(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
struct kvm_run *run = vcpu->run;
|
||||
u64 uninitialized_var(gpr);
|
||||
u64 gpr;
|
||||
|
||||
if (run->mmio.len > sizeof(gpr)) {
|
||||
printk(KERN_ERR "bad MMIO length: %d\n", run->mmio.len);
|
||||
|
@ -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;
|
||||
|
@ -146,7 +146,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)
|
||||
|
@ -95,7 +95,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)
|
||||
@ -185,7 +185,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;
|
||||
@ -207,7 +207,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;
|
||||
@ -298,7 +298,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;
|
||||
@ -429,7 +429,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;
|
||||
|
@ -1986,7 +1986,7 @@ static int kvm_age_rmapp(struct kvm *kvm, struct kvm_rmap_head *rmap_head,
|
||||
unsigned long data)
|
||||
{
|
||||
u64 *sptep;
|
||||
struct rmap_iterator uninitialized_var(iter);
|
||||
struct rmap_iterator iter;
|
||||
int young = 0;
|
||||
|
||||
for_each_rmap_spte(rmap_head, &iter, sptep)
|
||||
|
@ -314,7 +314,7 @@ static int FNAME(walk_addr_generic)(struct guest_walker *walker,
|
||||
{
|
||||
int ret;
|
||||
pt_element_t pte;
|
||||
pt_element_t __user *uninitialized_var(ptep_user);
|
||||
pt_element_t __user *ptep_user;
|
||||
gfn_t table_gfn;
|
||||
u64 pt_access, pte_access;
|
||||
unsigned index, accessed_dirty, pte_pkey;
|
||||
|
@ -9927,7 +9927,7 @@ void kvm_arch_sync_events(struct kvm *kvm)
|
||||
int __x86_set_memory_region(struct kvm *kvm, int id, gpa_t gpa, u32 size)
|
||||
{
|
||||
int i, r;
|
||||
unsigned long hva, uninitialized_var(old_npages);
|
||||
unsigned long hva, old_npages;
|
||||
struct kvm_memslots *slots = kvm_memslots(kvm);
|
||||
struct kvm_memory_slot *slot;
|
||||
|
||||
|
@ -473,7 +473,7 @@ static int __blk_bios_map_sg(struct request_queue *q, struct bio *bio,
|
||||
struct scatterlist *sglist,
|
||||
struct scatterlist **sg)
|
||||
{
|
||||
struct bio_vec uninitialized_var(bvec), bvprv = { NULL };
|
||||
struct bio_vec bvec, bvprv = { NULL };
|
||||
struct bvec_iter iter;
|
||||
int nsegs = 0;
|
||||
bool new_bio = false;
|
||||
|
@ -88,7 +88,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;
|
||||
|
@ -93,7 +93,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);
|
||||
|
@ -940,7 +940,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,
|
||||
|
@ -3423,7 +3423,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;
|
||||
@ -3512,7 +3512,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;
|
||||
@ -3674,7 +3674,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;
|
||||
|
@ -1993,7 +1993,7 @@ static int rbd_object_map_update_finish(struct rbd_obj_request *obj_req,
|
||||
struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev;
|
||||
struct ceph_osd_data *osd_data;
|
||||
u64 objno;
|
||||
u8 state, new_state, uninitialized_var(current_state);
|
||||
u8 state, new_state, current_state;
|
||||
bool has_current_state;
|
||||
void *p;
|
||||
|
||||
|
@ -56,7 +56,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;
|
||||
|
@ -1099,7 +1099,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;
|
||||
|
||||
/*
|
||||
@ -1289,7 +1289,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;
|
||||
@ -2445,7 +2445,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);
|
||||
|
||||
@ -2933,10 +2933,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);
|
||||
|
@ -986,7 +986,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,
|
||||
|
@ -3051,7 +3051,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))
|
||||
|
@ -547,9 +547,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);
|
||||
|
@ -474,7 +474,7 @@ static int intel_fbc_alloc_cfb(struct drm_i915_private *dev_priv,
|
||||
unsigned int size, unsigned int fb_cpp)
|
||||
{
|
||||
struct intel_fbc *fbc = &dev_priv->fbc;
|
||||
struct drm_mm_node *uninitialized_var(compressed_llb);
|
||||
struct drm_mm_node *compressed_llb;
|
||||
int ret;
|
||||
|
||||
drm_WARN_ON(&dev_priv->drm,
|
||||
|
@ -1103,7 +1103,7 @@ static struct i915_request *
|
||||
__unwind_incomplete_requests(struct intel_engine_cs *engine)
|
||||
{
|
||||
struct i915_request *rq, *rn, *active = NULL;
|
||||
struct list_head *uninitialized_var(pl);
|
||||
struct list_head *pl;
|
||||
int prio = I915_PRIORITY_INVALID;
|
||||
|
||||
lockdep_assert_held(&engine->active.lock);
|
||||
|
@ -1991,7 +1991,7 @@ int __intel_wait_for_register_fw(struct intel_uncore *uncore,
|
||||
unsigned int slow_timeout_ms,
|
||||
u32 *out_value)
|
||||
{
|
||||
u32 uninitialized_var(reg_value);
|
||||
u32 reg_value;
|
||||
#define done (((reg_value = intel_uncore_read_fw(uncore, reg)) & mask) == value)
|
||||
int ret;
|
||||
|
||||
|
@ -517,8 +517,8 @@ dw_mipi_dsi_get_lane_mbps(void *priv_data, const struct drm_display_mode *mode,
|
||||
unsigned long best_freq = 0;
|
||||
unsigned long fvco_min, fvco_max, fin, fout;
|
||||
unsigned int min_prediv, max_prediv;
|
||||
unsigned int _prediv, uninitialized_var(best_prediv);
|
||||
unsigned long _fbdiv, uninitialized_var(best_fbdiv);
|
||||
unsigned int _prediv, best_prediv;
|
||||
unsigned long _fbdiv, best_fbdiv;
|
||||
unsigned long min_delta = ULONG_MAX;
|
||||
|
||||
dsi->format = format;
|
||||
|
@ -415,7 +415,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 @@ err:
|
||||
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;
|
||||
|
@ -609,7 +609,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;
|
||||
|
@ -173,7 +173,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);
|
||||
@ -217,7 +217,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);
|
||||
|
@ -622,12 +622,12 @@ static int drive_is_ready(ide_drive_t *drive)
|
||||
void ide_timer_expiry (struct timer_list *t)
|
||||
{
|
||||
ide_hwif_t *hwif = from_timer(hwif, t, timer);
|
||||
ide_drive_t *uninitialized_var(drive);
|
||||
ide_drive_t *drive;
|
||||
ide_handler_t *handler;
|
||||
unsigned long flags;
|
||||
int wait = -1;
|
||||
int plug_device = 0;
|
||||
struct request *uninitialized_var(rq_in_flight);
|
||||
struct request *rq_in_flight;
|
||||
|
||||
spin_lock_irqsave(&hwif->lock, flags);
|
||||
|
||||
@ -780,13 +780,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]);
|
||||
|
@ -108,7 +108,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",
|
||||
|
@ -132,7 +132,7 @@ static __cpuidle int intel_idle(struct cpuidle_device *dev,
|
||||
struct cpuidle_state *state = &drv->states[index];
|
||||
unsigned long eax = flg2MWAIT(state->flags);
|
||||
unsigned long ecx = 1; /* break on interrupt flag */
|
||||
bool uninitialized_var(tick);
|
||||
bool tick;
|
||||
int cpu = smp_processor_id();
|
||||
|
||||
/*
|
||||
|
@ -1584,7 +1584,7 @@ static int ib_uverbs_open_qp(struct uverbs_attr_bundle *attrs)
|
||||
struct ib_uverbs_create_qp_resp resp;
|
||||
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;
|
||||
@ -3406,7 +3406,7 @@ static int __uverbs_create_xsrq(struct uverbs_attr_bundle *attrs,
|
||||
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;
|
||||
struct ib_device *ib_dev;
|
||||
|
@ -3282,7 +3282,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;
|
||||
|
||||
|
@ -754,7 +754,7 @@ skip_cqe:
|
||||
static int __c4iw_poll_cq_one(struct c4iw_cq *chp, struct c4iw_qp *qhp,
|
||||
struct ib_wc *wc, struct c4iw_srq *srq)
|
||||
{
|
||||
struct t4_cqe uninitialized_var(cqe);
|
||||
struct t4_cqe cqe;
|
||||
struct t4_wq *wq = qhp ? &qhp->wq : NULL;
|
||||
u32 credit = 0;
|
||||
u8 cqe_flushed;
|
||||
|
@ -3541,11 +3541,11 @@ static int _mlx4_ib_post_send(struct ib_qp *ibqp, const struct ib_send_wr *wr,
|
||||
int nreq;
|
||||
int err = 0;
|
||||
unsigned ind;
|
||||
int uninitialized_var(size);
|
||||
unsigned uninitialized_var(seglen);
|
||||
int size;
|
||||
unsigned seglen;
|
||||
__be32 dummy;
|
||||
__be32 *lso_wqe;
|
||||
__be32 uninitialized_var(lso_hdr_sz);
|
||||
__be32 lso_hdr_sz;
|
||||
__be32 blh;
|
||||
int i;
|
||||
struct mlx4_ib_dev *mdev = to_mdev(ibqp->device);
|
||||
|
@ -925,8 +925,8 @@ int mlx5_ib_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
|
||||
struct mlx5_ib_dev *dev = to_mdev(ibdev);
|
||||
struct mlx5_ib_cq *cq = to_mcq(ibcq);
|
||||
u32 out[MLX5_ST_SZ_DW(create_cq_out)];
|
||||
int uninitialized_var(index);
|
||||
int uninitialized_var(inlen);
|
||||
int index;
|
||||
int inlen;
|
||||
u32 *cqb = NULL;
|
||||
void *cqc;
|
||||
int cqe_size;
|
||||
@ -1246,7 +1246,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)) {
|
||||
|
@ -2536,7 +2536,7 @@ static ssize_t devx_async_event_read(struct file *filp, char __user *buf,
|
||||
{
|
||||
struct devx_async_event_file *ev_file = filp->private_data;
|
||||
struct devx_event_subscription *event_sub;
|
||||
struct devx_async_event_data *uninitialized_var(event);
|
||||
struct devx_async_event_data *event;
|
||||
int ret = 0;
|
||||
size_t eventsz;
|
||||
bool omit_data;
|
||||
|
@ -1249,7 +1249,7 @@ int mlx5_ib_post_send(struct ib_qp *ibqp, const struct ib_send_wr *wr,
|
||||
struct mlx5_wqe_xrc_seg *xrc;
|
||||
struct mlx5_bf *bf;
|
||||
void *cur_edge;
|
||||
int uninitialized_var(size);
|
||||
int size;
|
||||
unsigned long flags;
|
||||
unsigned int idx;
|
||||
int err = 0;
|
||||
|
@ -1639,8 +1639,8 @@ int mthca_tavor_post_send(struct ib_qp *ibqp, const 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;
|
||||
|
||||
@ -1835,7 +1835,7 @@ int mthca_tavor_post_receive(struct ib_qp *ibqp, const 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;
|
||||
@ -1943,8 +1943,8 @@ int mthca_arbel_post_send(struct ib_qp *ibqp, const 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;
|
||||
|
||||
|
@ -333,7 +333,7 @@ static struct siw_wqe *siw_rqe_get(struct siw_qp *qp)
|
||||
struct siw_srq *srq;
|
||||
struct siw_wqe *wqe = NULL;
|
||||
bool srq_event = false;
|
||||
unsigned long uninitialized_var(flags);
|
||||
unsigned long flags;
|
||||
|
||||
srq = qp->srq;
|
||||
if (srq) {
|
||||
|
@ -159,7 +159,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;
|
||||
|
||||
|
@ -2236,7 +2236,7 @@ static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn,
|
||||
unsigned long nr_pages, int prot)
|
||||
{
|
||||
struct dma_pte *first_pte = NULL, *pte = NULL;
|
||||
phys_addr_t uninitialized_var(pteval);
|
||||
phys_addr_t pteval;
|
||||
unsigned long sg_res = 0;
|
||||
unsigned int largepage_lvl = 0;
|
||||
unsigned long lvl_pages = 0;
|
||||
|
@ -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.
|
||||
|
@ -1844,7 +1844,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);
|
||||
|
||||
/*
|
||||
|
@ -642,7 +642,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;
|
||||
|
||||
|
@ -1752,7 +1752,7 @@ static void writecache_writeback(struct work_struct *work)
|
||||
{
|
||||
struct dm_writecache *wc = container_of(work, struct dm_writecache, writeback_work);
|
||||
struct blk_plug plug;
|
||||
struct wc_entry *f, *uninitialized_var(g), *e = NULL;
|
||||
struct wc_entry *f, *g, *e = NULL;
|
||||
struct rb_node *node, *next_node;
|
||||
struct list_head skipped;
|
||||
struct writeback_list wbl;
|
||||
|
@ -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;
|
||||
|
@ -640,7 +640,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;
|
||||
|
||||
|
@ -215,7 +215,7 @@ static int qt1010_set_params(struct dvb_frontend *fe)
|
||||
static int qt1010_init_meas1(struct qt1010_priv *priv,
|
||||
u8 oper, u8 reg, u8 reg_init_val, u8 *retval)
|
||||
{
|
||||
u8 i, val1, uninitialized_var(val2);
|
||||
u8 i, val1, val2;
|
||||
int err;
|
||||
|
||||
qt1010_i2c_oper_t i2c_data[] = {
|
||||
@ -250,7 +250,7 @@ static int qt1010_init_meas1(struct qt1010_priv *priv,
|
||||
static int qt1010_init_meas2(struct qt1010_priv *priv,
|
||||
u8 reg_init_val, u8 *retval)
|
||||
{
|
||||
u8 i, uninitialized_var(val);
|
||||
u8 i, val;
|
||||
int err;
|
||||
qt1010_i2c_oper_t i2c_data[] = {
|
||||
{ QT1010_WR, 0x07, reg_init_val },
|
||||
|
@ -225,7 +225,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,
|
||||
|
@ -765,9 +765,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)
|
||||
@ -1828,7 +1828,7 @@ static int uvc_video_start_transfer(struct uvc_streaming *stream,
|
||||
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. */
|
||||
|
@ -314,7 +314,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),
|
||||
|
@ -198,7 +198,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),
|
||||
|
@ -493,7 +493,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");
|
||||
|
@ -131,7 +131,7 @@ void __nand_calculate_ecc(const unsigned char *buf, unsigned int eccsize,
|
||||
/* rp0..rp15..rp17 are the various accumulated parities (per byte) */
|
||||
uint32_t rp0, rp1, rp2, rp3, rp4, rp5, rp6, rp7;
|
||||
uint32_t rp8, rp9, rp10, rp11, rp12, rp13, rp14, rp15, rp16;
|
||||
uint32_t uninitialized_var(rp17); /* to make compiler happy */
|
||||
uint32_t rp17;
|
||||
uint32_t par; /* the cumulative parity for all data */
|
||||
uint32_t tmppar; /* the cumulative parity for this iteration;
|
||||
for rp12, rp14 and rp16 at the end of the
|
||||
|
@ -291,7 +291,7 @@ static int s3c2410_nand_setrate(struct s3c2410_nand_info *info)
|
||||
int tacls_max = (info->cpu_type == TYPE_S3C2412) ? 8 : 4;
|
||||
int tacls, twrph0, twrph1;
|
||||
unsigned long clkrate = clk_get_rate(info->clk);
|
||||
unsigned long uninitialized_var(set), cfg, uninitialized_var(mask);
|
||||
unsigned long set, cfg, mask;
|
||||
unsigned long flags;
|
||||
|
||||
/* calculate the timing information for the controller */
|
||||
|
@ -126,8 +126,8 @@ static int afs_parse_v1_partition(struct mtd_info *mtd,
|
||||
* Static checks cannot see that we bail out if we have an error
|
||||
* reading the footer.
|
||||
*/
|
||||
u_int uninitialized_var(iis_ptr);
|
||||
u_int uninitialized_var(img_ptr);
|
||||
u_int iis_ptr;
|
||||
u_int img_ptr;
|
||||
u_int ptr;
|
||||
size_t sz;
|
||||
int ret;
|
||||
|
@ -599,7 +599,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)
|
||||
|
@ -1451,7 +1451,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;
|
||||
|
@ -1455,7 +1455,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))
|
||||
@ -1499,7 +1499,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))
|
||||
|
@ -529,8 +529,8 @@ static int req_pages_handler(struct notifier_block *nb,
|
||||
|
||||
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);
|
||||
|
@ -7276,7 +7276,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;
|
||||
|
||||
|
@ -3769,7 +3769,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) {
|
||||
|
@ -2271,7 +2271,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;
|
||||
|
@ -429,7 +429,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;
|
||||
@ -526,7 +526,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;
|
||||
|
||||
@ -714,7 +714,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,
|
||||
|
@ -702,7 +702,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;
|
||||
|
@ -2240,7 +2240,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++) {
|
||||
|
@ -230,7 +230,7 @@ static unsigned int ath9k_reg_rmw(void *hw_priv, u32 reg_offset, u32 set, u32 cl
|
||||
struct ath_hw *ah = 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) {
|
||||
|
@ -493,7 +493,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);
|
||||
|
@ -37,7 +37,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:
|
||||
|
@ -729,7 +729,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;
|
||||
|
@ -5643,7 +5643,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;
|
||||
|
||||
|
@ -422,10 +422,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);
|
||||
@ -436,7 +436,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:
|
||||
@ -458,7 +458,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:
|
||||
@ -637,8 +637,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;
|
||||
|
||||
|
@ -190,7 +190,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);
|
||||
|
@ -2580,7 +2580,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;
|
||||
|
@ -2100,7 +2100,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,
|
||||
|
@ -2769,7 +2769,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;
|
||||
|
@ -618,8 +618,8 @@ static void _rtl92cu_init_chipn_two_out_ep_priority(struct ieee80211_hw *hw,
|
||||
u8 queue_sel)
|
||||
{
|
||||
u16 beq, bkq, viq, voq, mgtq, hiq;
|
||||
u16 uninitialized_var(valuehi);
|
||||
u16 uninitialized_var(valuelow);
|
||||
u16 valuehi;
|
||||
u16 valuelow;
|
||||
|
||||
switch (queue_sel) {
|
||||
case (TX_SELE_HQ | TX_SELE_LQ):
|
||||
|
@ -1138,7 +1138,7 @@ static irqreturn_t aer_isr(int irq, void *context)
|
||||
{
|
||||
struct pcie_device *dev = (struct pcie_device *)context;
|
||||
struct aer_rpc *rpc = get_service_data(dev);
|
||||
struct aer_err_source uninitialized_var(e_src);
|
||||
struct aer_err_source e_src;
|
||||
|
||||
if (kfifo_is_empty(&rpc->aer_fifo))
|
||||
return IRQ_NONE;
|
||||
|
@ -365,7 +365,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);
|
||||
@ -378,7 +378,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);
|
||||
|
@ -4126,7 +4126,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;
|
||||
|
@ -4202,7 +4202,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;
|
||||
|
||||
|
@ -4182,7 +4182,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;
|
||||
|
@ -3643,7 +3643,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;
|
||||
|
@ -1514,7 +1514,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;
|
||||
|
||||
|
@ -1146,7 +1146,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)
|
||||
|
@ -554,8 +554,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;
|
||||
|
||||
|
@ -862,7 +862,7 @@ static void handle_tx_zerocopy(struct vhost_net *net, struct socket *sock)
|
||||
struct tun_msg_ctl ctl;
|
||||
size_t len, total_len = 0;
|
||||
int err;
|
||||
struct vhost_net_ubuf_ref *uninitialized_var(ubufs);
|
||||
struct vhost_net_ubuf_ref *ubufs;
|
||||
bool zcopy_used;
|
||||
int sent_pkts = 0;
|
||||
|
||||
@ -1042,7 +1042,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)) {
|
||||
@ -1099,7 +1099,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,
|
||||
|
@ -300,7 +300,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)
|
||||
@ -732,8 +732,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)) {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user