Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1261869pxp; Thu, 10 Mar 2022 01:53:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJzV6BWyKrmt/WdzayHtgcWjEOgexIfyQBq5LTEGqGqihWlbX+P7rpMGGXyMiMAu1c6agW59 X-Received: by 2002:a17:902:7296:b0:151:62b1:e2b0 with SMTP id d22-20020a170902729600b0015162b1e2b0mr4143181pll.165.1646906026503; Thu, 10 Mar 2022 01:53:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1646906026; cv=pass; d=google.com; s=arc-20160816; b=BChwMGHWLjUm3XPq+6w++v8+5ON8CnHUHlPDUj8+vEo7G4c7E2UwQFhGG13t8/nMqk WsKapbUBtXspyarZng61b+Y+UHfxMl0swD09p9VjfV5/1p82haxuZydE06ZbRrwJsZAR 66YMVVuu9ADRlApCd4PFm3dKzzKdMM1TAAphKpn0YgPi5XMdTo51/ovpHzuL+w42G7Cz eOYY1oWNanyOjcSe/XDjXLj3u5+i1efK+/5lSBsKPigNrqrejfiF2VmKDd+7veSLj15W m6Y08V1My0Wd6cNVJE5G88Auy+BN6cy5tA57BpHXlclybZJnkBchbslMPG97PvWkgOrg 4mdg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=8cj0mrCMIs9PN+wOh0LAfWCQY7sBTjA3cZn7v7M0yE8=; b=s9Z5D/anU/UdFCICa5OYZNaChDbnacb7FTvU9eYa7V54Zt34LRrKBNrX5TuNCTJcvf NNRSwu6D1vT681JEqeOW3FDbPCCqPpf13k5jrSRKFsAvftRRaSk2/MXOop79O2QEw74R NSiMsO0BxlkCZ9LMf4bBMpVx+8WeQ4OpABMPqx5alDqSnPLiQaKdYCFzQ3YuJrpY+KHY cmvRHMRxRONtjwIHWQ4KGUmHTYCs4GIy9Euv/L34RiJ/+Fid2d0mfyc+/s3fd6KnUvbZ IgCFkxW6a3xcoNFuBN9rPTEaQ1TSY66hH3bXXu9EOimTJ6gPZac+IeKhNoFsE9rXUBc6 VWag== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Analogixsemi.onmicrosoft.com header.s=selector2-Analogixsemi-onmicrosoft-com header.b=V7v5AZ27; arc=pass (i=1 spf=pass spfdomain=analogixsemi.com dkim=pass dkdomain=analogixsemi.com dmarc=pass fromdomain=analogixsemi.com); 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=fail (p=NONE sp=NONE dis=NONE) header.from=analogixsemi.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u11-20020a056a00158b00b004f775259f28si1389220pfk.333.2022.03.10.01.53.31; Thu, 10 Mar 2022 01:53:46 -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=@Analogixsemi.onmicrosoft.com header.s=selector2-Analogixsemi-onmicrosoft-com header.b=V7v5AZ27; arc=pass (i=1 spf=pass spfdomain=analogixsemi.com dkim=pass dkdomain=analogixsemi.com dmarc=pass fromdomain=analogixsemi.com); 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=fail (p=NONE sp=NONE dis=NONE) header.from=analogixsemi.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240670AbiCJJSl (ORCPT + 99 others); Thu, 10 Mar 2022 04:18:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240663AbiCJJSj (ORCPT ); Thu, 10 Mar 2022 04:18:39 -0500 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2111.outbound.protection.outlook.com [40.107.223.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3179611AA2C for ; Thu, 10 Mar 2022 01:17:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fMCLbDknTwot3pLHzVTMADzwMnV70G+IWCcsBc7kcdagYT6hqSyVVkbDe7LT6RFmGmbA0H8ydxeL47zWXvu0zp6BykDna8MRCziLuHgjNjrb2csm0HWCMNaARxlXnOjBL17JymqiXizUyWxZtj0sI4pbVbbkyZ37wWaz1c53wuV5xejD4zLz6l0rJQ/VdgaUismTlddOzhf9sZmvJdZLJvxtkNSnNae3hjgddNeYOrb8CfPr/anXXPFPOh8ANsm5rzJQM1bDFXC3ZucJTxefOXFBpdU8UFlwr6hKp89nfi44eWcwU1Nx80wGbSaEnxQPoMY74QpAh2QXr6TjgSWmMw== 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=8cj0mrCMIs9PN+wOh0LAfWCQY7sBTjA3cZn7v7M0yE8=; b=F/c4RbhcSPb5ZGSIVmBUd9X6Z1wDIjwcMwPOrjVdxcgw2N/HLgGRR2kJRBSpq3CiYdm8NAoYwec7TSPN3+jb7AUo9MNxs+ZN6qgrDZ7WPjAaCd/K7W2OtQzG1UL8fd6+MMxReGzLw4nBR1ozmgkbETK2ckxBMaKfVolG/F0zCLzFztqu70LCTu872oJq6eFBGli4SFOAr2m3tgQ7jIz5eBsoRU/0pXq+xfsocy8qxSnwL5GisA/suoXr1I/SEc3Gy0sv7GmzW4ivHz9ognDn04zrvplpe/65zYNCnGryJz+tPTTgIArITn0HfCmAsD2g4ekF7A1mGTaMjgzNCehZPg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=analogixsemi.com; dmarc=pass action=none header.from=analogixsemi.com; dkim=pass header.d=analogixsemi.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Analogixsemi.onmicrosoft.com; s=selector2-Analogixsemi-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8cj0mrCMIs9PN+wOh0LAfWCQY7sBTjA3cZn7v7M0yE8=; b=V7v5AZ271MY92kmPPGnKK/8GG0nRD0JAw0OHWLTBnmZ0AWPcIFTcEx9F1cNV2itQDW4O7xGnHnPy4/caa7+fus77IObZnhwb+mkaOnYXdlG4VG5uJRr1EYli8efZJhV2a+HYxQi4GAveqnvj8PvXdvNAuuEwlb4f5pwp/aPjBco= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=analogixsemi.com; Received: from BY5PR04MB6739.namprd04.prod.outlook.com (2603:10b6:a03:229::8) by SN4PR0401MB3550.namprd04.prod.outlook.com (2603:10b6:803:46::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.17; Thu, 10 Mar 2022 09:17:32 +0000 Received: from BY5PR04MB6739.namprd04.prod.outlook.com ([fe80::a865:6d10:c4a9:1142]) by BY5PR04MB6739.namprd04.prod.outlook.com ([fe80::a865:6d10:c4a9:1142%9]) with mapi id 15.20.5061.022; Thu, 10 Mar 2022 09:17:31 +0000 From: Xin Ji To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Xin Ji Cc: bliang@analogixsemi.com, qwen@analogixsemi.com, hsinyi@chromium.org, mliu@analogixsemi.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/bridge: anx7625: Fix not correct get property counts Date: Thu, 10 Mar 2022 17:16:53 +0800 Message-Id: <20220310091653.1298588-1-xji@analogixsemi.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: HK2P15301CA0013.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::23) To BY5PR04MB6739.namprd04.prod.outlook.com (2603:10b6:a03:229::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5b51d5b2-d147-4eb1-6a24-08da0276ce23 X-MS-TrafficTypeDiagnostic: SN4PR0401MB3550:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Wl4LGflbF6LiQ/F59OXpEzJS9V/Zj33ZeMCCETmeEiRi/mhLfqZgLS7jqAmJmFDZY1jpTskrsXEac5yuv3qXHgXMype3wCcsu9ZI/Pzb3nwEpMJ5dPBU2ONglPe6WdnVCVnYgrVzV1OuE4owo1iQXaaTXodSwmCfvwW0BUzs45dnqSNGQrb5RRpgr4LYYYtHcS55UNQbw6FSwkodGYKquNN1d/tzLa6XvRQYkipyfxnt9Aw1byjhM6AOsd9JYUg8EpBIj+uzLWMKb6mY9ypDT7eNOTFVrnpV+xb9AZXBy9zIkRlKEPyiMnrs7gk2yFWrVEaZS6JdkqGlVw8wczv2Fhs6QkKhMxa0DcvuqahBVA0v8E7Tf7ndGYN+qadO+h0LmLeoEzVK+t4tkFpYX6QOqLnLHhhXb0psaXr6rZj7D9kINgTMY0isSBGTxPCM5yWi/4E6ZlN7kKR6hBTJhTyWvLGNPXAff/dke6Zsc33Imb7CXTwVUToWZNPwfeaM5OtbyPB1lJn93xO0/nZwgYiaBd9DmSgo9vom6blAsVWl61KFF9HhgKbvdzr+WCdhjflds4u4y2Lb63FO+5BylBo8igZRORXg5rPdziKH6tItOy+CWmKgCdOgsiG+x2/GtMvM8Io2J/LhtsoiNTUKo7hnaHXPzljriOnjmpHyKzwkMuYqIsJgoFZhXCEHH3CKBzhR X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR04MB6739.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(86362001)(1076003)(2616005)(7416002)(8936002)(110136005)(38100700002)(26005)(186003)(38350700002)(7049001)(2906002)(52116002)(55236004)(508600001)(6506007)(36756003)(6512007)(66946007)(66556008)(66476007)(6666004)(316002)(6486002)(8676002)(4326008)(5660300002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?WonV+jWFy1dkeqejCPnOtBcN+ZFMogCbuqF5p/Tu9dT5m+/e8CypC0pqGWGh?= =?us-ascii?Q?8GQE2J/zEBT0K2f3Uncnkf4nBRLxtJFiW5lAkj0i3Yvqj9hxYPCTeUAP5yq/?= =?us-ascii?Q?xF+Op8wt5rqwhtRi6qJ0GgIbjfAJitbYxpZxaFrpHLwmVOT20V26c3/iRR/Z?= =?us-ascii?Q?VkcbiEsYRjC5yL7ToiNUpz7XXkU0aJJrv3t8YW+HnuhEP91sckMaCaBfZufc?= =?us-ascii?Q?zRFfbJ5X4RwGQLtthFDlXULgPqmkVPk0/+ohgKomnsNmO6RiS3Y90fS24LuW?= =?us-ascii?Q?8SB2m7zGYZXeGeaRC3+zYrCD+MDoLPX2bPnScFRZSgh8AuxtoPKA4lueS1Nc?= =?us-ascii?Q?47rDfIrs+abMmndZU+TuG0sHIlHAihNnOYT7AqE+daENkuiq3GCJ7KccZZ77?= =?us-ascii?Q?OnSjB6ev8EJd+RXsqcoM1C/F0TxCE30F/4dfW8qmxwedSGj6XjVKRjozOD5y?= =?us-ascii?Q?45vVoYQyTPHmza6PPdqSJCESazcYE2fg18Y3m9Mz+fmlD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pICeF8LurtXDW0hGkYirHEl9ArJ6x+/qltPxJt37z8JFDYL?= =?us-ascii?Q?ydDhROnO3eTqVuBAndN3P60/qJYMxQFSXUbV5LgUUA0YXGsJA/gPfnGG91qa?= =?us-ascii?Q?4uMgRO5z1/0zSNPT8sh/I4mVX3XkBYHNR1rWwe2T+TaUOzZ5L99I+WCRPK6Z?= =?us-ascii?Q?iswl/xEyb4ZBgKYrsJsARzbixphWEoffCkI4ULBLJnuvQigOHuGQE6CNOj0f?= =?us-ascii?Q?VRRtm2ERx3Y+N2u8Cxr9S+8=3D?= X-OriginatorOrg: analogixsemi.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5b51d5b2-d147-4eb1-6a24-08da0276ce23 X-MS-Exchange-CrossTenant-AuthSource: BY5PR04MB6739.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2022 09:17:31.6669 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b099b0b4-f26c-4cf5-9a0f-d5be9acab205 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jGDRbZRjgLE9Gi9TyxwCAgmCINN2rcEope4oIOFfuy2VmbXRRXm3NxpSCYrP7qw5VeeB0XsHCxV3+i7ezAtfsA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR0401MB3550 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 property length which returns from "of_get_property", divided by sizeof(int) to get the total property counts. Fixes: fd0310b6fe7d ("drm/bridge: anx7625: add MIPI DPI input feature") Signed-off-by: Xin Ji --- drivers/gpu/drm/bridge/analogix/anx7625.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c index c6a9a02ed762..87081d5b408d 100644 --- a/drivers/gpu/drm/bridge/analogix/anx7625.c +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -1594,6 +1594,7 @@ static int anx7625_get_swing_setting(struct device *dev, if (of_get_property(dev->of_node, "analogix,lane0-swing", &num_regs)) { + num_regs /= sizeof(int); if (num_regs > DP_TX_SWING_REG_CNT) num_regs = DP_TX_SWING_REG_CNT; @@ -1604,6 +1605,7 @@ static int anx7625_get_swing_setting(struct device *dev, if (of_get_property(dev->of_node, "analogix,lane1-swing", &num_regs)) { + num_regs /= sizeof(int); if (num_regs > DP_TX_SWING_REG_CNT) num_regs = DP_TX_SWING_REG_CNT; -- 2.25.1