Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1119708rwb; Thu, 19 Jan 2023 06:55:50 -0800 (PST) X-Google-Smtp-Source: AMrXdXspQtwBhF5MwUDvekSPSjETsp8x+IhBG0OW+yN4WiN0MdDkxGDuhBm8RXEiNGN8r37/d1Vz X-Received: by 2002:a17:906:a182:b0:872:14ea:1a7b with SMTP id s2-20020a170906a18200b0087214ea1a7bmr11180315ejy.13.1674140149883; Thu, 19 Jan 2023 06:55:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1674140149; cv=pass; d=google.com; s=arc-20160816; b=nVsw4GZfIyx4k4aSOMrLoiptjtJ5UtZJJDc6c8jhVvgpo/dHGCrwO0j04ZpaB75Du4 MoFVmz6iGwL7N810nQqbwiXGenPSzOIe8Wnuq8X2TxfmNFtLqFDQw5KkVCETiOpcJ2zQ 0mFTaCErmdjSVcV47gDz17fm8x7eODjTi62WytsV5EnteLi+V8Uc+nlJcGy4gKlhG93R Evhfk7mqA87XAamQWt38UEpTPm5VwM5PyqeKb0bWBCv+DERWiYsUrb2S4INawXdzJB9U 30zD1qWtuJ4grI3woFkeQO1j+JVoEXdM65krgzDnigW3Vs7dcp3Bo1r8ePokt4SvWQDK C4hg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YkmzXP433g36lmVGSWk0FObt+14496EMVIh7i4RMKLA=; b=fLqb18l507VB6hZaVqDEDCJZ8rh5RVLhVpnx952vYKiG5eOR+kipBAhT1koLYFzUGW OA6ogVbUWx0kHwNAWpn3QVv7/CkIXfKAjtQng23WvLeY1OkfSoqPEd19TRF+3/hmhVlh uoxVce+NAUp8tPe6XXwW9/C0hG45NbUGqARv631vZL+E86tfFPhlYWayJkc47f2DGz4x RXWsc8oEjDZzR3U2I6LApK/EFMwsoZGCkbfVdnWMkehQFZE1kDacrns3x2JTd4SLKywE Hm92dIdt2KRpYDitFa0tNYUEnsAEbXleHJEiaaYHRcUhgSYBXhtlCDtuZ3UzCLNH+HtU PO1w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wolfvision.net header.s=selector2 header.b=lffbv7Iv; arc=pass (i=1 spf=pass spfdomain=wolfvision.net dkim=pass dkdomain=wolfvision.net dmarc=pass fromdomain=wolfvision.net); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wolfvision.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw1-20020a1709066a0100b0086e9d66b358si18159354ejc.234.2023.01.19.06.55.38; Thu, 19 Jan 2023 06:55:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@wolfvision.net header.s=selector2 header.b=lffbv7Iv; arc=pass (i=1 spf=pass spfdomain=wolfvision.net dkim=pass dkdomain=wolfvision.net dmarc=pass fromdomain=wolfvision.net); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wolfvision.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231370AbjASOld (ORCPT + 47 others); Thu, 19 Jan 2023 09:41:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231531AbjASOkb (ORCPT ); Thu, 19 Jan 2023 09:40:31 -0500 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2066.outbound.protection.outlook.com [40.107.241.66]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79DEE87293; Thu, 19 Jan 2023 06:39:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mj+75FXRCjwFx9HkyLoSytfSbiB+Ilu07E8EhSdB07IM9YXvdH/EJYuvfJ/4nFXY2wruAmbs0xKDNgCAa8C12UWMZ4ei0gtoHdOcqCkxXXwxQbmypnLqA4Uj315DWSbH34Y0MyVPr0neNSAeM1hDc8JXN7yj4sSHs/UNQawJDa+XhgXwVep4GjK0KkeRQY2gVkrcNC04zE49zlaV2sw3yEDUUY1KQAE+SickklK3JYwIELRnJoozdaVHRLmxk+AGVRxBc94yGOjpLOexB1G8C5kcNN7YCd+7g6AwW/i3NOIsDJ3/G77laviZl0KxFHy+ZCia66sEJxkAWmQWttcUbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YkmzXP433g36lmVGSWk0FObt+14496EMVIh7i4RMKLA=; b=jp+OHkxvaXKRE6sYQDo7pfItEEUawfk9zGk2/0jYqKEuis1PWEYQHSW/XMaX34fvrZ5Bu/gZ+KbxFP0KD3ipWzG/HMEgFhsSFa95OQrgxKqws9kHs1ybv1/4QS9CLyaJHiwLO3HJuExBJ+WNZXEEzzvLrycff9zIf6pHmr1yencaWiVep9+pZm+nZqdfIBzGtN6o6kSMJgDdg7p4Df38zs5/4Lsbr8CV/QNf/STSUwe5z+Xa0V2+KfabH8ULMeC81InZRCtzjKSdIcKmNxRpaQ2LJyNvaBkb2+alKINnh0vd78AUx4+Lo473hKXb7p+glgf+olZ5sGJEy0C4xLVH0A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YkmzXP433g36lmVGSWk0FObt+14496EMVIh7i4RMKLA=; b=lffbv7IvJJ0pFhIdUqN4vpxl3s3uRGHWwBNUMFYsTj6ZhE5ttMZB7whm5a8ycHsQyK+Fg9QXlWmmjZUGiSjzrFpbcxpcDFSWvaW/yMm2pyGDU5ENdxJg8PEBereK1pzcyWsnL5+cev4iCHj5qI+jj0r7vgcPxsJ7EvFIzP0kANI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) by DB9PR08MB6556.eurprd08.prod.outlook.com (2603:10a6:10:261::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.13; Thu, 19 Jan 2023 14:39:25 +0000 Received: from DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::4718:6092:e763:4219]) by DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::4718:6092:e763:4219%2]) with mapi id 15.20.6002.024; Thu, 19 Jan 2023 14:39:25 +0000 From: Michael Riesch To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Sandy Huang , David Airlie , Daniel Vetter , Sascha Hauer , Michael Riesch , kernel test robot , Dan Carpenter Subject: [PATCH v2 1/6] drm/rockchip: vop2: initialize possible_crtcs properly Date: Thu, 19 Jan 2023 15:39:06 +0100 Message-Id: <20230119143911.3793654-2-michael.riesch@wolfvision.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230119143911.3793654-1-michael.riesch@wolfvision.net> References: <20230119143911.3793654-1-michael.riesch@wolfvision.net> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: VI1PR07CA0152.eurprd07.prod.outlook.com (2603:10a6:802:16::39) To DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR08MB9155:EE_|DB9PR08MB6556:EE_ X-MS-Office365-Filtering-Correlation-Id: e307a077-75a8-4286-8e62-08dafa2af64d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pLIOIWTeCLGBbDJ3hBddCSGBttpzzT89GMkFepDXZ7ciDvjsnYRVN1rjN3pV/JQk4q0Fobe90+df+x3h5Ak/BHrJxcpnnz09DEm7o8DmFiSYAjAyuwSbuuKFGuX+EuYcVYnr4oPbMVXd2v47qgTPlbbCRrholk1KJzXGminnwp6FNLcPhX6Wxh2zyS1fRKbnT+HRdijV5kOwkM6zJup1/mUgnuJHXrk4nwHB2H+57F57tsoXkqTCPlGPrIl+E0aB6rM/+8i2BZyNnGWoC7miKusyfDxIap6odBKFwHXM+0uNtUMnzDZxTvw1BygE0lRNqAmuJ8W7t/6VlQ2c249Di4+cgKe6erbTH/oS9QtSAEiQEGNsFbrh2Ckvx+OI96TkHU20TMlSyZSwwbhBF+PIgaRM4+Dn/N9rvbhpjeDRqJBi+bprlKcV/wukl2bQ0ndtDuFZ5NvQ2YLr0ii9Su3Gre+aX5T2aLC6B9cQ5nv4+aemV5015eZWMX/IH3N+So7exnIyHhExELyL63FsDv3n6fuJUzcUKA3BZB5iOB+NcKdPDgpRFkc+yB2eGaHR6T90f0LCMjLDaKzq/zv6cSRr6JAzjP+toaa4Q0wJah298VtHvR7actCKbMbJGTHatriZw0Ud0maDf77IaGxs+JJ3nw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR08MB9155.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(376002)(366004)(346002)(136003)(39850400004)(396003)(451199015)(2616005)(52116002)(36756003)(478600001)(6512007)(8936002)(186003)(6486002)(5660300002)(83380400001)(41300700001)(7416002)(38100700002)(44832011)(316002)(1076003)(66556008)(66946007)(66476007)(86362001)(8676002)(2906002)(4326008)(54906003)(6666004)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?0lPkwXv+0eEWl9DI7JUrW8QFFLdYUgC0deK0Xvli06M/fhULcHjh2JIlafZ9?= =?us-ascii?Q?7NSyqLQRkvuopuRPaYBZEPz7OY0NbpfwEl95hbQdZSZVwEBC2+swUEqW03nm?= =?us-ascii?Q?YNVwCyyGPmY1//C0vw/j/+nLE85larCeWPLJFhpzW5qrZdZrbEFxEkeF7Lqh?= =?us-ascii?Q?ck1JOnmzgeYklWEuKCgRab/WonUfv+k93+h5rSfN5Pex/V3e9BadBB1JVNQi?= =?us-ascii?Q?A9IEyWEpce3XYj3ImGzUotSogizC/UvI3Tloph87HZA7Co7seuBAgRdQAULL?= =?us-ascii?Q?L7S9Qo1Xh1bwpA8xJGxPJo/zTu8iUWjn6IB6q+CL6cNXVNIH6cp2KvfLZODs?= =?us-ascii?Q?AG6mD9OZbm8k8FFOXXD+BbpmGMfrtogBpbDDguDO8lrUPPoXWpPqeM+rBSlx?= =?us-ascii?Q?g4zWTWFZnJaT/eD/C4GRjFmNvxn2Q0AW+rYMRQIzTQxp4gzTuYkAP6zs0j8Y?= =?us-ascii?Q?VCrbMS/uEfb8EJQ1QKCekBbgKk6F96ZxWxD1cSqXbwED+9ZMdNFilMFctVJL?= =?us-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wc9XzyfvoL00O4qq?= =?us-ascii?Q?B++ZsvflrDcCuw2jp7GK5dj67AFBS/5KeK62SlKGQQgw7c2ALBxilCfFLD3N?= =?us-ascii?Q?0Yy3DbcL5ffUIBL+5wBgVp8DKCurhIHiqYRUSZQ/oDPYBS5py/7+FnN7Kfxr?= =?us-ascii?Q?JW4oelYU/imhsd1hE27JxLt0cUvFYU2DFB/RGBfsaP6lgSgW7crlRrhKs8OI?= =?us-ascii?Q?PE7v6kEbBjXp0mA75+dPPpjvhpyIbUe1YMqng4QyU+7bUduJ+us9Jssn7MtU?= =?us-ascii?Q?eYb3SB/Ig+/yNcpMDOJ6UzNJ9/o=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: e307a077-75a8-4286-8e62-08dafa2af64d X-MS-Exchange-CrossTenant-AuthSource: DU0PR08MB9155.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2023 14:39:25.5600 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Ev9n9lWn28ZvX4uLV7i+Q06HoBohrCitVJcOOUf75H63iqXjwkYFyXtooNJn58uGW+gfqyYi18kne+n6gEjVq4jeQLk9VZslfbN4toRxO+g= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6556 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The variable possible_crtcs is only initialized for primary and overlay planes. Since the VOP2 driver only supports these plane types at the moment, the current code is safe. However, in order to provide a future-proof solution, fix the initialization of the variable. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Michael Riesch --- v2: - new patch drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index 8cecf81a5ae0..374ef821b453 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -2322,10 +2322,11 @@ static int vop2_create_crtc(struct vop2 *vop2) /* change the unused primary window to overlay window */ win->type = DRM_PLANE_TYPE_OVERLAY; } - } - - if (win->type == DRM_PLANE_TYPE_OVERLAY) + } else if (win->type == DRM_PLANE_TYPE_OVERLAY) { possible_crtcs = (1 << nvps) - 1; + } else { + possible_crtcs = 0; + } ret = vop2_plane_init(vop2, win, possible_crtcs); if (ret) { -- 2.30.2