From patchwork Sun Dec 6 19:02:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 11954331 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4C38C4361B for ; Sun, 6 Dec 2020 19:03:12 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A117C22D08 for ; Sun, 6 Dec 2020 19:03:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A117C22D08 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 34CE76E4DD; Sun, 6 Dec 2020 19:03:11 +0000 (UTC) Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by gabe.freedesktop.org (Postfix) with ESMTPS id 662C76E4D4 for ; Sun, 6 Dec 2020 19:03:08 +0000 (UTC) Received: by mail-lf1-x144.google.com with SMTP id z21so14856354lfe.12 for ; Sun, 06 Dec 2020 11:03:08 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=eLxsg7EkjCm+oZc7/H4MeQJFzAKzFuMyJlMAucG5j6M=; b=ILdNiwFfM7J4+SrpF1knMWis/rnjLfkL9BW6opbCU1Tht72uZsNuwawgHaGa/TYKPf uzszEFxJDJHoljJLRysYP0ao1o/tHtZZd7QR4kMaCMZXf3naGJ2ARncpPHw0yQRwyPzf gg8YpdlAHdUuc6y0g726nvK95UCQgpT78x3PC/fAZgYGseaf/YNQ8p3l1n1VrCf7kEst uH81FAX3+vFTNjbGmFRV8NcLQwLM70sDtyAfAlw4toa6bIdQK8MbkzqN4OD8tSDh9Jb0 UT4vJb9IwDqTlso6A9fQtuUqykaBwOa0H/dlMcgUhOiZDeAkhu6PPjI4W1jeoSJU4E6T M4wQ== 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 :in-reply-to:references:mime-version:content-transfer-encoding; bh=eLxsg7EkjCm+oZc7/H4MeQJFzAKzFuMyJlMAucG5j6M=; b=EWdYNrh2XXARR3BNZx4k7xdIcac4A0Le1mNadPh5kclbV24V5XL2tOrJqs1I3Q1N3L SNIMl9XPP5HunVkJwuAFPWEzXzE1vJILHr58bYD7Ygk4ir64FOR2WqvI6qsjrJehmZds 3nH0wcGHgmDqb7fckKoAKyYNioMig59DWZcSqc9Ux8l7moow7sVb1bnHZ3LfQU3eAn4g FbS51dweV4ouxQ8Wzu1E/uvZA+xkDasQZrsZkbfDe/2dGk6H6CAe/Vy4I4irk0adTo2z i0FRhZf3XG55ciycj05sQrFFSI7XlaNvJ/4tklKPsaINioNi4YPZx7Z7Vo/YNotZ7mdU UGoA== X-Gm-Message-State: AOAM532DKGBsYyR2bxcO8/7gqFut7TtzDhnhEITeK+1tqhKceK+Dakb6 ziltxwJkL1kS6UGwx/0QR9o= X-Google-Smtp-Source: ABdhPJxnM6yBu1jRcx8Og5RErbaxtRURZRQTgDs7BZFG81dlhoGPg5ALRRskqOrkcPkDhwvsIpFv1g== X-Received: by 2002:a19:23d8:: with SMTP id j207mr4911471lfj.153.1607281386823; Sun, 06 Dec 2020 11:03:06 -0800 (PST) Received: from saturn.localdomain ([2a00:fd00:8060:1c00:c1c3:bbc6:3ac5:732d]) by smtp.gmail.com with ESMTPSA id v28sm2483865ljv.29.2020.12.06.11.03.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Dec 2020 11:03:06 -0800 (PST) From: Sam Ravnborg To: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Lee Jones Subject: [PATCH v3 05/13] sh: Fix set but not used warnings with !CONFIG_MMU Date: Sun, 6 Dec 2020 20:02:39 +0100 Message-Id: <20201206190247.1861316-6-sam@ravnborg.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201206190247.1861316-1-sam@ravnborg.org> References: <20201206190247.1861316-1-sam@ravnborg.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rich Felker , Kuninori Morimoto , Peter Zijlstra , Daniel Vetter , Gustavo A R Silva , Andrzej Hajda , Peter Jones , Sam Ravnborg , Geert Uytterhoeven , Michael Ellerman , Thomas Zimmermann , Arnd Bergmann , Bartlomiej Zolnierkiewicz , Thomas Winischhofer , linux-arm-kernel@lists.infradead.org, Qilong Zhang , Randy Dunlap , Douglas Anderson , Tony Prisk , Thierry Reding , Alexander Klimov , Colin Ian King , Andrew Morton , Mike Rapoport Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Building fbdev drivers for sh with W=1 produces the following warning: tmiofb.c: In function ‘tmiofb_remove’: tmiofb.c:805:21: warning: variable ‘par’ set but not used This is with allmodconfig and ARCH=sh This boiled down to iounmap() defined as empty for !CONFIG_MMU. Fix this by by adding "(void)addr;" to tell the compiler the argument to iounmap() should be considered used. Signed-off-by: Sam Ravnborg Cc: Thomas Zimmermann Cc: Lee Jones Cc: Rich Felker Cc: Arnd Bergmann Cc: Geert Uytterhoeven Cc: Mike Rapoport Cc: Kuninori Morimoto Cc: Peter Zijlstra Cc: Sam Ravnborg Cc: Andrew Morton Reported-by: kernel test robot Acked-by: Thomas Zimmermann --- arch/sh/include/asm/io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h index 6d5c6463bc07..5ad56c6c1e1e 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h @@ -271,7 +271,7 @@ static inline void __iomem *ioremap_prot(phys_addr_t offset, unsigned long size, #endif /* CONFIG_HAVE_IOREMAP_PROT */ #else /* CONFIG_MMU */ -#define iounmap(addr) do { } while (0) +#define iounmap(addr) do { (void)addr; } while (0) #define ioremap(offset, size) ((void __iomem *)(unsigned long)(offset)) #endif /* CONFIG_MMU */