lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 30 Aug 2021 19:19:57 +0200
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     eli.billauer@...il.com, arnd@...db.de, gregkh@...uxfoundation.org,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH v1 3/4] char: xillybus: Remove usage of remaining
 deprecated pci_ API

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ