Skip to contentSkip to conversation

staging:gasket:apex_driver.c:fix the parenthesis

PATCH In review [email protected] 2 participants 3 messages Mar 16, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging:gasket:apex_driver.c:fix the parenthesis

From: Anushka Shukla <[email protected]>

Fix the checkpatch.pl WARNING in apex_driver.c by changing the position of parenthesis

WARNING: Line should end with '('

---
 drivers/staging/gasket/apex_driver.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/gasket/apex_driver.c +6 -6
index 0578bf1ba1e9..7c2ffa467557 100644
@@ -529,18 +529,18 @@ static ssize_t sysfs_show(struct device *device, struct device_attribute *attr,
 	switch (type) {
 	case ATTR_KERNEL_HIB_PAGE_TABLE_SIZE:
 		ret = scnprintf(buf, PAGE_SIZE, "%u\n",
-				gasket_page_table_num_entries(
-					gasket_dev->page_table[0]));
+				gasket_page_table_num_entries
+				       (gasket_dev->page_table[0]));
 		break;
 	case ATTR_KERNEL_HIB_SIMPLE_PAGE_TABLE_SIZE:
 		ret = scnprintf(buf, PAGE_SIZE, "%u\n",
-				gasket_page_table_num_entries(
-					gasket_dev->page_table[0]));
+				gasket_page_table_num_entries
+				       (gasket_dev->page_table[0]));
 		break;
 	case ATTR_KERNEL_HIB_NUM_ACTIVE_PAGES:
 		ret = scnprintf(buf, PAGE_SIZE, "%u\n",
-				gasket_page_table_num_active_pages(
-					gasket_dev->page_table[0]));
+				gasket_page_table_num_active_pages
+				       (gasket_dev->page_table[0]));
 		break;
 	default:
 		dev_dbg(gasket_dev->dev, "Unknown attribute: %s\n",
Signature · 1 line
2.17.1
#1 lore raw

This is not the right subject line for this patch. First, you have put [Outreachy kerel] in the subject line and the mailing list has put another, so there are two. You don't need to put this in the subject line. Second, the information about the file is no correct. This is no something that you can make up by yourself. Use git log --oneline to see what others have done. Follow the same choice of words and spacing.

Quoted 1 line · On Sat, 16 Mar 2019, [email protected] wrote:

From: Anushka Shukla <[email protected]>

You shouldn't need this line. Update your git configuration file so that git-send-email will use your full name.

Quoted 1 line

Fix the checkpatch.pl WARNING in apex_driver.c by changing the position of parenthesis

Commit log messages should be limited to around 70 characters, since they will be indented a bit. Try to come up with a messae that describes what you have done and why. Avoid Fix, which doesn't really give any information.

Quoted 12 lines

WARNING: Line should end with '('

---
 drivers/staging/gasket/apex_driver.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/gasket/apex_driver.c +0 -0
index 0578bf1ba1e9..7c2ffa467557 100644

drivers/staging/gasket/apex_driver.c static ssize_t sysfs_show(struct device *device, struct device_attribute *attr, · line 533

Quoted 7 lines
drivers/staging/gasket/apex_driver.c +2 -2
@@ -529,18 +529,18 @@ static ssize_t sysfs_show(struct device *device, struct device_attribute *attr,
 	switch (type) {
 	case ATTR_KERNEL_HIB_PAGE_TABLE_SIZE:
 		ret = scnprintf(buf, PAGE_SIZE, "%u\n",
-				gasket_page_table_num_entries(
-					gasket_dev->page_table[0]));
+				gasket_page_table_num_entries
+				       (gasket_dev->page_table[0]));

This doesn't look very nice. The argument is the same in all cases. Maybe you could create a new local variable with a short name and an appropriate type and store this value in it before the switch.

julia

Quoted 27 lines
drivers/staging/gasket/apex_driver.c +4 -5
 		break;
 	case ATTR_KERNEL_HIB_SIMPLE_PAGE_TABLE_SIZE:
 		ret = scnprintf(buf, PAGE_SIZE, "%u\n",
-				gasket_page_table_num_entries(
-					gasket_dev->page_table[0]));
+				gasket_page_table_num_entries
+				       (gasket_dev->page_table[0]));
 		break;
 	case ATTR_KERNEL_HIB_NUM_ACTIVE_PAGES:
 		ret = scnprintf(buf, PAGE_SIZE, "%u\n",
-				gasket_page_table_num_active_pages(
-					gasket_dev->page_table[0]));
+				gasket_page_table_num_active_pages
+				       (gasket_dev->page_table[0]));
 		break;
 	default:
 		dev_dbg(gasket_dev->dev, "Unknown attribute: %s\n",
--

2.17.1

--
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/20190316161959.8901-1-anushkacharu9%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

#2 lore raw

Okay I will submit it again.

Quoted 93 lines · Julia Lawall

This is not the right subject line for this patch. First, you have put [Outreachy kerel] in the subject line and the mailing list has put another, so there are two. You don't need to put this in the subject line. Second, the information about the file is no correct. This is no something that you can make up by yourself. Use git log --oneline to see what others have done. Follow the same choice of words and spacing.

Quoted 1 line · On Sat, 16 Mar 2019, [email protected] wrote:

From: Anushka Shukla <[email protected]>

You shouldn't need this line. Update your git configuration file so that git-send-email will use your full name.

Quoted 1 line

Fix the checkpatch.pl WARNING in apex_driver.c by changing the position

of parenthesis

Commit log messages should be limited to around 70 characters, since they will be indented a bit. Try to come up with a messae that describes what you have done and why. Avoid Fix, which doesn't really give any information.

Review

Quoted 8 lines

WARNING: Line should end with '('

---
 drivers/staging/gasket/apex_driver.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
(quoted diff) +0 -0

b/drivers/staging/gasket/apex_driver.c

drivers/staging/gasket/apex_driver.c static ssize_t sysfs_show(struct device *device,

Quoted 4 lines

index 0578bf1ba1e9..7c2ffa467557 100644

drivers/staging/gasket/apex_driver.c +0 -0
@@ -529,18 +529,18 @@ static ssize_t sysfs_show(struct device *device,

struct device_attribute *attr,

drivers/staging/gasket/apex_driver.c static ssize_t sysfs_show(struct device *device, struct device_attribute *attr, · line 533

Quoted 7 lines
drivers/staging/gasket/apex_driver.c +2 -2
      switch (type) {
      case ATTR_KERNEL_HIB_PAGE_TABLE_SIZE:
              ret = scnprintf(buf, PAGE_SIZE, "%u\n",
-                             gasket_page_table_num_entries(
-                                     gasket_dev->page_table[0]));
+                             gasket_page_table_num_entries
+                                    (gasket_dev->page_table[0]));

This doesn't look very nice. The argument is the same in all cases. Maybe you could create a new local variable with a short name and an appropriate type and store this value in it before the switch.

julia

Quoted 20 lines
drivers/staging/gasket/apex_driver.c +4 -5
              break;
      case ATTR_KERNEL_HIB_SIMPLE_PAGE_TABLE_SIZE:
              ret = scnprintf(buf, PAGE_SIZE, "%u\n",
-                             gasket_page_table_num_entries(
-                                     gasket_dev->page_table[0]));
+                             gasket_page_table_num_entries
+                                    (gasket_dev->page_table[0]));
              break;
      case ATTR_KERNEL_HIB_NUM_ACTIVE_PAGES:
              ret = scnprintf(buf, PAGE_SIZE, "%u\n",
-                             gasket_page_table_num_active_pages(
-                                     gasket_dev->page_table[0]));
+                             gasket_page_table_num_active_pages
+                                    (gasket_dev->page_table[0]));
              break;
      default:
              dev_dbg(gasket_dev->dev, "Unknown attribute: %s\n",
--

2.17.1

Quoted 2 lines

--
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].

Quoted 2 lines

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/20190316161959.8901-1-anushkacharu9%40gmail.com
.

Quoted 2 lines

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

--
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/alpine.DEB.2.21.1903161729560.2487%40hadrien
.
For more options, visit https://groups.google.com/d/optout.