linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [RESEND] drm/gma500: initialize gma_clock_t structures
@ 2018-01-16 14:57 Arnd Bergmann
  2018-01-17  8:23 ` Patrik Jakobsson
  2018-01-17  8:27 ` Daniel Vetter
  0 siblings, 2 replies; 7+ messages in thread
From: Arnd Bergmann @ 2018-01-16 14:57 UTC (permalink / raw)
  To: Patrik Jakobsson, David Airlie; +Cc: Arnd Bergmann, dri-devel, linux-kernel

The two functions pass a partially initialized structure back to the
caller after a memset() on the destination.

This is not entirely well-defined, most compilers are sensible enough
to either keep the zero-initialization for the uninitialized members,
but gcc-4.4 does not, and it warns about this:

drivers/gpu/drm/gma500/oaktrail_crtc.c: In function 'mrst_sdvo_find_best_pll':
drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.vco' may be used uninitialized in this function
drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.dot' may be used uninitialized in this function
drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.p2' may be used uninitialized in this function
drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.m2' may be used uninitialized in this function
drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.m1' may be used uninitialized in this function
drivers/gpu/drm/gma500/oaktrail_crtc.c: In function 'mrst_lvds_find_best_pll':
drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.p' may be used uninitialized in this function
drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.vco' may be used uninitialized in this function
drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.p2' may be used uninitialized in this function
drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.m2' may be used uninitialized in this function
drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.m1' may be used uninitialized in this function
drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.n' may be used uninitialized in this function

This adds an initialization at declaration time to avoid the warning
and make it well-defined on all compiler versions.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
Originally submitted on Sep 15, 2017, but got no reply. Resending unchanged.
---
 drivers/gpu/drm/gma500/oaktrail_crtc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/gma500/oaktrail_crtc.c b/drivers/gpu/drm/gma500/oaktrail_crtc.c
index 0fff269d3fe6..b49fe79c3f44 100644
--- a/drivers/gpu/drm/gma500/oaktrail_crtc.c
+++ b/drivers/gpu/drm/gma500/oaktrail_crtc.c
@@ -134,7 +134,7 @@ static bool mrst_sdvo_find_best_pll(const struct gma_limit_t *limit,
 				    struct drm_crtc *crtc, int target,
 				    int refclk, struct gma_clock_t *best_clock)
 {
-	struct gma_clock_t clock;
+	struct gma_clock_t clock = {};
 	u32 target_vco, actual_freq;
 	s32 freq_error, min_error = 100000;
 
@@ -191,7 +191,7 @@ static bool mrst_lvds_find_best_pll(const struct gma_limit_t *limit,
 				    struct drm_crtc *crtc, int target,
 				    int refclk, struct gma_clock_t *best_clock)
 {
-	struct gma_clock_t clock;
+	struct gma_clock_t clock = {};
 	int err = target;
 
 	memset(best_clock, 0, sizeof(*best_clock));
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] [RESEND] drm/gma500: initialize gma_clock_t structures
  2018-01-16 14:57 [PATCH] [RESEND] drm/gma500: initialize gma_clock_t structures Arnd Bergmann
@ 2018-01-17  8:23 ` Patrik Jakobsson
  2018-01-17  8:27 ` Daniel Vetter
  1 sibling, 0 replies; 7+ messages in thread
From: Patrik Jakobsson @ 2018-01-17  8:23 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: David Airlie, dri-devel, linux-kernel, Daniel Vetter

On Tue, Jan 16, 2018 at 3:57 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> The two functions pass a partially initialized structure back to the
> caller after a memset() on the destination.
>
> This is not entirely well-defined, most compilers are sensible enough
> to either keep the zero-initialization for the uninitialized members,
> but gcc-4.4 does not, and it warns about this:
>
> drivers/gpu/drm/gma500/oaktrail_crtc.c: In function 'mrst_sdvo_find_best_pll':
> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.vco' may be used uninitialized in this function
> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.dot' may be used uninitialized in this function
> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.p2' may be used uninitialized in this function
> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.m2' may be used uninitialized in this function
> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.m1' may be used uninitialized in this function
> drivers/gpu/drm/gma500/oaktrail_crtc.c: In function 'mrst_lvds_find_best_pll':
> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.p' may be used uninitialized in this function
> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.vco' may be used uninitialized in this function
> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.p2' may be used uninitialized in this function
> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.m2' may be used uninitialized in this function
> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.m1' may be used uninitialized in this function
> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.n' may be used uninitialized in this function
>
> This adds an initialization at declaration time to avoid the warning
> and make it well-defined on all compiler versions.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Dave or Daniel, I'm on sick leave and will be for some time to come.
Can one of you pick up this patch? Thanks.

Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

> ---
> Originally submitted on Sep 15, 2017, but got no reply. Resending unchanged.
> ---
>  drivers/gpu/drm/gma500/oaktrail_crtc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/gma500/oaktrail_crtc.c b/drivers/gpu/drm/gma500/oaktrail_crtc.c
> index 0fff269d3fe6..b49fe79c3f44 100644
> --- a/drivers/gpu/drm/gma500/oaktrail_crtc.c
> +++ b/drivers/gpu/drm/gma500/oaktrail_crtc.c
> @@ -134,7 +134,7 @@ static bool mrst_sdvo_find_best_pll(const struct gma_limit_t *limit,
>                                     struct drm_crtc *crtc, int target,
>                                     int refclk, struct gma_clock_t *best_clock)
>  {
> -       struct gma_clock_t clock;
> +       struct gma_clock_t clock = {};
>         u32 target_vco, actual_freq;
>         s32 freq_error, min_error = 100000;
>
> @@ -191,7 +191,7 @@ static bool mrst_lvds_find_best_pll(const struct gma_limit_t *limit,
>                                     struct drm_crtc *crtc, int target,
>                                     int refclk, struct gma_clock_t *best_clock)
>  {
> -       struct gma_clock_t clock;
> +       struct gma_clock_t clock = {};
>         int err = target;
>
>         memset(best_clock, 0, sizeof(*best_clock));
> --
> 2.9.0
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] [RESEND] drm/gma500: initialize gma_clock_t structures
  2018-01-16 14:57 [PATCH] [RESEND] drm/gma500: initialize gma_clock_t structures Arnd Bergmann
  2018-01-17  8:23 ` Patrik Jakobsson
@ 2018-01-17  8:27 ` Daniel Vetter
  2018-01-17 14:36   ` Arnd Bergmann
  1 sibling, 1 reply; 7+ messages in thread
From: Daniel Vetter @ 2018-01-17  8:27 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Patrik Jakobsson, David Airlie, dri-devel, linux-kernel

On Tue, Jan 16, 2018 at 03:57:10PM +0100, Arnd Bergmann wrote:
> The two functions pass a partially initialized structure back to the
> caller after a memset() on the destination.
> 
> This is not entirely well-defined, most compilers are sensible enough
> to either keep the zero-initialization for the uninitialized members,
> but gcc-4.4 does not, and it warns about this:
> 
> drivers/gpu/drm/gma500/oaktrail_crtc.c: In function 'mrst_sdvo_find_best_pll':
> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.vco' may be used uninitialized in this function
> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.dot' may be used uninitialized in this function
> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.p2' may be used uninitialized in this function
> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.m2' may be used uninitialized in this function
> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.m1' may be used uninitialized in this function
> drivers/gpu/drm/gma500/oaktrail_crtc.c: In function 'mrst_lvds_find_best_pll':
> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.p' may be used uninitialized in this function
> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.vco' may be used uninitialized in this function
> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.p2' may be used uninitialized in this function
> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.m2' may be used uninitialized in this function
> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.m1' may be used uninitialized in this function
> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.n' may be used uninitialized in this function
> 
> This adds an initialization at declaration time to avoid the warning
> and make it well-defined on all compiler versions.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Applied to drm-misc-next-fixes for 4.16, thx for your patch. Aside: Still
don't want commit rights? :-)

Cheers, Daniel
> ---
> Originally submitted on Sep 15, 2017, but got no reply. Resending unchanged.
> ---
>  drivers/gpu/drm/gma500/oaktrail_crtc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/gma500/oaktrail_crtc.c b/drivers/gpu/drm/gma500/oaktrail_crtc.c
> index 0fff269d3fe6..b49fe79c3f44 100644
> --- a/drivers/gpu/drm/gma500/oaktrail_crtc.c
> +++ b/drivers/gpu/drm/gma500/oaktrail_crtc.c
> @@ -134,7 +134,7 @@ static bool mrst_sdvo_find_best_pll(const struct gma_limit_t *limit,
>  				    struct drm_crtc *crtc, int target,
>  				    int refclk, struct gma_clock_t *best_clock)
>  {
> -	struct gma_clock_t clock;
> +	struct gma_clock_t clock = {};
>  	u32 target_vco, actual_freq;
>  	s32 freq_error, min_error = 100000;
>  
> @@ -191,7 +191,7 @@ static bool mrst_lvds_find_best_pll(const struct gma_limit_t *limit,
>  				    struct drm_crtc *crtc, int target,
>  				    int refclk, struct gma_clock_t *best_clock)
>  {
> -	struct gma_clock_t clock;
> +	struct gma_clock_t clock = {};
>  	int err = target;
>  
>  	memset(best_clock, 0, sizeof(*best_clock));
> -- 
> 2.9.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] [RESEND] drm/gma500: initialize gma_clock_t structures
  2018-01-17  8:27 ` Daniel Vetter
@ 2018-01-17 14:36   ` Arnd Bergmann
  2018-01-17 14:55     ` Daniel Vetter
  0 siblings, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2018-01-17 14:36 UTC (permalink / raw)
  To: Arnd Bergmann, Patrik Jakobsson, David Airlie, dri-devel,
	Linux Kernel Mailing List

On Wed, Jan 17, 2018 at 9:27 AM, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Tue, Jan 16, 2018 at 03:57:10PM +0100, Arnd Bergmann wrote:
>> The two functions pass a partially initialized structure back to the
>> caller after a memset() on the destination.
>>
>> This is not entirely well-defined, most compilers are sensible enough
>> to either keep the zero-initialization for the uninitialized members,
>> but gcc-4.4 does not, and it warns about this:
>>
>> drivers/gpu/drm/gma500/oaktrail_crtc.c: In function 'mrst_sdvo_find_best_pll':
>> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.vco' may be used uninitialized in this function
>> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.dot' may be used uninitialized in this function
>> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.p2' may be used uninitialized in this function
>> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.m2' may be used uninitialized in this function
>> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.m1' may be used uninitialized in this function
>> drivers/gpu/drm/gma500/oaktrail_crtc.c: In function 'mrst_lvds_find_best_pll':
>> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.p' may be used uninitialized in this function
>> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.vco' may be used uninitialized in this function
>> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.p2' may be used uninitialized in this function
>> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.m2' may be used uninitialized in this function
>> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.m1' may be used uninitialized in this function
>> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.n' may be used uninitialized in this function
>>
>> This adds an initialization at declaration time to avoid the warning
>> and make it well-defined on all compiler versions.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Applied to drm-misc-next-fixes for 4.16, thx for your patch.

Thanks!

> Aside: Still don't want commit rights? :-)

I think I'm fine without. While I do tend to have a backlog on DRM
patches that I'd
like to get merged, they are generally of the kind that I should not
apply myself
without the maintainer being involved in some form, and then they can commit
it themselves.

       Arnd

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] [RESEND] drm/gma500: initialize gma_clock_t structures
  2018-01-17 14:36   ` Arnd Bergmann
@ 2018-01-17 14:55     ` Daniel Vetter
  2018-01-17 19:44       ` Arnd Bergmann
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Vetter @ 2018-01-17 14:55 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Patrik Jakobsson, David Airlie, dri-devel, Linux Kernel Mailing List

On Wed, Jan 17, 2018 at 3:36 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Wed, Jan 17, 2018 at 9:27 AM, Daniel Vetter <daniel@ffwll.ch> wrote:
>> On Tue, Jan 16, 2018 at 03:57:10PM +0100, Arnd Bergmann wrote:
>>> The two functions pass a partially initialized structure back to the
>>> caller after a memset() on the destination.
>>>
>>> This is not entirely well-defined, most compilers are sensible enough
>>> to either keep the zero-initialization for the uninitialized members,
>>> but gcc-4.4 does not, and it warns about this:
>>>
>>> drivers/gpu/drm/gma500/oaktrail_crtc.c: In function 'mrst_sdvo_find_best_pll':
>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.vco' may be used uninitialized in this function
>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.dot' may be used uninitialized in this function
>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.p2' may be used uninitialized in this function
>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.m2' may be used uninitialized in this function
>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.m1' may be used uninitialized in this function
>>> drivers/gpu/drm/gma500/oaktrail_crtc.c: In function 'mrst_lvds_find_best_pll':
>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.p' may be used uninitialized in this function
>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.vco' may be used uninitialized in this function
>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.p2' may be used uninitialized in this function
>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.m2' may be used uninitialized in this function
>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.m1' may be used uninitialized in this function
>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.n' may be used uninitialized in this function
>>>
>>> This adds an initialization at declaration time to avoid the warning
>>> and make it well-defined on all compiler versions.
>>>
>>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>>
>> Applied to drm-misc-next-fixes for 4.16, thx for your patch.
>
> Thanks!
>
>> Aside: Still don't want commit rights? :-)
>
> I think I'm fine without. While I do tend to have a backlog on DRM
> patches that I'd
> like to get merged, they are generally of the kind that I should not
> apply myself
> without the maintainer being involved in some form, and then they can commit
> it themselves.

Commit rights isn't for pushing unreviewed stuff (our scripts will
remind you of that if you try). But you could just volunteer someone
to review the entire pile and then push it, instead of nagging every
single slacking maintainer individually.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] [RESEND] drm/gma500: initialize gma_clock_t structures
  2018-01-17 14:55     ` Daniel Vetter
@ 2018-01-17 19:44       ` Arnd Bergmann
  2018-01-17 21:19         ` Daniel Vetter
  0 siblings, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2018-01-17 19:44 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Patrik Jakobsson, David Airlie, dri-devel, Linux Kernel Mailing List

On Wed, Jan 17, 2018 at 3:55 PM, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Wed, Jan 17, 2018 at 3:36 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>> On Wed, Jan 17, 2018 at 9:27 AM, Daniel Vetter <daniel@ffwll.ch> wrote:
>>> On Tue, Jan 16, 2018 at 03:57:10PM +0100, Arnd Bergmann wrote:
>>>> The two functions pass a partially initialized structure back to the
>>>> caller after a memset() on the destination.
>>>>
>>>> This is not entirely well-defined, most compilers are sensible enough
>>>> to either keep the zero-initialization for the uninitialized members,
>>>> but gcc-4.4 does not, and it warns about this:
>>>>
>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c: In function 'mrst_sdvo_find_best_pll':
>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.vco' may be used uninitialized in this function
>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.dot' may be used uninitialized in this function
>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.p2' may be used uninitialized in this function
>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.m2' may be used uninitialized in this function
>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.m1' may be used uninitialized in this function
>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c: In function 'mrst_lvds_find_best_pll':
>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.p' may be used uninitialized in this function
>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.vco' may be used uninitialized in this function
>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.p2' may be used uninitialized in this function
>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.m2' may be used uninitialized in this function
>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.m1' may be used uninitialized in this function
>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.n' may be used uninitialized in this function
>>>>
>>>> This adds an initialization at declaration time to avoid the warning
>>>> and make it well-defined on all compiler versions.
>>>>
>>>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>>>
>>> Applied to drm-misc-next-fixes for 4.16, thx for your patch.
>>
>> Thanks!
>>
>>> Aside: Still don't want commit rights? :-)
>>
>> I think I'm fine without. While I do tend to have a backlog on DRM
>> patches that I'd
>> like to get merged, they are generally of the kind that I should not
>> apply myself
>> without the maintainer being involved in some form, and then they can commit
>> it themselves.
>
> Commit rights isn't for pushing unreviewed stuff (our scripts will
> remind you of that if you try). But you could just volunteer someone
> to review the entire pile and then push it, instead of nagging every
> single slacking maintainer individually.

I understand, but I could also just nag someone to review and apply
the patches, right? Or do the committer and reviewer also need to
be separate people?

        Arnd

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] [RESEND] drm/gma500: initialize gma_clock_t structures
  2018-01-17 19:44       ` Arnd Bergmann
@ 2018-01-17 21:19         ` Daniel Vetter
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Vetter @ 2018-01-17 21:19 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Patrik Jakobsson, David Airlie, dri-devel, Linux Kernel Mailing List

On Wed, Jan 17, 2018 at 8:44 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Wed, Jan 17, 2018 at 3:55 PM, Daniel Vetter <daniel@ffwll.ch> wrote:
>> On Wed, Jan 17, 2018 at 3:36 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>>> On Wed, Jan 17, 2018 at 9:27 AM, Daniel Vetter <daniel@ffwll.ch> wrote:
>>>> On Tue, Jan 16, 2018 at 03:57:10PM +0100, Arnd Bergmann wrote:
>>>>> The two functions pass a partially initialized structure back to the
>>>>> caller after a memset() on the destination.
>>>>>
>>>>> This is not entirely well-defined, most compilers are sensible enough
>>>>> to either keep the zero-initialization for the uninitialized members,
>>>>> but gcc-4.4 does not, and it warns about this:
>>>>>
>>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c: In function 'mrst_sdvo_find_best_pll':
>>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.vco' may be used uninitialized in this function
>>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.dot' may be used uninitialized in this function
>>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.p2' may be used uninitialized in this function
>>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.m2' may be used uninitialized in this function
>>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:175: warning: 'clock.m1' may be used uninitialized in this function
>>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c: In function 'mrst_lvds_find_best_pll':
>>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.p' may be used uninitialized in this function
>>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.vco' may be used uninitialized in this function
>>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.p2' may be used uninitialized in this function
>>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.m2' may be used uninitialized in this function
>>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.m1' may be used uninitialized in this function
>>>>> drivers/gpu/drm/gma500/oaktrail_crtc.c:208: warning: 'clock.n' may be used uninitialized in this function
>>>>>
>>>>> This adds an initialization at declaration time to avoid the warning
>>>>> and make it well-defined on all compiler versions.
>>>>>
>>>>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>>>>
>>>> Applied to drm-misc-next-fixes for 4.16, thx for your patch.
>>>
>>> Thanks!
>>>
>>>> Aside: Still don't want commit rights? :-)
>>>
>>> I think I'm fine without. While I do tend to have a backlog on DRM
>>> patches that I'd
>>> like to get merged, they are generally of the kind that I should not
>>> apply myself
>>> without the maintainer being involved in some form, and then they can commit
>>> it themselves.
>>
>> Commit rights isn't for pushing unreviewed stuff (our scripts will
>> remind you of that if you try). But you could just volunteer someone
>> to review the entire pile and then push it, instead of nagging every
>> single slacking maintainer individually.
>
> I understand, but I could also just nag someone to review and apply
> the patches, right? Or do the committer and reviewer also need to
> be separate people?

Among author, committer and ackers/reviewers we just insist on 2
different people. So nagging works too, if you don't find that
frustrating.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-01-17 21:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-16 14:57 [PATCH] [RESEND] drm/gma500: initialize gma_clock_t structures Arnd Bergmann
2018-01-17  8:23 ` Patrik Jakobsson
2018-01-17  8:27 ` Daniel Vetter
2018-01-17 14:36   ` Arnd Bergmann
2018-01-17 14:55     ` Daniel Vetter
2018-01-17 19:44       ` Arnd Bergmann
2018-01-17 21:19         ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).