mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Mostafa Saleh <smostafa@google.com>
Cc: will@kernel.org, robin.murphy@arm.com,
	linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev,
	linux-kernel@vger.kernel.org, joro@8bytes.org, jgg@nvidia.com,
	nicolinc@nvidia.com, mshavit@google.com
Subject: Re: [PATCH] iommu/arm-smmu-v3: Avoid uninitialized asid in case of error
Date: Tue, 4 Jun 2024 22:09:05 +0300	[thread overview]
Message-ID: <30b1fd0f-d43d-497d-b372-5218f7b4153b@moroto.mountain> (raw)
In-Reply-To: <20240604185218.2602058-1-smostafa@google.com>

On Tue, Jun 04, 2024 at 06:52:18PM +0000, Mostafa Saleh wrote:
> A simple fix would be just to initialize the local variable to zero,
> this path will only be reached on the first attach to a domain where
> the CD is already initialized to zero.
> This avoids having to bloat the function with an error path.

Yep.  Since everyone automatically zeroes stack variables these days,
this patch doesn't have any impact on runtime at all.  It's free.  It
just silences warning.

regards,
dan carpenter


  parent reply	other threads:[~2024-06-04 19:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-04 18:52 Mostafa Saleh
2024-06-04 18:55 ` Jason Gunthorpe
2024-06-04 19:09 ` Dan Carpenter [this message]
2024-06-05 15:45 ` 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=30b1fd0f-d43d-497d-b372-5218f7b4153b@moroto.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mshavit@google.com \
    --cc=nicolinc@nvidia.com \
    --cc=robin.murphy@arm.com \
    --cc=smostafa@google.com \
    --cc=will@kernel.org \
    /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

all inboxes | Powered by JetHome®