Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp5511889imm; Tue, 26 Jun 2018 12:36:04 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLa4PbOIoCnj0lLMUCcKGAaxMNzgttC+4HvqXExVV6aflx1kckdBtwekydGUAMQ7gTWriaQ X-Received: by 2002:a65:4b0f:: with SMTP id r15-v6mr2542679pgq.103.1530041764359; Tue, 26 Jun 2018 12:36:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530041764; cv=none; d=google.com; s=arc-20160816; b=QEM5JA74jeX+TMK1A9PIlFM8VnRCJ8jNJWbNsLNRcRNsLqy/kb7QnuZuW/G5BBDvJ+ DJ/IWGduS0Xnv8mp57KTiACPjEMLWooVgjnTHgiY1aOT4Xn3KshYa+ArWawxCVwRbObM B1a9hdY39AM07ZuJy+3hsjbrzU5Ao0OHxPUcO3xyEhN9eS4fh5Ap8yYsBmne7KjJolNZ 29cSZtPRceIErLkKT2BPTl4/YlPOVJ56Vh3FXcpqKqOzIJjTi9hYG+CZOCJus/dTqwnC hehYrNo6aZonxv0RDVPCnyf6YrJcWw7rBOWVk7/p0waQ2ZqrK655Q+9TB1CJ1dg42k++ 66LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=svhjIJta6ftYcpoSKBEfZ3om+DfFymcPomVhFAvsprI=; b=bIR4lPSglDNqdnllU8U0k/N+EfYxq4GADtj5o2W/jmJIssTl5u8jdy4tj9YGuFxEnz eB23DaIt7XDZt2CUOVFwriUkCg/tKXsPAoBlkb+FASA4WCdBzB9SrLIJhzI5Tbsf3YpC hhTH39anRcgkP99wgtgXqaNNJ14COjgj+GZF4pg5HSkqj5Ev3xLQps2vM0ThLN/fg3aG d/+17D8F++7QsZYnI+06cbf+MaiuqZu3ACfVQea+POm+0fqlafbDHIadmQKEUyXymVvB b25VrmU3JYGP8CyHi22nlJG/A/32xsZwmkdZFG2PRV3GGn3+1sEMTtD0C13p1wmBlBiv kxQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rp0tTnYx; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a10-v6si1830229pgt.552.2018.06.26.12.35.49; Tue, 26 Jun 2018 12:36:04 -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=pass header.i=@gmail.com header.s=20161025 header.b=rp0tTnYx; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754650AbeFZTcV (ORCPT + 99 others); Tue, 26 Jun 2018 15:32:21 -0400 Received: from mail-vk0-f66.google.com ([209.85.213.66]:38230 "EHLO mail-vk0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751175AbeFZTcT (ORCPT ); Tue, 26 Jun 2018 15:32:19 -0400 Received: by mail-vk0-f66.google.com with SMTP id b77-v6so10742778vkb.5; Tue, 26 Jun 2018 12:32:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=svhjIJta6ftYcpoSKBEfZ3om+DfFymcPomVhFAvsprI=; b=rp0tTnYx5wSXV+Oqu3HgOCiPLnTzuQ7efMbbpT+p2GbTb2HQ2SiN5t4qo6ULy2a0LN zxi5eYgibHw5bxCj5l6Dj9CrqwE/bK5uwSsnNnzHgX0qT8FdAi6YmPpqkhT4ZUAHMO+5 Kd1HTouHzE5pt1HQvEoIRYWJx3ol3EZ9xBk5sKx17Wb6WCaJNOjmKp165kO6xBDWnJQv XyIGmIb1vM8px0xIPBlr+z9Y0FfxvK7E9dY73KIWWFLp0M5hiu5JXomc4g5y2R6sflYy mB5+4adIVxJHta3q0d7L8Sk0lxdwheUPsJc4lRFCaIcZDGeCuA62x77zeT9pQ6NF0lkz cjDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=svhjIJta6ftYcpoSKBEfZ3om+DfFymcPomVhFAvsprI=; b=Nm6kw8tsDkrgysfFkDG+c36hOyqn0e2tv/DW6zW+qvyLkzLo2EvzlPeVuSY+muUdSO UDYI0pFvIm5yXQoECtMdId690tLGzHORYHSXnHyN1cZBBP5iht/ZtgmzsqTIkaYlRy+D pO/+TbaTUD8kTma2O0ilEEQpfJvEUlO4Qs2CjLSLsdB340WHD/kdpQUGPwOgbDM2fAlG EJnfyOD/0UbLHx/d+GiTl2pG6mNPzrYoW86Cq1VwBYOGKrtGxeMii/E6M3UY6ZjAzypl TEVVKzEthesMNXYG2EDLL0oWYTWi2dYOJYl9k41QxAP/d7BDm4JQqhIR80dGYnhVoOKO NU5w== X-Gm-Message-State: APt69E1tnCxuXAeeE6oyoslf8VZL7DVgMxefJday15RvoCCYEmbXkSAi pOsmaeOVOTDHVM9eu9uwpYOvF8ioUobRARSO/cA= X-Received: by 2002:a1f:50c:: with SMTP id 12-v6mr1822658vkf.26.1530041538279; Tue, 26 Jun 2018 12:32:18 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a67:8b02:0:0:0:0:0 with HTTP; Tue, 26 Jun 2018 12:32:17 -0700 (PDT) In-Reply-To: <20180623002237.GG27466@fury> References: <20180621181524.30550-1-colin.king@canonical.com> <20180623002237.GG27466@fury> From: Andy Shevchenko Date: Tue, 26 Jun 2018 22:32:17 +0300 Message-ID: Subject: Re: [PATCH] platform/x86: dell-smbios: make a function and a pointer static To: Darren Hart Cc: Colin King , Mario Limonciello , Andy Shevchenko , Platform Driver , kernel-janitors@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- With Best Regards, Andy Shevchenko