From patchwork Sat Jan 21 18:22:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 9530563 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 707C8601AE for ; Sat, 21 Jan 2017 18:22:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5802728459 for ; Sat, 21 Jan 2017 18:22:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4AAC42846D; Sat, 21 Jan 2017 18:22:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RCVD_IN_SORBS_SPAM,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F32BA28459 for ; Sat, 21 Jan 2017 18:22:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4B4766E290; Sat, 21 Jan 2017 18:22:39 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5C1F56E290 for ; Sat, 21 Jan 2017 18:22:37 +0000 (UTC) Received: by mail-wm0-x242.google.com with SMTP id c85so15030390wmi.1 for ; Sat, 21 Jan 2017 10:22:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ycFVnTvI+veUx6a8IYOEJh6NCYbDxB99y7AwylwuPNQ=; b=QVSUqSQQLoYgZRK7i5863X5NswDviM+1Zyo4w02u5bx4v2ea2svXokPWYmS9cuW4ph Gf/yXfVMkoUYBEiuXNV3C/yaNqNCOu5imlQX8Kve3YY90NOWdjYkqypr6ZdptcUCh5p3 ipk76BDR0FryMi2v7y4d4GJoM2NTDd/X5nvvPY64lU/mLY19EsVe7VipR2Nwztr/OAcD FDO4h0mYFOWSFQ5nt6riAaxjhBQdT1wqRFr5a419kkKwTvV1bJTx1uttHIvLblRppk24 w8bqZBEHaCQrhTuSDe+z2CR2bbqdJj13ctoYct8UYioJJek+Ps/DZoSAnifA1UCgbZwk zMQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=ycFVnTvI+veUx6a8IYOEJh6NCYbDxB99y7AwylwuPNQ=; b=ubG3KbBXnnlNYOtDaa1c8tu4iPluQQqaizMcDLZFNefkrEGIAD3ervKxYol9+p14Yb 0oeJtp/6QQZJHDy7dWkrKHVNpbGVNBnwiQqTjM4T7nIU2STAZgNC3Giz/ud/f1RMj8BB eqXzHyXvKSb+/LmFf60HOYF1B76KJKgYLlQfYIO+uxaiqIVuMyR803WUNfk8NO4LQK81 G6O9ajzWBF2Do1SpVGG5EHc3unh6CejJGaXI3VY+QbgygDYXaLmc5BWXY6rUfC9DcpV/ FALTlFf5/vbZrryA94OUyENmzqVpIFzP6+yx3Td/5zRkFyLY8e2kSP/luRs9Ew6J9agK 8V+w== X-Gm-Message-State: AIkVDXKCP4xhl9J7uIehdMg18Pi8/wWY6IPv9WKDlY0w5Z2Mw7jgB3uvwQkjszxl/B0W6g== X-Received: by 10.28.16.211 with SMTP id 202mr8663481wmq.133.1485022955950; Sat, 21 Jan 2017 10:22:35 -0800 (PST) Received: from haswell.alporthouse.com ([78.156.65.138]) by smtp.gmail.com with ESMTPSA id y65sm12049468wmb.5.2017.01.21.10.22.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Jan 2017 10:22:35 -0800 (PST) From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Sat, 21 Jan 2017 18:22:33 +0000 Message-Id: <20170121182233.30852-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH] agp/intel: Move intel_fake_agp_sizes into #ifdef block X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Move the intel_fake_agp_sizes array into the same #ifdef block as it is used to avoid instantiation when not used, and so triggering a compiler warning drivers/char/agp/intel-gtt.c:335:42: warning: ‘intel_fake_agp_sizes’ defined but not used [-Wunused-const-variable=] Signed-off-by: Chris Wilson Reviewed-by: Jani Nikula Reviewed-by: Joonas Lahtinen --- drivers/char/agp/intel-gtt.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c index 9702c78f458d..7fcc2a9d1d5a 100644 --- a/drivers/char/agp/intel-gtt.c +++ b/drivers/char/agp/intel-gtt.c @@ -332,14 +332,6 @@ static void i810_write_entry(dma_addr_t addr, unsigned int entry, writel_relaxed(addr | pte_flags, intel_private.gtt + entry); } -static const struct aper_size_info_fixed intel_fake_agp_sizes[] = { - {32, 8192, 3}, - {64, 16384, 4}, - {128, 32768, 5}, - {256, 65536, 6}, - {512, 131072, 7}, -}; - static unsigned int intel_gtt_stolen_size(void) { u16 gmch_ctrl; @@ -670,6 +662,14 @@ static int intel_gtt_init(void) } #if IS_ENABLED(CONFIG_AGP_INTEL) +static const struct aper_size_info_fixed intel_fake_agp_sizes[] = { + {32, 8192, 3}, + {64, 16384, 4}, + {128, 32768, 5}, + {256, 65536, 6}, + {512, 131072, 7}, +}; + static int intel_fake_agp_fetch_size(void) { int num_sizes = ARRAY_SIZE(intel_fake_agp_sizes);