Fix uninitialized variable in ipmb_dev_int.c
cover Fix uninitialized variable in ipmb_dev_int.c
ret at line 112 of ipmb_dev_int.c is uninitialized which results in a warning during build regressions.
Asmaa Mnebhi (1):
Fix uninitialized variable in ipmb_dev_int.c
drivers/char/ipmi/ipmb_dev_int.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.1.2
PATCH 1/1 Fix uninitialized variable in ipmb_dev_int.c
--- drivers/char/ipmi/ipmb_dev_int.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/ipmi/ipmb_dev_int.c +1 -1
@@ -76,7 +76,7 @@ static ssize_t ipmb_read(struct file *file, char __user *buf, size_t count,struct ipmb_dev *ipmb_dev =to_ipmb_dev (file);struct ipmb_request_elem *queue_elem;struct ipmb_msg msg; -ssize_t ret; +ssize_t ret =0 ;memset (&msg,0 ,sizeof (msg));
Signature · 1 line
2.1.2
Quoted 1 line · Asmaa Mnebhi
Signed-off-by Asmaa Mnebhi <[email protected]>
The patch is, of course, fine, but you should add some info about how it was found and a Reported-by: tag.
Thanks,
-corey
Quoted 20 lines
--- drivers/char/ipmi/ipmb_dev_int.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/char/ipmi/ipmb_dev_int.c +1
-1@@ -76,7 +76,7 @@ static ssize_t ipmb_read(struct file *file, char __user *buf, size_t count,struct ipmb_dev *ipmb_dev =to_ipmb_dev (file);struct ipmb_request_elem *queue_elem;struct ipmb_msg msg; -ssize_t ret; +ssize_t ret =0 ;memset (&msg,0 ,sizeof (msg));Signature · 1 line
2.1.2
Quoted 2 lines · Asmaa Mnebhi
Signed-off-by Asmaa Mnebhi <[email protected]>Reported-by Geert Uytterhoeven <[email protected]>
Sorry to be picky here, but it's considered bad style to have an empty message. I probably wasn't clear before, but you should add some text like "Found by build regression/improvement testing." or something like that. Just so people know where it was found.
Could you also add a "Fixes" field? This is important in case someone pulls the original patch, they can look forward and see if any bugs were fixed. From the kernel docs:
If your patch fixes a bug in a specific commit, e.g. you found an issue using ``git bisect``, please use the 'Fixes:' tag with the first 12 characters of the SHA-1 ID, and the one line summary. Do not split the tag across multiple lines, tags are exempt from the "wrap at 75 columns" rule in order to simplify parsing scripts. For example::
I was going to do that myself, but since another spin is required...
Thanks,
-corey
Quoted 20 lines
--- drivers/char/ipmi/ipmb_dev_int.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/char/ipmi/ipmb_dev_int.c +1
-1@@ -76,7 +76,7 @@ static ssize_t ipmb_read(struct file *file, char __user *buf, size_t count,struct ipmb_dev *ipmb_dev =to_ipmb_dev (file);struct ipmb_request_elem *queue_elem;struct ipmb_msg msg; -ssize_t ret; +ssize_t ret =0 ;memset (&msg,0 ,sizeof (msg));Signature · 1 line
2.1.2
Ah ok! I put that message on the cover letter. Thanks! I will make an update shortly.
-----Original Message-----
From: Corey Minyard <[email protected]> On Behalf Of Corey Minyard
Sent: Wednesday, July 24, 2019 3:07 PM
To: Asmaa Mnebhi <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH v1 1/1] Fix uninitialized variable in ipmb_dev_int.c
Quoted 2 lines · Asmaa Mnebhi
Signed-off-by Asmaa Mnebhi <[email protected]>Reported-by Geert Uytterhoeven <[email protected]>
Sorry to be picky here, but it's considered bad style to have an empty message. I probably wasn't clear before, but you should add some text like "Found by build regression/improvement testing." or something like that. Just so people know where it was found.
Could you also add a "Fixes" field? This is important in case someone pulls the original patch, they can look forward and see if any bugs were fixed. From the kernel docs:
If your patch fixes a bug in a specific commit, e.g. you found an issue using ``git bisect``, please use the 'Fixes:' tag with the first 12 characters of the SHA-1 ID, and the one line summary. Do not split the tag across multiple lines, tags are exempt from the "wrap at 75 columns" rule in order to simplify parsing scripts. For example::
I was going to do that myself, but since another spin is required...
Thanks,
-corey
Quoted 21 lines
--- drivers/char/ipmi/ipmb_dev_int.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/char/ipmi/ipmb_dev_int.c +1
-2@@ -76,7 +76,7 @@ static ssize_t ipmb_read(struct file *file, char __user *buf, size_t count,struct ipmb_dev *ipmb_dev =to_ipmb_dev (file);struct ipmb_request_elem *queue_elem;struct ipmb_msg msg; -ssize_t ret; +ssize_t ret =0 ;memset (&msg,0 ,sizeof (msg)); --2.1.2