From: Alex Dewar <alex.dewar90@gmail.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Alex Dewar <alex.dewar90@gmail.com>,
Dan Carpenter <dan.carpenter@oracle.com>,
Linus Walleij <linus.walleij@linaro.org>,
Alan Cox <alan@linux.intel.com>,
linux-media@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: [PATCH RESEND 3/5] staging: media: atomisp: Don't do unnecessary zeroing of memory
Date: Mon, 21 Sep 2020 22:53:55 +0100 [thread overview]
Message-ID: <20200921215359.45003-4-alex.dewar90@gmail.com> (raw)
In-Reply-To: <20200921215359.45003-1-alex.dewar90@gmail.com>
In a few places in pci/sh_css_params.c, memset is used to zero memory
immediately before it is freed. As none of these structs appear to
contain sensitive information, just remove the calls to memset.
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Dewar <alex.dewar90@gmail.com>
---
drivers/staging/media/atomisp/pci/sh_css_params.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/sh_css_params.c b/drivers/staging/media/atomisp/pci/sh_css_params.c
index 2c67c23b3700..24fc497bd491 100644
--- a/drivers/staging/media/atomisp/pci/sh_css_params.c
+++ b/drivers/staging/media/atomisp/pci/sh_css_params.c
@@ -4378,7 +4378,6 @@ ia_css_3a_statistics_free(struct ia_css_3a_statistics *me)
if (me) {
kvfree(me->rgby_data);
kvfree(me->data);
- memset(me, 0, sizeof(struct ia_css_3a_statistics));
kvfree(me);
}
}
@@ -4417,7 +4416,6 @@ ia_css_dvs_statistics_free(struct ia_css_dvs_statistics *me)
if (me) {
kvfree(me->hor_proj);
kvfree(me->ver_proj);
- memset(me, 0, sizeof(struct ia_css_dvs_statistics));
kvfree(me);
}
}
@@ -4459,7 +4457,6 @@ ia_css_dvs_coefficients_free(struct ia_css_dvs_coefficients *me)
if (me) {
kvfree(me->hor_coefs);
kvfree(me->ver_coefs);
- memset(me, 0, sizeof(struct ia_css_dvs_coefficients));
kvfree(me);
}
}
@@ -4551,7 +4548,6 @@ ia_css_dvs2_statistics_free(struct ia_css_dvs2_statistics *me)
kvfree(me->ver_prod.odd_imag);
kvfree(me->ver_prod.even_real);
kvfree(me->ver_prod.even_imag);
- memset(me, 0, sizeof(struct ia_css_dvs2_statistics));
kvfree(me);
}
}
@@ -4635,7 +4631,6 @@ ia_css_dvs2_coefficients_free(struct ia_css_dvs2_coefficients *me)
kvfree(me->ver_coefs.odd_imag);
kvfree(me->ver_coefs.even_real);
kvfree(me->ver_coefs.even_imag);
- memset(me, 0, sizeof(struct ia_css_dvs2_coefficients));
kvfree(me);
}
}
@@ -4710,7 +4705,6 @@ ia_css_dvs2_6axis_config_free(struct ia_css_dvs_6axis_config *dvs_6axis_config)
kvfree(dvs_6axis_config->ycoords_y);
kvfree(dvs_6axis_config->xcoords_uv);
kvfree(dvs_6axis_config->ycoords_uv);
- memset(dvs_6axis_config, 0, sizeof(struct ia_css_dvs_6axis_config));
kvfree(dvs_6axis_config);
}
}
--
2.28.0
next prev parent reply other threads:[~2020-09-21 21:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-21 21:53 [PATCH RESEND 0/5] atomisp: Fixes and cleanups Alex Dewar
2020-09-21 21:53 ` [PATCH RESEND 1/5] staging: media: atomisp: Fix error path in lm3554_probe() Alex Dewar
2020-09-21 21:53 ` [PATCH RESEND 2/5] staging: media: atomisp: Remove unhelpful info message Alex Dewar
2020-09-21 21:53 ` Alex Dewar [this message]
2020-09-21 21:53 ` [PATCH RESEND 4/5] staging: media: atomisp: Don't abort on error in module exit path Alex Dewar
2020-09-21 21:53 ` [PATCH RESEND 5/5] staging: media: atomisp: Fix bool-related style issues Alex Dewar
2020-09-22 8:11 ` [PATCH RESEND 0/5] atomisp: Fixes and cleanups Mauro Carvalho Chehab
2020-09-22 8:16 ` Alex Dewar
2020-09-22 9:09 ` [PATCH REBASE 0/3] atomisp: Rebased fixes Alex Dewar
2020-09-22 9:09 ` [PATCH REBASE 1/3] staging: media: atomisp: Fix error path in lm3554_probe() Alex Dewar
2020-09-22 9:09 ` [PATCH REBASE 2/3] staging: media: atomisp: Remove unhelpful info message Alex Dewar
2020-09-22 9:09 ` [PATCH REBASE 3/3] staging: media: atomisp: Don't abort on error in module exit path Alex Dewar
2020-09-22 9:27 ` [PATCH REBASE 0/3] atomisp: Rebased fixes Mauro Carvalho Chehab
2020-09-22 11:02 ` Alex Dewar
2020-09-22 13:27 ` Dan Carpenter
2020-09-22 13:51 ` Alex Dewar
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=20200921215359.45003-4-alex.dewar90@gmail.com \
--to=alex.dewar90@gmail.com \
--cc=alan@linux.intel.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).