Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp996406rdh; Fri, 27 Oct 2023 01:23:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFXbQ2jB4apkGxR3qrl8uIqusGYySZornLFgzj2YfL/4vFPYpU4fj+oZc70NIXx2o0A2xrS X-Received: by 2002:a05:6902:541:b0:d9a:b67f:94e3 with SMTP id z1-20020a056902054100b00d9ab67f94e3mr1819913ybs.52.1698395009542; Fri, 27 Oct 2023 01:23:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698395009; cv=none; d=google.com; s=arc-20160816; b=ILyhJw6iJooibSz0g8i2shUtBozWIs/+ZNF2q9P46C/MX7EfPgDtvy5P7DTC00HLnD d1JqEKvVQcaOfM6q66ajfViy4jLoUkVo/p3yB9fdx0mpqYonTESgLFZribZsw/sHZD4+ li6Gv5E0CRcQcZjMv5R2JH771fn9euRc40zZLQeDpp93yh8kO0FPEEdk5K+BYCtO+9OK uGSjsWgaRwaSp/SvtXLlMM1NIMIDaBnOryBbNvC+SoU2QxPAH0ytA1mrHQEgE5TUJEtc 12kiBaQz6HNjanyXMfjDdTvaZWMXjdn+W760kVa8aW875774Y97J8ufaTOJXFUp/OunT cbLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=2ZxpY1vjsc4zx7bmsbIUQXSJpyxKql+2tTnnsraEizo=; fh=E6XPjNdpCYysdnQfeKsk83k9vixQIxArdmkt7iQnwcU=; b=zWAXHYlNc5ibuWUkhEz9eVv54OQcs7HTXW7GwXrEvuAURi9c/FVF+FZDmIMSoSHE+i YOsIFY/Bzs1T+gxV3YJcXjiGE20HSi5dMvNmfXR/BkUfMWcktpk6Tao1blUGtPI6zG2x LCUHDT98eDupFHy7yRPKtUiiCg5J944rII0SyrbZUhbO6KOD4bDikB0TdhRhPRrMC/A6 8+3gPGVvB3AmhotEHCH2+J/eT2ZjUuCUse5Xa53Qhg7rANenEKW91bFvV2DUb8no1Ca1 wrrL7kUKJGIZfsOl/Yb8ZkffHXxzB+JTxl1WwBI2uz1welM4xXR5gZJTi9ifGWVEa/j+ qMLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=h+kjnRq3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id u127-20020a256085000000b00d9a56d2944dsi1840717ybb.54.2023.10.27.01.23.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 01:23:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=h+kjnRq3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 50DB782C06F8; Fri, 27 Oct 2023 01:23:26 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235194AbjJ0IXT (ORCPT + 99 others); Fri, 27 Oct 2023 04:23:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345534AbjJ0IWt (ORCPT ); Fri, 27 Oct 2023 04:22:49 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE27F10CF for ; Fri, 27 Oct 2023 01:21:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698394907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2ZxpY1vjsc4zx7bmsbIUQXSJpyxKql+2tTnnsraEizo=; b=h+kjnRq34qI6AfEI2uxkgNJESlFUI3sv3+Zn29cn+MeV7DVViz9mu52RuTej1CXALHznws rcZw33YBGQyn+rCwROU5CUjcxy6hOmwy9G1ccVqV53ur42hnTMxGSUA0FPwCr05tkyuR4Q tmNWFqrFuAN8dbJHXn+yagGXFqmb5Ms= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-442-GnB8q6rWNSyuWShPblyC5w-1; Fri, 27 Oct 2023 04:21:45 -0400 X-MC-Unique: GnB8q6rWNSyuWShPblyC5w-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4083717431eso13759005e9.1 for ; Fri, 27 Oct 2023 01:21:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698394904; x=1698999704; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2ZxpY1vjsc4zx7bmsbIUQXSJpyxKql+2tTnnsraEizo=; b=bLaocZfbCn3p175YGFNY24iuU3EO947KGYCxOpkKQ3/RF4OoJszEh6eJl6xgzKpaYB 3EqmGq/nhAMhhpPs6i8emAhTUhmy3CMwkPKF0GSYsiThEVYfK9Rz5RTc0+UCGpUOdQEy AUZQvSQvdInMCn5onSer70yFFzDCDfOKFVlWHokWZtPyktBgV05VllUbFdxz1vF+XwX/ MhZn6l9AluDqqegptRsDMky5PiWbdDDCp9Qc9SFZjC3eyOTo2pVXFKRc2ammaHkmZakg jyGg7fqiRbLVZd34nFezTfbaZ50wvuu4mnCQMfGbn9r9Lctqbe14FC1AG3BC7a/fqS2Y LTUg== X-Gm-Message-State: AOJu0YyavYqVxgXkD5w4GkMAZQlyh020uLw2OFoef2SdloGjh3yp0r75 DYUxdt3QCzxQIbwAUJtKn2LzhtWXHMZpI9MuFkn9rNY+hQuAzLtny8Tr3zu9OJBukpraVA9WDXc +YdfTlIqtkRRSNueYsBcZNqFt X-Received: by 2002:a5d:6782:0:b0:319:867e:97d7 with SMTP id v2-20020a5d6782000000b00319867e97d7mr1431772wru.52.1698394904067; Fri, 27 Oct 2023 01:21:44 -0700 (PDT) X-Received: by 2002:a5d:6782:0:b0:319:867e:97d7 with SMTP id v2-20020a5d6782000000b00319867e97d7mr1431763wru.52.1698394903737; Fri, 27 Oct 2023 01:21:43 -0700 (PDT) Received: from ?IPV6:2a01:e0a:d5:a000:680e:9bf4:b6a9:959b? ([2a01:e0a:d5:a000:680e:9bf4:b6a9:959b]) by smtp.gmail.com with ESMTPSA id h16-20020adfe990000000b0032dc24ae625sm1225357wrm.12.2023.10.27.01.21.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Oct 2023 01:21:43 -0700 (PDT) Message-ID: Date: Fri, 27 Oct 2023 10:21:42 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] drm/ssd130x: Fix possible uninitialized usage of crtc_state variable Content-Language: en-US To: Javier Martinez Canillas , linux-kernel@vger.kernel.org Cc: Thomas Zimmermann , Maxime Ripard , dri-devel@lists.freedesktop.org, Dan Carpenter References: <20231020225338.1686974-1-javierm@redhat.com> From: Jocelyn Falempe In-Reply-To: <20231020225338.1686974-1-javierm@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 27 Oct 2023 01:23:26 -0700 (PDT) Hi, On 21/10/2023 00:52, Javier Martinez Canillas wrote: > 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'. That looks trivial, so you can add: Acked-by: Jocelyn Falempe > > Fixes: fdd591e00a9c ("drm/ssd130x: Add support for the SSD132x OLED controller family") > Reported-by: Dan Carpenter > Closes: https://lore.kernel.org/dri-devel/7dd6ca45-8263-44fe-a318-2fd9d761425d@moroto.mountain/ > Signed-off-by: Javier Martinez Canillas > --- > > drivers/gpu/drm/solomon/ssd130x.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/solomon/ssd130x.c b/drivers/gpu/drm/solomon/ssd130x.c > index 32f0857aec9f..e0174f82e353 100644 > --- a/drivers/gpu/drm/solomon/ssd130x.c > +++ b/drivers/gpu/drm/solomon/ssd130x.c > @@ -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;