All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: Zhen Lei <thunder.leizhen@huawei.com>
Cc: Robin Murphy <robin.murphy@arm.com>,
	iommu <iommu@lists.linux-foundation.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/1] iommu/arm-smmu-v3: remove unnecessary oom message
Date: Fri, 11 Jun 2021 11:32:20 +0100	[thread overview]
Message-ID: <20210611103220.GB15274@willie-the-truck> (raw)
In-Reply-To: <20210609125438.14369-1-thunder.leizhen@huawei.com>

On Wed, Jun 09, 2021 at 08:54:38PM +0800, Zhen Lei wrote:
> Fixes scripts/checkpatch.pl warning:
> WARNING: Possible unnecessary 'out of memory' message
> 
> Remove it can help us save a bit of memory.
> 
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
>  drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> index 2ddc3cd5a7d1..fd7c55b44881 100644
> --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> @@ -2787,10 +2787,8 @@ static int arm_smmu_init_l1_strtab(struct arm_smmu_device *smmu)
>  	void *strtab = smmu->strtab_cfg.strtab;
>  
>  	cfg->l1_desc = devm_kzalloc(smmu->dev, size, GFP_KERNEL);
> -	if (!cfg->l1_desc) {
> -		dev_err(smmu->dev, "failed to allocate l1 stream table desc\n");
> +	if (!cfg->l1_desc)

What error do you get if devm_kzalloc() fails? I'd like to make sure it's
easy to track down _which_ allocation failed in that case -- does it give
you a line number, for example?

Will
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will@kernel.org>
To: Zhen Lei <thunder.leizhen@huawei.com>
Cc: Robin Murphy <robin.murphy@arm.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	Joerg Roedel <joro@8bytes.org>,
	iommu <iommu@lists.linux-foundation.org>
Subject: Re: [PATCH 1/1] iommu/arm-smmu-v3: remove unnecessary oom message
Date: Fri, 11 Jun 2021 11:32:20 +0100	[thread overview]
Message-ID: <20210611103220.GB15274@willie-the-truck> (raw)
In-Reply-To: <20210609125438.14369-1-thunder.leizhen@huawei.com>

On Wed, Jun 09, 2021 at 08:54:38PM +0800, Zhen Lei wrote:
> Fixes scripts/checkpatch.pl warning:
> WARNING: Possible unnecessary 'out of memory' message
> 
> Remove it can help us save a bit of memory.
> 
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
>  drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> index 2ddc3cd5a7d1..fd7c55b44881 100644
> --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> @@ -2787,10 +2787,8 @@ static int arm_smmu_init_l1_strtab(struct arm_smmu_device *smmu)
>  	void *strtab = smmu->strtab_cfg.strtab;
>  
>  	cfg->l1_desc = devm_kzalloc(smmu->dev, size, GFP_KERNEL);
> -	if (!cfg->l1_desc) {
> -		dev_err(smmu->dev, "failed to allocate l1 stream table desc\n");
> +	if (!cfg->l1_desc)

What error do you get if devm_kzalloc() fails? I'd like to make sure it's
easy to track down _which_ allocation failed in that case -- does it give
you a line number, for example?

Will

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-06-11 10:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-09 12:54 [PATCH 1/1] iommu/arm-smmu-v3: remove unnecessary oom message Zhen Lei
2021-06-09 12:54 ` Zhen Lei
2021-06-11 10:32 ` Will Deacon [this message]
2021-06-11 10:32   ` Will Deacon
2021-06-15 11:22   ` Leizhen (ThunderTown)
2021-06-15 11:22     ` Leizhen (ThunderTown)
2021-06-15 11:34     ` Will Deacon
2021-06-15 11:34       ` Will Deacon
2021-06-15 11:36       ` Will Deacon
2021-06-15 11:36         ` Will Deacon
2021-06-15 11:51       ` Robin Murphy
2021-06-15 11:51         ` Robin Murphy
2021-06-15 11:55         ` Will Deacon
2021-06-15 11:55           ` Will Deacon
2021-06-16  1:47           ` Leizhen (ThunderTown)
2021-06-16  1:47             ` Leizhen (ThunderTown)
2021-06-16 10:10             ` Will Deacon
2021-06-16 10:10               ` Will Deacon
2021-06-15 19:18 ` Will Deacon
2021-06-15 19:18   ` Will Deacon

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=20210611103220.GB15274@willie-the-truck \
    --to=will@kernel.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=robin.murphy@arm.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.