linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko@kernel.org>
To: Zhen Lei <thunder.leizhen@huawei.com>
Cc: Peter Huewe <peterhuewe@gmx.de>, Jason Gunthorpe <jgg@ziepe.ca>,
	linux-integrity <linux-integrity@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/1] tpm_tis: Use DEFINE_RES_MEM() to simplify code
Date: Wed, 9 Jun 2021 15:23:51 +0300	[thread overview]
Message-ID: <20210609122351.buld2xgk7z2rrmsf@kernel.org> (raw)
In-Reply-To: <20210603074955.11653-2-thunder.leizhen@huawei.com>

On Thu, Jun 03, 2021 at 03:49:55PM +0800, Zhen Lei wrote:
> Use DEFINE_RES_MEM() to save a couple of lines of code, which is simpler
> and more readable. The start address does not need to appear twice.
> 
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>


Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>

/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
> 
> 
> 

      reply	other threads:[~2021-06-09 12:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-03  7:49 [PATCH v2 0/1] tpm_tis: Use DEFINE_RES_MEM() to simplify code Zhen Lei
2021-06-03  7:49 ` [PATCH v2 1/1] " Zhen Lei
2021-06-09 12:23   ` Jarkko Sakkinen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210609122351.buld2xgk7z2rrmsf@kernel.org \
    --to=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=thunder.leizhen@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).