[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cf85a732-6901-4eca-2848-71e35e7ce95d@users.sourceforge.net>
Date: Tue, 23 May 2017 22:54:18 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: linux-mips@...ux-mips.org, Ingo Molnar <mingo@...nel.org>,
James Hogan <james.hogan@...tec.com>,
Kees Cook <keescook@...omium.org>,
Marcin Nowakowski <marcin.nowakowski@...tec.com>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Matt Redfearn <matt.redfearn@...tec.com>,
Paul Burton <paul.burton@...tec.com>,
Ralf Bächle <ralf@...ux-mips.org>,
Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH 4/5] MIPS: VPE: Improve a size determination in two functions
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Tue, 23 May 2017 22:04:17 +0200
Replace the specification of two data structures by pointer dereferences
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
arch/mips/kernel/vpe.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c
index 721b1523b740..ed019218496b 100644
--- a/arch/mips/kernel/vpe.c
+++ b/arch/mips/kernel/vpe.c
@@ -93,7 +93,7 @@ struct vpe *alloc_vpe(int minor)
{
struct vpe *v;
- v = kzalloc(sizeof(struct vpe), GFP_KERNEL);
+ v = kzalloc(sizeof(*v), GFP_KERNEL);
if (v == NULL)
goto out;
@@ -114,7 +114,7 @@ struct tc *alloc_tc(int index)
{
struct tc *tc;
- tc = kzalloc(sizeof(struct tc), GFP_KERNEL);
+ tc = kzalloc(sizeof(*tc), GFP_KERNEL);
if (tc == NULL)
goto out;
--
2.13.0
Powered by blists - more mailing lists