Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753458AbeAQOz0 (ORCPT + 1 other); Wed, 17 Jan 2018 09:55:26 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:46512 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753051AbeAQOzX (ORCPT ); Wed, 17 Jan 2018 09:55:23 -0500 X-Google-Smtp-Source: ACJfBovYP2mm/0gnm258P/ZG0JDJIpufYx56XCKZPG/Efa9bXz8bywx6F+LPh3hvYGQpXY1GhfPiSN5Unlo93ZAK8V8= MIME-Version: 1.0 X-Originating-IP: [2a02:168:56e6:0:e4bc:76a0:8042:669e] In-Reply-To: References: <20180116145720.2348043-1-arnd@arndb.de> <20180117082712.GF2759@phenom.ffwll.local> From: Daniel Vetter Date: Wed, 17 Jan 2018 15:55:22 +0100 X-Google-Sender-Auth: IbsT99hCoKUjvNejkoCbs4Duxyk Message-ID: Subject: Re: [PATCH] [RESEND] drm/gma500: initialize gma_clock_t structures To: Arnd Bergmann Cc: Patrik Jakobsson , David Airlie , dri-devel , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Wed, Jan 17, 2018 at 3:36 PM, Arnd Bergmann wrote: > On Wed, Jan 17, 2018 at 9:27 AM, Daniel Vetter 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 >> >> 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