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] [day] [month] [year] [list]
Date:   Mon, 17 Oct 2022 15:58:28 -0700
From:   Jacob Keller <jacob.e.keller@...el.com>
To:     Joe Perches <joe@...ches.com>,
        Jesse Brandeburg <jesse.brandeburg@...el.com>,
        <yexingchen116@...il.com>, <anthony.l.nguyen@...el.com>
CC:     <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
        <pabeni@...hat.com>, <intel-wired-lan@...ts.osuosl.org>,
        <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        ye xingchen <ye.xingchen@....com.cn>
Subject: Re: [PATCH linux-next] iavf: Replace __FUNCTION__ with __func__



On 10/14/2022 8:10 AM, Joe Perches wrote:
> On Tue, 2022-10-11 at 14:46 -0700, Jesse Brandeburg wrote:
>> On 10/11/2022 4:16 AM, yexingchen116@...il.com wrote:
>>> __FUNCTION__ exists only for backwards compatibility reasons with old
>>> gcc versions. Replace it with __func__.
> []
>>> diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
> []
>>> @@ -4820,7 +4820,7 @@ static void iavf_shutdown(struct pci_dev *pdev)
>>>   		iavf_close(netdev);
>>>   
>>>   	if (iavf_lock_timeout(&adapter->crit_lock, 5000))
>>> -		dev_warn(&adapter->pdev->dev, "failed to acquire crit_lock in %s\n", __FUNCTION__);
>>> +		dev_warn(&adapter->pdev->dev, "failed to acquire crit_lock in %s\n", __func__);
> 
> Trivia: I suggest
> 
> 		dev_warn(&adapter->pdev->dev, "%s: failed to acquire crit_lock\n", __func__);
> 
> As almost all printed uses of __func__ use a form like
> 
> 	<printk_variant>("%s: message\n", __func__);
> 
> not
> 
> 	<printk_variant>("message in %s\n", __func__);
> 

I agree with Joe. Please fix this message up to use "%s: ...", __func__.
While at it, you might mention this fixes commit 226d528512cf ("iavf:
fix locking of critical sections") which introduced the use of __FUNCTION__.

Thanks,
Jake

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ