Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3592459rwl; Mon, 27 Mar 2023 16:55:48 -0700 (PDT) X-Google-Smtp-Source: AKy350Zll/foy3kSEFKqRvSOt5A6zOoND46bxX10ob4yhUBeBmlLsivLgTmNSO7dLzcfkASVWtDK X-Received: by 2002:a17:906:25d1:b0:8b1:3131:76e9 with SMTP id n17-20020a17090625d100b008b1313176e9mr13589007ejb.46.1679961348131; Mon, 27 Mar 2023 16:55:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679961348; cv=none; d=google.com; s=arc-20160816; b=CXrhtNL/wmAAcZZUqPPcTNiE+k+8zMitmYIbqfNigEkiUs3OWnnntF+bBdjEtWwwYd GdG8uMjP+gKrTYB3g8xA0KVIcnnBmWcX6wRbPn2Xyq8JIFWP+zv4dYw1AlBIpho1ITBA dousKKTyQUhRTkMq0/oJRq4YqF6wQTpPBrfNAzt+ykDgY8hgleOBNr3fxEGmDc/6ZgH1 cxsGW/0VfycDyQB+LzIH9PyOcq5OvcR3Hu+m9YBXbwYQ4zdWCAhs6JmxMCDD11SwgMnh uZoAyn5a5MNg4Itikah5NDdGTztwHtSoB993hurW00Oz6z3owMLSEo+fuxZaWclHwdfg 1XZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=+HHSCdFOMcHm/qTnYSefeJOCZD07oxZlsWhVPH8z90I=; b=aH9nu5C8uzc/cTan+Gom4WvosBPyUnSzLxVCZCwieWKkbk8DhpyOBoImD6FBTeGPO2 fK1d8sCWrhcx6GrbfdR0ptCR5mDfkv0Zk1Se1rtzlvT0N2OgJmWs/ulRk4/OOUOFx1zw vzpv+p/9+SQjfinxmF9JXCCOnnvaaJPewpjVx3utiqGzlf/rq3XonJKjqrVJa8DUAzxs U3TGktEq5CGmWVmyvyaiZ2MfJnZBiNuGL4JEy6zpbHUaXPnNbDELHPkEUrhCWbJKb6Ks dcXeaaDbQesMlfRY6bBdNYxaoGvy4RYcPbdCAVITTiT6FVihFZx/J8MVGk99/hlJDkFg nAKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XkhgxyTZ; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rg10-20020a1709076b8a00b009446edc65d5si3894186ejc.532.2023.03.27.16.55.20; Mon, 27 Mar 2023 16:55:48 -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=@gmail.com header.s=20210112 header.b=XkhgxyTZ; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231960AbjC0Xqk (ORCPT + 99 others); Mon, 27 Mar 2023 19:46:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229493AbjC0Xqi (ORCPT ); Mon, 27 Mar 2023 19:46:38 -0400 Received: from mail-oa1-x29.google.com (mail-oa1-x29.google.com [IPv6:2001:4860:4864:20::29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A3951AB for ; Mon, 27 Mar 2023 16:46:37 -0700 (PDT) Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-17aa62d0a4aso11065523fac.4 for ; Mon, 27 Mar 2023 16:46:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679960797; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+HHSCdFOMcHm/qTnYSefeJOCZD07oxZlsWhVPH8z90I=; b=XkhgxyTZd9kUR7Mla+hglqBL+D9/RgpyDpo01akjHC4VAuLumOJrjNLjak/QXPcNrc oRYEgpTBzmdQzsXmFXudNZDRN9xrMJ7ZUVOEt3QpMP1FF1owquMp/AEIobLlDc/dM8k1 2YWN/qLuTmP4VZMnIcAbRydw5hR6BxqRGi+009qYQTkX9Y59f4DfxlSWD4rng7LpLXhD lbF/ujVpRDWHyIrh8a8IoNHZxzuflZmFVejEjezfku+2NDz8HvcrkYHXuPgvYaqE5B1N f/ctHuRye3Y3ZVa9sdtg+pMuAHkV+HlyGGOIH6H91wlrnVahQEYrXOD1wO4WgefG4zNy uSuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679960797; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+HHSCdFOMcHm/qTnYSefeJOCZD07oxZlsWhVPH8z90I=; b=52YyWiqSkA6YceQ+kdHLaYdNZMhPPXos+GEz/35NItGtwDFuQ+WfAFxUMftUc3p43P fjzcVE5+8n5kUIOxzNQZ3sCnWrmLOFJf4rZzk/WFvhvzNTgmSj4FNKhCOeE5w0zTZAx3 CGnPjfC/Ybw1dlBIp6utxvLPYzR89PA/Cb1tmiElUPmm+OPNgwjwNUIne0VPwoU1ZyB+ iuDRzdRSx+AX5OOhNEKzzQ1S5K9u7lX6P1OnqAcb1AM2jmR1fMlkwcqjcvMmJzfYdaWG tidAKkbfr3K5s99SagVXX9TPGkaM3AO5KJLhxu+JadyzZgfsstStdkanRfERpGsJ7KCA a+dg== X-Gm-Message-State: AAQBX9cGGYzhWaWuTFfHnqJPLZ8CvF0SSoMBBboTb4LYU4sH2EsoqA3X LM9WCjp6yE3tHkNt1vODfKQ52nbOLWbj5ujL8YM= X-Received: by 2002:a05:6870:7f84:b0:177:b05f:c5f with SMTP id aw4-20020a0568707f8400b00177b05f0c5fmr2712997oac.3.1679960796796; Mon, 27 Mar 2023 16:46:36 -0700 (PDT) MIME-Version: 1.0 References: <20230327233353.64081-1-caionovais@usp.br> <20230327233353.64081-2-caionovais@usp.br> In-Reply-To: <20230327233353.64081-2-caionovais@usp.br> From: Alex Deucher Date: Mon, 27 Mar 2023 19:46:25 -0400 Message-ID: Subject: Re: [PATCH 01/12] drm/amd: Remove unused variable 'r' To: Caio Novais Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Felipe Clark , Wenjing Liu , =?UTF-8?B?TWHDrXJhIENhbmFs?= , Mario Limonciello , Jun Lei , Charlene Liu , Gabe Teeger , Rodrigo Siqueira , Taimur Hassan , Aurabindo Pillai , Alvin Lee , George Shen , Hamza Mahfooz , Chaitanya Dhere , Alan Liu , Mukul Joshi , =?UTF-8?Q?Andr=C3=A9_Almeida?= , Jingwen Zhu , Guo Zhengkui , Leo Li , Melissa Wen , Le Ma , Jiapeng Chong , Martin Leung , Ryan Lin , Brian Chang , Sung Joon Kim , Yifan Zhang , Jack Xiao , Dillon Varone , Tom Chung , Wesley Chalmers , Qingqing Zhuo , "Pan, Xinhui" , Zhan Liu , Roman Li , =?UTF-8?Q?Christian_K=C3=B6nig?= , Wayne Lin , Alex Deucher , Ethan Wellenreiter , Nicholas Kazlauskas , Joshua Ashton , Hawking Zhang Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 On Mon, Mar 27, 2023 at 7:34=E2=80=AFPM Caio Novais wro= te: > > Compiling AMD GPU drivers displays a warning: > > drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c: In function =E2=80=98amdgpu_mes_= ctx_alloc_meta_data=E2=80=99: > drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c:1099:13: warning: variable =E2=80= =98r=E2=80=99 set but not used [-Wunused-but-set-variable] > > Get rid of it by removing the variable. > > Signed-off-by: Caio Novais > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c b/drivers/gpu/drm/am= d/amdgpu/amdgpu_mes.c > index 82e27bd4f038..e0130536f778 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c > @@ -1096,14 +1096,6 @@ uint32_t amdgpu_mes_get_aggregated_doorbell_index(= struct amdgpu_device *adev, > int amdgpu_mes_ctx_alloc_meta_data(struct amdgpu_device *adev, > struct amdgpu_mes_ctx_data *ctx_data) > { > - int r; > - > - r =3D amdgpu_bo_create_kernel(adev, > - sizeof(struct amdgpu_mes_ctx_meta_data), > - PAGE_SIZE, AMDGPU_GEM_DOMAIN_GTT, > - &ctx_data->meta_data_obj, > - &ctx_data->meta_data_mc_addr, > - &ctx_data->meta_data_ptr); You can't just remove the buffer allocation here. If you want to fix this then do something like if (r) return r; Alex > if (!ctx_data->meta_data_obj) > return -ENOMEM; > > -- > 2.40.0 >