All of lore.kernel.org
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-arm-kernel@lists.infradead.org,
	linux-media@vger.kernel.org, Andrzej Hajda <a.hajda@samsung.com>,
	Jeongtae Park <jtp.park@samsung.com>,
	Kamil Debski <kamil@wypas.org>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 2/3] [media] s5p-mfc: Improve a size determination in s5p_mfc_alloc_memdev()
Date: Fri, 8 Sep 2017 22:52:30 +0200	[thread overview]
Message-ID: <003abb1f-4dc6-91ca-9d03-cae13dc4ff6f@users.sourceforge.net> (raw)
In-Reply-To: <482a6c92-a85e-0bcd-edf7-3c2f63ea74c5@users.sourceforge.net>

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 8 Sep 2017 22:30:09 +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/platform/s5p-mfc/s5p_mfc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index 8af45d53846f..abfb70b07032 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -1083,7 +1083,7 @@ static struct device *s5p_mfc_alloc_memdev(struct device *dev,
 	struct device *child;
 	int ret;
 
-	child = devm_kzalloc(dev, sizeof(struct device), GFP_KERNEL);
+	child = devm_kzalloc(dev, sizeof(*child), GFP_KERNEL);
 	if (!child)
 		return NULL;
 
-- 
2.14.1

WARNING: multiple messages have this Message-ID (diff)
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] [media] s5p-mfc: Improve a size determination in s5p_mfc_alloc_memdev()
Date: Fri, 08 Sep 2017 20:52:30 +0000	[thread overview]
Message-ID: <003abb1f-4dc6-91ca-9d03-cae13dc4ff6f@users.sourceforge.net> (raw)
In-Reply-To: <482a6c92-a85e-0bcd-edf7-3c2f63ea74c5@users.sourceforge.net>

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 8 Sep 2017 22:30:09 +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/platform/s5p-mfc/s5p_mfc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index 8af45d53846f..abfb70b07032 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -1083,7 +1083,7 @@ static struct device *s5p_mfc_alloc_memdev(struct device *dev,
 	struct device *child;
 	int ret;
 
-	child = devm_kzalloc(dev, sizeof(struct device), GFP_KERNEL);
+	child = devm_kzalloc(dev, sizeof(*child), GFP_KERNEL);
 	if (!child)
 		return NULL;
 
-- 
2.14.1


WARNING: multiple messages have this Message-ID (diff)
From: elfring@users.sourceforge.net (SF Markus Elfring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] [media] s5p-mfc: Improve a size determination in s5p_mfc_alloc_memdev()
Date: Fri, 8 Sep 2017 22:52:30 +0200	[thread overview]
Message-ID: <003abb1f-4dc6-91ca-9d03-cae13dc4ff6f@users.sourceforge.net> (raw)
In-Reply-To: <482a6c92-a85e-0bcd-edf7-3c2f63ea74c5@users.sourceforge.net>

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 8 Sep 2017 22:30:09 +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/platform/s5p-mfc/s5p_mfc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index 8af45d53846f..abfb70b07032 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -1083,7 +1083,7 @@ static struct device *s5p_mfc_alloc_memdev(struct device *dev,
 	struct device *child;
 	int ret;
 
-	child = devm_kzalloc(dev, sizeof(struct device), GFP_KERNEL);
+	child = devm_kzalloc(dev, sizeof(*child), GFP_KERNEL);
 	if (!child)
 		return NULL;
 
-- 
2.14.1

  parent reply	other threads:[~2017-09-08 20:53 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-08 20:50 [PATCH 0/3] S5P MFC: Adjustments for five function implementations SF Markus Elfring
2017-09-08 20:50 ` SF Markus Elfring
2017-09-08 20:50 ` SF Markus Elfring
2017-09-08 20:51 ` [PATCH 1/3] [media] s5p-mfc: Delete an error message for a failed memory allocation in s5p_mfc_probe() SF Markus Elfring
2017-09-08 20:51   ` SF Markus Elfring
2017-09-08 20:51   ` [PATCH 1/3] [media] s5p-mfc: Delete an error message for a failed memory allocation in s5p_mfc_probe SF Markus Elfring
     [not found]   ` <CGME20170911091439epcas1p3f8b62f55cae4255d250b1fe990fbf1ff@epcas1p3.samsung.com>
2017-09-11  9:14     ` [PATCH 1/3] [media] s5p-mfc: Delete an error message for a failed memory allocation in s5p_mfc_probe() Sylwester Nawrocki
2017-09-11  9:14       ` Sylwester Nawrocki
2017-09-11  9:14       ` [PATCH 1/3] [media] s5p-mfc: Delete an error message for a failed memory allocation in s5p_mfc_p Sylwester Nawrocki
2017-09-11 19:34       ` [media] s5p-mfc: Delete an error message for a failed memory allocation in s5p_mfc_probe() SF Markus Elfring
2017-09-11 19:34         ` SF Markus Elfring
2017-09-11 19:34         ` SF Markus Elfring
2017-09-08 20:52 ` SF Markus Elfring [this message]
2017-09-08 20:52   ` [PATCH 2/3] [media] s5p-mfc: Improve a size determination in s5p_mfc_alloc_memdev() SF Markus Elfring
2017-09-08 20:52   ` SF Markus Elfring
     [not found]   ` <CGME20170911091700epcas1p1bd85f95a6b776581ad4cd6f3108d09ba@epcas1p1.samsung.com>
2017-09-11  9:16     ` Sylwester Nawrocki
2017-09-11  9:16       ` Sylwester Nawrocki
2017-09-11  9:16       ` Sylwester Nawrocki
2017-09-08 20:53 ` [PATCH 3/3] [media] s5p-mfc: Adjust a null pointer check in four functions SF Markus Elfring
2017-09-08 20:53   ` SF Markus Elfring
2017-09-08 20:53   ` SF Markus Elfring
     [not found]   ` <CGME20170911092134epcas2p1a1b11c056b52d68c3b0e4ea2e1e8f758@epcas2p1.samsung.com>
2017-09-11  9:21     ` Sylwester Nawrocki
2017-09-11  9:21       ` Sylwester Nawrocki
2017-09-11  9:21       ` Sylwester Nawrocki
2017-09-11 19:21       ` SF Markus Elfring
2017-09-11 19:21         ` SF Markus Elfring
2017-09-11 19:21         ` SF Markus Elfring
2017-09-12 13:21         ` Sylwester Nawrocki
2017-09-12 13:21           ` Sylwester Nawrocki
2017-09-12 13:21           ` Sylwester Nawrocki
2017-09-12 15:00           ` SF Markus Elfring
2017-09-12 15:00             ` SF Markus Elfring
2017-09-12 15:00             ` SF Markus Elfring
2017-09-12 17:41             ` Sylwester Nawrocki
2017-09-12 17:41               ` Sylwester Nawrocki
2017-09-12 17:41               ` Sylwester Nawrocki
2017-09-12 20:33               ` SF Markus Elfring
2017-09-12 20:33                 ` SF Markus Elfring
2017-09-12 20:33                 ` 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=003abb1f-4dc6-91ca-9d03-cae13dc4ff6f@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=a.hajda@samsung.com \
    --cc=jtp.park@samsung.com \
    --cc=kamil@wypas.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mchehab@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.