* [PATCH 0/2] video: ssd1307fb: Adjustments for ssd1307fb_probe()
@ 2017-11-25 16:04 ` SF Markus Elfring
0 siblings, 0 replies; 19+ messages in thread
From: SF Markus Elfring @ 2017-11-25 16:04 UTC (permalink / raw)
To: linux-fbdev, dri-devel, Arnd Bergmann, Bartlomiej Zolnierkiewicz,
Bastian Stender, Jyri Sarha, Tomi Valkeinen
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 25 Nov 2017 16:56:46 +0100
Two update suggestions were taken into account
from static source code analysis.
Markus Elfring (2):
Delete an error message for a failed memory allocation
Improve a size determination
drivers/video/fbdev/ssd1307fb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
2.15.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 0/2] video: ssd1307fb: Adjustments for ssd1307fb_probe()
@ 2017-11-25 16:04 ` SF Markus Elfring
0 siblings, 0 replies; 19+ messages in thread
From: SF Markus Elfring @ 2017-11-25 16:04 UTC (permalink / raw)
To: linux-fbdev, dri-devel, Arnd Bergmann, Bartlomiej Zolnierkiewicz,
Bastian Stender, Jyri Sarha, Tomi Valkeinen
Cc: kernel-janitors, LKML
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 25 Nov 2017 16:56:46 +0100
Two update suggestions were taken into account
from static source code analysis.
Markus Elfring (2):
Delete an error message for a failed memory allocation
Improve a size determination
drivers/video/fbdev/ssd1307fb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
2.15.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 0/2] video: ssd1307fb: Adjustments for ssd1307fb_probe()
@ 2017-11-25 16:04 ` SF Markus Elfring
0 siblings, 0 replies; 19+ messages in thread
From: SF Markus Elfring @ 2017-11-25 16:04 UTC (permalink / raw)
To: linux-fbdev, dri-devel, Arnd Bergmann, Bartlomiej Zolnierkiewicz,
Bastian Stender, Jyri Sarha, Tomi Valkeinen
Cc: kernel-janitors, LKML
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 25 Nov 2017 16:56:46 +0100
Two update suggestions were taken into account
from static source code analysis.
Markus Elfring (2):
Delete an error message for a failed memory allocation
Improve a size determination
drivers/video/fbdev/ssd1307fb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
2.15.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 1/2] video: ssd1307fb: Delete an error message for a failed memory allocation in ssd1307fb_probe()
2017-11-25 16:04 ` SF Markus Elfring
(?)
@ 2017-11-25 16:05 ` SF Markus Elfring
-1 siblings, 0 replies; 19+ messages in thread
From: SF Markus Elfring @ 2017-11-25 16:05 UTC (permalink / raw)
To: linux-fbdev, dri-devel, Arnd Bergmann, Bartlomiej Zolnierkiewicz,
Bastian Stender, Jyri Sarha, Tomi Valkeinen
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 25 Nov 2017 16:45:56 +0100
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/video/fbdev/ssd1307fb.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index f599520374dd..fb0ef1922d49 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -630,7 +630,6 @@ static int ssd1307fb_probe(struct i2c_client *client,
ssd1307fb_defio = devm_kzalloc(&client->dev, sizeof(struct fb_deferred_io), GFP_KERNEL);
if (!ssd1307fb_defio) {
- dev_err(&client->dev, "Couldn't allocate deferred io.\n");
ret = -ENOMEM;
goto fb_alloc_error;
}
--
2.15.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 1/2] video: ssd1307fb: Delete an error message for a failed memory allocation in ssd1307fb_pr
@ 2017-11-25 16:05 ` SF Markus Elfring
0 siblings, 0 replies; 19+ messages in thread
From: SF Markus Elfring @ 2017-11-25 16:05 UTC (permalink / raw)
To: linux-fbdev, dri-devel, Arnd Bergmann, Bartlomiej Zolnierkiewicz,
Bastian Stender, Jyri Sarha, Tomi Valkeinen
Cc: kernel-janitors, LKML
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 25 Nov 2017 16:45:56 +0100
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/video/fbdev/ssd1307fb.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index f599520374dd..fb0ef1922d49 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -630,7 +630,6 @@ static int ssd1307fb_probe(struct i2c_client *client,
ssd1307fb_defio = devm_kzalloc(&client->dev, sizeof(struct fb_deferred_io), GFP_KERNEL);
if (!ssd1307fb_defio) {
- dev_err(&client->dev, "Couldn't allocate deferred io.\n");
ret = -ENOMEM;
goto fb_alloc_error;
}
--
2.15.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 1/2] video: ssd1307fb: Delete an error message for a failed memory allocation in ssd1307fb_probe()
@ 2017-11-25 16:05 ` SF Markus Elfring
0 siblings, 0 replies; 19+ messages in thread
From: SF Markus Elfring @ 2017-11-25 16:05 UTC (permalink / raw)
To: linux-fbdev, dri-devel, Arnd Bergmann, Bartlomiej Zolnierkiewicz,
Bastian Stender, Jyri Sarha, Tomi Valkeinen
Cc: kernel-janitors, LKML
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 25 Nov 2017 16:45:56 +0100
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/video/fbdev/ssd1307fb.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index f599520374dd..fb0ef1922d49 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -630,7 +630,6 @@ static int ssd1307fb_probe(struct i2c_client *client,
ssd1307fb_defio = devm_kzalloc(&client->dev, sizeof(struct fb_deferred_io), GFP_KERNEL);
if (!ssd1307fb_defio) {
- dev_err(&client->dev, "Couldn't allocate deferred io.\n");
ret = -ENOMEM;
goto fb_alloc_error;
}
--
2.15.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 2/2] video: ssd1307fb: Improve a size determination in ssd1307fb_probe()
2017-11-25 16:04 ` SF Markus Elfring
(?)
@ 2017-11-25 16:06 ` SF Markus Elfring
-1 siblings, 0 replies; 19+ messages in thread
From: SF Markus Elfring @ 2017-11-25 16:06 UTC (permalink / raw)
To: linux-fbdev, dri-devel, Arnd Bergmann, Bartlomiej Zolnierkiewicz,
Bastian Stender, Jyri Sarha, Tomi Valkeinen
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 25 Nov 2017 16:50:26 +0100
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/video/fbdev/ssd1307fb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index fb0ef1922d49..bb32b2dd1f7a 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -628,7 +628,8 @@ static int ssd1307fb_probe(struct i2c_client *client,
goto fb_alloc_error;
}
- ssd1307fb_defio = devm_kzalloc(&client->dev, sizeof(struct fb_deferred_io), GFP_KERNEL);
+ ssd1307fb_defio = devm_kzalloc(&client->dev, sizeof(*ssd1307fb_defio),
+ GFP_KERNEL);
if (!ssd1307fb_defio) {
ret = -ENOMEM;
goto fb_alloc_error;
--
2.15.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 2/2] video: ssd1307fb: Improve a size determination in ssd1307fb_probe()
@ 2017-11-25 16:06 ` SF Markus Elfring
0 siblings, 0 replies; 19+ messages in thread
From: SF Markus Elfring @ 2017-11-25 16:06 UTC (permalink / raw)
To: linux-fbdev, dri-devel, Arnd Bergmann, Bartlomiej Zolnierkiewicz,
Bastian Stender, Jyri Sarha, Tomi Valkeinen
Cc: kernel-janitors, LKML
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 25 Nov 2017 16:50:26 +0100
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/video/fbdev/ssd1307fb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index fb0ef1922d49..bb32b2dd1f7a 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -628,7 +628,8 @@ static int ssd1307fb_probe(struct i2c_client *client,
goto fb_alloc_error;
}
- ssd1307fb_defio = devm_kzalloc(&client->dev, sizeof(struct fb_deferred_io), GFP_KERNEL);
+ ssd1307fb_defio = devm_kzalloc(&client->dev, sizeof(*ssd1307fb_defio),
+ GFP_KERNEL);
if (!ssd1307fb_defio) {
ret = -ENOMEM;
goto fb_alloc_error;
--
2.15.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 2/2] video: ssd1307fb: Improve a size determination in ssd1307fb_probe()
@ 2017-11-25 16:06 ` SF Markus Elfring
0 siblings, 0 replies; 19+ messages in thread
From: SF Markus Elfring @ 2017-11-25 16:06 UTC (permalink / raw)
To: linux-fbdev, dri-devel, Arnd Bergmann, Bartlomiej Zolnierkiewicz,
Bastian Stender, Jyri Sarha, Tomi Valkeinen
Cc: kernel-janitors, LKML
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 25 Nov 2017 16:50:26 +0100
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/video/fbdev/ssd1307fb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index fb0ef1922d49..bb32b2dd1f7a 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -628,7 +628,8 @@ static int ssd1307fb_probe(struct i2c_client *client,
goto fb_alloc_error;
}
- ssd1307fb_defio = devm_kzalloc(&client->dev, sizeof(struct fb_deferred_io), GFP_KERNEL);
+ ssd1307fb_defio = devm_kzalloc(&client->dev, sizeof(*ssd1307fb_defio),
+ GFP_KERNEL);
if (!ssd1307fb_defio) {
ret = -ENOMEM;
goto fb_alloc_error;
--
2.15.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH 0/2] video: ssd1307fb: Adjustments for ssd1307fb_probe()
2017-11-25 16:04 ` SF Markus Elfring
(?)
@ 2017-12-29 18:10 ` Bartlomiej Zolnierkiewicz
-1 siblings, 0 replies; 19+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2017-12-29 18:10 UTC (permalink / raw)
To: SF Markus Elfring
Cc: linux-fbdev, dri-devel, Arnd Bergmann, Bastian Stender,
Jyri Sarha, Tomi Valkeinen, LKML, kernel-janitors
On Saturday, November 25, 2017 05:04:02 PM SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 25 Nov 2017 16:56:46 +0100
>
> Two update suggestions were taken into account
> from static source code analysis.
>
> Markus Elfring (2):
> Delete an error message for a failed memory allocation
This patch removes the information about the device for which the allocation
fails.
> Improve a size determination
This patch depends on the earlier patch (which is not being merged) so please
re-base it if you want it to be applied.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 0/2] video: ssd1307fb: Adjustments for ssd1307fb_probe()
@ 2017-12-29 18:10 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 19+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2017-12-29 18:10 UTC (permalink / raw)
To: SF Markus Elfring
Cc: linux-fbdev, Arnd Bergmann, kernel-janitors, LKML, Jyri Sarha,
Tomi Valkeinen, dri-devel, Bastian Stender
On Saturday, November 25, 2017 05:04:02 PM SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 25 Nov 2017 16:56:46 +0100
>
> Two update suggestions were taken into account
> from static source code analysis.
>
> Markus Elfring (2):
> Delete an error message for a failed memory allocation
This patch removes the information about the device for which the allocation
fails.
> Improve a size determination
This patch depends on the earlier patch (which is not being merged) so please
re-base it if you want it to be applied.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 0/2] video: ssd1307fb: Adjustments for ssd1307fb_probe()
@ 2017-12-29 18:10 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 19+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2017-12-29 18:10 UTC (permalink / raw)
To: SF Markus Elfring
Cc: linux-fbdev, Arnd Bergmann, kernel-janitors, LKML, Jyri Sarha,
Tomi Valkeinen, dri-devel, Bastian Stender
On Saturday, November 25, 2017 05:04:02 PM SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 25 Nov 2017 16:56:46 +0100
>
> Two update suggestions were taken into account
> from static source code analysis.
>
> Markus Elfring (2):
> Delete an error message for a failed memory allocation
This patch removes the information about the device for which the allocation
fails.
> Improve a size determination
This patch depends on the earlier patch (which is not being merged) so please
re-base it if you want it to be applied.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [0/2] video: ssd1307fb: Adjustments for ssd1307fb_probe()
2017-12-29 18:10 ` Bartlomiej Zolnierkiewicz
@ 2017-12-29 18:23 ` SF Markus Elfring
-1 siblings, 0 replies; 19+ messages in thread
From: SF Markus Elfring @ 2017-12-29 18:23 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz, linux-fbdev, dri-devel
Cc: Arnd Bergmann, Bastian Stender, Jyri Sarha, Tomi Valkeinen, LKML,
kernel-janitors
>> Delete an error message for a failed memory allocation
>
> This patch removes the information about the device for which the allocation fails.
How do you think about to take another look if a Linux allocation failure report
could be sufficient in this use case?
>> Improve a size determination
>
> This patch depends on the earlier patch (which is not being merged)
Partly, yes.
> so please re-base it if you want it to be applied.
Would you dare to reduce any context lines for this update step so that
such a small adjustment will still work?
Regards,
Markus
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [0/2] video: ssd1307fb: Adjustments for ssd1307fb_probe()
@ 2017-12-29 18:23 ` SF Markus Elfring
0 siblings, 0 replies; 19+ messages in thread
From: SF Markus Elfring @ 2017-12-29 18:23 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz, linux-fbdev, dri-devel
Cc: Arnd Bergmann, Bastian Stender, Jyri Sarha, Tomi Valkeinen, LKML,
kernel-janitors
>> Delete an error message for a failed memory allocation
>
> This patch removes the information about the device for which the allocation fails.
How do you think about to take another look if a Linux allocation failure report
could be sufficient in this use case?
>> Improve a size determination
>
> This patch depends on the earlier patch (which is not being merged)
Partly, yes.
> so please re-base it if you want it to be applied.
Would you dare to reduce any context lines for this update step so that
such a small adjustment will still work?
Regards,
Markus
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v2] video: ssd1307fb: Improve a size determination in ssd1307fb_probe()
2017-12-29 18:10 ` Bartlomiej Zolnierkiewicz
(?)
@ 2018-01-07 18:34 ` SF Markus Elfring
-1 siblings, 0 replies; 19+ messages in thread
From: SF Markus Elfring @ 2018-01-07 18:34 UTC (permalink / raw)
To: Arnd Bergmann, Bartlomiej Zolnierkiewicz, Bastian Stender,
Jyri Sarha, Tomi Valkeinen, linux-fbdev, dri-devel
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 7 Jan 2018 19:27:28 +0100
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>
---
v2:
This update suggestion was rebased on source files from the software
"Linux next-20180105".
drivers/video/fbdev/ssd1307fb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index f599520374dd..6439231f2db2 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -628,7 +628,8 @@ static int ssd1307fb_probe(struct i2c_client *client,
goto fb_alloc_error;
}
- ssd1307fb_defio = devm_kzalloc(&client->dev, sizeof(struct fb_deferred_io), GFP_KERNEL);
+ ssd1307fb_defio = devm_kzalloc(&client->dev, sizeof(*ssd1307fb_defio),
+ GFP_KERNEL);
if (!ssd1307fb_defio) {
dev_err(&client->dev, "Couldn't allocate deferred io.\n");
ret = -ENOMEM;
--
2.15.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2] video: ssd1307fb: Improve a size determination in ssd1307fb_probe()
@ 2018-01-07 18:34 ` SF Markus Elfring
0 siblings, 0 replies; 19+ messages in thread
From: SF Markus Elfring @ 2018-01-07 18:34 UTC (permalink / raw)
To: Arnd Bergmann, Bartlomiej Zolnierkiewicz, Bastian Stender,
Jyri Sarha, Tomi Valkeinen, linux-fbdev, dri-devel
Cc: kernel-janitors, LKML
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 7 Jan 2018 19:27:28 +0100
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>
---
v2:
This update suggestion was rebased on source files from the software
"Linux next-20180105".
drivers/video/fbdev/ssd1307fb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index f599520374dd..6439231f2db2 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -628,7 +628,8 @@ static int ssd1307fb_probe(struct i2c_client *client,
goto fb_alloc_error;
}
- ssd1307fb_defio = devm_kzalloc(&client->dev, sizeof(struct fb_deferred_io), GFP_KERNEL);
+ ssd1307fb_defio = devm_kzalloc(&client->dev, sizeof(*ssd1307fb_defio),
+ GFP_KERNEL);
if (!ssd1307fb_defio) {
dev_err(&client->dev, "Couldn't allocate deferred io.\n");
ret = -ENOMEM;
--
2.15.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2] video: ssd1307fb: Improve a size determination in ssd1307fb_probe()
@ 2018-01-07 18:34 ` SF Markus Elfring
0 siblings, 0 replies; 19+ messages in thread
From: SF Markus Elfring @ 2018-01-07 18:34 UTC (permalink / raw)
To: Arnd Bergmann, Bartlomiej Zolnierkiewicz, Bastian Stender,
Jyri Sarha, Tomi Valkeinen, linux-fbdev, dri-devel
Cc: kernel-janitors, LKML
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 7 Jan 2018 19:27:28 +0100
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>
---
v2:
This update suggestion was rebased on source files from the software
"Linux next-20180105".
drivers/video/fbdev/ssd1307fb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index f599520374dd..6439231f2db2 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -628,7 +628,8 @@ static int ssd1307fb_probe(struct i2c_client *client,
goto fb_alloc_error;
}
- ssd1307fb_defio = devm_kzalloc(&client->dev, sizeof(struct fb_deferred_io), GFP_KERNEL);
+ ssd1307fb_defio = devm_kzalloc(&client->dev, sizeof(*ssd1307fb_defio),
+ GFP_KERNEL);
if (!ssd1307fb_defio) {
dev_err(&client->dev, "Couldn't allocate deferred io.\n");
ret = -ENOMEM;
--
2.15.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH v2] video: ssd1307fb: Improve a size determination in ssd1307fb_probe()
2018-01-07 18:34 ` SF Markus Elfring
@ 2018-03-28 13:53 ` Bartlomiej Zolnierkiewicz
-1 siblings, 0 replies; 19+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-03-28 13:53 UTC (permalink / raw)
To: SF Markus Elfring
Cc: Arnd Bergmann, Bastian Stender, Jyri Sarha, Tomi Valkeinen,
linux-fbdev, dri-devel, LKML, kernel-janitors
On Sunday, January 07, 2018 07:34:44 PM SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sun, 7 Jan 2018 19:27:28 +0100
>
> 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>
Patch queued for 4.17, thanks.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2] video: ssd1307fb: Improve a size determination in ssd1307fb_probe()
@ 2018-03-28 13:53 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 19+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-03-28 13:53 UTC (permalink / raw)
To: SF Markus Elfring
Cc: Arnd Bergmann, Bastian Stender, Jyri Sarha, Tomi Valkeinen,
linux-fbdev, dri-devel, LKML, kernel-janitors
On Sunday, January 07, 2018 07:34:44 PM SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sun, 7 Jan 2018 19:27:28 +0100
>
> 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>
Patch queued for 4.17, thanks.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2018-03-28 13:53 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20171125160425epcas5p43b2d94fbcc74745017c4c91ff08de685@epcas5p4.samsung.com>
2017-11-25 16:04 ` [PATCH 0/2] video: ssd1307fb: Adjustments for ssd1307fb_probe() SF Markus Elfring
2017-11-25 16:04 ` SF Markus Elfring
2017-11-25 16:04 ` SF Markus Elfring
2017-11-25 16:05 ` [PATCH 1/2] video: ssd1307fb: Delete an error message for a failed memory allocation in ssd1307fb_probe() SF Markus Elfring
2017-11-25 16:05 ` SF Markus Elfring
2017-11-25 16:05 ` [PATCH 1/2] video: ssd1307fb: Delete an error message for a failed memory allocation in ssd1307fb_pr SF Markus Elfring
2017-11-25 16:06 ` [PATCH 2/2] video: ssd1307fb: Improve a size determination in ssd1307fb_probe() SF Markus Elfring
2017-11-25 16:06 ` SF Markus Elfring
2017-11-25 16:06 ` SF Markus Elfring
2017-12-29 18:10 ` [PATCH 0/2] video: ssd1307fb: Adjustments for ssd1307fb_probe() Bartlomiej Zolnierkiewicz
2017-12-29 18:10 ` Bartlomiej Zolnierkiewicz
2017-12-29 18:10 ` Bartlomiej Zolnierkiewicz
2017-12-29 18:23 ` [0/2] " SF Markus Elfring
2017-12-29 18:23 ` SF Markus Elfring
2018-01-07 18:34 ` [PATCH v2] video: ssd1307fb: Improve a size determination in ssd1307fb_probe() SF Markus Elfring
2018-01-07 18:34 ` SF Markus Elfring
2018-01-07 18:34 ` SF Markus Elfring
2018-03-28 13:53 ` Bartlomiej Zolnierkiewicz
2018-03-28 13:53 ` Bartlomiej Zolnierkiewicz
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.