Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4646397iob; Sun, 8 May 2022 20:28:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfuUnGog7EmbOTZl7w/f6YTzfiZCHdt0iT5JRKJh55NrqaEC9NL1xKE9XYJNMi8s4TtQ4o X-Received: by 2002:a17:90a:488c:b0:1c7:b62e:8e8c with SMTP id b12-20020a17090a488c00b001c7b62e8e8cmr23927832pjh.157.1652066918663; Sun, 08 May 2022 20:28:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652066918; cv=none; d=google.com; s=arc-20160816; b=iG4PNqxjptba3IIhxQBW0axJqHJvE6K7r4oylZpffcLhxrzNkW3qU03B9lFiuoSiyc MmEbeKD2Vy/CKlX5iD77iqPQWLRx9gDtEE+uXEQJN55wB9TQm4IPVkRduCBlcSaTQbw6 GWOTy7nD2A/Js+n5xrMdDkofreLo6vC3uuW8Luicjm9Y5/gwUCxgsHZ/MYlUiLdTHbG9 QMeg10wOdbNCtppQmj/yRWxhE6tIORVpI5zFgNhiRYQLUAyuZcc+yccSf6KiZZ/R6rK6 d+rDftTlI+QM8ewcIKXd0bPdT/t7r6n6M730mHC48BV+dQm48tkKCPSiCgnGc/GCG8nC 19yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=A3ItVx1AlgQz9xrG3sUVb2odNuGC9onNLhKh26bH4o0=; b=vBjlJQdmn6yN0+RF9v0LEL/zjFtlFuN4xJhIwD1czE8EHlKXjoFqZft+TWcBhUiJtI PkQr759d/HhrFJ+55emD4gzl3fcsXGaz8XXtMx4Dt1KSlT43gWnBV3DYGtryfH5mQ/Rj cP2sqjcXJGgJ+JOkyhLjyjggvsO/y+pkkemEIqC2jk9/mt4dtNvFAcB7LdQsZpoJ+Vro ltawG0M51mQFtg8X6H41IUrgHXyK+9sfU8aXJ9rwXBfPkkVTOZufLv9DUGBo5zCTZ3Xj vDdqMODo6LKPrkGkhHhaBZLXxKyDlrCGnVRkzlrm2DYU1vf2RuuvbTBeskHbXFdzgJ6f nyEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nqO9L2cc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s10-20020a170902a50a00b0015eb08a719csi9506244plq.512.2022.05.08.20.28.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 20:28:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nqO9L2cc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 701B5A66C6; Sun, 8 May 2022 20:27:41 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238612AbiEEC1F (ORCPT + 99 others); Wed, 4 May 2022 22:27:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232881AbiEEC1C (ORCPT ); Wed, 4 May 2022 22:27:02 -0400 Received: from mail-oa1-x34.google.com (mail-oa1-x34.google.com [IPv6:2001:4860:4864:20::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68DD94B87C for ; Wed, 4 May 2022 19:23:24 -0700 (PDT) Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-ed9a75c453so3013569fac.11 for ; Wed, 04 May 2022 19:23:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=A3ItVx1AlgQz9xrG3sUVb2odNuGC9onNLhKh26bH4o0=; b=nqO9L2ccR2RLv0hwu7Of1bMPd1ToYdb0OEmTNEdEXWBBQWWrawL5nsIcTfe7LHb8rk XgqmKSrJuZbBKIOQDX45VSItS592sCDghequZ1qAlJmU9Clu1OZ6+oCtugZLex8ADpz3 NXe5rNZQlEtA7Sw/KGoatTdL8Egct9qIxptDzk/2kqUizNV5NMZYtq+ZXhwzpbXHSfUm JnXcUYoQdez9wkcQm573XA8sLUCgCBXZtSOKDQEn3Ka7c0x9DuLx05KfOCyi7xNoQOuZ dWlhsjjy6e9g/ti7uTyFr/djsXjmgf8dSERB2FWDic5SpEstVrFuzbb0ZnrKdSWUmRcq D2hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=A3ItVx1AlgQz9xrG3sUVb2odNuGC9onNLhKh26bH4o0=; b=E0UtQKQHOBKTy3RILwHPWz0fw9Be9QQWwQfOqcTbDVQgvPojM3oAC/BZDMgr81XTWL pvgLwTKGyanDgfitg2fDeKjNwU/CEN2UQ4/GdIzI9sDIotAStDDXV5of/agh+QZH6a2U ueBnAc7E7zH0Z96AKx6NJIfKloptZAw6zsaWQ8gVt+2pn0+NBeIOtJjo+9ium2b50XcH ly7X1AzPfXhFAKvUqEMd8hpnRY3IlaCW0ftdI2BlMBwrp308rdUZ3EiKqm5r3zCDD/4y bSUbtdy8AdwitybjZDiFuLaWK1JImAaDTIR9Q1hQAqS2B2lOmhA1xbai275GjDwh0scH Z7Wg== X-Gm-Message-State: AOAM5302wyRLnoIFfpbujoWYS/y/mwMekbl6nDa3naF9h2xiVChVJV1m YVeuwbYK/DA4YAiZaejzInHPJrFBSPshxvFwCOc= X-Received: by 2002:a05:6870:311d:b0:de:9b6c:362b with SMTP id v29-20020a056870311d00b000de9b6c362bmr1186962oaa.200.1651717403721; Wed, 04 May 2022 19:23:23 -0700 (PDT) MIME-Version: 1.0 References: <20220505021057.54044-1-chi.minghao@zte.com.cn> In-Reply-To: <20220505021057.54044-1-chi.minghao@zte.com.cn> From: Alex Deucher Date: Wed, 4 May 2022 22:23:12 -0400 Message-ID: Subject: Re: [PATCH] drm/amdgpu: simplify the return expression To: CGEL Cc: "Deucher, Alexander" , amd-gfx list , Zeal Robot , xinhui pan , LKML , Minghao Chi , Maling list - DRI developers , Christian Koenig Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Applied. Thanks! On Wed, May 4, 2022 at 10:11 PM wrote: > > From: Minghao Chi > > Simplify the return expression. > > Reported-by: Zeal Robot > Signed-off-by: Minghao Chi > --- > drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 13 ++----------- > 1 file changed, 2 insertions(+), 11 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c > index 54446162db8b..3d8093bf1679 100644 > --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c > @@ -4688,7 +4688,6 @@ static void gfx_v10_0_gpu_early_init(struct amdgpu_device *adev) > static int gfx_v10_0_gfx_ring_init(struct amdgpu_device *adev, int ring_id, > int me, int pipe, int queue) > { > - int r; > struct amdgpu_ring *ring; > unsigned int irq_type; > > @@ -4708,17 +4707,13 @@ static int gfx_v10_0_gfx_ring_init(struct amdgpu_device *adev, int ring_id, > sprintf(ring->name, "gfx_%d.%d.%d", ring->me, ring->pipe, ring->queue); > > irq_type = AMDGPU_CP_IRQ_GFX_ME0_PIPE0_EOP + ring->pipe; > - r = amdgpu_ring_init(adev, ring, 1024, &adev->gfx.eop_irq, irq_type, > + return amdgpu_ring_init(adev, ring, 1024, &adev->gfx.eop_irq, irq_type, > AMDGPU_RING_PRIO_DEFAULT, NULL); > - if (r) > - return r; > - return 0; > } > > static int gfx_v10_0_compute_ring_init(struct amdgpu_device *adev, int ring_id, > int mec, int pipe, int queue) > { > - int r; > unsigned irq_type; > struct amdgpu_ring *ring; > unsigned int hw_prio; > @@ -4743,12 +4738,8 @@ static int gfx_v10_0_compute_ring_init(struct amdgpu_device *adev, int ring_id, > hw_prio = amdgpu_gfx_is_high_priority_compute_queue(adev, ring) ? > AMDGPU_RING_PRIO_2 : AMDGPU_RING_PRIO_DEFAULT; > /* type-2 packets are deprecated on MEC, use type-3 instead */ > - r = amdgpu_ring_init(adev, ring, 1024, &adev->gfx.eop_irq, irq_type, > + return amdgpu_ring_init(adev, ring, 1024, &adev->gfx.eop_irq, irq_type, > hw_prio, NULL); > - if (r) > - return r; > - > - return 0; > } > > static int gfx_v10_0_sw_init(void *handle) > -- > 2.25.1 > >