Skip to contentSkip to conversation

staging/asus_oled fixed style issues

PATCH In review Matthias Schid 2 participants 5 messages Jun 5, 2013 Staging

lore
Share & tools
lore
#0 lore raw

cover staging/asus_oled fixed style issues

fixed alignment issue and a linebreak issue reported by checkpatch.pl in asus_oled

Matthias Schid (2):
staging/asus_oled fixed alignment in defines
staging/asus_oled fixed linebreak style issue

 drivers/staging/asus_oled/asus_oled.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/2 staging/asus_oled fixed alignment in defines

replaced spaces in incorrect alignment in defines with tabs

---
 drivers/staging/asus_oled/asus_oled.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/asus_oled/asus_oled.c +3 -3
index 4598a2f..173fb9a 100644
@@ -50,9 +50,9 @@
 #define ASUS_OLED_DISP_HEIGHT		32
 #define ASUS_OLED_PACKET_BUF_SIZE	256
 
-#define USB_VENDOR_ID_ASUS      0x0b05
-#define USB_DEVICE_ID_ASUS_LCM      0x1726
-#define USB_DEVICE_ID_ASUS_LCM2     0x175b
+#define USB_VENDOR_ID_ASUS		0x0b05
+#define USB_DEVICE_ID_ASUS_LCM		0x1726
+#define USB_DEVICE_ID_ASUS_LCM2		0x175b
 
 MODULE_AUTHOR("Jakub Schmidtke, [email protected]");
 MODULE_DESCRIPTION("Asus OLED Driver");
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 2/2 staging/asus_oled fixed linebreak style issue

In reply to Matthias Schid

fixed a linebreak within an error message string coding style issue reported by checkpatch.pl

---
 drivers/staging/asus_oled/asus_oled.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/asus_oled/asus_oled.c +1 -2
index 173fb9a..a7cd65a 100644
@@ -383,8 +383,7 @@ static int append_values(struct asus_oled_dev *odev, uint8_t val, size_t count)
 		}
 
 		if (i >= odev->buf_size) {
-			dev_err(odev->dev, "Buffer overflow! Report a bug:"
-			       "offs: %d >= %d i: %d (x: %d y: %d)\n",
+			dev_err(odev->dev, "Buffer overflow! Report a bug: offs: %d >= %d i: %d (x: %d y: %d)\n",
 			       (int) odev->buf_offs, (int) odev->buf_size,
 			       (int) i, (int) x, (int) y);
 			return -EIO;
Signature · 1 line
1.7.10.4
#3 lore raw

Re: [PATCH 2/2] staging/asus_oled fixed linebreak style issue

Quoted 15 lines · Matthias Schid

fixed a linebreak within an error message string coding style issue reported by checkpatch.pl

---
 drivers/staging/asus_oled/asus_oled.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/asus_oled/asus_oled.c +0 -0
index 173fb9a..a7cd65a 100644

drivers/staging/asus_oled/asus_oled.c static int append_values(struct asus_oled_dev *odev, uint8_t val, size_t count) · line 388

Quoted 8 lines
drivers/staging/asus_oled/asus_oled.c +1 -2
@@ -383,8 +383,7 @@ static int append_values(struct asus_oled_dev *odev, uint8_t val, size_t count)
 		}
 
 		if (i >= odev->buf_size) {
-			dev_err(odev->dev, "Buffer overflow! Report a bug:"
-			       "offs: %d >= %d i: %d (x: %d y: %d)\n",
+			dev_err(odev->dev, "Buffer overflow! Report a bug: offs: %d >= %d i: %d (x: %d y: %d)\n",
 			       (int) odev->buf_offs, (int) odev->buf_size,
 			       (int) i, (int) x, (int) y);

This could be improved:

			dev_err(odev->dev,
				"Buffer overflow! Report a bug: offs: %zu >= %d i: %zu (x: %zu y: %zu)\n",
			     	odev->buf_offs, odev->buf_size, i, x, y);

Printk fromats are documented in Documentation/printk-formats.txt.

regards,
dan carpenter

#4 lore raw

PATCH 2/2 staging/asus_oled fixed linebreak and printk issue

fixed a linebreak within an error message string coding style issue reported by checkpatch.pl and dev_err format parameters

---
 drivers/staging/asus_oled/asus_oled.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/staging/asus_oled/asus_oled.c +2 -4
index 173fb9a..9fe13d0 100644
@@ -383,10 +383,8 @@ static int append_values(struct asus_oled_dev *odev, uint8_t val, size_t count)
 		}
 
 		if (i >= odev->buf_size) {
-			dev_err(odev->dev, "Buffer overflow! Report a bug:"
-			       "offs: %d >= %d i: %d (x: %d y: %d)\n",
-			       (int) odev->buf_offs, (int) odev->buf_size,
-			       (int) i, (int) x, (int) y);
+			dev_err(odev->dev, "Buffer overflow! Report a bug: offs: %zu >= %zu i: %zu (x: %zu y: %zu)\n",
+			       odev->buf_offs, odev->buf_size, i, x, y);
 			return -EIO;
 		}
 
Signature · 1 line
1.7.10.4