Re: [PATCH 4.19 217/220] tools: PCI: Fix broken pcitest compilation

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

 



Hi!

> From: Alan Mikhak <alan.mikhak@xxxxxxxxxx>
> 
> [ Upstream commit 8a5e0af240e07dd3d4897eb8ff52aab757da7fab ]
> 
> pcitest is currently broken due to the following compiler error
> and related warning. Fix by changing the run_test() function
> signature to return an integer result.
> 
> pcitest.c: In function run_test:
> pcitest.c:143:9: warning: return with a value, in function
> returning void
>   return (ret < 0) ? ret : 1 - ret; /* return 0 if test succeeded */

There is no such line in 4.19 version.

> +++ b/tools/pci/pcitest.c
> @@ -47,15 +47,15 @@ struct pci_test {
>  	unsigned long	size;
>  };
>  
> -static void run_test(struct pci_test *test)
> +static int run_test(struct pci_test *test)
>  {
> -	long ret;
> +	int ret = -EINVAL;
>  	int fd;

...
        fflush(stdout);
}

No, sorry, this will bring back warning fef31ecaaf2c was supposed to
fix.

My recommendation would be to drop this and fef31ecaaf2c from the
stable. It is warning, not a "serious bug" after all.

Alternatively, it needs to return something at the end of function,
after the fflush().

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux