From: Zhenyu Wang <zhenyuw.linux@gmail.com>
To: Jonathan Cavitt <jonathan.cavitt@intel.com>
Cc: intel-gfx@lists.freedesktop.org, saurabhg.gupta@intel.com,
alex.zuo@intel.com, andi.shyti@linux.intel.com
Subject: Re: [PATCH] drm/i915/gvt: Simplify case switch in intel_vgpu_ioctl
Date: Mon, 22 Sep 2025 11:50:39 +0900 [thread overview]
Message-ID: <aNC5f_W1q3JBtIlI@dell-wzy> (raw)
In-Reply-To: <20250918214515.66926-2-jonathan.cavitt@intel.com>
On Thu, Sep 18, 2025 at 09:45:16PM +0000, Jonathan Cavitt wrote:
> We do not need a case switch to check cap_type_id in intel_vgpu_ioctl
> for various reasons (it's impossible to hit the default case in the
> current code, there's only one valid case to check, the error handling
> code overlaps in both cases, etc.). Simplify the case switch into a
> single if statement. This has the additional effect of simplifying the
> error handling code.
>
> Note that it is still currently impossible for
> 'if (cap_type_id == VFIO_REGION_INFO_CAP_SPARSE_MMAP)'
> to fail, but we should still guard against the possibility of this
> changing in the future.
>
> Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
> Cc: Andi Shyti <andi.shyti@linux.intel.com>
> ---
Reviewed-by: Zhenyu Wang <zhenyuw.linux@gmail.com>
next prev parent reply other threads:[~2025-09-22 2:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-18 21:45 [PATCH] drm/i915/gvt: Simplify case switch in intel_vgpu_ioctl Jonathan Cavitt
2025-09-19 0:43 ` ✓ i915.CI.BAT: success for " Patchwork
2025-09-19 10:22 ` [PATCH] " Andi Shyti
2025-09-19 22:10 ` ✗ i915.CI.Full: failure for " Patchwork
2025-09-22 2:50 ` Zhenyu Wang [this message]
2025-09-23 23:44 ` ✓ i915.CI.BAT: success for drm/i915/gvt: Simplify case switch in intel_vgpu_ioctl (rev2) Patchwork
2025-09-24 14:36 ` ✗ i915.CI.Full: failure " Patchwork
2025-09-25 22:24 ` [PATCH] drm/i915/gvt: Simplify case switch in intel_vgpu_ioctl Andi Shyti
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=aNC5f_W1q3JBtIlI@dell-wzy \
--to=zhenyuw.linux@gmail.com \
--cc=alex.zuo@intel.com \
--cc=andi.shyti@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jonathan.cavitt@intel.com \
--cc=saurabhg.gupta@intel.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.