linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools/pci: Fix compilation warnings
@ 2018-08-23 11:34 Gustavo Pimentel
  2018-10-03  8:56 ` Kishon Vijay Abraham I
  2018-10-03 10:41 ` Lorenzo Pieralisi
  0 siblings, 2 replies; 3+ messages in thread
From: Gustavo Pimentel @ 2018-08-23 11:34 UTC (permalink / raw)
  To: bhelgaas, lorenzo.pieralisi, kishon
  Cc: linux-pci, linux-kernel, Gustavo Pimentel

Fix compilation warnings:
 - remove unused variables
 - change function return from int to void, since it's not used

Signed-off-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
---
 tools/pci/pcitest.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/tools/pci/pcitest.c b/tools/pci/pcitest.c
index 9074b47..8ca1c62 100644
--- a/tools/pci/pcitest.c
+++ b/tools/pci/pcitest.c
@@ -23,7 +23,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/ioctl.h>
-#include <time.h>
 #include <unistd.h>
 
 #include <linux/pcitest.h>
@@ -43,17 +42,15 @@ struct pci_test {
 	unsigned long	size;
 };
 
-static int run_test(struct pci_test *test)
+static void run_test(struct pci_test *test)
 {
 	long ret;
 	int fd;
-	struct timespec start, end;
-	double time;
 
 	fd = open(test->device, O_RDWR);
 	if (fd < 0) {
 		perror("can't open PCI Endpoint Test device");
-		return fd;
+		return;
 	}
 
 	if (test->barnum >= 0 && test->barnum <= 5) {
-- 
2.7.4


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

* Re: [PATCH] tools/pci: Fix compilation warnings
  2018-08-23 11:34 [PATCH] tools/pci: Fix compilation warnings Gustavo Pimentel
@ 2018-10-03  8:56 ` Kishon Vijay Abraham I
  2018-10-03 10:41 ` Lorenzo Pieralisi
  1 sibling, 0 replies; 3+ messages in thread
From: Kishon Vijay Abraham I @ 2018-10-03  8:56 UTC (permalink / raw)
  To: Gustavo Pimentel, bhelgaas, lorenzo.pieralisi; +Cc: linux-pci, linux-kernel



On Thursday 23 August 2018 05:04 PM, Gustavo Pimentel wrote:
> Fix compilation warnings:
>  - remove unused variables
>  - change function return from int to void, since it's not used
> 
> Signed-off-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>

Reviewed-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
>  tools/pci/pcitest.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/tools/pci/pcitest.c b/tools/pci/pcitest.c
> index 9074b47..8ca1c62 100644
> --- a/tools/pci/pcitest.c
> +++ b/tools/pci/pcitest.c
> @@ -23,7 +23,6 @@
>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <sys/ioctl.h>
> -#include <time.h>
>  #include <unistd.h>
>  
>  #include <linux/pcitest.h>
> @@ -43,17 +42,15 @@ struct pci_test {
>  	unsigned long	size;
>  };
>  
> -static int run_test(struct pci_test *test)
> +static void run_test(struct pci_test *test)
>  {
>  	long ret;
>  	int fd;
> -	struct timespec start, end;
> -	double time;
>  
>  	fd = open(test->device, O_RDWR);
>  	if (fd < 0) {
>  		perror("can't open PCI Endpoint Test device");
> -		return fd;
> +		return;
>  	}
>  
>  	if (test->barnum >= 0 && test->barnum <= 5) {
> 

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

* Re: [PATCH] tools/pci: Fix compilation warnings
  2018-08-23 11:34 [PATCH] tools/pci: Fix compilation warnings Gustavo Pimentel
  2018-10-03  8:56 ` Kishon Vijay Abraham I
@ 2018-10-03 10:41 ` Lorenzo Pieralisi
  1 sibling, 0 replies; 3+ messages in thread
From: Lorenzo Pieralisi @ 2018-10-03 10:41 UTC (permalink / raw)
  To: Gustavo Pimentel; +Cc: bhelgaas, kishon, linux-pci, linux-kernel

On Thu, Aug 23, 2018 at 01:34:53PM +0200, Gustavo Pimentel wrote:
> Fix compilation warnings:
>  - remove unused variables
>  - change function return from int to void, since it's not used
> 
> Signed-off-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
> ---
>  tools/pci/pcitest.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)

Applied to pci/tools for v4.20, however, I reformatted the subject
to make it in line with previous commits and added the warnings that
you are fixing in the commit log.

Lorenzo

> diff --git a/tools/pci/pcitest.c b/tools/pci/pcitest.c
> index 9074b47..8ca1c62 100644
> --- a/tools/pci/pcitest.c
> +++ b/tools/pci/pcitest.c
> @@ -23,7 +23,6 @@
>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <sys/ioctl.h>
> -#include <time.h>
>  #include <unistd.h>
>  
>  #include <linux/pcitest.h>
> @@ -43,17 +42,15 @@ struct pci_test {
>  	unsigned long	size;
>  };
>  
> -static int run_test(struct pci_test *test)
> +static void run_test(struct pci_test *test)
>  {
>  	long ret;
>  	int fd;
> -	struct timespec start, end;
> -	double time;
>  
>  	fd = open(test->device, O_RDWR);
>  	if (fd < 0) {
>  		perror("can't open PCI Endpoint Test device");
> -		return fd;
> +		return;
>  	}
>  
>  	if (test->barnum >= 0 && test->barnum <= 5) {
> -- 
> 2.7.4
> 

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

end of thread, other threads:[~2018-10-03 10:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-23 11:34 [PATCH] tools/pci: Fix compilation warnings Gustavo Pimentel
2018-10-03  8:56 ` Kishon Vijay Abraham I
2018-10-03 10:41 ` Lorenzo Pieralisi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).