* [PATCH] xen: remove redundant initialization of variable ret
@ 2020-09-19 3:17 Jing Xiangfeng
2020-09-22 8:44 ` Jürgen Groß
2020-09-30 14:12 ` boris.ostrovsky
0 siblings, 2 replies; 3+ messages in thread
From: Jing Xiangfeng @ 2020-09-19 3:17 UTC (permalink / raw)
To: boris.ostrovsky, jgross, sstabellini
Cc: xen-devel, linux-kernel, jingxiangfeng
After commit 9f51c05dc41a ("pvcalls-front: Avoid
get_free_pages(GFP_KERNEL) under spinlock"), the variable ret is being
initialized with '-ENOMEM' that is meaningless. So remove it.
Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
---
drivers/xen/pvcalls-front.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/xen/pvcalls-front.c b/drivers/xen/pvcalls-front.c
index 72d725a0ab5c..7984645b5956 100644
--- a/drivers/xen/pvcalls-front.c
+++ b/drivers/xen/pvcalls-front.c
@@ -371,7 +371,7 @@ static int alloc_active_ring(struct sock_mapping *map)
static int create_active(struct sock_mapping *map, evtchn_port_t *evtchn)
{
void *bytes;
- int ret = -ENOMEM, irq = -1, i;
+ int ret, irq = -1, i;
*evtchn = 0;
init_waitqueue_head(&map->active.inflight_conn_req);
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] xen: remove redundant initialization of variable ret
2020-09-19 3:17 [PATCH] xen: remove redundant initialization of variable ret Jing Xiangfeng
@ 2020-09-22 8:44 ` Jürgen Groß
2020-09-30 14:12 ` boris.ostrovsky
1 sibling, 0 replies; 3+ messages in thread
From: Jürgen Groß @ 2020-09-22 8:44 UTC (permalink / raw)
To: Jing Xiangfeng, boris.ostrovsky, sstabellini; +Cc: xen-devel, linux-kernel
On 19.09.20 05:17, Jing Xiangfeng wrote:
> After commit 9f51c05dc41a ("pvcalls-front: Avoid
> get_free_pages(GFP_KERNEL) under spinlock"), the variable ret is being
> initialized with '-ENOMEM' that is meaningless. So remove it.
>
> Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Juergen
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xen: remove redundant initialization of variable ret
2020-09-19 3:17 [PATCH] xen: remove redundant initialization of variable ret Jing Xiangfeng
2020-09-22 8:44 ` Jürgen Groß
@ 2020-09-30 14:12 ` boris.ostrovsky
1 sibling, 0 replies; 3+ messages in thread
From: boris.ostrovsky @ 2020-09-30 14:12 UTC (permalink / raw)
To: Jing Xiangfeng, jgross, sstabellini; +Cc: xen-devel, linux-kernel
On 9/18/20 11:17 PM, Jing Xiangfeng wrote:
> After commit 9f51c05dc41a ("pvcalls-front: Avoid
> get_free_pages(GFP_KERNEL) under spinlock"), the variable ret is being
> initialized with '-ENOMEM' that is meaningless. So remove it.
>
> Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
Applied to for-linus-5.10
-boris
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-30 14:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-19 3:17 [PATCH] xen: remove redundant initialization of variable ret Jing Xiangfeng
2020-09-22 8:44 ` Jürgen Groß
2020-09-30 14:12 ` boris.ostrovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).