From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-media@vger.kernel.org,
"Andi Shyti" <andi.shyti@samsung.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Arvind Yadav" <arvind.yadav.cs@gmail.com>,
"Bhumika Goyal" <bhumirks@gmail.com>,
"Christophe Jaillet" <christophe.jaillet@wanadoo.fr>,
"David Härdeman" <david@hardeman.nu>,
"Hans Verkuil" <hans.verkuil@cisco.com>,
"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
"Masahiro Yamada" <yamada.masahiro@socionext.com>,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
"Sakari Ailus" <sakari.ailus@linux.intel.com>,
"Santosh Kumar Singh" <kumar.san1093@gmail.com>,
"Sean Young" <sean@mess.org>,
"Wei Yongjun" <weiyongjun1@huawei.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 7/9] [media] tm6000: Improve a size determination in dvb_init()
Date: Fri, 15 Sep 2017 09:57:43 +0200 [thread overview]
Message-ID: <77a3eba4-aeba-6747-dcce-e545802882d6@users.sourceforge.net> (raw)
In-Reply-To: <2aade468-5dfd-76ee-f59f-c25864930f61@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 15 Sep 2017 07:33:24 +0200
Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/media/usb/tm6000/tm6000-dvb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/usb/tm6000/tm6000-dvb.c b/drivers/media/usb/tm6000/tm6000-dvb.c
index 2bc584f75f87..855874134fcf 100644
--- a/drivers/media/usb/tm6000/tm6000-dvb.c
+++ b/drivers/media/usb/tm6000/tm6000-dvb.c
@@ -398,7 +398,7 @@ static int dvb_init(struct tm6000_core *dev)
return 0;
}
- dvb = kzalloc(sizeof(struct tm6000_dvb), GFP_KERNEL);
+ dvb = kzalloc(sizeof(*dvb), GFP_KERNEL);
if (!dvb)
return -ENOMEM;
--
2.14.1
next prev parent reply other threads:[~2017-09-15 7:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-15 7:46 [PATCH 0/9] [media] TM6000: Adjustments for some function implementations SF Markus Elfring
2017-09-15 7:48 ` [PATCH 1/9] [media] tm6000: Delete seven error messages for a failed memory allocation SF Markus Elfring
2017-09-15 7:49 ` [PATCH 2/9] [media] tm6000: Adjust seven checks for null pointers SF Markus Elfring
2017-09-15 7:50 ` [PATCH 3/9] [media] tm6000: Use common error handling code in tm6000_usb_probe() SF Markus Elfring
2017-09-15 7:51 ` [PATCH 4/9] [media] tm6000: One function call less in tm6000_usb_probe() after error detection SF Markus Elfring
2017-09-15 7:53 ` [PATCH 5/9] [media] tm6000: Delete an unnecessary variable initialisation in tm6000_usb_probe() SF Markus Elfring
2017-09-15 7:56 ` [PATCH 6/9] [media] tm6000: Use common error handling code in tm6000_cards_setup() SF Markus Elfring
2017-09-15 7:57 ` SF Markus Elfring [this message]
2017-09-15 7:59 ` [PATCH 8/9] [media] tm6000: Use common error handling code in tm6000_start_stream() SF Markus Elfring
2017-09-15 8:00 ` [PATCH 9/9] [media] tm6000: Use common error handling code in tm6000_prepare_isoc() 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=77a3eba4-aeba-6747-dcce-e545802882d6@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=akpm@linux-foundation.org \
--cc=andi.shyti@samsung.com \
--cc=arvind.yadav.cs@gmail.com \
--cc=bhumirks@gmail.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=david@hardeman.nu \
--cc=hans.verkuil@cisco.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kumar.san1093@gmail.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=sean@mess.org \
--cc=weiyongjun1@huawei.com \
--cc=yamada.masahiro@socionext.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