From: Jani Nikula <jani.nikula@linux.intel.com>
To: Yu Jiaoliang <yujiaoliang@vivo.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Tvrtko Ursulin <tursulin@ursulin.net>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Matt Roper <matthew.d.roper@intel.com>,
Andi Shyti <andi.shyti@linux.intel.com>,
Michal Mrozek <michal.mrozek@intel.com>,
Gustavo Sousa <gustavo.sousa@intel.com>,
Lucas De Marchi <lucas.demarchi@intel.com>,
Tejas Upadhyay <tejas.upadhyay@intel.com>,
Shekhar Chauhan <shekhar.chauhan@intel.com>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Cc: opensource.kernel@vivo.com, Yu Jiaoliang <yujiaoliang@vivo.com>
Subject: Re: [PATCH v1] drivers:gt:Switch to use kmemdup_array()
Date: Tue, 20 Aug 2024 10:54:27 +0300 [thread overview]
Message-ID: <87ikvv634c.fsf@intel.com> (raw)
In-Reply-To: <20240820074505.2728118-1-yujiaoliang@vivo.com>
On Tue, 20 Aug 2024, Yu Jiaoliang <yujiaoliang@vivo.com> wrote:
> Let the kememdup_array() take care about multiplication and possible
> overflows.
> Signed-off-by: Yu Jiaoliang <yujiaoliang@vivo.com>
For future reference, please look at git log for the file instead of
inventing subject prefixes.
There should be a blank line between commit message and trailers.
Other than that,
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_workarounds.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> index 09a287c1aedd..d90348c56765 100644
> --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
> +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> @@ -111,8 +111,8 @@ static void wa_init_finish(struct i915_wa_list *wal)
> {
> /* Trim unused entries. */
> if (!IS_ALIGNED(wal->count, WA_LIST_CHUNK)) {
> - struct i915_wa *list = kmemdup(wal->list,
> - wal->count * sizeof(*list),
> + struct i915_wa *list = kmemdup_array(wal->list,
> + wal->count, sizeof(*list),
> GFP_KERNEL);
>
> if (list) {
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-08-20 7:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-20 7:45 Yu Jiaoliang
2024-08-20 7:54 ` Jani Nikula [this message]
2024-08-20 8:18 ` 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=87ikvv634c.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@gmail.com \
--cc=andi.shyti@linux.intel.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo.sousa@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lucas.demarchi@intel.com \
--cc=matthew.d.roper@intel.com \
--cc=michal.mrozek@intel.com \
--cc=opensource.kernel@vivo.com \
--cc=rodrigo.vivi@intel.com \
--cc=shekhar.chauhan@intel.com \
--cc=tejas.upadhyay@intel.com \
--cc=tursulin@ursulin.net \
--cc=yujiaoliang@vivo.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®