From: Joe Perches <joe@perches.com>
To: SF Markus Elfring <elfring@users.sourceforge.net>,
linux-arm-kernel@lists.infradead.org,
linux-media@vger.kernel.org,
Alexandre Torgue <alexandre.torgue@st.com>,
"Gustavo A. R. Silva" <garsilva@embeddedor.com>,
Hans Verkuil <hansverk@cisco.com>,
Hugues Fruchet <hugues.fruchet@st.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 2/2] [media] stm32-dcmi: Improve four size determinations
Date: Fri, 15 Sep 2017 11:16:28 -0700 [thread overview]
Message-ID: <1505499388.27581.13.camel@perches.com> (raw)
In-Reply-To: <f4e400ea-9660-05cd-3194-cdf2495a2376@users.sourceforge.net>
On Fri, 2017-09-15 at 19:29 +0200, SF Markus Elfring wrote:
> diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/platform/stm32/stm32-dcmi.c
[]
> @@ -1372,9 +1372,8 @@ static int dcmi_formats_init(struct stm32_dcmi *dcmi)
> dcmi->sd_formats = devm_kcalloc(dcmi->dev,
> - num_fmts, sizeof(struct dcmi_format *),
> + num_fmts, sizeof(*dcmi->sd_formats),
> GFP_KERNEL);
> if (!dcmi->sd_formats)
> return -ENOMEM;
>
> - memcpy(dcmi->sd_formats, sd_fmts,
> - num_fmts * sizeof(struct dcmi_format *));
> + memcpy(dcmi->sd_formats, sd_fmts, num_fmts * sizeof(*dcmi->sd_formats));
devm_kmemdup
next prev parent reply other threads:[~2017-09-15 18:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-15 17:27 [PATCH 0/2] [media] STM32-DCMI: Adjustments for three function implementations SF Markus Elfring
2017-09-15 17:28 ` [PATCH 1/2] [media] stm32-dcmi: Delete an error message for a failed memory allocation in two functions SF Markus Elfring
2017-09-15 17:29 ` [PATCH 2/2] [media] stm32-dcmi: Improve four size determinations SF Markus Elfring
2017-09-15 18:16 ` Joe Perches [this message]
2017-09-15 18:54 ` SF Markus Elfring
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=1505499388.27581.13.camel@perches.com \
--to=joe@perches.com \
--cc=alexandre.torgue@st.com \
--cc=elfring@users.sourceforge.net \
--cc=garsilva@embeddedor.com \
--cc=hansverk@cisco.com \
--cc=hugues.fruchet@st.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=mcoquelin.stm32@gmail.com \
--cc=p.zabel@pengutronix.de \
--cc=sakari.ailus@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox