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]
Message-ID: <427a9ec1-a841-e42a-0970-81f2a890db1f@huawei.com>
Date:   Thu, 3 Jun 2021 14:27:05 +0800
From:   "Leizhen (ThunderTown)" <thunder.leizhen@...wei.com>
To:     Jarkko Sakkinen <jarkko@...nel.org>
CC:     Peter Huewe <peterhuewe@....de>, Jason Gunthorpe <jgg@...pe.ca>,
        linux-integrity <linux-integrity@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] tpm_tis: Use DEFINE_RES_MEM() to simplify code



On 2021/6/3 13:29, Jarkko Sakkinen wrote:
> On Wed, Jun 02, 2021 at 09:11:47AM +0800, Leizhen (ThunderTown) wrote:
>>
>>
>> On 2021/6/2 1:57, Jarkko Sakkinen wrote:
>>> On Tue, Jun 01, 2021 at 02:45:07PM +0800, Zhen Lei wrote:
>>>> No functional change.
>>>>
>>>> Signed-off-by: Zhen Lei <thunder.leizhen@...wei.com>
>>>
>>> No change, no need to apply?
>>
>> But it can make the code look simpler, easier to read and maintain(The start
>> address does not need to appear twice). I think that's why these DEFINE_RES_*
>> macros are defined.
>>
>> By the way, would it be better to change the letters in 0xFED40000 to lowercase?
> 
> I mean "No functional change" does not really tell anything about anything.
> 
> Please just describe what the commit does.

I'm sorry to have misunderstood your intention. OK, I rewrite the commit message.

> 
> /Jarkko
> 
>>
>>>
>>> /Jarkko
>>>
>>>> ---
>>>>  drivers/char/tpm/tpm_tis.c | 6 +-----
>>>>  1 file changed, 1 insertion(+), 5 deletions(-)
>>>>
>>>> diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
>>>> index 4ed6e660273a414..d3f2e5364c275f4 100644
>>>> --- a/drivers/char/tpm/tpm_tis.c
>>>> +++ b/drivers/char/tpm/tpm_tis.c
>>>> @@ -363,11 +363,7 @@ static int tpm_tis_force_device(void)
>>>>  {
>>>>  	struct platform_device *pdev;
>>>>  	static const struct resource x86_resources[] = {
>>>> -		{
>>>> -			.start = 0xFED40000,
>>>> -			.end = 0xFED40000 + TIS_MEM_LEN - 1,
>>>> -			.flags = IORESOURCE_MEM,
>>>> -		},
>>>> +		DEFINE_RES_MEM(0xFED40000, TIS_MEM_LEN)
>>>>  	};
>>>>  
>>>>  	if (!force)
>>>> -- 
>>>> 2.26.0.106.g9fadedd
>>>>
>>>>
>>>>
>>>
>>> .
>>>
>>
>>
> 
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ