From mboxrd@z Thu Jan 1 00:00:00 1970 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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 3C270C31E51 for ; Tue, 18 Jun 2019 07:18:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 042B420679 for ; Tue, 18 Jun 2019 07:18:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726723AbfFRHSi (ORCPT ); Tue, 18 Jun 2019 03:18:38 -0400 Received: from mslow2.mail.gandi.net ([217.70.178.242]:58290 "EHLO mslow2.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725900AbfFRHSh (ORCPT ); Tue, 18 Jun 2019 03:18:37 -0400 Received: from relay2-d.mail.gandi.net (unknown [217.70.183.194]) by mslow2.mail.gandi.net (Postfix) with ESMTP id 5B09B3A2057 for ; Tue, 18 Jun 2019 06:38:51 +0000 (UTC) X-Originating-IP: 90.88.23.150 Received: from bootlin.com (aaubervilliers-681-1-81-150.w90-88.abo.wanadoo.fr [90.88.23.150]) (Authenticated sender: maxime.chevallier@bootlin.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 698A640003; Tue, 18 Jun 2019 06:38:50 +0000 (UTC) Date: Tue, 18 Jun 2019 08:39:00 +0200 From: Maxime Chevallier To: Nathan Huckleberry Cc: davem@davemloft.net, netdev@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: Cleanup of -Wunused-const-variable in drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c Message-ID: <20190618083900.78eb88bd@bootlin.com> In-Reply-To: References: X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hello Nathan, On Thu, 13 Jun 2019 10:53:05 -0700 Nathan Huckleberry wrote: >Hey all, > >I'm looking into cleaning up ignored warnings in the kernel so we can >remove compiler flags to ignore warnings. > >There's an unused variable 'mvpp2_dbgfs_prs_pmap_fops' in >mvpp2_debugfs.c. It looks like this code is for dumping useful >information into userspace. I'd like to either remove the variable or >dump it to userspace in the same way the other variables are. Thanks for reporting this. The ops should actually be used, fixing the warning should be as simple as adding this into mvpp2_dbgfs_prs_entry_init : + debugfs_create_file("pmap", 0444, prs_entry_dir, entry, + &mvpp2_dbgfs_prs_pmap_fops); + >Wanted to reach out for opinions on the best course of action before >submitting a patch. Can you submit a patch, or do you prefer me to do it ? Thanks, Maxime