From: Joerg Roedel <joro@8bytes.org>
To: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
jroedel@suse.de, alex.williamson@redhat.com
Subject: Re: [PATCH] iommu: Do not return error code for APIs with size_t return type
Date: Tue, 13 Feb 2018 19:33:14 +0100 [thread overview]
Message-ID: <20180213183313.cu7nsjauuhvorzg2@8bytes.org> (raw)
In-Reply-To: <1517827553-81034-1-git-send-email-suravee.suthikulpanit@amd.com>
On Mon, Feb 05, 2018 at 05:45:53AM -0500, Suravee Suthikulpanit wrote:
> Currently, iommu_unmap, iommu_unmap_fast and iommu_map_sg return
> size_t. However, some of the return values are error codes (< 0),
> which can be misinterpreted as large size. Therefore, returning size 0
> instead to signify failure to map/unmap.
>
> Cc: Joerg Roedel <joro@8bytes.org>
> Cc: Alex Williamson <alex.williamson@redhat.com>
> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
> ---
>
> Note: This issue was previously discussed here (https://lkml.org/lkml/2018/1/30/873).
>
> drivers/iommu/amd_iommu.c | 2 +-
> drivers/iommu/iommu.c | 6 +++---
> include/linux/iommu.h | 14 +++++++-------
> 3 files changed, 11 insertions(+), 11 deletions(-)
Yeah, I am not happy with this, but the alternatives aren't any
better... So I applied this one. Thanks!
Joerg
prev parent reply other threads:[~2018-02-13 18:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-05 10:45 Suravee Suthikulpanit
2018-02-13 18:33 ` Joerg Roedel [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=20180213183313.cu7nsjauuhvorzg2@8bytes.org \
--to=joro@8bytes.org \
--cc=alex.williamson@redhat.com \
--cc=iommu@lists.linux-foundation.org \
--cc=jroedel@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=suravee.suthikulpanit@amd.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
all inboxes | Powered by JetHome®