Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp5613902imm; Tue, 26 Jun 2018 14:37:29 -0700 (PDT) X-Google-Smtp-Source: AAOMgpddRtc+In7PKbk12J0LAs66EAosc2p6nbEFmOvtCvTvfKtX6fKn1AV8k8U9tkGhg+KuDBC9 X-Received: by 2002:a62:403:: with SMTP id 3-v6mr3119373pfe.28.1530049049136; Tue, 26 Jun 2018 14:37:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530049049; cv=none; d=google.com; s=arc-20160816; b=ItXwsMhWYrMbz7qbDcYu5SsP4VtF+IvZ/7YhCyPuejldLw52W5rjLjd+sv7wo27kOF sTOLU9nZs4r8+LvlQBtOlJHQbbDMK+4FILdwfHM6AxjxpuFqcGNEvpz95kXnB0tBfcVw 7acHgWPs1wrb/ofwFbdAyHF45U1XeZPWUv36PDyjAkOZ01ydemev06gk6l5d0qkv/+8X WV6cy3fYzvkse27LFkiLdgwA2YZn8W2g/c0C9/s1/johMLwZ8ClJMxgVP3J9cKD+Y1X5 vLjhHx6U5ViV5AcxVJ5zEXcwdGZVJivDNvjsOYQOrOUrkuahIBg1bu3/m6MiI+X7t672 RqtQ== 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:arc-authentication-results; bh=Ej8jc6giKxYXMysRblkTvftP2k9huG1UoYwTt7xug2c=; b=lsjQlGfonevjlhqeCS2gv+m30pLpqGQDkR9EeHpRzMYkVeRh4oY+E8g2mCPTL/FLDh KklQ4hmf+cJ7u+gLa+oCGLncK4T0QUeIU6aqePJhlYtAF6i8jNIqpnk0xiojWyTL4xze RCT3SJv6QemKZQXsSfePNOqlzRIW+qDpRBeG/LvhHQzlGE0ADrkS2GmS93ZZ0jZRukn8 FJ2pNOrdkoo/lJUR4BPC+wbB/XN+BYlEiFcv1meAhhycsl96+pvlhzQ5sVsniFt0cTUV DruDxQq584S6cOb9ws3+3m6vOZeReQ0UClb9ZjAwAmReExGMPKkvvfuDR2LNhewDr3nR F3tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=HLL8T4vO; 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 31-v6si2328752plj.216.2018.06.26.14.37.14; Tue, 26 Jun 2018 14:37:29 -0700 (PDT) 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=HLL8T4vO; 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 S1753186AbeFZVeH (ORCPT + 99 others); Tue, 26 Jun 2018 17:34:07 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:53292 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752299AbeFZVeF (ORCPT ); Tue, 26 Jun 2018 17:34:05 -0400 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=Ej8jc6giKxYXMysRblkTvftP2k9huG1UoYwTt7xug2c=; b=HLL8T4vOBSxD0U10ecp11LdCe KxJK6u9Y+wF1Aiqs0RZjXR8HEyGkKQkcM2eJNDPoDKKNoZ+JijgNW82U/h/eZBpXHcgzBVdlJWKPp IGzRtwH4a25binZ7AxRNWAkbNv8mQ/P8vrMx803dgqlBCSsiVL/A8MlX4iyEkq9fJeUjScQYDPBTo tAyW68g87HS8j1MVdABZWC5KYcTX+kdLsUmk1KmFsp40WqL2u32MvI9GlJTDvzNTRKZoabDRtqsdh BA9lBbCJ+q7enXZ4sbcFLU1dwRV5kR0rX98sM3RuVXo9Zs46ehJIFA+YkzKubcqdWd3i+DdWne4PK PsGbBbSEQ==; Received: from dvhart by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXvb7-0004b7-Nc; Tue, 26 Jun 2018 21:34:01 +0000 Date: Tue, 26 Jun 2018 14:33:58 -0700 From: Darren Hart To: Andy Shevchenko Cc: Colin King , Mario Limonciello , Andy Shevchenko , Platform Driver , kernel-janitors@vger.kernel.org, Linux Kernel Mailing List Subject: Re: [PATCH] platform/x86: dell-smbios: make a function and a pointer static Message-ID: <20180626213358.GA4945@fury> References: <20180621181524.30550-1-colin.king@canonical.com> <20180623002237.GG27466@fury> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 26, 2018 at 10:32:17PM +0300, Andy Shevchenko wrote: > On Sat, Jun 23, 2018 at 3:22 AM, Darren Hart wrote: > > On Thu, Jun 21, 2018 at 07:15:24PM +0100, Colin King wrote: > >> From: Colin Ian King > >> > >> The function dell_smbios_smm_call and pointer platform_device are > >> local to the source and do not need to be in global scope, so make > >> them static. > >> > >> Cleans up sparse warnings: > >> warning: symbol 'platform_device' was not declared. Should it be static? > >> warning: symbol 'dell_smbios_smm_call' was not declared. Should it be > >> static? > > > >> -int dell_smbios_smm_call(struct calling_interface_buffer *input) > >> +static int dell_smbios_smm_call(struct calling_interface_buffer *input) > > > > Hrm. So these are passed by pointer to dell_smbios_register_device(), which is in > > turn called by dell_smbios_call() from dell-smbios-base.c. > > > > So while it is valid to make these static, since we're not referencing the > > symbol, but the pointer value instead - I do worry about the "static" suggesting > > to someone reading the code that this data is not used outside of this file, > > when it is. > > > > I'm not finding a position on this in coding-style. > > > > Andy, do you care to weigh in on this? > > We are using static keyword by almost all callback defined functions, > so, for my point of view it's pretty much okay. OK, just wanted to double check. -- Darren Hart VMware Open Source Technology Center