Skip to contentSkip to conversation

Staging: speakup: Use x instead of x != NULL.

PATCH In review Sandhya Bankar 2 participants 4 messages Sep 14, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: speakup: Use x instead of x != NULL.

Use x instead of x != NULL.

---
 drivers/staging/speakup/fakekey.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/speakup/fakekey.c +1 -1
index 8f058b4..032b936 100644
@@ -56,7 +56,7 @@ int speakup_add_virtual_keyboard(void)
 
 void speakup_remove_virtual_keyboard(void)
 {
-	if (virt_keyboard != NULL) {
+	if (virt_keyboard) {
 		input_unregister_device(virt_keyboard);
 		virt_keyboard = NULL;
 	}
Signature · 1 line
1.8.2.3
#1 lore raw

Hi,

Quoted 1 line · Sandhya Bankar

Use x instead of x != NULL.

Commit log should contain the information about why doing this change is good instead of what you are doing. Also, if you have used any tool for detecting or solving the issue then probably writing something like 'Issue found using x' would be useful. :)

Thanks

Quoted 27 lines
---
 drivers/staging/speakup/fakekey.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/speakup/fakekey.c +1 -2
index 8f058b4..032b936 100644
@@ -56,7 +56,7 @@ int speakup_add_virtual_keyboard(void)
 
 void speakup_remove_virtual_keyboard(void)
 {
-       if (virt_keyboard != NULL) {
+       if (virt_keyboard) {
                input_unregister_device(virt_keyboard);
                virt_keyboard = NULL;
        }
--

1.8.2.3

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160914085822.GA2558%40sandhya.
For more options, visit https://groups.google.com/d/optout.

Signature · 2 lines
Vaishali
http://vaishalithakkar.in/
#2 lore raw

Thank you for quick reply . Shall I send it with v2 with adding commit log information?

Quoted 57 lines · Vaishali Thakkar

Hi,

Quoted 1 line · On Wed, Sep 14, 2016 at 2:28 PM, Sandhya Bankar <[email protected]…

Use x instead of x != NULL.

Commit log should contain the information about why doing this change is good
instead of what you are doing. Also, if you have used any tool for detecting or
solving the issue then probably writing something like 'Issue found using x'
would be useful. :)

Thanks

Review

Quoted 6 lines
Signed-off-by Sandhya Bankar <[email protected] <javascript:>>

---

 drivers/staging/speakup/fakekey.c | 2 +- 
 1 file changed, 1 insertion(+), 1 deletion(-) 
(quoted diff) +0 -0

b/drivers/staging/speakup/fakekey.c

Quoted 17 lines

index 8f058b4..032b936 100644

drivers/staging/speakup/fakekey.c +1 -1
@@ -56,7 +56,7 @@ int speakup_add_virtual_keyboard(void) 
 
 void speakup_remove_virtual_keyboard(void) 
 { 
-       if (virt_keyboard != NULL) { 
+       if (virt_keyboard) { 
                input_unregister_device(virt_keyboard); 
                virt_keyboard = NULL; 
        } 
Signature · 4 lines
1.8.2.3 

-- 
You received this message because you are subscribed to the Google 

Groups "outreachy-kernel" group.

Quoted 1 line

To unsubscribe from this group and stop receiving emails from it, send

an email to [email protected] <javascript:>.

Quoted 1 line

To post to this group, send email to [email protected]

<javascript:>.

Quoted 1 line

To view this discussion on the web visit

https://groups.google.com/d/msgid/outreachy-kernel/20160914085822.GA2558%40sandhya.

Quoted 1 line

For more options, visit https://groups.google.com/d/optout.

Signature · 2 lines
Vaishali 
http://vaishalithakkar.in/ 
#3 lore raw
Quoted 5 lines · Sandhya Bankar

Thank you for quick reply . Shall I send it with v2 with adding commit log information?

Yes, please.

Also, do not top-post while replying to mails.

Quoted 69 lines
Quoted 39 lines · Vaishali Thakkar

Hi,

Quoted 1 line · Sandhya Bankar

Use x instead of x != NULL.

Commit log should contain the information about why doing this change is good
instead of what you are doing. Also, if you have used any tool for detecting or
solving the issue then probably writing something like 'Issue found using x'
would be useful. :)

Thanks

Quoted 22 lines
---
 drivers/staging/speakup/fakekey.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/speakup/fakekey.c +1 -2
index 8f058b4..032b936 100644
@@ -56,7 +56,7 @@ int speakup_add_virtual_keyboard(void)
 
 void speakup_remove_virtual_keyboard(void)
 {
-       if (virt_keyboard != NULL) {
+       if (virt_keyboard) {
                input_unregister_device(virt_keyboard);
                virt_keyboard = NULL;
        }
--

1.8.2.3

Quoted 15 lines
Quoted 9 lines

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected]. To view this discussion on the web visit
https://groups.google.com/d/msgid/outreachy-kernel/20160914085822.GA2558%40sandhya.
For more options, visit https://groups.google.com/d/optout.

--
Vaishali
http://vaishalithakkar.in/

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected]. To view this discussion on the web visit
https://groups.google.com/d/msgid/outreachy-kernel/0475959f-954a-445b-a442-64a01d6348c0%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Signature · 2 lines
Vaishali
http://vaishalithakkar.in/