From patchwork Fri Apr 1 02:59:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guo Zhengkui X-Patchwork-Id: 12797860 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 98375C433F5 for ; Fri, 1 Apr 2022 03:00:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BB11010F662; Fri, 1 Apr 2022 03:00:09 +0000 (UTC) Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2123.outbound.protection.outlook.com [40.107.255.123]) by gabe.freedesktop.org (Postfix) with ESMTPS id BF0A610F662; Fri, 1 Apr 2022 03:00:08 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YK/4Kksv0qRUCQXOl9ELgV2H3p4d0bFyh9ZkqrYVeS2TYuPSYxt/n/gX8zNECWu4wudt8ZaX9+0H9yHPqhrYx6WgpgX3HcwN2ZZQiAV6HlfUqm5zgiO/IeU07nGuQGlcwzYfwzDywXzYKtnyGwNf8hhDSJDFoPPozTtAbeNa4tWFECnOoAL+3lUr9jW9kBcHhWfAR49ibLeXaPRQbS7bMWf16QkbuGDuBRzwyTlMW7L/rJGlN4g5SV/fV5Nt1eL7MkNu0WZXEXHcZ/tyrKf4mLmXA5myvtTpQgCEnUtpFyQdTeHiewEyoaypjsT44ChJVQzoXuEl3x3GczFggF1J7w== 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=lJ1rRgtFDy1WnNLW2a9FrBZWicHNfdHknBZaI60DBG8=; b=JmOEqcdIs67XkKJjzWUzpcpIqL9Q0GI3/TpSW8s8l/qM2R61h8m+wTONr6llwOX1kej2jo9v+FBMFFy3Lnrd4F/2viC88CmjH7oJzz6o50YROlQe0PZ5fIcnigjj6YQrlMYPc0X+wRu5ud+t+tZcKuthkC6NWajLxZPLgQexPudocpjXVqQt1GiJgzlPQrArzL32207E7LkX4zSZYl+oETxfkqXnRImEoG8hUERxJrSxK3go+efONOZgZer4p/2n0yzHGWAS17HjE9496T4gV/98IEUtzrUDdtEJ3in2nJWYoE0pYuegVCeCLEcAv3Mymz8YmEATOlUwyMdPhw3aCw== 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=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lJ1rRgtFDy1WnNLW2a9FrBZWicHNfdHknBZaI60DBG8=; b=oEsJSvfFqBz6w/jQimof15n9JZ94HufgHZDHNn1sOzcC5tikPtvAfd7cjLB1j7ypInv4n2KUfa3pOy2YifPfYrDDO8ym3+3KC3JUHUwZK8Blk+K/qCFBuvzrNqykRaeLC0brnZM8lp+XNJ9RKMRq2Z0PkBa27pTlbY2RS+SQ/wE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from HK2PR06MB3492.apcprd06.prod.outlook.com (2603:1096:202:2f::10) by TYZPR06MB3904.apcprd06.prod.outlook.com (2603:1096:400:4::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.19; Fri, 1 Apr 2022 03:00:05 +0000 Received: from HK2PR06MB3492.apcprd06.prod.outlook.com ([fe80::5aa:dfff:8ca7:ae33]) by HK2PR06MB3492.apcprd06.prod.outlook.com ([fe80::5aa:dfff:8ca7:ae33%6]) with mapi id 15.20.5123.025; Fri, 1 Apr 2022 03:00:05 +0000 From: Guo Zhengkui To: Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , amd-gfx@lists.freedesktop.org (open list:RADEON and AMDGPU DRM DRIVERS), dri-devel@lists.freedesktop.org (open list:DRM DRIVERS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] drm/radeon: simplify if-if to if-else Date: Fri, 1 Apr 2022 10:59:29 +0800 Message-Id: <20220401025930.16365-1-guozhengkui@vivo.com> X-Mailer: git-send-email 2.20.1 X-ClientProxiedBy: TY2PR0101CA0022.apcprd01.prod.exchangelabs.com (2603:1096:404:92::34) To HK2PR06MB3492.apcprd06.prod.outlook.com (2603:1096:202:2f::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6c606c30-4812-4b96-1f66-08da138bb8bd X-MS-TrafficTypeDiagnostic: TYZPR06MB3904: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: 1cRiIqkCrF4HgehTX7eHScOc6fdBX78lmAvw8wvlVrXEQfsbo4pneXMXnSikKpF+Dv3XocNYtqf+7tDrN0ABAtOgzhM6zmxlJiZCZGrTOIQjPyw3XsUmXbYv+9lwMZoYvKMbvJkmE1V4I0Fe1cPhW4l23Iw94TQSB4MlgQ3Jd6sOzti7WmlbraP5dfjvM8W7TaPkd8WY9VpbvfVYR6TYhn/f9OELW0qlvDnEziw+Dwc1qIoRuugminviXgS0TzNTli+2PYbEVUc7LuLD/npWJAwFJWNCQes8gDUdXN/iRTmJX4OY2cotVnxlmB8WTM9Qg4J1beiFu7eCHBRTIX+FTbXGQwOUhhnjYalER7camU6FtTi77d/MOlLnzofcs3pHtzFSK2ysU+kG821ieQ9QIOz5sRjOCe/BFpUMJT/MuJQvtijqS6wf65Q+688pvV/Lf7HQjfqDMDeNsai4914VJu14mt1YPhQcIjcEuHUnEQM2DHb0ygsukzn2WOEuwLS4WOLP2T0Jf5jdrOhgp49y+P4NsfovNgA7M2IseGd9pGdLeSR7gdieiGQrrA4ls+gmNn2zqnnNOWskZVTYj7AyFbaKgVsnFoCb0lJ2TsSOJEg22eUaa9hzqWhjElE9I3a6SIlweGDoRB1B0nKmnh/KYPE2D0YLLkHWeruSx4ixL3b1Qh71G74ISDpXRCvojGL/jHCfc4XfApCWnVijtwjfIQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HK2PR06MB3492.apcprd06.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(52116002)(2906002)(86362001)(6486002)(110136005)(36756003)(508600001)(6506007)(83380400001)(66946007)(4744005)(6666004)(5660300002)(6512007)(26005)(186003)(316002)(1076003)(2616005)(38100700002)(38350700002)(107886003)(4326008)(66476007)(8676002)(66556008)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: pRxX2MYb7oZRT0fYfQzfWtwMHDsp+fk2PqyTv/3zzeQxWPwG9qrz8PkqLTZhv5zKJ/B0/i2+w8E0M2uTnlj+HBJts/SqnUrwqaW2TYZmLaOFEhj0S9T9Q6jK5s6s3dEnssWLeX2954qDBcEKBBRNWbtIc2QI7nHNfece2Pxf0xU4uh+gdoXEkGfZu+TZ7b1u6a8cQF0LisSEaSzyHvJ8DSsX74p3miOQxBRn9+9rE5KJDpf6HQrB2A8fJaqFmtRoBkLd01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OM636WflsLkw8cDEtKFC6cQU56L6Wpmz8XAVOBtNbU0v6OX8wMH8p5P8wVBy3kt7rHak+GR5zu78/48M9tlIdiSGbaP4atASU7z7uiV5ZjznDeu/UoKZNF8/5XXcnZMbgNhFPfcZ1JX5Sd+ptNDKgdkpyK+Kxkury28iIUGb48s7IffyIcnCbrKFsE8nrJRCe3on/1PrJk0tjtqF2vkprLFcDWMTwtIN2oo1QtkJfizFcJkd0B/366YqKn4mzeEM8hU+ktpr0ErSK4kcFYHLyuNk1oYnOSg9S+5+OOhKKHPBdZ8cyWK5b6agzhMdOoFTN7AwqWRflvyGUiTkCseVo9Sn9swdRx/mEZs71dC/8QuJBOw6OwbKrA5G2MTVPzuJg== X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6c606c30-4812-4b96-1f66-08da138bb8bd X-MS-Exchange-CrossTenant-AuthSource: HK2PR06MB3492.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Apr 2022 03:00:05.0099 (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: sz8QHDhYUNjz0X+KVfTdPgoMM869RirOrewyFx+pQ6TdS3xB/FtsCvpJlnNuMCIciUBZiB8SaEOc4aETMtL9qA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB3904 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: zhengkui_guo@outlook.com, Guo Zhengkui Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Replace `if (!ret)` with `else` for simplification. Signed-off-by: Guo Zhengkui --- drivers/gpu/drm/radeon/radeon_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index c67b6ddb29a4..e765abcb3b01 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c @@ -1629,7 +1629,7 @@ int radeon_pm_late_init(struct radeon_device *rdev) ret = device_create_file(rdev->dev, &dev_attr_power_method); if (ret) DRM_ERROR("failed to create device file for power method\n"); - if (!ret) + else rdev->pm.sysfs_initialized = true; } }