Message ID | 20230408143428.2704141-1-trix@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp912305vqo; Sat, 8 Apr 2023 07:44:17 -0700 (PDT) X-Google-Smtp-Source: AKy350YnF2DcBjETPYVJzEmbYfRjJ0i33DfGOcuG+j/9ytCUQAuEkPhlGvf2oVMmpF2uMd1fLcgx X-Received: by 2002:a05:6a20:38a7:b0:dc:e183:26df with SMTP id n39-20020a056a2038a700b000dce18326dfmr5707183pzf.42.1680965056894; Sat, 08 Apr 2023 07:44:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680965056; cv=none; d=google.com; s=arc-20160816; b=klzRaXLSCZTEonqF2fqMcStIwQ6eVXs2+yQ/a5pamaEozy86rgIBc2+sL0veESuS0R zxMKRN+2aWNfHP2NYq3/XyY9Bdca3vBvDruyC+actRGyzYJPyD6ECGGrKJ8P95AnCenc P6IriHdpGumE+8pcLnhWXUVarq6kW2u+K4nAznGJQ3zBD22LIywDNrh8DFI2FZFQpct2 OsuVbUeHnYnuaXARp2fADsDvLtjtbgIUFZ8U2TwO3o608ba3Aa3L+qQEH19JRPgn8vhw JP36a0qRqdP3HY9J1+CSNj3ysoJpwRyKgszIY7pLmpQdOrjJSCMg/Yfyg0/IuVMAIfBi dTAQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=DkwXScb6wJOf3gN1DF0csk3W5arFQbdl8U7x7u5uuJY=; b=cPHLoizm5U1lu7QryDpNU7MP14ul9EWuT78J85Lna+fHmeIi3BLkFmZ3oqx10J71af LPrC5G2Dz1Cuqw+uvECvWfXcL1BRAZofvf1ZqzFZ6iVJ5ZGpwJZCX5nHN2DnflBDldvU rjhj3+ZyB8ytuVIgmzj6a124f0Pyi3rjDoB0dB8roxuaN4zo2zeH2g3GjLKEM634qZgL 1Ri/8IglmV7MD65S6oJQOhXzo3CNtHSkoG6DuW8V5OygpeoNDYG5lqmty6pSjV2+X4Xb a3DLQq7QZ8ynMr2pxRGbqeTPyr1leLh1mCKQvlIq7sMRkYMOx9MTy/XqVj5clfbJEWxa 6pOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=I3iL7D8s; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o18-20020aa79792000000b0062602702839si4848516pfp.87.2023.04.08.07.44.02; Sat, 08 Apr 2023 07:44:16 -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=@redhat.com header.s=mimecast20190719 header.b=I3iL7D8s; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230029AbjDHOfZ (ORCPT <rfc822;a1648639935@gmail.com> + 99 others); Sat, 8 Apr 2023 10:35:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229739AbjDHOfY (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 8 Apr 2023 10:35:24 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EF31C66C for <linux-kernel@vger.kernel.org>; Sat, 8 Apr 2023 07:34:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680964477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=DkwXScb6wJOf3gN1DF0csk3W5arFQbdl8U7x7u5uuJY=; b=I3iL7D8sj8OAkv9cl4y/a4x8x6xSFR/bTpC0bZgcBI9RJyobbeVEo/hZzXXCyKKrszQxAc BrTlAeUZP4dmkKok+nrl7tC8+r9vRkj/xgr5StdTQ3oQEJmko6ggXVV6uIlLem/5K88GjT Z3M5ct3Eeg0BUpPfCO/oUcepJLUFQo0= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-480-57ZpoIqzMnCikc13uxzetg-1; Sat, 08 Apr 2023 10:34:36 -0400 X-MC-Unique: 57ZpoIqzMnCikc13uxzetg-1 Received: by mail-qk1-f199.google.com with SMTP id 69-20020a370c48000000b007468cffa4e2so642144qkm.10 for <linux-kernel@vger.kernel.org>; Sat, 08 Apr 2023 07:34:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680964475; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DkwXScb6wJOf3gN1DF0csk3W5arFQbdl8U7x7u5uuJY=; b=VyOEDk8oCUHf610WV7hTmDmVrXuoCqKBj5ZxJ1vcAjeaAKIOJsJwGW38+TslXYZTeX p6Pyc334lfvZ1p3+HrQUs4t1p/KoybyCVGVl2EBnREQ98KxNe+v8SbErwNDHs5fkW9hv ufvcuDtSvDRuPW147E8MPo0NlB6SHnkhP93WyTZg6Zi5QptZZ7XD74n+wEzr8JVNQ1np xNiDwY1ltKkRy/8aVvu5XtFyccWlq2EmUV3eNjAl6rAvLEAmF6lM/VOO5PS66MklTRQ4 VzMNYSL/8LugNZWT6njyKJp/kU+hNXabUx6Mut/bZtBArrr5rRC1zE9fpo8N7rJpmqyN 0oXQ== X-Gm-Message-State: AAQBX9eenw603ojrGeXgLaXOSQbQF7CfOLGJkv58L8zmsmg1p3JPxbru iBfMPzit/MJvQ7nFfC4k2OQb7c269q+cWrQA9Ng2rdFW+PPSNvgRZROycs6PxoMw8+fTeVy+eNa YhtuA8h65LOm7ndCJp8rD/3WJ X-Received: by 2002:a05:622a:4c7:b0:3e4:dcb4:169 with SMTP id q7-20020a05622a04c700b003e4dcb40169mr9743249qtx.16.1680964475600; Sat, 08 Apr 2023 07:34:35 -0700 (PDT) X-Received: by 2002:a05:622a:4c7:b0:3e4:dcb4:169 with SMTP id q7-20020a05622a04c700b003e4dcb40169mr9743220qtx.16.1680964475319; Sat, 08 Apr 2023 07:34:35 -0700 (PDT) Received: from dell-per740-01.7a2m.lab.eng.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id g129-20020a37b687000000b0074865a9cb34sm2052931qkf.28.2023.04.08.07.34.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Apr 2023 07:34:35 -0700 (PDT) From: Tom Rix <trix@redhat.com> To: wim@linux-watchdog.org, linux@roeck-us.net, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com Cc: linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Tom Rix <trix@redhat.com> Subject: [PATCH] watchdog: imx2_wdt: set variables imx_wdt* storage-class-specifier to static Date: Sat, 8 Apr 2023 10:34:28 -0400 Message-Id: <20230408143428.2704141-1-trix@redhat.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762619615296177180?= X-GMAIL-MSGID: =?utf-8?q?1762619615296177180?= |
Series |
watchdog: imx2_wdt: set variables imx_wdt* storage-class-specifier to static
|
|
Commit Message
Tom Rix
April 8, 2023, 2:34 p.m. UTC
smatch reports
drivers/watchdog/imx2_wdt.c:442:22: warning: symbol
'imx_wdt' was not declared. Should it be static?
drivers/watchdog/imx2_wdt.c:446:22: warning: symbol
'imx_wdt_legacy' was not declared. Should it be static?
These variables are only used in one file so should be static.
Signed-off-by: Tom Rix <trix@redhat.com>
---
drivers/watchdog/imx2_wdt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On 4/8/23 07:34, Tom Rix wrote: > smatch reports > drivers/watchdog/imx2_wdt.c:442:22: warning: symbol > 'imx_wdt' was not declared. Should it be static? > drivers/watchdog/imx2_wdt.c:446:22: warning: symbol > 'imx_wdt_legacy' was not declared. Should it be static? > > These variables are only used in one file so should be static. > > Signed-off-by: Tom Rix <trix@redhat.com> We already have that at https://patchwork.kernel.org/project/linux-watchdog/patch/20230228151648.4087637-1-linux@roeck-us.net/ but I don't really care which one Wim picks up, so Reviewed-by: Guenter Roeck <linux@roeck-us.net> Guenter > --- > drivers/watchdog/imx2_wdt.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c > index 19ab7b3d286b..6fcc3596103c 100644 > --- a/drivers/watchdog/imx2_wdt.c > +++ b/drivers/watchdog/imx2_wdt.c > @@ -439,11 +439,11 @@ static int __maybe_unused imx2_wdt_resume(struct device *dev) > static SIMPLE_DEV_PM_OPS(imx2_wdt_pm_ops, imx2_wdt_suspend, > imx2_wdt_resume); > > -struct imx2_wdt_data imx_wdt = { > +static struct imx2_wdt_data imx_wdt = { > .wdw_supported = true, > }; > > -struct imx2_wdt_data imx_wdt_legacy = { > +static struct imx2_wdt_data imx_wdt_legacy = { > .wdw_supported = false, > }; >
diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c index 19ab7b3d286b..6fcc3596103c 100644 --- a/drivers/watchdog/imx2_wdt.c +++ b/drivers/watchdog/imx2_wdt.c @@ -439,11 +439,11 @@ static int __maybe_unused imx2_wdt_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(imx2_wdt_pm_ops, imx2_wdt_suspend, imx2_wdt_resume); -struct imx2_wdt_data imx_wdt = { +static struct imx2_wdt_data imx_wdt = { .wdw_supported = true, }; -struct imx2_wdt_data imx_wdt_legacy = { +static struct imx2_wdt_data imx_wdt_legacy = { .wdw_supported = false, };