public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] vt: defkeymap.c_shipped remove unused variables
@ 2022-04-29  1:48 Zhang Jianhua
  2022-04-29  6:39 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Zhang Jianhua @ 2022-04-29  1:48 UTC (permalink / raw)
  To: gregkh, jirislaby, chris.zjh; +Cc: linux-kernel

The global variables 'funcbufptr' 'funcbufsize' and 'funcbufleft' have
been initialized but not used, they are redundant and remove them.

--------

Signed-off-by: Zhang Jianhua <chris.zjh@huawei.com>
---
 drivers/tty/vt/defkeymap.c_shipped | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/tty/vt/defkeymap.c_shipped b/drivers/tty/vt/defkeymap.c_shipped
index 094d95bf0005..80dee50bcb7a 100644
--- a/drivers/tty/vt/defkeymap.c_shipped
+++ b/drivers/tty/vt/defkeymap.c_shipped
@@ -185,10 +185,6 @@ char func_buf[] = {
 	'\033', '[', 'P', 0, 
 };
 
-char *funcbufptr = func_buf;
-int funcbufsize = sizeof(func_buf);
-int funcbufleft = 0;          /* space left */
-
 char *func_table[MAX_NR_FUNC] = {
 	func_buf + 0,
 	func_buf + 5,
-- 
2.31.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] vt: defkeymap.c_shipped remove unused variables
  2022-04-29  1:48 [PATCH -next] vt: defkeymap.c_shipped remove unused variables Zhang Jianhua
@ 2022-04-29  6:39 ` Greg KH
  2022-05-05  3:10   ` zhangjianhua (E)
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2022-04-29  6:39 UTC (permalink / raw)
  To: Zhang Jianhua; +Cc: jirislaby, linux-kernel

On Fri, Apr 29, 2022 at 09:48:14AM +0800, Zhang Jianhua wrote:
> The global variables 'funcbufptr' 'funcbufsize' and 'funcbufleft' have
> been initialized but not used, they are redundant and remove them.
> 
> --------

Why this extra "------" line?

> 
> Signed-off-by: Zhang Jianhua <chris.zjh@huawei.com>
> ---
>  drivers/tty/vt/defkeymap.c_shipped | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/tty/vt/defkeymap.c_shipped b/drivers/tty/vt/defkeymap.c_shipped
> index 094d95bf0005..80dee50bcb7a 100644
> --- a/drivers/tty/vt/defkeymap.c_shipped
> +++ b/drivers/tty/vt/defkeymap.c_shipped
> @@ -185,10 +185,6 @@ char func_buf[] = {
>  	'\033', '[', 'P', 0, 
>  };
>  
> -char *funcbufptr = func_buf;
> -int funcbufsize = sizeof(func_buf);
> -int funcbufleft = 0;          /* space left */
> -
>  char *func_table[MAX_NR_FUNC] = {
>  	func_buf + 0,
>  	func_buf + 5,
> -- 
> 2.31.0
> 

Shouldn't you fix up the loadkeys tool instead?  As the top of this file
says, it is auto-generated and is not something to be hand-edited at
all.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] vt: defkeymap.c_shipped remove unused variables
  2022-04-29  6:39 ` Greg KH
@ 2022-05-05  3:10   ` zhangjianhua (E)
  2022-05-05 12:23     ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: zhangjianhua (E) @ 2022-05-05  3:10 UTC (permalink / raw)
  To: Greg KH; +Cc: jirislaby, linux-kernel


在 2022/4/29 14:39, Greg KH 写道:
> On Fri, Apr 29, 2022 at 09:48:14AM +0800, Zhang Jianhua wrote:
>> The global variables 'funcbufptr' 'funcbufsize' and 'funcbufleft' have
>> been initialized but not used, they are redundant and remove them.
>>
>> --------
> Why this extra "------" line?

This line "------" means the end of commit message, if it is redundant, I will remove it in next version.

>> Signed-off-by: Zhang Jianhua <chris.zjh@huawei.com>
>> ---
>>   drivers/tty/vt/defkeymap.c_shipped | 4 ----
>>   1 file changed, 4 deletions(-)
>>
>> diff --git a/drivers/tty/vt/defkeymap.c_shipped b/drivers/tty/vt/defkeymap.c_shipped
>> index 094d95bf0005..80dee50bcb7a 100644
>> --- a/drivers/tty/vt/defkeymap.c_shipped
>> +++ b/drivers/tty/vt/defkeymap.c_shipped
>> @@ -185,10 +185,6 @@ char func_buf[] = {
>>   	'\033', '[', 'P', 0,
>>   };
>>   
>> -char *funcbufptr = func_buf;
>> -int funcbufsize = sizeof(func_buf);
>> -int funcbufleft = 0;          /* space left */
>> -
>>   char *func_table[MAX_NR_FUNC] = {
>>   	func_buf + 0,
>>   	func_buf + 5,
>> -- 
>> 2.31.0
>>
> Shouldn't you fix up the loadkeys tool instead?  As the top of this file
> says, it is auto-generated and is not something to be hand-edited at
> all.
>
> thanks,
>
> greg k-h
> .
Thanks, I will read the source code more carefully, and fix up the 
loadkeys tool if it is indeed a problem.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] vt: defkeymap.c_shipped remove unused variables
  2022-05-05  3:10   ` zhangjianhua (E)
@ 2022-05-05 12:23     ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2022-05-05 12:23 UTC (permalink / raw)
  To: zhangjianhua (E); +Cc: jirislaby, linux-kernel

On Thu, May 05, 2022 at 11:10:55AM +0800, zhangjianhua (E) wrote:
> 
> 在 2022/4/29 14:39, Greg KH 写道:
> > On Fri, Apr 29, 2022 at 09:48:14AM +0800, Zhang Jianhua wrote:
> > > The global variables 'funcbufptr' 'funcbufsize' and 'funcbufleft' have
> > > been initialized but not used, they are redundant and remove them.
> > > 
> > > --------
> > Why this extra "------" line?
> 
> This line "------" means the end of commit message, if it is redundant, I will remove it in next version.

That is not used in kernel changelogs at all, sorry.  Please don't add
it in future changes either.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-05-05 17:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-29  1:48 [PATCH -next] vt: defkeymap.c_shipped remove unused variables Zhang Jianhua
2022-04-29  6:39 ` Greg KH
2022-05-05  3:10   ` zhangjianhua (E)
2022-05-05 12:23     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox