Re: [PATCH 1/1] staging: speakup: place each variable declaration on a single line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 13, 2013 at 03:25:02PM -0400, Brandon McGinty-Carroll wrote:
> @@ -1047,10 +1075,12 @@ static void say_to_right(struct vc_data *vc)
>  static void spkup_write(const char *in_buf, int count)
>  {
>  	static int rep_count;
> -	static u_char ch = '\0', old_ch = '\0';
> -	static u_short char_type, last_type;
> +	static u_char ch = '\0';
> +	static u_char old_ch = '\0';
> +	static u_short char_type;
> +	static u_short last_type;
>  	int in_count = count;
> -	spk_keydown = 0;
> +	int spk_keydown = 0;

This last bit is incorrect, you are overriding a file-wide variable with
a function variable.  Not good at all, please be more careful.

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux