Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp915637ybl; Thu, 12 Dec 2019 06:56:12 -0800 (PST) X-Google-Smtp-Source: APXvYqwSaT1EzYzzg/vJzYyZQGq63IAqiiTSdi/pOedp4ZEmJfDoDoE4pH1QcpkFkDLxT10gD+UM X-Received: by 2002:a05:6808:8e:: with SMTP id s14mr4888366oic.160.1576162572665; Thu, 12 Dec 2019 06:56:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576162572; cv=none; d=google.com; s=arc-20160816; b=w9N0K2ExXyDqr+v4/mMUp1J4Vb6zMRmbzv6BPUQAoi9JTM6pFro3QkkjI2pGsXIGPz 2B5VEUNYqrElLG+3YkN8mt6E+Rzb09UOVhhzniW0iLwsyssYyarRs79xz7RGn5dWL2ud 1rIRMyhEVsjlua7Q7pSnUUYcxGI3smdMi1iU34sq4FJWv3LLtge1OWN5j2iO7zyL7Nzo bagiqDw2cbA8nXW3VzmFtbL03HfGrlBZ8iublY1crAMxc8COp7r+l4XGkulXrjvhRhIe NJFHVrbGqK9mDS/cHRXj2PvNzpQls/XpQYWZY0TLqPKKJi2jHOL/SwzYLvJ5GAALIOuw Qceg== 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:message-id:subject:cc :to:from:date:dkim-signature; bh=g2WAPCffaDSa5XZ/+/8mSxwtz/ygAOx7fwf+HEIeSBg=; b=IhK7xZ5P8CwtfxTyedU6RN8nrVJt3O1hsGEsgMs3ymCMKlol2ZR+vyMKCoEs9xVxmu wH2KVxBfupP3wLaS7oGE2lAAsnEBbOs+MhWLIG26pUfixTCU1QZDrXRvh7nJledcyWp+ MztrgMz9MSRLVH9DPwLPDCCupJ+FEZV8EsOzf06i9kmH4177eSiitKKm+6bpM4kioJAT iNGYgrXkC9076Uuw/+6S0G/ygtt++FnxyNgPSydpCNzNNBIO6KksDateUE4tGAR9kDnB CEAAnScyw/mxN5AoPEKJs6wJfT1olHRSzcIp3pvm7k4MvI1xcY/QADEtc+eK3j2hf7xY f/Cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=hkjBzwQO; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q127si3221081oic.99.2019.12.12.06.56.00; Thu, 12 Dec 2019 06:56:12 -0800 (PST) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=hkjBzwQO; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729009AbfLLOyx (ORCPT + 99 others); Thu, 12 Dec 2019 09:54:53 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:49050 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728861AbfLLOyw (ORCPT ); Thu, 12 Dec 2019 09:54:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=g2WAPCffaDSa5XZ/+/8mSxwtz/ygAOx7fwf+HEIeSBg=; b=hkjBzwQO+J4wtlwwBA6daxDQD 2Lmz6jeYlULJ6AqVdN4Iqt/7P+4s1Dgqs9n6L7jr12D/gsGrXlqnAsv6KFai8JntV5Q/4mEAuapuT bK+eKjT4fBa9297FvVDG4XtTgrY5eA+GJvejZMmcE+g9XSvJgnGG8EfAyPayNvX3DSwf1IpYaq2cq +klAZby68snnb60ykLtvfUuOvaKvFeWf65NjkNMrH5rbKa0mWePtV4iCLYnxRxDclzNk1Z+r92lMz 4cuDbq/05AbMfzWH/ux1oKzt3DzO8+0yEPjyYM4rOzwVTuzUfHgSMWAHCVo6kgR+95j9X50rjK42B N3qqnLwIw==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifPrM-0004WV-Es; Thu, 12 Dec 2019 14:54:32 +0000 Date: Thu, 12 Dec 2019 06:54:32 -0800 From: Christoph Hellwig To: Arnd Bergmann Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, Mike Travis , Steve Wahl , Dimitri Sivanich , Andrew Morton , Christoph Hellwig , "H. Peter Anvin" , Hedi Berriche , Justin Ernst , Peter Zijlstra , Russ Anderson , Anshuman Khandual , linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/platform/uv: avoid unused variable warning Message-ID: <20191212145432.GA15634@infradead.org> References: <20191212135815.4176658-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191212135815.4176658-1-arnd@arndb.de> User-Agent: Mutt/1.12.1 (2019-06-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Instead of that maybe_unused mess please just use good old ifdefs. > if (hubless) > - proc_version_fops.open = proc_hubless_open; > + proc_create_single("hubless", 0, pde, proc_hubless_show); > else > - proc_version_fops.open = proc_hubbed_open; > + proc_create_single("hubbed", 0, pde, proc_hubbed_show); > } Or someone could figure out what happens if we turn the proc_create_single stub into an inline function instead of the define. That makes it used at a syntactic level, the big question is if the compiler is smart enough to optimize away the unused callback still.