This patch fixes checkpatch.pl warnings, related to comments. Signed-off-by: Lior Pugatch <buzz5800@gmail.com> --- drivers/staging/panel/panel.c | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c index 3e9ee7e..6b96369 100644 --- a/drivers/staging/panel/panel.c +++ b/drivers/staging/panel/panel.c @@ -785,6 +785,7 @@ static void long_sleep(int ms) * send a serial byte to the LCD panel. The caller is responsible for locking * if needed. */ + static void lcd_send_serial(int byte) { int bit; @@ -910,7 +911,8 @@ static void lcd_gotoxy(void) lcd_write_cmd(LCD_CMD_SET_DDRAM_ADDR | (lcd.addr.y ? lcd.hwidth : 0) /* we force the cursor to stay at the end of the - line if it wants to go farther */ + * line if it wants to go farther + */ | ((lcd.addr.x < lcd.bwidth) ? lcd.addr.x & (lcd.hwidth - 1) : lcd.bwidth - 1)); } @@ -1064,11 +1066,9 @@ static void lcd_init_display(void) lcd_clear_display(); } -/* - * These are the file operation function for user access to /dev/lcd +/* These are the file operation function for user access to /dev/lcd * This function can also be called from inside the kernel, by * setting file and ppos to NULL. - * */ static inline int handle_lcd_special_code(void) @@ -1295,7 +1295,8 @@ static inline int handle_lcd_special_code(void) lcd_backlight(1); else if (lcd.light_tempo == 0) /* switch off the light only when the tempo - lighting is gone */ + * lighting is gone + */ lcd_backlight(0); } } @@ -1324,7 +1325,8 @@ static void lcd_write_char(char c) /* go back one char and clear it */ if (lcd.addr.x > 0) { /* check if we're not at the - end of the line */ + * end of the line + */ if (lcd.addr.x < lcd.bwidth) /* back one char */ lcd_write_cmd(LCD_CMD_SHIFT); @@ -1341,7 +1343,8 @@ static void lcd_write_char(char c) break; case '\n': /* flush the remainder of the current line and - go to the beginning of the next line */ + * go to the beginning of the next line + */ for (; lcd.addr.x < lcd.bwidth; lcd.addr.x++) lcd_write_data(' '); lcd.addr.x = 0; @@ -1365,7 +1368,9 @@ static void lcd_write_char(char c) } /* now we'll see if we're in an escape mode and if the current - escape sequence can be understood. */ + * escape sequence can be understood. + */ + if (lcd.esc_seq.len >= 2) { int processed = 0; @@ -1388,8 +1393,10 @@ static void lcd_write_char(char c) } /* LCD special escape codes */ + /* flush the escape sequence if it's been processed - or if it is getting too long. */ + * or if it is getting too long. + */ if (processed || (lcd.esc_seq.len >= LCD_ESCAPE_LEN)) lcd.esc_seq.len = -1; } /* escape codes */ @@ -1404,7 +1411,8 @@ static ssize_t lcd_write(struct file *file, for (; count-- > 0; (*ppos)++, tmp++) { if (!in_interrupt() && (((count + 1) & 0x1f) == 0)) /* let's be a little nice with other processes - that need some CPU */ + * that need some CPU. + */ schedule(); if (get_user(c, tmp)) @@ -1460,7 +1468,8 @@ static void panel_lcd_print(const char *s) for (; count-- > 0; tmp++) { if (!in_interrupt() && (((count + 1) & 0x1f) == 0)) /* let's be a little nice with other processes - that need some CPU */ + * that need some CPU. + */ schedule(); lcd_write_char(*tmp); @@ -1636,7 +1645,9 @@ static void lcd_init(void) /* before this line, we must NOT send anything to the display. * Since lcd_init_display() needs to write data, we have to - * enable mark the LCD initialized just before. */ + * enable mark the LCD initialized just before. + */ + lcd.initialized = true; lcd_init_display(); @@ -1787,7 +1798,8 @@ static void phys_scan_contacts(void) w_dtr(pprt, oldval); /* disable all outputs */ } /* this is easy: use old bits when they are flapping, - * use new ones when stable */ + * use new ones when stable. + */ phys_curr = (phys_prev & (phys_read ^ phys_read_prev)) | (phys_read & ~(phys_read ^ phys_read_prev)); } -- 1.9.1
On Wed, Aug 05, 2015 at 11:19:53PM +0300, Lior Pugatch wrote: > This patch fixes checkpatch.pl warnings, > related to comments. > > Signed-off-by: Lior Pugatch <buzz5800@gmail.com> > --- > drivers/staging/panel/panel.c | 38 +++++++++++++++++++++++++------------- > 1 file changed, 25 insertions(+), 13 deletions(-) > > diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c > index 3e9ee7e..6b96369 100644 > --- a/drivers/staging/panel/panel.c > +++ b/drivers/staging/panel/panel.c > @@ -785,6 +785,7 @@ static void long_sleep(int ms) > * send a serial byte to the LCD panel. The caller is responsible for locking > * if needed. > */ > + Why is this line added? And please fix up your subject to say what part of the kernel you are changing and be more specific, something like: staging: panel: fix comment... thanks, greg k-h _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Coding style issues found were rectified Signed-off-by: Anant Thazhemadam <anant.thazhemadam@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_security.c | 92 ++++++++++--------- 1 file changed, 47 insertions(+), 45 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_security.c b/drivers/staging/rtl8188eu/core/rtw_security.c index 21f6652dd69f..3111f4a899ee 100644 --- a/drivers/staging/rtl8188eu/core/rtw_security.c +++ b/drivers/staging/rtl8188eu/core/rtw_security.c @@ -127,8 +127,8 @@ static __le32 getcrc32(u8 *buf, int len) } /* - Need to consider the fragment situation -*/ + * Need to consider the fragment situation + */ void rtw_wep_encrypt(struct adapter *padapter, u8 *pxmitframe) { int curfragnum, length; @@ -429,9 +429,9 @@ static const unsigned short Sbox1[2][256] = { /* Sbox for hash (can be in ROM) 0x2DB6, 0x3C22, 0x1592, 0xC920, 0x8749, 0xAAFF, 0x5078, 0xA57A, 0x038F, 0x59F8, 0x0980, 0x1A17, 0x65DA, 0xD731, 0x84C6, 0xD0B8, 0x82C3, 0x29B0, 0x5A77, 0x1E11, 0x7BCB, 0xA8FC, 0x6DD6, 0x2C3A, - }, +}, - { /* second half of table is unsigned char-reversed version of first! */ +{ /* second half of table is unsigned char-reversed version of first! */ 0xA5C6, 0x84F8, 0x99EE, 0x8DF6, 0x0DFF, 0xBDD6, 0xB1DE, 0x5491, 0x5060, 0x0302, 0xA9CE, 0x7D56, 0x19E7, 0x62B5, 0xE64D, 0x9AEC, 0x458F, 0x9D1F, 0x4089, 0x87FA, 0x15EF, 0xEBB2, 0xC98E, 0x0BFB, @@ -464,26 +464,26 @@ static const unsigned short Sbox1[2][256] = { /* Sbox for hash (can be in ROM) 0xB62D, 0x223C, 0x9215, 0x20C9, 0x4987, 0xFFAA, 0x7850, 0x7AA5, 0x8F03, 0xF859, 0x8009, 0x171A, 0xDA65, 0x31D7, 0xC684, 0xB8D0, 0xC382, 0xB029, 0x775A, 0x111E, 0xCB7B, 0xFCA8, 0xD66D, 0x3A2C, - } +} }; - /* -********************************************************************** -* Routine: Phase 1 -- generate P1K, given TA, TK, IV32 -* -* Inputs: -* tk[] = temporal key [128 bits] -* ta[] = transmitter's MAC address [ 48 bits] -* iv32 = upper 32 bits of IV [ 32 bits] -* Output: -* p1k[] = Phase 1 key [ 80 bits] -* -* Note: -* This function only needs to be called every 2**16 packets, -* although in theory it could be called every packet. -* -********************************************************************** -*/ +/* + ********************************************************************** + * Routine: Phase 1 -- generate P1K, given TA, TK, IV32 + * + * Inputs: + * tk[] = temporal key [128 bits] + * ta[] = transmitter's MAC address [ 48 bits] + * iv32 = upper 32 bits of IV [ 32 bits] + * Output: + * p1k[] = Phase 1 key [ 80 bits] + * + * Note: + * This function only needs to be called every 2**16 packets, + * although in theory it could be called every packet. + * + ********************************************************************** + */ static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32) { int i; @@ -507,28 +507,28 @@ static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32) } /* -********************************************************************** -* Routine: Phase 2 -- generate RC4KEY, given TK, P1K, IV16 -* -* Inputs: -* tk[] = Temporal key [128 bits] -* p1k[] = Phase 1 output key [ 80 bits] -* iv16 = low 16 bits of IV counter [ 16 bits] -* Output: -* rc4key[] = the key used to encrypt the packet [128 bits] -* -* Note: -* The value {TA, IV32, IV16} for Phase1/Phase2 must be unique -* across all packets using the same key TK value. Then, for a -* given value of TK[], this TKIP48 construction guarantees that -* the final RC4KEY value is unique across all packets. -* -* Suggested implementation optimization: if PPK[] is "overlaid" -* appropriately on RC4KEY[], there is no need for the final -* for loop below that copies the PPK[] result into RC4KEY[]. -* -********************************************************************** -*/ + ********************************************************************** + * Routine: Phase 2 -- generate RC4KEY, given TK, P1K, IV16 + * + * Inputs: + * tk[] = Temporal key [128 bits] + * p1k[] = Phase 1 output key [ 80 bits] + * iv16 = low 16 bits of IV counter [ 16 bits] + * Output: + * rc4key[] = the key used to encrypt the packet [128 bits] + * + * Note: + * The value {TA, IV32, IV16} for Phase1/Phase2 must be unique + * across all packets using the same key TK value. Then, for a + * given value of TK[], this TKIP48 construction guarantees that + * the final RC4KEY value is unique across all packets. + * + * Suggested implementation optimization: if PPK[] is "overlaid" + * appropriately on RC4KEY[], there is no need for the final + * for loop below that copies the PPK[] result into RC4KEY[]. + * + ********************************************************************** + */ static void phase2(u8 *rc4key, const u8 *tk, const u16 *p1k, u16 iv16) { int i; @@ -718,7 +718,9 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe) res = _FAIL; } } else { - RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo==NULL!!!\n",__func__)); + RT_TRACE(_module_rtl871x_security_c_, _drv_err_, + ("%s: stainfo==NULL!!!\n", __func__) + ); res = _FAIL; } } -- 2.25.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
On Sat, Jul 25, 2020 at 01:55:19AM +0530, Anant Thazhemadam wrote: > Coding style issues found were rectified > > Signed-off-by: Anant Thazhemadam <anant.thazhemadam@gmail.com> > --- > drivers/staging/rtl8188eu/core/rtw_security.c | 92 ++++++++++--------- > 1 file changed, 47 insertions(+), 45 deletions(-) > > diff --git a/drivers/staging/rtl8188eu/core/rtw_security.c b/drivers/staging/rtl8188eu/core/rtw_security.c > index 21f6652dd69f..3111f4a899ee 100644 > --- a/drivers/staging/rtl8188eu/core/rtw_security.c > +++ b/drivers/staging/rtl8188eu/core/rtw_security.c > @@ -127,8 +127,8 @@ static __le32 getcrc32(u8 *buf, int len) > } > > /* > - Need to consider the fragment situation > -*/ > + * Need to consider the fragment situation > + */ > void rtw_wep_encrypt(struct adapter *padapter, u8 *pxmitframe) > { > int curfragnum, length; > @@ -429,9 +429,9 @@ static const unsigned short Sbox1[2][256] = { /* Sbox for hash (can be in ROM) > 0x2DB6, 0x3C22, 0x1592, 0xC920, 0x8749, 0xAAFF, 0x5078, 0xA57A, > 0x038F, 0x59F8, 0x0980, 0x1A17, 0x65DA, 0xD731, 0x84C6, 0xD0B8, > 0x82C3, 0x29B0, 0x5A77, 0x1E11, 0x7BCB, 0xA8FC, 0x6DD6, 0x2C3A, > - }, > +}, > > - { /* second half of table is unsigned char-reversed version of first! */ > +{ /* second half of table is unsigned char-reversed version of first! */ > 0xA5C6, 0x84F8, 0x99EE, 0x8DF6, 0x0DFF, 0xBDD6, 0xB1DE, 0x5491, > 0x5060, 0x0302, 0xA9CE, 0x7D56, 0x19E7, 0x62B5, 0xE64D, 0x9AEC, > 0x458F, 0x9D1F, 0x4089, 0x87FA, 0x15EF, 0xEBB2, 0xC98E, 0x0BFB, > @@ -464,26 +464,26 @@ static const unsigned short Sbox1[2][256] = { /* Sbox for hash (can be in ROM) > 0xB62D, 0x223C, 0x9215, 0x20C9, 0x4987, 0xFFAA, 0x7850, 0x7AA5, > 0x8F03, 0xF859, 0x8009, 0x171A, 0xDA65, 0x31D7, 0xC684, 0xB8D0, > 0xC382, 0xB029, 0x775A, 0x111E, 0xCB7B, 0xFCA8, 0xD66D, 0x3A2C, > - } > +} > }; > > - /* > -********************************************************************** > -* Routine: Phase 1 -- generate P1K, given TA, TK, IV32 > -* > -* Inputs: > -* tk[] = temporal key [128 bits] > -* ta[] = transmitter's MAC address [ 48 bits] > -* iv32 = upper 32 bits of IV [ 32 bits] > -* Output: > -* p1k[] = Phase 1 key [ 80 bits] > -* > -* Note: > -* This function only needs to be called every 2**16 packets, > -* although in theory it could be called every packet. > -* > -********************************************************************** > -*/ > +/* > + ********************************************************************** > + * Routine: Phase 1 -- generate P1K, given TA, TK, IV32 > + * > + * Inputs: > + * tk[] = temporal key [128 bits] > + * ta[] = transmitter's MAC address [ 48 bits] > + * iv32 = upper 32 bits of IV [ 32 bits] > + * Output: > + * p1k[] = Phase 1 key [ 80 bits] > + * > + * Note: > + * This function only needs to be called every 2**16 packets, > + * although in theory it could be called every packet. > + * > + ********************************************************************** > + */ > static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32) > { > int i; > @@ -507,28 +507,28 @@ static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32) > } > > /* > -********************************************************************** > -* Routine: Phase 2 -- generate RC4KEY, given TK, P1K, IV16 > -* > -* Inputs: > -* tk[] = Temporal key [128 bits] > -* p1k[] = Phase 1 output key [ 80 bits] > -* iv16 = low 16 bits of IV counter [ 16 bits] > -* Output: > -* rc4key[] = the key used to encrypt the packet [128 bits] > -* > -* Note: > -* The value {TA, IV32, IV16} for Phase1/Phase2 must be unique > -* across all packets using the same key TK value. Then, for a > -* given value of TK[], this TKIP48 construction guarantees that > -* the final RC4KEY value is unique across all packets. > -* > -* Suggested implementation optimization: if PPK[] is "overlaid" > -* appropriately on RC4KEY[], there is no need for the final > -* for loop below that copies the PPK[] result into RC4KEY[]. > -* > -********************************************************************** > -*/ > + ********************************************************************** > + * Routine: Phase 2 -- generate RC4KEY, given TK, P1K, IV16 > + * > + * Inputs: > + * tk[] = Temporal key [128 bits] > + * p1k[] = Phase 1 output key [ 80 bits] > + * iv16 = low 16 bits of IV counter [ 16 bits] > + * Output: > + * rc4key[] = the key used to encrypt the packet [128 bits] > + * > + * Note: > + * The value {TA, IV32, IV16} for Phase1/Phase2 must be unique > + * across all packets using the same key TK value. Then, for a > + * given value of TK[], this TKIP48 construction guarantees that > + * the final RC4KEY value is unique across all packets. > + * > + * Suggested implementation optimization: if PPK[] is "overlaid" > + * appropriately on RC4KEY[], there is no need for the final > + * for loop below that copies the PPK[] result into RC4KEY[]. > + * > + ********************************************************************** > + */ > static void phase2(u8 *rc4key, const u8 *tk, const u16 *p1k, u16 iv16) > { > int i; > @@ -718,7 +718,9 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe) > res = _FAIL; > } > } else { > - RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo==NULL!!!\n",__func__)); > + RT_TRACE(_module_rtl871x_security_c_, _drv_err_, > + ("%s: stainfo==NULL!!!\n", __func__) > + ); > res = _FAIL; > } > } > -- > 2.25.1 > Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree. You are receiving this message because of the following common error(s) as indicated below: - Your patch did many different things all at once, making it difficult to review. All Linux kernel patches need to only do one thing at a time. If you need to do multiple things (such as clean up all coding style issues in a file/driver), do it in a sequence of patches, each one doing only one thing. This will make it easier to review the patches to ensure that they are correct, and to help alleviate any merge issues that larger patches can cause. - You did not specify a description of why the patch is needed, or possibly, any description at all, in the email body. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/SubmittingPatches for what is needed in order to properly describe the change. - You did not write a descriptive Subject: for the patch, allowing Greg, and everyone else, to know what this patch is all about. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/SubmittingPatches for what a proper Subject: line should look like. If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers. thanks, greg k-h's patch email bot _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel