Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4344974pxb; Tue, 10 Nov 2020 14:09:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJwW2tMjQdefUxwXDgfYVlHwX4ZjT+Ex2ITkgGELnSRCJPYR/u/0MeXeJSJ77f9Ij2Sdr2Wl X-Received: by 2002:a17:906:868b:: with SMTP id g11mr22529316ejx.263.1605046181130; Tue, 10 Nov 2020 14:09:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605046181; cv=none; d=google.com; s=arc-20160816; b=mSkYIjc8rWOQu5wl+TqUKRaN1v9PKGH52jx3+V6e1MgAB9RXIXW0ySTL0NGSbFJ1R8 HZmxMhNCseK2rcRhZWFS/tHUhxKIgvYDTIarpuO9zl7cvQ7RjPeYk+9IgBj6SXUBufMx yBpiZnMYWpQFLAhYSqf7p6zd7SorPKlbwFFp2/tLtF8mqg+eDml7yxxfr8WtLMulwgGM JMdBgW2nkf/aznBBrz+gGWHXKgoukqnphfiBlkPcTRH16qdF//ubmBYU8455aHtYCZ67 KpP8dH3R/uFuA6fJNItrsPfHBrFqqHNFgH3j7l7GL/C0w4++KLi2V8bbJfV+INykdh3N 2UiQ== 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=qZToJzWvZIM70EuRiQ7NoVEKN6DZ5AQGlu/l0sYJbdo=; b=Nw7dYK/FfD7XqEi4PBkxSrukM2Z9USu6x/XO41X7ioKMVfU1Y/m5qB3L5OQkv34pQi xKhTmCTD1VcV2mZV+NWpYIOrj4jYMilGDGhS/p5coz7W1Mp46QaRPH29vJhIcHpWqdI8 MsCicz/wEGo3BfwCZlxGPyGMFjqrJNRkEvNgE+dm5rCLBjs+nGBP5rTiiZGX+zb0Ryq2 WgsH4vhBNykfFAqv/Tv6FXL31e2G9sMb1ikWA2hmyAqa7xiYKlzjh4S4llJ5Ofg5noze ZubMEermHpDVbwDGz8BtR5casHOOKRfaFfWnADqJDFCfejV+ViFClopRIpRxXoSNWKFw qy6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XjyOicW3; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qc1si10163325ejb.315.2020.11.10.14.09.17; Tue, 10 Nov 2020 14:09:41 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XjyOicW3; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731997AbgKJWFX (ORCPT + 99 others); Tue, 10 Nov 2020 17:05:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726467AbgKJWFW (ORCPT ); Tue, 10 Nov 2020 17:05:22 -0500 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A0CEC0613D1 for ; Tue, 10 Nov 2020 14:05:21 -0800 (PST) Received: by mail-wm1-x344.google.com with SMTP id a65so4694751wme.1 for ; Tue, 10 Nov 2020 14:05:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=qZToJzWvZIM70EuRiQ7NoVEKN6DZ5AQGlu/l0sYJbdo=; b=XjyOicW3O9YNxvhwetYYen8NIUXx6DtxhfHeM3eeS7dRqHQTVCI2YXrvlAXna8ubw4 91hNbvU5rvEipK0xYxRb+aAFeCVhGN3sXSmKvT9uMnvyRjKZK0MVQZsLsUW0y1NuThB+ qpIQUWf4Q0V6cxCuoEiAk5gvoYEqve6tboDkF4bzKsMEEGMaDqknFVAuHon1tPSxft88 V067xL1LNtenmB1IGjhefnjnAd+OSJwQqSxSxYntaqlXt+tfZN5Xbu9/CPyqNV+M53Nd jgI1xhFvjcpsQuqb3xpH/SxHFKAFKgfzkzozf2vYODBsdHbjTBxXZ59zgeTdlvW9/9y6 K9+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=qZToJzWvZIM70EuRiQ7NoVEKN6DZ5AQGlu/l0sYJbdo=; b=R8EcXZZ+VcWfGzSu8TVMNm2DO/q8VOPLDOdIaMX7ZXj43T13iItQXniQVN9tWZc9ah FIDv4xLf1t0NOHNt9HFYOKjQqXScLA2BK+yBEUjPV5sRGKOyukxdw45n2U3DE+ChdswQ AgBeSsHyDRyEuDxXAb4iHAL7UuIuWz8iR2SWCAi8FFZfbVYS7NE96YR509DUCW+LuQyL J3vFxzL5M72IXg0kPyub7uTlRQJn0XYFtDClUap80JHnVHdXOsa17jtqKXmBJcvXjRqG nq++Pe9K2X6b8MOvFId3ZiEZ5qCXhr5HlszOv0gAVCZNhCInQTEQj2BNoyzCkPclrzPb E76g== X-Gm-Message-State: AOAM532F/0PS656odAkgVxJ0Uiy3LHqam8eGQ0B5pfd2lls98P8sIMzK eCcD3cLYkRa0unjqi+Gy8nQcChrVAwr/3mWwc2Y= X-Received: by 2002:a7b:c157:: with SMTP id z23mr246689wmi.70.1605045920104; Tue, 10 Nov 2020 14:05:20 -0800 (PST) MIME-Version: 1.0 References: <20201109211855.3340030-1-lee.jones@linaro.org> <20201109211855.3340030-2-lee.jones@linaro.org> In-Reply-To: <20201109211855.3340030-2-lee.jones@linaro.org> From: Alex Deucher Date: Tue, 10 Nov 2020 17:05:07 -0500 Message-ID: Subject: Re: [PATCH 01/20] drm/radeon/radeon_ttm: Place declaration of 'rdev' in same clause as its use To: Lee Jones Cc: David Airlie , LKML , amd-gfx list , Jerome Glisse , Maling list - DRI developers , Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 9, 2020 at 4:19 PM Lee Jones wrote: > > Fixes the following W=3D1 kernel build warning(s): > > drivers/gpu/drm/radeon/radeon_ttm.c: In function =E2=80=98radeon_ttm_tt_= create=E2=80=99: > drivers/gpu/drm/radeon/radeon_ttm.c:611:24: warning: variable =E2=80=98r= dev=E2=80=99 set but not used [-Wunused-but-set-variable] > > Cc: Alex Deucher > Cc: "Christian K=C3=B6nig" > Cc: David Airlie > Cc: Daniel Vetter > Cc: Jerome Glisse > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-devel@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > drivers/gpu/drm/radeon/radeon_ttm.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon= /radeon_ttm.c > index 95038ac3382e2..a8c915920070f 100644 > --- a/drivers/gpu/drm/radeon/radeon_ttm.c > +++ b/drivers/gpu/drm/radeon/radeon_ttm.c > @@ -608,21 +608,21 @@ static void radeon_ttm_backend_destroy(struct ttm_b= o_device *bdev, struct ttm_tt > static struct ttm_tt *radeon_ttm_tt_create(struct ttm_buffer_object *bo, > uint32_t page_flags) > { > - struct radeon_device *rdev; > struct radeon_ttm_tt *gtt; > enum ttm_caching caching; > struct radeon_bo *rbo; > - > - rbo =3D container_of(bo, struct radeon_bo, tbo); > +#if IS_ENABLED(CONFIG_AGP) > + struct radeon_device *rdev; > > rdev =3D radeon_get_rdev(bo->bdev); > -#if IS_ENABLED(CONFIG_AGP) > if (rdev->flags & RADEON_IS_AGP) { > return ttm_agp_tt_create(bo, rdev->ddev->agp->bridge, > page_flags); > } > #endif > > + rbo =3D container_of(bo, struct radeon_bo, tbo); > + > gtt =3D kzalloc(sizeof(struct radeon_ttm_tt), GFP_KERNEL); > if (gtt =3D=3D NULL) { > return NULL; > -- > 2.25.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel