Re: [PATCH v1 3/4] char: xillybus: Remove usage of remaining deprecated pci_ API

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

 



Le 30/08/2021 à 11:48, Dan Carpenter a écrit :
On Fri, Aug 27, 2021 at 07:17:47PM +0200, Christophe JAILLET wrote:
diff --git a/drivers/char/xillybus/xillybus.h b/drivers/char/xillybus/xillybus.h
index 7c71bdef7ccb..55d47cb13a7b 100644
--- a/drivers/char/xillybus/xillybus.h
+++ b/drivers/char/xillybus/xillybus.h
@@ -87,7 +87,6 @@ struct xilly_channel {
  };
struct xilly_endpoint {
-	struct pci_dev *pdev;
  	struct device *dev;
  	struct xilly_endpoint_hardware *ephw;
diff --git a/drivers/char/xillybus/xillybus_core.c b/drivers/char/xillybus/xillybus_core.c
index 931d0bf4cec6..0ced9ec6977f 100644
--- a/drivers/char/xillybus/xillybus_core.c
+++ b/drivers/char/xillybus/xillybus_core.c
@@ -1783,7 +1783,7 @@ struct xilly_endpoint *xillybus_init_endpoint(struct pci_dev *pdev,
  	if (!endpoint)
  		return NULL;
- endpoint->pdev = pdev;
+	(void)pdev;	// silence a compiler warning, will be removed

Just out of curiousity which compiler warning is this?  I don't think
GCC will complain.  I think there are other compilers which complain but
I don't know which.

  	endpoint->dev = dev;
  	endpoint->ephw = ephw;
  	endpoint->msg_counter = 0x0b;

regards,
dan carpenter



Well, I first did something like:
> -	endpoint->pdev = pdev;
> +	pdev;

in order to avoid a *potential* warning about unused parameter.
gcc (10.3.0) complains about it.
So I added the (void) to please gcc.

But, you are right, removing all uses of 'pdev' is just fine for gcc and the warning I wanted to avoid just does not exist :(

CJ



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux