Received: by 2002:ac8:734e:0:b0:40f:fb00:664b with SMTP id q14csp1724992qtp; Wed, 9 Aug 2023 10:02:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHSSm78zjj3F1UDLpJvoQ/5ZFZFLntdvQ3O1DG9u22PEU/5JTqGamN9dFV4lxJxqZjjjQOY X-Received: by 2002:a50:ec98:0:b0:523:3fef:e39e with SMTP id e24-20020a50ec98000000b005233fefe39emr3111648edr.14.1691600539516; Wed, 09 Aug 2023 10:02:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691600539; cv=none; d=google.com; s=arc-20160816; b=NXDDZIile4j60swg2w5aJXLlMAMLW3k78mP/ysLjGIRRAsV9IjWElVS79d9l4UuTdc 0bvToOwqFl3VfgZBIBNSWL7Ur1J1cv7JMd+dxAYXGjwRo/X3LG/ptPQLTEQvKX3l3ckb OdPAZ727OsKDwO/oxgwg+18zft/PfNaVnOynEHj7UFplp+u407Coi50g5Q5mALf9ctPV 0+oj8Fo8kcXO22VaEpZPl3ZRE1mWAHDh0h91kTt2Ze8ulV57cWHvTueeJx1ib33SJrJf 3HPW2H2Wg/eCiJfb/SiQyhameSH+yYZkxINMH1tzQFUdbgOHzD/WVqPX0HK9WR3v/5uH FhPA== 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 :dkim-signature; bh=PXQIZ+fPIH3bc8gxDN+g8b0rmUv7zu4isFxQBbk0R64=; fh=YKHoYS8QwvnuuDO+V+NUzcnKAeOvr5y73wgNR9PnXSo=; b=v+4TA9Ap0hKAXNzBRH9u42Q2ik/F44C3lRWwq0QNTfq5sTGL7nt/Kp/HLEqk2Syo1l uVlWiGYuods2SvSy9Kq99dZlpkSe8Yt22UouDNWV4oJK01Vp5C+h3l0o3PLLvZnm6Vnv fXfR+wGES5ny2Af6l5P8s8l96qsbZyYBGFOCa4LUGmUhCsfEL3T8DOgu02R0e1eEMpt2 DNDkom9Ka7Qk9hSyrIwNuT0gqcvXOEcbv8smj5JEVO5BFcMsH+UzYQofXfc+wf6Vksxn mMCGRzIqkHZ4yPQWd3yT1nUvx8LBcpWfrqZJwrb7jjwip78jsZlGPDRnfvl07u1aGsyU CqGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=hkVOwlaK; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f12-20020a056402004c00b005231e5514ecsi8549661edu.689.2023.08.09.10.01.49; Wed, 09 Aug 2023 10:02:19 -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; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=hkVOwlaK; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231149AbjHIPlY (ORCPT + 99 others); Wed, 9 Aug 2023 11:41:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232964AbjHIPlX (ORCPT ); Wed, 9 Aug 2023 11:41:23 -0400 Received: from smtp-fw-52004.amazon.com (smtp-fw-52004.amazon.com [52.119.213.154]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D1C9211C; Wed, 9 Aug 2023 08:41:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1691595682; x=1723131682; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PXQIZ+fPIH3bc8gxDN+g8b0rmUv7zu4isFxQBbk0R64=; b=hkVOwlaKEEbp4TzWr9POvR/BIfcNwXKxEIiCTwzFe9xDBhJz917GaiG1 4D7EAnf8M2iXkrHewCgzfyD1JZ0ROtyLUygbB3INUH3HonfP8s0M9r/Kl cLe/PM/lnCKodvwZ+ILTuZ/b12p9/BNOpbY4QHLCDm+r32ohJpWglh0tN Q=; X-IronPort-AV: E=Sophos;i="6.01,159,1684800000"; d="scan'208";a="147543119" Received: from iad12-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-iad-1e-m6i4x-529f0975.us-east-1.amazon.com) ([10.43.8.2]) by smtp-border-fw-52004.iad7.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Aug 2023 15:41:20 +0000 Received: from EX19MTAUWB002.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan3.iad.amazon.com [10.40.163.38]) by email-inbound-relay-iad-1e-m6i4x-529f0975.us-east-1.amazon.com (Postfix) with ESMTPS id B516146BA6; Wed, 9 Aug 2023 15:41:17 +0000 (UTC) Received: from EX19D004ANA001.ant.amazon.com (10.37.240.138) by EX19MTAUWB002.ant.amazon.com (10.250.64.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Wed, 9 Aug 2023 15:41:16 +0000 Received: from 88665a182662.ant.amazon.com (10.106.100.32) by EX19D004ANA001.ant.amazon.com (10.37.240.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Wed, 9 Aug 2023 15:41:13 +0000 From: Kuniyuki Iwashima To: CC: , , , , , , , , , , , Subject: Re: [PATCH] net/llc/llc_conn.c: fix 4 instances of -Wmissing-variable-declarations Date: Wed, 9 Aug 2023 08:41:04 -0700 Message-ID: <20230809154104.64963-1-kuniyu@amazon.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.106.100.32] X-ClientProxiedBy: EX19D039UWA002.ant.amazon.com (10.13.139.32) To EX19D004ANA001.ant.amazon.com (10.37.240.138) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,T_SPF_PERMERROR autolearn=no 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: X-Mailing-List: linux-kernel@vger.kernel.org From: Simon Horman Date: Wed, 9 Aug 2023 14:59:51 +0200 > + Kuniyuki Iwashima Thanks Simon. > > On Tue, Aug 08, 2023 at 09:43:09AM -0700, Nick Desaulniers wrote: > > I'm looking to enable -Wmissing-variable-declarations behind W=1. 0day > > bot spotted the following instances: > > > > net/llc/llc_conn.c:44:5: warning: no previous extern declaration for > > non-static variable 'sysctl_llc2_ack_timeout' > > [-Wmissing-variable-declarations] > > 44 | int sysctl_llc2_ack_timeout = LLC2_ACK_TIME * HZ; > > | ^ > > net/llc/llc_conn.c:44:1: note: declare 'static' if the variable is not > > intended to be used outside of this translation unit > > 44 | int sysctl_llc2_ack_timeout = LLC2_ACK_TIME * HZ; > > | ^ > > net/llc/llc_conn.c:45:5: warning: no previous extern declaration for > > non-static variable 'sysctl_llc2_p_timeout' > > [-Wmissing-variable-declarations] > > 45 | int sysctl_llc2_p_timeout = LLC2_P_TIME * HZ; > > | ^ > > net/llc/llc_conn.c:45:1: note: declare 'static' if the variable is not > > intended to be used outside of this translation unit > > 45 | int sysctl_llc2_p_timeout = LLC2_P_TIME * HZ; > > | ^ > > net/llc/llc_conn.c:46:5: warning: no previous extern declaration for > > non-static variable 'sysctl_llc2_rej_timeout' > > [-Wmissing-variable-declarations] > > 46 | int sysctl_llc2_rej_timeout = LLC2_REJ_TIME * HZ; > > | ^ > > net/llc/llc_conn.c:46:1: note: declare 'static' if the variable is not > > intended to be used outside of this translation unit > > 46 | int sysctl_llc2_rej_timeout = LLC2_REJ_TIME * HZ; > > | ^ > > net/llc/llc_conn.c:47:5: warning: no previous extern declaration for > > non-static variable 'sysctl_llc2_busy_timeout' > > [-Wmissing-variable-declarations] > > 47 | int sysctl_llc2_busy_timeout = LLC2_BUSY_TIME * HZ; > > | ^ > > net/llc/llc_conn.c:47:1: note: declare 'static' if the variable is not > > intended to be used outside of this translation unit > > 47 | int sysctl_llc2_busy_timeout = LLC2_BUSY_TIME * HZ; > > | ^ > > > > These symbols are referenced by more than one translation unit, so make > > include the correct header for their declarations. Finally, sort the > > list of includes to help keep them tidy. > > > > Reported-by: kernel test robot > > Closes: https://lore.kernel.org/llvm/202308081000.tTL1ElTr-lkp@intel.com/ > > Signed-off-by: Nick Desaulniers > > Reviewed-by: Simon Horman Reviewed-by: Kuniyuki Iwashima Thanks! > > > --- > > net/llc/llc_conn.c | 11 ++++++----- > > 1 file changed, 6 insertions(+), 5 deletions(-) > > > > diff --git a/net/llc/llc_conn.c b/net/llc/llc_conn.c > > index d037009ee10f..0a3f5e0bec00 100644 > > --- a/net/llc/llc_conn.c > > +++ b/net/llc/llc_conn.c > > @@ -14,14 +14,15 @@ > > > > #include > > #include > > -#include > > -#include > > -#include > > -#include > > -#include > > +#include > > #include > > +#include > > #include > > +#include > > #include > > +#include > > +#include > > +#include > > > > #if 0 > > #define dprintk(args...) printk(KERN_DEBUG args) > > > > --- > > base-commit: 14f9643dc90adea074a0ffb7a17d337eafc6a5cc > > change-id: 20230808-llc_static-de4dddcc64b4 > > > > Best regards, > > -- > > Nick Desaulniers