staging/asus_oled fixed style issues
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
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
@@ -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 0x175bMODULE_AUTHOR ("Jakub Schmidtke, [email protected]" );MODULE_DESCRIPTION ("Asus OLED Driver" );
Signature · 1 line
1.7.10.4
PATCH 2/2 staging/asus_oled fixed linebreak style issue
In reply to Matthias Schidfixed 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
@@ -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
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
Signed-off-by Matthias Schid <[email protected]>Signed-off-by Stefan Huber <[email protected]>Signed-off-by Simon Puels <[email protected]>--- drivers/staging/asus_oled/asus_oled.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/staging/asus_oled/asus_oled.c +0
-0
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
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
@@ -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