Re: [PATCH kernel 1/1] powerpc/Documentation/misc-devices/: Fix one compile error

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

 



On Wed, 2017-02-22 at 15:22 +0800, fgao@xxxxxxxxxx wrote:
> From: Gao Feng <fgao@xxxxxxxxxx>
> 
> When make allyesconfig, there is one compile error on my platform
> "gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4".
> The following is the output.
> 
> Documentation/misc-devices/mei/mei-amt-version.c: In function ‘main’:
> Documentation/misc-devices/mei/mei-amt-version.c:103:5: warning:
> ‘acmd.fd’
> is used uninitialized in this function [-Wuninitialized]
>   if (cl->fd != -1)
>      ^
> Documentation/misc-devices/mei/mei-amt-version.c:443:21: note:
> ‘acmd.fd’
> was declared here
>   struct amt_host_if acmd;
>                      ^
> This commit fixes this compile error.
> 
> Signed-off-by: Gao Feng <fgao@xxxxxxxxxx>

This is false positive, as the variable is assined in mei_init(), in
any case, the code has moved under samples diretory in the current
kernel. Anything need to be fixed there first

Thanks 
Tomas

> ---
>  Documentation/misc-devices/mei/mei-amt-version.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/misc-devices/mei/mei-amt-version.c
> b/Documentation/misc-devices/mei/mei-amt-version.c
> index 49e4f77..ca035cb 100644
> --- a/Documentation/misc-devices/mei/mei-amt-version.c
> +++ b/Documentation/misc-devices/mei/mei-amt-version.c
> @@ -297,6 +297,7 @@ static bool amt_host_if_init(struct amt_host_if
> *acmd,
>  		      unsigned long send_timeout, bool verbose)
>  {
>  	acmd->send_timeout = (send_timeout) ? send_timeout : 20000;
> +	acmd->mei_cl.fd = -1;
>  	acmd->initialized = mei_init(&acmd->mei_cl, &MEI_IAMTHIF, 0,
> verbose);
>  	return acmd->initialized;
>  }��.n��������+%������w��{.n�����{����*jg��������ݢj����G�������j:+v���w�m������w�������h�����٥




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux