Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp516890rwd; Wed, 31 May 2023 01:21:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4qOSn94z1aEITDI4KTO+pMVc/vf/A7i3FXKO+Tbs9OCeMMrjjp8lfuEL9cP3O1dg8Glhek X-Received: by 2002:a05:6a00:114e:b0:64d:123d:cc74 with SMTP id b14-20020a056a00114e00b0064d123dcc74mr4904383pfm.4.1685521287452; Wed, 31 May 2023 01:21:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685521287; cv=pass; d=google.com; s=arc-20160816; b=lR08xOC98a/SyM64GrJK0ySQ6/i/6o4pDibh0tohHGgFfCkLyHt2orXTnniu4X0M6H SosVPmxDuxNRMETIsqomQeVxuoGUTFAdM60g3Y+VeqNs807BjzLEjMB7U6+PA66CKx4i 2aiXWM1nEk1i7Pa404pX0CO3gcZDJTifZjxOhpD2Fqgl/Y6A+8EN8LRjzKiUn5PbsgRw wwMWlE8KacDmWCq+Whhbi3voPkS6+KvJSpYcXf17RqvIJaqQ6LNZp0J8DYi1GXHMCJQN qnGfYAVZGtYYb44aFRt4M8y4szIRhhl7mNmM+P9NYPZiVpo4ImGViIVhLBRz5uHA4IN0 bXbQ== 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=bWcWb4kBK15aAmXyOXHcgMskBxsxfIStyeHH/5j6LSE=; b=cAdM4eFZQwl6QMeUgkNh9dzWV5pc7qtV4bAnsRmIXwTr/PrFIO8+PWiTBAD5b/vY73 ELAAPeMhouAauxCfpJYX6US6woxOmUDl/u90oCOXeWfSRetrl6AB72Ddzf+3zeiYW19d AZ3UzhxI3XY0Ru/PNGi89Pjh73oXrFmqYHOck+LPM5tZG/M0UM3V4g92H6WgUpHad74L O1GUfguLrGipyuQX7sa5HGnX4ZLfNtv9+X2ywXz1OfN4myPyPLDx2GM3TKSGqpV7nAso tHilpahA2A7kyeEdCbB/A1TZVLl60eTZRu0Chxl1g5pTalpLQeP2oWeQokKSi5SHiCdF xINg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=l3cnqhWn; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a22-20020aa79716000000b0064d2b0cc8f2si3112630pfg.150.2023.05.31.01.21.15; Wed, 31 May 2023 01:21:27 -0700 (PDT) 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=@vivo.com header.s=selector2 header.b=l3cnqhWn; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234702AbjEaHiU (ORCPT + 99 others); Wed, 31 May 2023 03:38:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234706AbjEaHiQ (ORCPT ); Wed, 31 May 2023 03:38:16 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2131.outbound.protection.outlook.com [40.107.255.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2568C185 for ; Wed, 31 May 2023 00:38:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jjqhyX6dn+EBbiYsmKMl4nj+Hp/GVpG2x+WtdLtxUMPJOvZ+Z3CHnm7t2Ez8v7mHLd8XLOKpaEz2LgHmMerVmUCRPGdAgMHSBfNLQhu4Vk2KWAsjkHc1GGnPOM87EJpp/y3eXpB8hVvORGk3FtExnvUhHthxSsIz9s05d3+1Xa4TMc/DvdAooPedxaEqn7IXu+L8/FtXNIS7fsEA/LNicp1EA0M1kAocHZkHP1vOcVzXcilIRfPl9AqNY+db9+gi5/Ihkim9sRSCsjuU33LjLkByUTY7TnK2ml6jhy+fM3n5KzHmqNh4IjDQOtOdm0I8wHOkpS0VvPU6o3PK9SvKJw== 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=bWcWb4kBK15aAmXyOXHcgMskBxsxfIStyeHH/5j6LSE=; b=RUc6MgWLj+x15k2m58H6lpR1DsBXhtHiSEa12n755w6jAaHmp811JMl6T6ALTkSS6qf8LTUOnEsdmmYMXQ7cQh36+k73sSLnjYvDi8iQLnxbcbcC7qUJc7+nGuCQKCgRcn0TUvCBW0Sraar4yhnslcVaOkGHDgKm2fwDXGjbAkxkGxeWHue9Hhit2DJvq/8kgDicTdMy4XR0uD47aO9g1KqwY1P0RSo7kJ9bhvGHH3nylOsZx/KR7l6ibXltX13DBCOuuvsoj9zNcuRAfqyZiBeqPA2o79J0ymPR3noFACpnGF4G7cPukOE7tLvch8xrdwcuokQT+XmH2/70aq9LuA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bWcWb4kBK15aAmXyOXHcgMskBxsxfIStyeHH/5j6LSE=; b=l3cnqhWn/kmPtJ+4TgblP2373uJTumCMy/oOT2PxmHOVRczPEzolrHB9PjTNmusMtI6H+3qY8t31hyVnUNFcF0T2w++AKDdTnoQSffstS46oU2l/3KVOJ6gXiMn8TMozyzQsgOb5pZkVvJTw3UlOJXCEZ5VJ8RyLzhGVRifuYkDaImfRXZsQH8OsGvAR1P4SmwPnE4g/U12l4OVluqQJzXyFoc3Nzanh5tIKqUXhOsxUs04i+Aq3hf4LKi0SflU16pFzctQzdNS9PBvsqIU6USNrUKlXW0qG2Ec94xrVcCPArTkltOqSVYkwxSZV9C4G9n8+gdi3GceW/fnjP2Csqg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from TYZPR06MB6697.apcprd06.prod.outlook.com (2603:1096:400:451::6) by SEZPR06MB6457.apcprd06.prod.outlook.com (2603:1096:101:17e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.28; Wed, 31 May 2023 07:38:03 +0000 Received: from TYZPR06MB6697.apcprd06.prod.outlook.com ([fe80::f652:a96b:482:409e]) by TYZPR06MB6697.apcprd06.prod.outlook.com ([fe80::f652:a96b:482:409e%5]) with mapi id 15.20.6433.018; Wed, 31 May 2023 07:38:03 +0000 From: Lu Hongfei To: Artur Weber , Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org (open list:DRM PANEL DRIVERS), linux-kernel@vger.kernel.org (open list) Cc: opensource.kernel@vivo.com, luhongfei@vivo.com Subject: [PATCH] gpu: drm/panel: Change the return value of s6d7aa0_lock to void Date: Wed, 31 May 2023 15:37:51 +0800 Message-Id: <20230531073751.48451-1-luhongfei@vivo.com> X-Mailer: git-send-email 2.39.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: TYCP286CA0129.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:2b6::17) To TYZPR06MB6697.apcprd06.prod.outlook.com (2603:1096:400:451::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR06MB6697:EE_|SEZPR06MB6457:EE_ X-MS-Office365-Filtering-Correlation-Id: 3f0abbb8-8b0f-43f1-ed61-08db61a9f76c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LhZ02FFtlfNJQZ+wn9ONaFGJwv2JHF3fHfxp9/g5+sEcAmTBCFyPeJ+HOTP5C7/uVdJaJ4FnQ+vcI3a3Wstc4mlWm5YZN/Pw5M71cZSBvnkI3cYi9XjV567itcZqda5k8uXPdMswcpbK+5Ctz7gpA+5jAmvsxfzMf7Qe4hCrdupCsGWQU3WgsSIChPASZBp9OZvwA6KYPUbcWiA9ZxgsGY80tFQb/YbowiaVC+oOFavPPGM/bJl+nnETOA8xzz5TWOd36ed3CJrh/yb53odyOwdf5m3UJlMRDmRIEpUuhAeQjOx7XzUpxJFRifzxa1u/1LMJRnW5JR+MhyhQ3iPpFdPjQVxmdOgwGNNlPneuoCOMd0uwBugNvtzKkX+igVXyV6g6BmnyHl0tQZ+esUl9df/naDcoOu/kx5nRf5d2ZefMRYMduJZ+C+dqzmAtD9GYqfVADKBPtARFiRp0O/1N/Eb30yZxPz4KmORyB6uQJXZoFsZybRKuBGSesmVxX5B3ZsonFEDoSGIxyD4v/M36JkiQ/PchUBd60rF2RVQ0ANxS6VFQadkDL56r6rlZTyvacHPO0IPdmas5ueZKskWDb/UJfI6iAsrTEntpNg5j+qzJPGROdNOwsv0HiB6L7+CV X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYZPR06MB6697.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(376002)(366004)(136003)(346002)(396003)(451199021)(66556008)(83380400001)(6666004)(478600001)(4326008)(66476007)(66946007)(110136005)(26005)(6506007)(107886003)(1076003)(6512007)(316002)(52116002)(6486002)(41300700001)(2906002)(186003)(38350700002)(38100700002)(86362001)(36756003)(5660300002)(2616005)(8936002)(8676002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?cNasMst5luVph0lIZU4skspDMPcyzfKIRu5cIts7z39p4OrwBdmdhmih6Q/G?= =?us-ascii?Q?1XRqtLhjpKwdI7ay53NaHXPRktWYN0HPytVFgQ9+XAMwfHIS2zXiqCdN7brD?= =?us-ascii?Q?o2xmbbadktc2wBJ0LeKAtpDUxjHPZWWeg1w4pft76csxXR84Rs1dhHVWWh07?= =?us-ascii?Q?e665Vg8umn+OFbW9+Fhz1C8hLSG2q31FwqhytODkPR9yDam09M/OfBCpsXTk?= =?us-ascii?Q?teFN0eqtSG9Fo6TgYZhnA7jlLdMSyrEnWKLApD4jxufuahJlTwnr3rcTloDh?= =?us-ascii?Q?HbTJYFM1grPSRbtpVAost3efPsCwgMsaTMWR8pyGWlSHWZs0570ivuaQQFJ8?= =?us-ascii?Q?LizslrCFkj5f78HNIt4c+YUBzQMA+KVT5BpejCqPDuNC3KvH4wjiUD5Pbfhm?= =?us-ascii?Q?BpedNBilLq2eChjXEsTZLTc1LmL+B1SNvSdHtGZZG9u+I1LlRasHqIYem1OU?= =?us-ascii?Q?++gRRQJUHnGhNLolPS1PdunHaCCBN/tsevj3ArXfvbK/OBhsKDeDjagSNpZr?= =?us-ascii?Q?zJ+Nv30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VkmScgh?= =?us-ascii?Q?ghJzmI0WB2pWeoo8v9EqENRx5BTjX2Ms767n1oINAKwkhJjQyNudnRtZ1C8v?= =?us-ascii?Q?ZuEK/l152XPOzUMpcIWSZlrSFL1UCaUNnx3qAR2b8swqTN4fUSgKe9Gimm9R?= =?us-ascii?Q?4FAcsaqFi+LPrzqA9d33O/ul42x8+kHURINsuUhh?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3f0abbb8-8b0f-43f1-ed61-08db61a9f76c X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB6697.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2023 07:38:03.3840 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: aikAzb2lWHGB3WIbZubyxKbIYWxxmWxatNkMt0qxiy7TRJE2gn3zEk8bB8C+aHHpoQp1E/dBv01iZTXI+ZILTA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB6457 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,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 return value of s6d7aa0_lock is meaningless, it is better to modify it to void. This patch fixes this issue and modifies the place where s6d7aa0_lock is called. Signed-off-by: Lu Hongfei --- drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c | 29 ++++--------------- 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c index 102e1fc7ee38..c5924e7b9e36 --- a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c @@ -63,10 +63,9 @@ static void s6d7aa0_reset(struct s6d7aa0 *ctx) msleep(50); } -static int s6d7aa0_lock(struct s6d7aa0 *ctx, bool lock) +static void s6d7aa0_lock(struct s6d7aa0 *ctx, bool lock) { struct mipi_dsi_device *dsi = ctx->dsi; - int ret = 0; if (lock) { mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD1, 0xa5, 0xa5); @@ -79,8 +78,6 @@ static int s6d7aa0_lock(struct s6d7aa0 *ctx, bool lock) if (ctx->desc->use_passwd3) mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD3, 0xa5, 0xa5); } - - return ret; } static int s6d7aa0_on(struct s6d7aa0 *ctx) @@ -238,11 +235,7 @@ static int s6d7aa0_lsl080al02_init(struct s6d7aa0 *ctx) usleep_range(20000, 25000); - ret = s6d7aa0_lock(ctx, false); - if (ret < 0) { - dev_err(dev, "Failed to unlock registers: %d\n", ret); - return ret; - } + s6d7aa0_lock(ctx, false); mipi_dsi_dcs_write_seq(dsi, MCS_OTP_RELOAD, 0x00, 0x10); usleep_range(1000, 1500); @@ -266,11 +259,7 @@ static int s6d7aa0_lsl080al02_init(struct s6d7aa0 *ctx) msleep(120); mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_SET_ADDRESS_MODE, 0x00); - ret = s6d7aa0_lock(ctx, true); - if (ret < 0) { - dev_err(dev, "Failed to lock registers: %d\n", ret); - return ret; - } + s6d7aa0_lock(ctx, true); ret = mipi_dsi_dcs_set_display_on(dsi); if (ret < 0) { @@ -327,11 +316,7 @@ static int s6d7aa0_lsl080al03_init(struct s6d7aa0 *ctx) usleep_range(20000, 25000); - ret = s6d7aa0_lock(ctx, false); - if (ret < 0) { - dev_err(dev, "Failed to unlock registers: %d\n", ret); - return ret; - } + s6d7aa0_lock(ctx, false); if (ctx->desc->panel_type == S6D7AA0_PANEL_LSL080AL03) { mipi_dsi_dcs_write_seq(dsi, MCS_BL_CTL, 0xc7, 0x00, 0x29); @@ -370,11 +355,7 @@ static int s6d7aa0_lsl080al03_init(struct s6d7aa0 *ctx) return ret; } - ret = s6d7aa0_lock(ctx, true); - if (ret < 0) { - dev_err(dev, "Failed to lock registers: %d\n", ret); - return ret; - } + s6d7aa0_lock(ctx, true); ret = mipi_dsi_dcs_set_display_on(dsi); if (ret < 0) { -- 2.39.0