Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4035856ybg; Fri, 25 Oct 2019 12:23:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqylbW5xsUAjK+7zu3cH11tkc/sNsSVppqYowVmpzW0mOoh9deDsAMMYjdSky2zuWc/aWUFW X-Received: by 2002:a17:906:670c:: with SMTP id a12mr4986631ejp.273.1572031421901; Fri, 25 Oct 2019 12:23:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572031421; cv=none; d=google.com; s=arc-20160816; b=SfUTL/Oomfpry0b50si5WRuhTf9rzHzO4lQv/UN3v3U5VznvkHxWw1rF4lW9ueQCRx QO6s3XmE4Anz0xxzaqBxrfV0ylr4ZOlUlVBGvjPpMpxNVAXV10wKCGo2lAnrNMPFM4v1 J8QN+v0fD2o1Q/aRm8oEfj6MNSNpJMgKPlmgUCIg7ucRBctgxlfvEnpqOfJwGr472GT6 TnFP93UFD4b/QScZt9Ih18Ep9RNGqVnFY7SqBe4A4R9wxhIoq0Ungtf5WlanLk7TzAHO jYmcbR8yQrDPErpv6572vAyS0OfdUePErqeSrIyBka97VYPYhnBjeC6oMblkOJ/IYMKK eXAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=9xlnRxbz5e5Gec4it5mCjsOFIOEz65fy9CE22wHzOHQ=; b=nZc2BqlbeUKX4Axo2Z6+KXP9AZGOiyC38+SrHCZcP2kPx47Bb69C785cmQFZo7WOhY ezDEcAGBp8R4UJs5SlLLbsv2eD42S0BCrIhnmzdzoAimX299yDvFDOTgO2PGr2bszjUh DoGRjtUIzIhgNOGklFn1ksGRUEsFMXlp4ufBsl3W/2/IWXhBw3PGanhQokQvH6NZMJ9c qbjxgMoQ4pJJiA5BKdmFZLACHAYQBpIo9oXKmH/bgYlm1wRZbausf7MNNzhCuyPX9XCH 8f7tOLSMxr+CYYf2Ik90kWu/PO/zfutf7EiHJs3S48CJKzkvO6p2skTL4PKnBCmP29IR p5OA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CDIFeZOv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id d28si1987485edb.10.2019.10.25.12.23.18; Fri, 25 Oct 2019 12:23:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CDIFeZOv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1729710AbfJYDiL (ORCPT + 99 others); Thu, 24 Oct 2019 23:38:11 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:42570 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727899AbfJYDiL (ORCPT ); Thu, 24 Oct 2019 23:38:11 -0400 Received: by mail-pg1-f195.google.com with SMTP id f14so596552pgi.9 for ; Thu, 24 Oct 2019 20:38:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-disposition:in-reply-to:user-agent; bh=9xlnRxbz5e5Gec4it5mCjsOFIOEz65fy9CE22wHzOHQ=; b=CDIFeZOvtLPMpAoNRpBSSxesK+l4qgc4U4YJQyQQFRn+kMT/tvB+L9xj4psbgj2sDo jvOyeTnKCY5Vdkg5ynMXnsCtSKfprt3GCdB2NRnSoe2T+IxxvwlLyHXqHj3uvjvAW4F5 ExGae8XSp41dxXQYNOqY6m2LQCiWzwvNniKSNN5qH6deGsbFfUlkcIRXEmg+mGxtKF82 d1dxKP+ae6/4tChL5rR4QPJdUUQczwdtcNxy06WIyZet1a5+MyprNMT0ETqgWRwc/w2w WhQXeaeDtgGzZ5CJxDdVnzIHgWKhTxUugvVNzldb875Rv/64nZNe2emrO5YznZ5wltgZ 8LFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:reply-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=9xlnRxbz5e5Gec4it5mCjsOFIOEz65fy9CE22wHzOHQ=; b=dcQ7n49V8Jve8nVmEHnFtWqnvzGDFW9Qh5euAA8eQIxlkpr/3puFcG+lY5sQDi8R/o kPQIdOW6FPwBPsFCkvPw/58b4afGM2J8ukx12iA+e/x0BEvlGj3U3C/pJ/rL1n01fStI X+b+UQWz76bYj/DjKMs1XINdKlrFJYYSgNhxrz2J3CNLB+vSB5IGxG/4CwlXM/RsfuDq 0z/YqCisnvM5/l7BqAZhS0KNfZf8DFGeLsdVTs83HV67FZd54dGoTB88x7eoat4xSiM5 sIZzHW12+x6wgQ+61FGGJU9hJaryZhdew1PSHloAlXLX8UFeN/bmeES8vaI6H0IRPDeD vXxw== X-Gm-Message-State: APjAAAUDw388JoXDQmwvssPpxiXgf7LyaiqUQVP5SLZKdIDk+LUzofpk G9mkkrhxzxBfBbAitpAoIc9WtvH0OLw/zA== X-Received: by 2002:a63:5909:: with SMTP id n9mr1674233pgb.101.1571974690423; Thu, 24 Oct 2019 20:38:10 -0700 (PDT) Received: from wambui ([197.254.95.2]) by smtp.gmail.com with ESMTPSA id p36sm489777pgm.55.2019.10.24.20.38.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2019 20:38:09 -0700 (PDT) Date: Fri, 25 Oct 2019 06:37:58 +0300 From: Wambui Karuga To: Harry Wentland Cc: airlied@linux.ie, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, outreachy-kernel@googlegroups.com, Alexander.Deucher@amd.com, Christian.Koenig@amd.com Subject: Re: [PATCH] drm/amd/amdgpu: make undeclared variables static Message-ID: <20191025033758.GA3201@wambui> Reply-To: 0f3fa30e-0392-054b-a81e-b9cb4475fe07@amd.com References: <20191019072426.20535-1-wambui@karuga.xyz> <0f3fa30e-0392-054b-a81e-b9cb4475fe07@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0f3fa30e-0392-054b-a81e-b9cb4475fe07@amd.com> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 23, 2019 at 03:09:34PM +0000, Harry Wentland wrote: > On 2019-10-19 3:24 a.m., Wambui Karuga wrote: > > Make the `amdgpu_lockup_timeout` and `amdgpu_exp_hw_support` variables > > static to remove the following sparse warnings: > > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:103:19: warning: symbol 'amdgpu_lockup_timeout' was not declared. Should it be static? > > This should be declared in amdgpu.h. amdgpu is maintained on the > amd-staging-drm-next branch from > https://cgit.freedesktop.org/~agd5f/linux/?h=amd-staging-drm-next. Can > you check there? > Hey Harry, I checked the amd-staging-drm-next branch, and 'amdgpu_lockup_timeout' is already declared as extern in amdgpu.h, so sparse only warns about 'amdgpu_exp_hw_support'. I'll do the same for 'amdgpu_exp_hw_support' and send an update patch series for this and the "_LENTH" mispelling. Thanks, wambui karuga > > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:117:18: warning: symbol 'amdgpu_exp_hw_support' was not declared. Should it be static? > > > > Signed-off-by: Wambui Karuga > > --- > > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > > index 3fae1007143e..c5b3c0c9193b 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > > @@ -100,7 +100,7 @@ int amdgpu_disp_priority = 0; > > int amdgpu_hw_i2c = 0; > > int amdgpu_pcie_gen2 = -1; > > int amdgpu_msi = -1; > > -char amdgpu_lockup_timeout[AMDGPU_MAX_TIMEOUT_PARAM_LENTH]; > > +static char amdgpu_lockup_timeout[AMDGPU_MAX_TIMEOUT_PARAM_LENTH]; > > int amdgpu_dpm = -1; > > int amdgpu_fw_load_type = -1; > > int amdgpu_aspm = -1; > > @@ -114,7 +114,7 @@ int amdgpu_vm_block_size = -1; > > int amdgpu_vm_fault_stop = 0; > > int amdgpu_vm_debug = 0; > > int amdgpu_vm_update_mode = -1; > > -int amdgpu_exp_hw_support = 0; > > +static int amdgpu_exp_hw_support; > > This is indeed only used in this file but for consistency's sake it's > probably better to also declare it in amdgpu.h rather than make it > static here. > > Harry > > > int amdgpu_dc = -1; > > int amdgpu_sched_jobs = 32; > > int amdgpu_sched_hw_submission = 2; > >