search for: uninitialized_var

Displaying 20 results from an estimated 393 matches for "uninitialized_var".

2009 Aug 25
2
[PATCH 1/1] XEN: enlighten, use uninitialized_var(cx)
...arch/x86/xen/enlighten.c index e90540a..5ab75e2 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -202,7 +202,7 @@ static void xen_cpuid(unsigned int *ax, unsigned int *bx, static __init void xen_init_cpuid_mask(void) { - unsigned int ax, bx, cx, dx; + unsigned int ax, bx, uninitialized_var(cx), dx; cpuid_leaf1_edx_mask = ~((1 << X86_FEATURE_MCE) | /* disable MCE */ -- 1.6.3.3
2009 Aug 25
2
[PATCH 1/1] XEN: enlighten, use uninitialized_var(cx)
...arch/x86/xen/enlighten.c index e90540a..5ab75e2 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -202,7 +202,7 @@ static void xen_cpuid(unsigned int *ax, unsigned int *bx, static __init void xen_init_cpuid_mask(void) { - unsigned int ax, bx, cx, dx; + unsigned int ax, bx, uninitialized_var(cx), dx; cpuid_leaf1_edx_mask = ~((1 << X86_FEATURE_MCE) | /* disable MCE */ -- 1.6.3.3
2009 Aug 25
2
[PATCH 1/1] XEN: enlighten, use uninitialized_var(cx)
...arch/x86/xen/enlighten.c index e90540a..5ab75e2 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -202,7 +202,7 @@ static void xen_cpuid(unsigned int *ax, unsigned int *bx, static __init void xen_init_cpuid_mask(void) { - unsigned int ax, bx, cx, dx; + unsigned int ax, bx, uninitialized_var(cx), dx; cpuid_leaf1_edx_mask = ~((1 << X86_FEATURE_MCE) | /* disable MCE */ -- 1.6.3.3
2010 Jul 23
2
[PATCH] virtio: fix oops on OOM
...ng.c b/drivers/virtio/virtio_ring.c index dd35b34..bffec32 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -164,7 +164,8 @@ int virtqueue_add_buf_gfp(struct virtqueue *_vq, gfp_t gfp) { struct vring_virtqueue *vq = to_vvq(_vq); - unsigned int i, avail, head, uninitialized_var(prev); + unsigned int i, avail, uninitialized_var(prev); + int head; START_USE(vq); @@ -174,8 +175,8 @@ int virtqueue_add_buf_gfp(struct virtqueue *_vq, * buffers, then go indirect. FIXME: tune this threshold */ if (vq->indirect && (out + in) > 1 && vq->num_free)...
2010 Jul 23
2
[PATCH] virtio: fix oops on OOM
...ng.c b/drivers/virtio/virtio_ring.c index dd35b34..bffec32 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -164,7 +164,8 @@ int virtqueue_add_buf_gfp(struct virtqueue *_vq, gfp_t gfp) { struct vring_virtqueue *vq = to_vvq(_vq); - unsigned int i, avail, head, uninitialized_var(prev); + unsigned int i, avail, uninitialized_var(prev); + int head; START_USE(vq); @@ -174,8 +175,8 @@ int virtqueue_add_buf_gfp(struct virtqueue *_vq, * buffers, then go indirect. FIXME: tune this threshold */ if (vq->indirect && (out + in) > 1 && vq->num_free)...
2016 Mar 12
1
[PATCH v1 13/19] zsmalloc: factor page chain functionality out
...ge); > + > + prev_page = page; > + } > +} > + > /* > * Allocate a zspage for the given size class > */ > static struct page *alloc_zspage(struct size_class *class, gfp_t flags) > { > - int i, error; > + int i; > struct page *first_page = NULL, *uninitialized_var(prev_page); > + struct page *pages[ZS_MAX_PAGES_PER_ZSPAGE]; > > /* > * Allocate individual pages and link them together as: > @@ -1041,43 +1074,23 @@ static struct page *alloc_zspage(struct size_class *class, gfp_t flags) *uninitialized_var(prev_page) in alloc_zspage is not...
2016 Mar 12
1
[PATCH v1 13/19] zsmalloc: factor page chain functionality out
...ge); > + > + prev_page = page; > + } > +} > + > /* > * Allocate a zspage for the given size class > */ > static struct page *alloc_zspage(struct size_class *class, gfp_t flags) > { > - int i, error; > + int i; > struct page *first_page = NULL, *uninitialized_var(prev_page); > + struct page *pages[ZS_MAX_PAGES_PER_ZSPAGE]; > > /* > * Allocate individual pages and link them together as: > @@ -1041,43 +1074,23 @@ static struct page *alloc_zspage(struct size_class *class, gfp_t flags) *uninitialized_var(prev_page) in alloc_zspage is not...
2016 Mar 14
0
[PATCH v1 13/19] zsmalloc: factor page chain functionality out
...gt;+ } > >+} > >+ > > /* > > * Allocate a zspage for the given size class > > */ > > static struct page *alloc_zspage(struct size_class *class, gfp_t flags) > > { > >- int i, error; > >+ int i; > > struct page *first_page = NULL, *uninitialized_var(prev_page); > >+ struct page *pages[ZS_MAX_PAGES_PER_ZSPAGE]; > > > > /* > > * Allocate individual pages and link them together as: > >@@ -1041,43 +1074,23 @@ static struct page *alloc_zspage(struct size_class *class, gfp_t flags) > > *uninitialized_var(pr...
2016 Apr 05
1
Re: [PATCH] virtio: fix "warning: ‘queue’ may be used uninitialized"
...#39;t apparent to gcc. >> >> Setting queue = NULL clears the warning. >> >> Signed-off-by: Jeff Mahoney <jeffm at suse.com> > > Which gcc version produces this warning? > I do not seem to see it with gcc 5.3.1. gcc version 4.8.5 (SUSE Linux) > Also - use uninitialized_var then? If it were a fast path, sure, but otherwise the use of uninitialized_var just makes similar issues harder to debug if the code changes. -Jeff >> --- >> >> drivers/virtio/virtio_ring.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> ---...
2016 Apr 05
1
Re: [PATCH] virtio: fix "warning: ‘queue’ may be used uninitialized"
...#39;t apparent to gcc. >> >> Setting queue = NULL clears the warning. >> >> Signed-off-by: Jeff Mahoney <jeffm at suse.com> > > Which gcc version produces this warning? > I do not seem to see it with gcc 5.3.1. gcc version 4.8.5 (SUSE Linux) > Also - use uninitialized_var then? If it were a fast path, sure, but otherwise the use of uninitialized_var just makes similar issues harder to debug if the code changes. -Jeff >> --- >> >> drivers/virtio/virtio_ring.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> ---...
2016 Oct 18
7
RFC: Killing undef and spreading poison
Hi Krzysztof, freeze(poison) is different from undef today, in the sense that it is an instruction that produces some random, but fixed bit pattern. E.g. today in %x = undef %y = xor %x, %x we can fold %y to undef since each use of %x can independently see some arbitrary (up to the compiler / environment) bit pattern. But in the new proposal, in: %x = freeze(poison) %y = xor
2014 Nov 30
2
[PATCH v7 36/46] vhost/net: suppress compiler warning
...(+), 1 deletion(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 984242e..54ffbb0 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -501,7 +501,7 @@ static int get_rx_bufs(struct vhost_virtqueue *vq, int headcount = 0; unsigned d; int r, nlogs = 0; - u32 len; + u32 uninitialized_var(len); while (datalen > 0 && headcount < quota) { if (unlikely(seg >= UIO_MAXIOV)) { -- MST
2014 Nov 30
2
[PATCH v7 36/46] vhost/net: suppress compiler warning
...(+), 1 deletion(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 984242e..54ffbb0 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -501,7 +501,7 @@ static int get_rx_bufs(struct vhost_virtqueue *vq, int headcount = 0; unsigned d; int r, nlogs = 0; - u32 len; + u32 uninitialized_var(len); while (datalen > 0 && headcount < quota) { if (unlikely(seg >= UIO_MAXIOV)) { -- MST
2018 Jul 03
2
[PATCH net-next v4 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...k->ops->peek_len(sock); > + > + return skb_queue_empty(&sk->sk_receive_queue); > +} > + > +static void vhost_net_busy_poll(struct vhost_net *net, > + struct vhost_virtqueue *rvq, > + struct vhost_virtqueue *tvq, > + bool rx) > +{ > + unsigned long uninitialized_var(endtime); > + unsigned long busyloop_timeout; > + struct socket *sock; > + struct vhost_virtqueue *vq = rx ? tvq : rvq; > + > + mutex_lock_nested(&vq->mutex, rx ? VHOST_NET_VQ_TX: VHOST_NET_VQ_RX); > + > + vhost_disable_notify(&net->dev, vq); > + sock = rvq-&gt...
2018 Jul 03
2
[PATCH net-next v4 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()
...k->ops->peek_len(sock); > + > + return skb_queue_empty(&sk->sk_receive_queue); > +} > + > +static void vhost_net_busy_poll(struct vhost_net *net, > + struct vhost_virtqueue *rvq, > + struct vhost_virtqueue *tvq, > + bool rx) > +{ > + unsigned long uninitialized_var(endtime); > + unsigned long busyloop_timeout; > + struct socket *sock; > + struct vhost_virtqueue *vq = rx ? tvq : rvq; > + > + mutex_lock_nested(&vq->mutex, rx ? VHOST_NET_VQ_TX: VHOST_NET_VQ_RX); > + > + vhost_disable_notify(&net->dev, vq); > + sock = rvq-&gt...
2016 Apr 04
2
[PATCH] virtio: fix "warning: ‘queue’ may be used uninitialized"
This fixes the following warning: drivers/virtio/virtio_ring.c:1032:5: warning: ?queue? may be used uninitialized in this function The conditions that govern when queue is set aren't apparent to gcc. Setting queue = NULL clears the warning. Signed-off-by: Jeff Mahoney <jeffm at suse.com> --- drivers/virtio/virtio_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---
2016 Apr 04
2
[PATCH] virtio: fix "warning: ‘queue’ may be used uninitialized"
This fixes the following warning: drivers/virtio/virtio_ring.c:1032:5: warning: ?queue? may be used uninitialized in this function The conditions that govern when queue is set aren't apparent to gcc. Setting queue = NULL clears the warning. Signed-off-by: Jeff Mahoney <jeffm at suse.com> --- drivers/virtio/virtio_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---
2014 Dec 01
2
[PATCH v7 36/46] vhost/net: suppress compiler warning
...984242e..54ffbb0 100644 > > --- a/drivers/vhost/net.c > > +++ b/drivers/vhost/net.c > > @@ -501,7 +501,7 @@ static int get_rx_bufs(struct vhost_virtqueue *vq, > > int headcount = 0; > > unsigned d; > > int r, nlogs = 0; > > - u32 len; > > + u32 uninitialized_var(len); > > > > while (datalen > 0 && headcount < quota) { > > if (unlikely(seg >= UIO_MAXIOV)) { > > Want to merge this with the patch introducing the variable and add a > comment there? Not really. Warnings in bisect are fine I think. -- MST
2014 Dec 01
2
[PATCH v7 36/46] vhost/net: suppress compiler warning
...984242e..54ffbb0 100644 > > --- a/drivers/vhost/net.c > > +++ b/drivers/vhost/net.c > > @@ -501,7 +501,7 @@ static int get_rx_bufs(struct vhost_virtqueue *vq, > > int headcount = 0; > > unsigned d; > > int r, nlogs = 0; > > - u32 len; > > + u32 uninitialized_var(len); > > > > while (datalen > 0 && headcount < quota) { > > if (unlikely(seg >= UIO_MAXIOV)) { > > Want to merge this with the patch introducing the variable and add a > comment there? Not really. Warnings in bisect are fine I think. -- MST
2016 Jan 20
3
[PATCH V2 3/3] vhost_net: basic polling support
...+ single_task_running(); > +} > + > +static int vhost_net_tx_get_vq_desc(struct vhost_net *net, > + struct vhost_virtqueue *vq, > + struct iovec iov[], unsigned int iov_size, > + unsigned int *out_num, unsigned int *in_num) > +{ > + unsigned long uninitialized_var(endtime); > + > + if (vq->busyloop_timeout) { > + preempt_disable(); > + endtime = busy_clock() + vq->busyloop_timeout; > + while (vhost_can_busy_poll(vq->dev, endtime) && > + !vhost_vq_more_avail(vq->dev, vq)) > + cpu_relax(); > + preempt_e...