drm/ssd130x: Fix possible uninitialized usage of crtc_state variable
Subsystems (3)
Javier Martinez Canillas
maintainerPATCH 1/1 drm/ssd130x: Fix possible uninitialized usage of crtc_state variable
Avoid a possible uninitialized use of the crtc_state variable in function ssd132x_primary_plane_atomic_check() and avoid the following Smatch warn:
drivers/gpu/drm/solomon/ssd130x.c:921 ssd132x_primary_plane_atomic_check()
error: uninitialized symbol 'crtc_state'.
---
drivers/gpu/drm/solomon/ssd130x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/solomon/ssd130x.c +1 -1
@@ -910,7 +910,7 @@ static int ssd132x_primary_plane_atomic_check(struct drm_plane *plane,struct drm_plane_state *plane_state =drm_atomic_get_new_plane_state (state, plane);struct ssd130x_plane_state *ssd130x_state =to_ssd130x_plane_state (plane_state);struct drm_crtc *crtc = plane_state->crtc; -struct drm_crtc_state *crtc_state; +struct drm_crtc_state *crtc_state =NULL ;const struct drm_format_info *fi;unsigned int pitch;int ret;
Signature · 1 line
2.41.0
Hi,
Quoted 5 lines · Javier Martinez Canillas
Avoid a possible uninitialized use of the
crtc_statevariable in functionssd132x_primary_plane_atomic_check()and avoid the following Smatch warn:
drivers/gpu/drm/solomon/ssd130x.c:921ssd132x_primary_plane_atomic_check()
error: uninitialized symbol 'crtc_state'.
That looks trivial, so you can add:
Quoted 23 lines
Fixes fdd591e00a9c ("drm/ssd130x: Add support for the SSD132x OLED controller family")Reported-by Dan Carpenter <[email protected]>Signed-off-by Javier Martinez Canillas <[email protected]>---
drivers/gpu/drm/solomon/ssd130x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/solomon/ssd130x.c +1
-1@@ -910,7 +910,7 @@ static int ssd132x_primary_plane_atomic_check(struct drm_plane *plane,struct drm_plane_state *plane_state =drm_atomic_get_new_plane_state (state, plane);struct ssd130x_plane_state *ssd130x_state =to_ssd130x_plane_state (plane_state);struct drm_crtc *crtc = plane_state->crtc; -struct drm_crtc_state *crtc_state; +struct drm_crtc_state *crtc_state =NULL ;const struct drm_format_info *fi;unsigned int pitch;int ret;
Quoted 6 lines · Jocelyn Falempe
Hi,
Quoted 3 lines · Javier Martinez Canillas
Avoid a possible uninitialized use of the
crtc_statevariable in functionssd132x_primary_plane_atomic_check()and avoid the following Smatch warn:
Quoted 7 lines
Quoted 2 lines
drivers/gpu/drm/solomon/ssd130x.c:921ssd132x_primary_plane_atomic_check()
error: uninitialized symbol 'crtc_state'.That looks trivial, so you can add:
Acked-by Jocelyn Falempe <[email protected]>
Pushed to drm-misc (drm-misc-next). Thanks!
Signature · 5 lines
Best regards, Javier Martinez Canillas Core Platforms Red Hat
Hi Javier,
Quoted 8 lines · Javier Martinez Canillas
Quoted 7 lines · Jocelyn Falempe
Quoted 5 lines · Javier Martinez Canillas
Avoid a possible uninitialized use of the
crtc_statevariable in functionssd132x_primary_plane_atomic_check()and avoid the following Smatch warn:
drivers/gpu/drm/solomon/ssd130x.c:921ssd132x_primary_plane_atomic_check()
error: uninitialized symbol 'crtc_state'.
Quoted 6 lines
Quoted 4 lines
That looks trivial, so you can add:
Acked-by Jocelyn Falempe <[email protected]>Pushed to drm-misc (drm-misc-next). Thanks!
Looks like you introduced an unintended
(cherry picked from commit 9e4db199e66d427c50458f4d72734cc4f0b92948)
?
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Javier Martinez Canillas
maintainerGeert Uytterhoeven <[email protected]> writes:
Hello Geert,
Quoted 17 lines
Hi Javier,
Quoted 13 lines · Javier Martinez Canillas
Quoted 11 lines · Jocelyn Falempe
Quoted 5 lines · Javier Martinez Canillas
Avoid a possible uninitialized use of the
crtc_statevariable in functionssd132x_primary_plane_atomic_check()and avoid the following Smatch warn:
drivers/gpu/drm/solomon/ssd130x.c:921ssd132x_primary_plane_atomic_check()
error: uninitialized symbol 'crtc_state'.That looks trivial, so you can add:
Acked-by Jocelyn Falempe <[email protected]>
Quoted 8 lines
Quoted 1 line
Pushed to drm-misc (drm-misc-next). Thanks!
Looks like you introduced an unintended
(cherry picked from commit 9e4db199e66d427c50458f4d72734cc4f0b92948)?
No, that's intended. It's added by the dim cherry-pick command, since I had to cherry-pick to drm-misc-next-fixes the commit that was already in the drm-misc-next branch.
You will find that message in many drm commits, i.e:
$ git log --oneline --grep="(cherry picked from commit" drivers/gpu/drm/ | wc -l 1708
Quoted 2 lines
Gr{oetje,eeting}s,
Signature · 5 lines
Best regards, Javier Martinez Canillas Core Platforms Red Hat
Hi Javier,
Quoted 25 lines · Javier Martinez Canillas
Quoted 15 lines · Geert Uytterhoeven
Quoted 13 lines · Javier Martinez Canillas
Quoted 11 lines · Jocelyn Falempe
Quoted 5 lines · Javier Martinez Canillas
Avoid a possible uninitialized use of the
crtc_statevariable in functionssd132x_primary_plane_atomic_check()and avoid the following Smatch warn:
drivers/gpu/drm/solomon/ssd130x.c:921ssd132x_primary_plane_atomic_check()
error: uninitialized symbol 'crtc_state'.That looks trivial, so you can add:
Acked-by Jocelyn Falempe <[email protected]>Quoted 8 lines
Quoted 1 line
Pushed to drm-misc (drm-misc-next). Thanks!
Looks like you introduced an unintended
(cherry picked from commit 9e4db199e66d427c50458f4d72734cc4f0b92948)?
Quoted 8 lines
No, that's intended. It's added by the
dim cherry-pickcommand, since I had to cherry-pick to drm-misc-next-fixes the commit that was already in the drm-misc-next branch.You will find that message in many drm commits, i.e:
$ git log --oneline --grep="(cherry picked from commit" drivers/gpu/drm/ | wc -l 1708
Ah, so that's why it's (way too) common to have merge conflicts between the fixes and non-fixes drm branches :-(
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Javier Martinez Canillas
maintainerQuoted 1 line · Geert Uytterhoeven
Hi Javier,
[...]
Quoted 13 lines
Quoted 13 lines
Quoted 8 lines
Quoted 1 line
Pushed to drm-misc (drm-misc-next). Thanks!
Looks like you introduced an unintended
(cherry picked from commit 9e4db199e66d427c50458f4d72734cc4f0b92948)?
No, that's intended. It's added by the
dim cherry-pickcommand, since I had to cherry-pick to drm-misc-next-fixes the commit that was already in the drm-misc-next branch.
Quoted 8 lines
Quoted 4 lines
You will find that message in many drm commits, i.e:
$ git log --oneline --grep="(cherry picked from commit" drivers/gpu/drm/ | wc -l 1708Ah, so that's why it's (way too) common to have merge conflicts between the fixes and non-fixes drm branches :-(
I guess so. In this particular case it was my fault because I pushed to drm-misc-next with the expectation that there would be a last PR before the drm-next tree was sent to Torvalds but I missed for a few hours...
So then I had the option for the fixes to miss 6.7 and wait to land in 6.8, or cherry-pick them to the drm-misc-next-fixes branch and pollute the git history log :(
Quoted 4 lines
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Best regards, Javier Martinez Canillas Core Platforms Red Hat
Maxime Ripard
maintainerQuoted 28 lines · Javier Martinez Canillas
Quoted 1 line · Geert Uytterhoeven
Hi Javier,
[...]
Quoted 13 lines
Quoted 13 lines
Quoted 8 lines
Quoted 1 line
Pushed to drm-misc (drm-misc-next). Thanks!
Looks like you introduced an unintended
(cherry picked from commit 9e4db199e66d427c50458f4d72734cc4f0b92948)?
No, that's intended. It's added by the
dim cherry-pickcommand, since I had to cherry-pick to drm-misc-next-fixes the commit that was already in the drm-misc-next branch.Quoted 8 lines
Quoted 4 lines
You will find that message in many drm commits, i.e:
$ git log --oneline --grep="(cherry picked from commit" drivers/gpu/drm/ | wc -l 1708Ah, so that's why it's (way too) common to have merge conflicts between the fixes and non-fixes drm branches :-(
Quoted 7 lines
I guess so. In this particular case it was my fault because I pushed to drm-misc-next with the expectation that there would be a last PR before the drm-next tree was sent to Torvalds but I missed for a few hours...
So then I had the option for the fixes to miss 6.7 and wait to land in 6.8, or cherry-pick them to the drm-misc-next-fixes branch and pollute the git history log :(
Yeah, it's the downside of having so many committers, we have to expect that people are going to make small mistakes every now and then and that's ok.
That's also not as bad as Geert put it: merging two branches with the exact same commit applied won't create conflict. If the two commits aren't exactly the same then we can indeed create conflicts, but that would have been the case anyway with or without the "double-commits"
Maxime
Hi Maxime,
Quoted 19 lines · Maxime Ripard
Quoted 18 lines · Javier Martinez Canillas
Quoted 17 lines · Geert Uytterhoeven
Quoted 16 lines
Quoted 7 lines
Quoted 1 line
Pushed to drm-misc (drm-misc-next). Thanks!
Looks like you introduced an unintended
(cherry picked from commit 9e4db199e66d427c50458f4d72734cc4f0b92948)?
No, that's intended. It's added by the
dim cherry-pickcommand, since I had to cherry-pick to drm-misc-next-fixes the commit that was already in the drm-misc-next branch.You will find that message in many drm commits, i.e:
$ git log --oneline --grep="(cherry picked from commit" drivers/gpu/drm/ | wc -l 1708
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
Ah, so that's why it's (way too) common to have merge conflicts between the fixes and non-fixes drm branches :-(
That's also not as bad as Geert put it: merging two branches with the exact same commit applied won't create conflict. If the two commits aren't exactly the same then we can indeed create conflicts, but that would have been the case anyway with or without the "double-commits"
Oh it is, as soon as one branch receives more commits that make changes to the same location. Which is fairly common, too, to the point that I am surprised when merging a drm for-next branch does not trigger a conflict...
Cfr. the conflict I had to resolve this morning between commit 64ffd2f1d00c6235 ("drm/amd: Disable ASPM for VI w/ all Intel systems") already upstream, and commits e5f52a84bf0a8170 ("drm/amd: Disable ASPM for VI w/ all Intel systems") and follow-up 2757a848cb0f1848 ("drm/amd: Explicitly disable ASPM when dynamic switching disabled") in drm/drm-next.
Note that none of 64ffd2f1d00c6235 and 2757a848cb0f1848 has a "cherry picked from commit" line in the commit description.
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Maxime Ripard
maintainerQuoted 35 lines · Geert Uytterhoeven
Hi Maxime,
Quoted 19 lines · Maxime Ripard
Quoted 18 lines · Javier Martinez Canillas
Quoted 17 lines · Geert Uytterhoeven
Quoted 16 lines
Quoted 7 lines
Quoted 1 line
Pushed to drm-misc (drm-misc-next). Thanks!
Looks like you introduced an unintended
(cherry picked from commit 9e4db199e66d427c50458f4d72734cc4f0b92948)?
No, that's intended. It's added by the
dim cherry-pickcommand, since I had to cherry-pick to drm-misc-next-fixes the commit that was already in the drm-misc-next branch.You will find that message in many drm commits, i.e:
$ git log --oneline --grep="(cherry picked from commit" drivers/gpu/drm/ | wc -l 1708Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
Ah, so that's why it's (way too) common to have merge conflicts between the fixes and non-fixes drm branches :-(
That's also not as bad as Geert put it: merging two branches with the exact same commit applied won't create conflict. If the two commits aren't exactly the same then we can indeed create conflicts, but that would have been the case anyway with or without the "double-commits"
Oh it is, as soon as one branch receives more commits that make changes to the same location. Which is fairly common, too, to the point that I am surprised when merging a drm for-next branch does not trigger a conflict...
Quoted 6 lines
Cfr. the conflict I had to resolve this morning between commit
64ffd2f1d00c6235("drm/amd: Disable ASPM for VI w/ all Intel systems") already upstream, and commitse5f52a84bf0a8170("drm/amd: Disable ASPM for VI w/ all Intel systems") and follow-up2757a848cb0f1848("drm/amd: Explicitly disable ASPM when dynamic switching disabled") in drm/drm-next.
I probably don't get what you're saying, sorry, but those two commits would have conflicted anyway when merging the two branches, with or without the cherry-pick.
Maxime