Message ID | 64ea8cf65a4318fbf8c91cb3062d90a2555007c4.1694093327.git.geert@linux-m68k.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ab0a:0:b0:3f2:4152:657d with SMTP id m10csp67639vqo; Thu, 7 Sep 2023 11:10:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFAosiSBSW5G6HvnpwYqxlal+CjY3Ekb1bEuaDQdR0CZ6dOwPi4Nm/pLwOPY1BxMTvQEACg X-Received: by 2002:a17:90b:1d08:b0:26f:f272:144c with SMTP id on8-20020a17090b1d0800b0026ff272144cmr354347pjb.27.1694110246117; Thu, 07 Sep 2023 11:10:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694110246; cv=none; d=google.com; s=arc-20160816; b=KP9dIkRTVGyKWdYg3afgONY9OyPS90P4UT3tH8+UjZ4b7vmOCqRzavObYSASohp+hf HS2l2ratcFhcValhlTxPs7hzBiqVs8KbGqTt7Mn3TosOYQNVPQF9DESl5G1yHXw1k0Zf knjlFGEzZZzIO5uQUTQWyPTV3B/O5iOXhVPanUdM6t+5BQaoXuVfg87dIujl6koCkkXA er20AMaUsxuXtqhHv8BgP7MleNB0z2BR5pQaqYbHF/dSpl8jv+uIFT6cYEQG24fAADWz yKz2ktAWswPFPvrYRfNdaHwkVGhka6Dcro7bKt/ekp8cQb1U9kboJGK7eeJPITk0C2JY SkBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=S0Bed5JPiRyXt2eU9LOY1QI56oEbDxrXheXaxL7NCYg=; fh=fKMC3BTGjlLXl5EvEhzqt3WHCynqYJKK7wAqLAOkWUw=; b=bRgvumqLzBLX+VnzUGZcKkMHhZjkPc2ndzYqCCnf+uxlUfx+C2Kv90v60aeIi3lJ3e LxwrdfEdZ/54e2YunZxUGdU65rErddIjYZ7O1krESTkmGf2QwF7nuOZVjc1QpBvwXeMI WZX30Y7BNJV5wHlRSkj7DyBPOEifG0F/xHJC0Sdjc2KFPoBE8FGBSULXj0hZX5ze1RAN mNn6QVS/9W/18SOkiFr6N8bnwjLO9QLUtGGrXXg9kkmA9v9nmLRnDhRhFFl2Tsn9WS9n 2Whe5v+uBVpyuuKF+Lt/KLls5sa7hLGUKFbWG2IxR6JV/WC1HVb4MywdNQfMxycmmnnd 9blw== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w9-20020a17090a8a0900b002719f1f90cbsi1911234pjn.61.2023.09.07.11.10.28; Thu, 07 Sep 2023 11:10:46 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237001AbjIGQVZ (ORCPT <rfc822;mochenchao2018@gmail.com> + 99 others); Thu, 7 Sep 2023 12:21:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242187AbjIGQVF (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 7 Sep 2023 12:21:05 -0400 Received: from weierstrass.telenet-ops.be (weierstrass.telenet-ops.be [IPv6:2a02:1800:110:4::f00:11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2BF86A6F for <linux-kernel@vger.kernel.org>; Thu, 7 Sep 2023 09:17:52 -0700 (PDT) Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by weierstrass.telenet-ops.be (Postfix) with ESMTPS id 4RhL6D0285z4x1nv for <linux-kernel@vger.kernel.org>; Thu, 7 Sep 2023 15:43:00 +0200 (CEST) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:c214:2eac:128d:f67e]) by baptiste.telenet-ops.be with bizsmtp id j1hx2A00U2mGBSJ011hxX0; Thu, 07 Sep 2023 15:41:59 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from <geert@linux-m68k.org>) id 1qeFGQ-002m8f-Bq; Thu, 07 Sep 2023 15:41:57 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from <geert@linux-m68k.org>) id 1qeFGf-00CMgD-K1; Thu, 07 Sep 2023 15:41:57 +0200 From: Geert Uytterhoeven <geert@linux-m68k.org> To: linux-m68k@lists.linux-m68k.org Cc: Arnd Bergmann <arnd@arndb.de>, Finn Thain <fthain@linux-m68k.org>, Michael Schmitz <schmitzmic@gmail.com>, Philip Blundell <philb@gnu.org>, Greg Ungerer <gerg@linux-m68k.org>, Joshua Thompson <funaho@jurai.org>, Sam Creasey <sammy@sammy.net>, Laurent Vivier <laurent@vivier.eu>, linux-kernel@vger.kernel.org, Geert Uytterhoeven <geert@linux-m68k.org> Subject: [PATCH 15/52] m68k: emu: Mark version[] __maybe_unused Date: Thu, 7 Sep 2023 15:41:16 +0200 Message-Id: <64ea8cf65a4318fbf8c91cb3062d90a2555007c4.1694093327.git.geert@linux-m68k.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <cover.1694093327.git.geert@linux-m68k.org> References: <cover.1694093327.git.geert@linux-m68k.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776403345300848903 X-GMAIL-MSGID: 1776403345300848903 |
Series |
None
|
|
Commit Message
Geert Uytterhoeven
Sept. 7, 2023, 1:41 p.m. UTC
When building with W=1:
m68k/arch/m68k/emu/nfeth.c:42:19: warning: ‘version’ defined but not used [-Wunused-const-variable=]
42 | static const char version[] =
| ^~~~~~~
Fix this while obeying the wishes of the original copyright holders by
marking version[] with __maybe_unused.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
arch/m68k/emu/nfeth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Thu, Sep 7, 2023, at 15:41, Geert Uytterhoeven wrote: > When building with W=1: > > m68k/arch/m68k/emu/nfeth.c:42:19: warning: ‘version’ defined but > not used [-Wunused-const-variable=] > 42 | static const char version[] = > | ^~~~~~~ > > Fix this while obeying the wishes of the original copyright holders by > marking version[] with __maybe_unused. > > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> That will just drop it from the object file, maybe it should instead be marked "__used" ? Arnd
Hi Arnd, On Sat, Sep 9, 2023 at 10:28 AM Arnd Bergmann <arnd@arndb.de> wrote: > On Thu, Sep 7, 2023, at 15:41, Geert Uytterhoeven wrote: > > When building with W=1: > > > > m68k/arch/m68k/emu/nfeth.c:42:19: warning: ‘version’ defined but > > not used [-Wunused-const-variable=] > > 42 | static const char version[] = > > | ^~~~~~~ > > > > Fix this while obeying the wishes of the original copyright holders by > > marking version[] with __maybe_unused. > > > > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> > > That will just drop it from the object file, maybe it should > instead be marked "__used" ? Given it's been like this since the beginning, I guess it never showed up in the object file anyway... Gr{oetje,eeting}s, Geert
diff --git a/arch/m68k/emu/nfeth.c b/arch/m68k/emu/nfeth.c index 1a5d1e8eb4c80839..26e68813f35144f8 100644 --- a/arch/m68k/emu/nfeth.c +++ b/arch/m68k/emu/nfeth.c @@ -39,7 +39,7 @@ enum { #define MAX_UNIT 8 /* These identify the driver base version and may not be removed. */ -static const char version[] = +static const char version[] __maybe_unused = KERN_INFO KBUILD_MODNAME ".c:v" DRV_VERSION " " DRV_RELDATE " S.Opichal, M.Jurik, P.Stehlik\n" KERN_INFO " http://aranym.org/\n";