Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp401318pxf; Wed, 31 Mar 2021 06:22:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypV8CH3/1E0mKAm8UJIYmFwxKmrqMwOAGVPe08A9ZoSn7CG+8FEr2KXMkZsLIQ4svZzee7 X-Received: by 2002:a17:906:3409:: with SMTP id c9mr3489327ejb.314.1617196968910; Wed, 31 Mar 2021 06:22:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617196968; cv=none; d=google.com; s=arc-20160816; b=REFfoCaZkcSq5bqtNxyR/tz0paohfubJNousuiKV+M4H0Hdz4Yb/cVVkYoyk54LkWf K7yIPg3HkTtMjeMFrYPtgRv3DbqEWO/BpOEJluaP84CcQfTNxuB5u37r1TZF7/9chp6F oRDe+WM4MvtMGL8imXJMcCdTKS9AppsmbiXv+Ge+uuFq9vO/67GgfxtIAHPBWkqtxaVk ZGQFusiTVIQKJjunL1P0TZoGdGkYiE9Xifg1XAPN7XhIjJINdP+m9abGf5U4mtwMeY65 gmj41kdabHN0Km+ClVqAwtTNqn/OM6ZG21zaJlpTQThnSmKDmJL+LJlkapzuqoFYyBqt oHRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=hDt2gGuCi6zVohm2A9qLKk8AcNEE4uha6vsbE3A7Hio=; b=WdZbJ75WZvSbJPMBXzYRxwcbQ6U7SiG2tbl8gJhsNVvjqqod/LzNHCTDC558Nh+7pZ YmIhF70CPKsxyfLod5ASs8BE2Y2AmyXUWxNrx/Iae36fzSRI56QDJmAPaGcfy4gy9G/R 7lw5+6UO1z1BZYxGvkzuD0BuWTivi6WHwuADL9Vz6JkuCTisX1nVNXl/MEeBzWNiCzAh Zra/c5qIWHK3wrUuVW+CyaPq8+o62MDYMUnwGZQHOSCultydKmyWapdFys0IF/VmrfZf A+2cz4fJD8V/v5vC85n3BDEYbG60uo3UsrVik7/Pr7rlVdJ+1r9XI0kcbstFj+F+rIh6 B4cw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vivo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d15si1776827edv.309.2021.03.31.06.22.26; Wed, 31 Mar 2021 06:22:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235855AbhCaNVq (ORCPT + 99 others); Wed, 31 Mar 2021 09:21:46 -0400 Received: from mail-m121143.qiye.163.com ([115.236.121.143]:34800 "EHLO mail-m121143.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235784AbhCaNVN (ORCPT ); Wed, 31 Mar 2021 09:21:13 -0400 Received: from ubuntu.localdomain (unknown [36.152.145.181]) by mail-m121143.qiye.163.com (Hmail) with ESMTPA id 383AD5404CC; Wed, 31 Mar 2021 21:12:11 +0800 (CST) From: Bernard Zhao To: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , David Airlie , Daniel Vetter , Guchun Chen , Hawking Zhang , Dennis Li , John Clements , Arnd Bergmann , "Stanley.Yang" , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com, Bernard Zhao Subject: [PATCH] drm/amd: cleanup coding style a bit Date: Wed, 31 Mar 2021 06:12:03 -0700 Message-Id: <20210331131205.60710-1-bernard@vivo.com> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZS1VLWVdZKFlBSE83V1ktWUFJV1kPCR oVCBIfWUFZQkhJS0seHR4fSkxNVkpNSkxKQk1ISEpNSUNVEwETFhoSFyQUDg9ZV1kWGg8SFR0UWU FZT0tIVUpKS09ISFVLWQY+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6NSo6NSo*DT8SHjVCGSoWNEgc MzQaFAJVSlVKTUpMSkJNSEhKQ0JIVTMWGhIXVRkeCRUaCR87DRINFFUYFBZFWVdZEgtZQVlITVVK TklVSk9OVUpDSllXWQgBWUFJQ05KNwY+ X-HM-Tid: 0a788869b23bb038kuuu383ad5404cc Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix patch check warning: WARNING: suspect code indent for conditional statements (8, 17) + if (obj && obj->use < 0) { + DRM_ERROR("RAS ERROR: Unbalance obj(%s) use\n", obj->head.name); WARNING: braces {} are not necessary for single statement blocks + if (obj && obj->use < 0) { + DRM_ERROR("RAS ERROR: Unbalance obj(%s) use\n", obj->head.name); + } Signed-off-by: Bernard Zhao --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index 1fb2a91ad30a..43d17b72c265 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c @@ -449,11 +449,10 @@ static ssize_t amdgpu_ras_sysfs_read(struct device *dev, static inline void put_obj(struct ras_manager *obj) { - if (obj && --obj->use == 0) + if (obj && (--obj->use == 0)) list_del(&obj->node); - if (obj && obj->use < 0) { - DRM_ERROR("RAS ERROR: Unbalance obj(%s) use\n", obj->head.name); - } + if (obj && (obj->use < 0)) + DRM_ERROR("RAS ERROR: Unbalance obj(%s) use\n", obj->head.name); } /* make one obj and return it. */ -- 2.31.0