From patchwork Mon Mar 29 16:19:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Neeli X-Patchwork-Id: 12170459 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7FC0C433E0 for ; Mon, 29 Mar 2021 16:20:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ACBF661964 for ; Mon, 29 Mar 2021 16:20:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229711AbhC2QUQ (ORCPT ); Mon, 29 Mar 2021 12:20:16 -0400 Received: from mail-mw2nam12on2069.outbound.protection.outlook.com ([40.107.244.69]:19105 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230397AbhC2QUB (ORCPT ); Mon, 29 Mar 2021 12:20:01 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NP8mcjC4XlfvvKk2LtzFYD/4Bh1MsVrDb00SykgnJtZcAbuMuIS+N/oPa/PLJPr71mDtCoXPVMchpmSBECQB7ZuGkQU/thbxArwJPbuN0mOcUysw2BFDmVleedmWAow3TfvanAD3CVLu8VH1KgcXZbd4wrpYyQznkOSYF/A7RHCRoFlCZvyRvQSZBwWq0uC0RmiF0UcOPg76M5/jtiF60s5Lfv2C6IVtFKGyFw9d55F/KJXttGGIUzZnaJDOAueGYbp1HSuArIPnPIbLozAuJ6+s0u+e36A2bS46ktZxENpXauBl35upq4m3jvPZUDUjaSvlRlUpJqDZUW4IInykHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BZnI2rkk3qtBrTzecTCr/PKsSPaVMywOsYWLcMfwAQ0=; b=gIWaO+t5IP7qSoSeUQN0bsdSfPaH6E+ldxN3rKJhRErIBnznS6Y9JddyjgKnJa7KvvPAR9tXqAnyHbJ2zFg2fAHlc+TF3ctDCgwTLDbBMdNFr7IRqod3M6c7kyPVmdHITmpjdvnhORzkXK0ShzF7acKb0xmnPZtAiSVOFg96Kn3GWeXAp+XQgw1sPy8yzy+exqUxRXY/XLPMIOzeZfQSqvkfkxDCMd8HoX/Yhlg++94gu0o3x5s+q9iD6p3W9QgfkWpzVQ0qPs0AZjGb79s5fJR6c/LONPrmMU+MlTWxb2zFkrrf6zkz/G9qaxFkcH/s8cgtd0y5DOfxkGmBPMIkYQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=roeck-us.net smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BZnI2rkk3qtBrTzecTCr/PKsSPaVMywOsYWLcMfwAQ0=; b=SFDs51iCFOWcxE0oEncIOTlKjnVE0SStPBoQwsOXoXM8oBs6ZyFdyk49TlzY3P2anK2ragcH4ScOHJH1MP0+/jT2oMPhyIL4rpSnna6ExaluYWifI93z68MwQfH31xx3Lz/hadku9A7qVX7+DCBnZxTv9r8J8KNFLYHyDmonIzE= Received: from DM5PR11CA0012.namprd11.prod.outlook.com (2603:10b6:3:115::22) by DM6PR02MB6793.namprd02.prod.outlook.com (2603:10b6:5:213::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.24; Mon, 29 Mar 2021 16:20:00 +0000 Received: from CY1NAM02FT007.eop-nam02.prod.protection.outlook.com (2603:10b6:3:115:cafe::25) by DM5PR11CA0012.outlook.office365.com (2603:10b6:3:115::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.26 via Frontend Transport; Mon, 29 Mar 2021 16:20:00 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; roeck-us.net; dkim=none (message not signed) header.d=none;roeck-us.net; dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch02.xlnx.xilinx.com; Received: from xsj-pvapexch02.xlnx.xilinx.com (149.199.62.198) by CY1NAM02FT007.mail.protection.outlook.com (10.152.75.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3977.25 via Frontend Transport; Mon, 29 Mar 2021 16:20:00 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 29 Mar 2021 09:19:49 -0700 Received: from smtp.xilinx.com (172.19.127.96) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2106.2 via Frontend Transport; Mon, 29 Mar 2021 09:19:49 -0700 Envelope-to: git@xilinx.com, linux@roeck-us.net, wim@linux-watchdog.org, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org Received: from [172.23.80.241] (port=50308 helo=xhdsneeli40x.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1lQucG-0002qR-0k; Mon, 29 Mar 2021 09:19:48 -0700 From: Srinivas Neeli To: , , , CC: , , , , Srinivas Goud , Srinivas Neeli Subject: [PATCH V2 1/5] watchdog: of_xilinx_wdt: Add comment to spinlock Date: Mon, 29 Mar 2021 21:49:35 +0530 Message-ID: <20210329161939.37680-2-srinivas.neeli@xilinx.com> X-Mailer: git-send-email 2.9.1 In-Reply-To: <20210329161939.37680-1-srinivas.neeli@xilinx.com> References: <20210329161939.37680-1-srinivas.neeli@xilinx.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a2f84a60-1c45-4c46-01de-08d8f2ce8051 X-MS-TrafficTypeDiagnostic: DM6PR02MB6793: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:2733; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1DWUuYEJXtIUeEbyn69l4TNLUJyKpYpYwooIUSueZbDJ2frfSAIFtZU+ZWGNZFN6FY498VaxWAc+aSYP0ib0QvcWce0ndax5QhtfCX4RJMhpz5qtXTH5Uae/thWJHten8xkrffXBuLo5xxr6gSO56E8kSQecXKvyozUyLResnWr5Pw8haBZAn7/pDpectigLbHHcrcTgGM5A+9y9W45E0g2mBCr7/dxSY7VfZ67v1xTW/UGp+YhK9kUmf9cZjqlzWMsPDwPuu2NwARwXS5DhNMVzLKTtY9o1eBd1emwQ/w6jaKie20Pv9OtFgFwv8D4/b6jJryqHnjk9MkAHImil0LS/sPo/29v/p7BsbJ0pghRVaLex3Or+MvNMN03qfh3jfbTNZMh6KPXU6ihIlsXQnvZxI2FCgvJxdeV348gmhq6wt1zwYvmfgDF7EHwft8Z21oAYK1gPke3PdgvGRj0+fUTKMz5XEiE2W5bfVc3Bf4XK7tKR9yi55gJSDVehgawbd/bM9smrB/Qtj8JKzrL7Qqggj6y4lEpCxfnK/tRNEZNqYhDfazOqfLNxm7O8FNcJD1X7xvka8AX7VnR0C6W/nl8Em3A/IzygpwMSth+qkDrITeZH18hkzVTZoK56br/a3sIrRlChoNWNwOKPudnoRh4HB3f2dKF5eo8djwENQgduhPDvw2/WFtooZHcUTOwg X-Forefront-Antispam-Report: CIP:149.199.62.198;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:xsj-pvapexch02.xlnx.xilinx.com;PTR:unknown-62-198.xilinx.com;CAT:NONE;SFS:(4636009)(39860400002)(396003)(136003)(376002)(346002)(46966006)(36840700001)(107886003)(7636003)(426003)(8676002)(8936002)(9786002)(6636002)(70206006)(36906005)(316002)(47076005)(82310400003)(70586007)(54906003)(336012)(1076003)(7696005)(5660300002)(2616005)(6666004)(356005)(186003)(4326008)(2906002)(36860700001)(26005)(478600001)(82740400003)(36756003)(83380400001)(44832011)(110136005)(102446001);DIR:OUT;SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Mar 2021 16:20:00.2272 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a2f84a60-1c45-4c46-01de-08d8f2ce8051 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.62.198];Helo=[xsj-pvapexch02.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: CY1NAM02FT007.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR02MB6793 Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org From: Srinivas Goud Based on checkpatch every spinlock should be documented. The patch is fixing this issue: ./scripts/checkpatch.pl --strict -f drivers/watchdog/of_xilinx_wdt.c CHECK: spinlock_t definition without comment + spinlock_t spinlock; Signed-off-by: Srinivas Goud Signed-off-by: Michal Simek Signed-off-by: Srinivas Neeli Reviewed-by: Guenter Roeck --- drivers/watchdog/of_xilinx_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/of_xilinx_wdt.c b/drivers/watchdog/of_xilinx_wdt.c index 7fe4f7c3f7ce..00549164b3d7 100644 --- a/drivers/watchdog/of_xilinx_wdt.c +++ b/drivers/watchdog/of_xilinx_wdt.c @@ -40,7 +40,7 @@ struct xwdt_device { void __iomem *base; u32 wdt_interval; - spinlock_t spinlock; + spinlock_t spinlock; /* spinlock for register handling */ struct watchdog_device xilinx_wdt_wdd; struct clk *clk; }; From patchwork Mon Mar 29 16:19:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Neeli X-Patchwork-Id: 12170467 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 589F6C433E1 for ; Mon, 29 Mar 2021 16:21:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 295C761982 for ; Mon, 29 Mar 2021 16:21:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231218AbhC2QUt (ORCPT ); Mon, 29 Mar 2021 12:20:49 -0400 Received: from mail-eopbgr700060.outbound.protection.outlook.com ([40.107.70.60]:10433 "EHLO NAM04-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230323AbhC2QUQ (ORCPT ); Mon, 29 Mar 2021 12:20:16 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fN9k/C24h52eAQuxVVOLFuadq4Bger296yFkJIxISznwbZ6JxdTaB/gbQvlEAAMZRfdQSwtFqEeXUBdqG6eERhUGdN7nuBOcu6Y/BOPkbdEc0AmuQaawZUyUKz+GCIhS8gFZ4sA3Ax08QMC1up7mQeIQ47E7I7bC+VZuvF637wEbx2Voy1lMUuomqqCGL3VtyVcpsK4vPeZeiy0ftg9zlugYXByGWztZLSXwLYRW7/DBbdYif1lUp6hbwLXA3C/hrF1MczDE6/mViF0/g3WITFN1iLLoJNV1Yu+8rmOdiXt3JtmyowbRHzxRxGiw3WR3/VzS5gEI3l1QJC2MwxbVcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=s8m0cD9wEuxA6bSr7dj7+X/XTAvngObNdnLPFOgaLnI=; b=Z14947sGZbL/27D2rQfkE2hQbnEmEAUgj7ZfBrqZ2EQE0Hyb/NNYxIFtobsdplkzOPLvTkHRbdO2IIynnf63KgzplLyAkr16N1FnX7H+pvCMQE7EkQpA1stc/323aVE0XpWAkmiGB3w37ep0GY9ZJyY8TviNhAnt8/gzSmEhbKO4AVzYa8QbsgQTrR9bFTiazriQjldi2EBw0WT9ZH+NH/YbOkatj6Rt7Tk3BK4LEHKpcUydaim2CgOEeHmSIKjPkP7aO/OnUqtf457BPHuAk3TnxNA+AYRltRYo0qHBjbD08h7poXNT0VtPEkGTrPh+gDOXwBnh78Zir+joVEPisw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=roeck-us.net smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=s8m0cD9wEuxA6bSr7dj7+X/XTAvngObNdnLPFOgaLnI=; b=I5N6SHof3uK31RvEEz4JZ2Wa75UzdLvl9b39aQmg020EElu6hCwWOnLyFhkPxD5QI4C5qvf9TTmwcRgOWktcs+oe3fRaaJfzRgpXUi3JBpCC1tqjNSoQhwXqq6JmXUZb+0OiT4sAdaJo2vjjKV/Q4W67wd26BgQDIXitm/p+PVc= Received: from CY4PR22CA0081.namprd22.prod.outlook.com (2603:10b6:903:ad::19) by MWHPR02MB2799.namprd02.prod.outlook.com (2603:10b6:300:107::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.33; Mon, 29 Mar 2021 16:20:14 +0000 Received: from CY1NAM02FT019.eop-nam02.prod.protection.outlook.com (2603:10b6:903:ad:cafe::24) by CY4PR22CA0081.outlook.office365.com (2603:10b6:903:ad::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.24 via Frontend Transport; Mon, 29 Mar 2021 16:20:14 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; roeck-us.net; dkim=none (message not signed) header.d=none;roeck-us.net; dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch02.xlnx.xilinx.com; Received: from xsj-pvapexch02.xlnx.xilinx.com (149.199.62.198) by CY1NAM02FT019.mail.protection.outlook.com (10.152.75.177) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3977.25 via Frontend Transport; Mon, 29 Mar 2021 16:20:14 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 29 Mar 2021 09:19:52 -0700 Received: from smtp.xilinx.com (172.19.127.96) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2106.2 via Frontend Transport; Mon, 29 Mar 2021 09:19:52 -0700 Envelope-to: git@xilinx.com, linux@roeck-us.net, wim@linux-watchdog.org, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org Received: from [172.23.80.241] (port=50308 helo=xhdsneeli40x.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1lQucI-0002qR-VS; Mon, 29 Mar 2021 09:19:51 -0700 From: Srinivas Neeli To: , , , CC: , , , , Srinivas Goud , Srinivas Neeli Subject: [PATCH V2 2/5] watchdog: of_xilinx_wdt: Used BIT macro Date: Mon, 29 Mar 2021 21:49:36 +0530 Message-ID: <20210329161939.37680-3-srinivas.neeli@xilinx.com> X-Mailer: git-send-email 2.9.1 In-Reply-To: <20210329161939.37680-1-srinivas.neeli@xilinx.com> References: <20210329161939.37680-1-srinivas.neeli@xilinx.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 77a3ab91-8518-4613-15ef-08d8f2ce889e X-MS-TrafficTypeDiagnostic: MWHPR02MB2799: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:949; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LPxXaYbi5wqO+hoGkPURZ4+VqeS41p0GDRnR5GQM6bW/Uf/ofNV+MBn7iwPPIzrf214RGLx1Z0LeNNhnAnEdb9Te2/6KSgV1xEcrwsnUP/FVcbP7L0rbkEJ0av7rJHNxggcT1h5FbO2Z4osa66z9kuhaiuz+XbUt+WZ/n38WQwi2gzH35v1Jiw8NLeHIH5send+UaKzOLzLY6JYqo9n/CX+Xt/gJ2GIZOcd89C0OjZEu1H88wSFR5TTPWPWZnN78QRDLniJ2uyduooDxC4lUGz3f7v36C9NpgU2i16b3f1wM1+VOnCgDbTHv3YW/tEcxlYNdrtnXMHqq7+TEBWsTNVDq/cJ/qPy4MW2s83Gmy6pK3YoD08NP5FB6eS+6cE/1G1x7P/TB9IqN/Zs1eT0lMw69Vw6OVLvExOr6+s2bNyvaGHjvSUtkEEe4h/Uxj+rvs9qx9MW7l0Ld7mJbcRcNU4MvhvEZ7F3Q1vv6/cd8N3A/B9+8+/xWT67K77ZgeSEvEgT/m4UkOQFg7V0OTbEaMPCrGEbrxIegtHVaUYOfTN1wgOStmKgN8qdxLRyh6tjCp2Sq3l60qIubiN+Wxx/d/Hi+5aRvMaBZ+33BL8CGLgvjVTfpXmxI8vL88fC0lZXyeXuSoEf65o2YlwerM95OiMQnpfW/X7gX3TqyfNlQUA7twcooHjbKThx/NxCMjTdO X-Forefront-Antispam-Report: CIP:149.199.62.198;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:xsj-pvapexch02.xlnx.xilinx.com;PTR:unknown-62-198.xilinx.com;CAT:NONE;SFS:(4636009)(46966006)(36840700001)(36756003)(47076005)(82310400003)(83380400001)(356005)(7636003)(36860700001)(426003)(2906002)(186003)(2616005)(336012)(44832011)(26005)(110136005)(498600001)(36906005)(107886003)(4326008)(54906003)(70206006)(70586007)(6636002)(7696005)(9786002)(8676002)(8936002)(1076003)(5660300002)(6666004)(102446001);DIR:OUT;SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Mar 2021 16:20:14.1531 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 77a3ab91-8518-4613-15ef-08d8f2ce889e X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.62.198];Helo=[xsj-pvapexch02.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: CY1NAM02FT019.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR02MB2799 Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org From: Srinivas Goud Used BIT macro instead of mask value. Signed-off-by: Srinivas Goud Signed-off-by: Michal Simek Signed-off-by: Srinivas Neeli Reviewed-by: Guenter Roeck --- Changes in V2: -Included bits.h header file. --- drivers/watchdog/of_xilinx_wdt.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/watchdog/of_xilinx_wdt.c b/drivers/watchdog/of_xilinx_wdt.c index 00549164b3d7..f76ec56859a4 100644 --- a/drivers/watchdog/of_xilinx_wdt.c +++ b/drivers/watchdog/of_xilinx_wdt.c @@ -6,6 +6,7 @@ * (C) Copyright 2011 (Alejandro Cabrera ) */ +#include #include #include #include @@ -24,12 +25,12 @@ #define XWT_TBR_OFFSET 0x8 /* Timebase Register Offset */ /* Control/Status Register Masks */ -#define XWT_CSR0_WRS_MASK 0x00000008 /* Reset status */ -#define XWT_CSR0_WDS_MASK 0x00000004 /* Timer state */ -#define XWT_CSR0_EWDT1_MASK 0x00000002 /* Enable bit 1 */ +#define XWT_CSR0_WRS_MASK BIT(3) /* Reset status */ +#define XWT_CSR0_WDS_MASK BIT(2) /* Timer state */ +#define XWT_CSR0_EWDT1_MASK BIT(1) /* Enable bit 1 */ /* Control/Status Register 0/1 bits */ -#define XWT_CSRX_EWDT2_MASK 0x00000001 /* Enable bit 2 */ +#define XWT_CSRX_EWDT2_MASK BIT(0) /* Enable bit 2 */ /* SelfTest constants */ #define XWT_MAX_SELFTEST_LOOP_COUNT 0x00010000 From patchwork Mon Mar 29 16:19:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Neeli X-Patchwork-Id: 12170463 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83A88C433E2 for ; Mon, 29 Mar 2021 16:21:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5356161964 for ; Mon, 29 Mar 2021 16:21:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231259AbhC2QUu (ORCPT ); Mon, 29 Mar 2021 12:20:50 -0400 Received: from mail-dm6nam10on2040.outbound.protection.outlook.com ([40.107.93.40]:57056 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230399AbhC2QUS (ORCPT ); Mon, 29 Mar 2021 12:20:18 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=awX48N9thbjASUrdjfHU08Y9WeWg+tpY0Ez6ivRm7+E4vekVr+/HnWK/pNSs3w+e1KwWfZuZZq28y3Z4PTdAiMO4v6fF1IvzfxnT+FysQRqTyuCMQDcyhW19TVmXBst1Taka/3xKIqRemOkVIBivkJzBD4x/iEMv/PR5cwBBO/P3LhZLLw97UFQZR62FprzK14skOaM+2BPdT4Ki+AO/cHkZYEz0/SPWhfBo3dVd3d/0gLWiGh+FcMiZHoVJVDh0Ye8o6FmXDspq33HvcEmB4HKfoGGsHV9SbgB7VO+lh3n44eDqGAK6+8lWpz0RWxEuNbNTcEDbarHjfzn7ZzI0HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qe5DPw70EUXqevLT7Mwr9qTrImsAq1HJ94uLtEUhAYo=; b=CYT8+uz3e780oXsGkoCDw46pe5ktx8lDv0IcURLmAn982qjGzL2akVGiqfMxu3L0XwKYWWQh866HJ80HEoJ1bbFsE0vw3V757mF+Pk6smsmR/tl1rzJuldzIk12UGXQnFzDEth4JGYIsSSSYwFkJ5wLIZav7meIZnUaeTMd7BDMFrynkkGaVKfAWkH18AMC4U9loGn06V6lvnv4Mjvgj9jvIwFq0xrYa/VcIiVNUZuo4j6dZU7CSxF8OCePihcCT4jbYo/edLiLjF/9CXo4X48GE93flN09zXa9cVuRSvcEirIeg0D6tR3dMWmNs9OkyMtZsXbBA0UFLPlHLUbsiew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=roeck-us.net smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qe5DPw70EUXqevLT7Mwr9qTrImsAq1HJ94uLtEUhAYo=; b=aGF5KbmYPsMQfU7MGGhgggwS6Dibl+OsqJFAZuzOvIpMGP9FyQBkIkLiK+aHAS3GxugKHFDItMs3A9U/O4rNFz8+6M/TNDJmxqLKkFGkaA6XbvwCJ+ASZzoNCoaM0bk/h53Slsh1c3l+XT2gXlDXBhPSyGXPvjxD/400L4G3lig= Received: from DM3PR03CA0021.namprd03.prod.outlook.com (2603:10b6:0:50::31) by DM6PR02MB5211.namprd02.prod.outlook.com (2603:10b6:5:49::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.25; Mon, 29 Mar 2021 16:20:17 +0000 Received: from CY1NAM02FT055.eop-nam02.prod.protection.outlook.com (2603:10b6:0:50:cafe::1c) by DM3PR03CA0021.outlook.office365.com (2603:10b6:0:50::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.26 via Frontend Transport; Mon, 29 Mar 2021 16:20:17 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; roeck-us.net; dkim=none (message not signed) header.d=none;roeck-us.net; dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch02.xlnx.xilinx.com; Received: from xsj-pvapexch02.xlnx.xilinx.com (149.199.62.198) by CY1NAM02FT055.mail.protection.outlook.com (10.152.74.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3977.25 via Frontend Transport; Mon, 29 Mar 2021 16:20:16 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 29 Mar 2021 09:19:55 -0700 Received: from smtp.xilinx.com (172.19.127.96) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2106.2 via Frontend Transport; Mon, 29 Mar 2021 09:19:55 -0700 Envelope-to: git@xilinx.com, linux@roeck-us.net, wim@linux-watchdog.org, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org Received: from [172.23.80.241] (port=50308 helo=xhdsneeli40x.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1lQucL-0002qR-Tu; Mon, 29 Mar 2021 09:19:54 -0700 From: Srinivas Neeli To: , , , CC: , , , , Srinivas Goud , Srinivas Neeli Subject: [PATCH V2 3/5] watchdog: of_xilinx_wdt: Used dev_dbg() Date: Mon, 29 Mar 2021 21:49:37 +0530 Message-ID: <20210329161939.37680-4-srinivas.neeli@xilinx.com> X-Mailer: git-send-email 2.9.1 In-Reply-To: <20210329161939.37680-1-srinivas.neeli@xilinx.com> References: <20210329161939.37680-1-srinivas.neeli@xilinx.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5bfdafdb-6cdb-49ab-07c4-08d8f2ce89ee X-MS-TrafficTypeDiagnostic: DM6PR02MB5211: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:1051; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BILbD2ucxD/mmxQUrImjwUWOX3JOtsJ4qp5lVMaukYcAvPiDEJT61mNMCcuVQ3eE84uEnw8R7PhzSg33beCFpxa689BTq8+ugj8czG1fnafH6Z+4zURl75w2coECipJBw/EbCt/DCAONZAk6g7zsiESWaz6tPQG6re6BnRw94qS2FNTiTNJP8uPBOS3mh6J7lR9Tk/7OsEDBDzIKJ/15Ut92Sv6tAVdP+RpIN9TA+WUQNw+zSy8myS61OAYzWtkokYiCVGEU4LoI8zSYxAMyPNHY8D+BTsCkYIP/nGyiOD3uQZcIpTxoovhKHKKRoLPDPRChsXmlWs2oeXkrfqgXk9sNwftDD+/8YUfnr8H69lr9C5SPHygjqG1PYJdfHte9MxCJMZcw22TDCPTo9QFYyXV84V9NKtqx4voA4GuZKo2Z0Kb8KdRx1JVAbtB5ZHUS2v0KfYrhWkHDKsbnD+6BAwzmsmK70vx7Fv/p/A7YKKf7wWQyvYQ+6DaYq3vHweVBnmQ+rDgMtT5AYFxuZdzzjNIi9jcJWazgg/WTiFSWUpznloKf4xhJdpTFB+EHdy77GhoiyC4jDOUbgLIr5hocJhxrTztU8vk0ED7yDj5GKPkOsmvqBv0go2jm+A2EREXye+lqrw35UIFWtOhCJ0WVlz7rI78tv7znd5Pngioytr5RqUYJSPspVvCHHTpRXD3Y X-Forefront-Antispam-Report: CIP:149.199.62.198;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:xsj-pvapexch02.xlnx.xilinx.com;PTR:unknown-62-198.xilinx.com;CAT:NONE;SFS:(4636009)(136003)(39860400002)(346002)(376002)(396003)(46966006)(36840700001)(82310400003)(7696005)(336012)(70586007)(7636003)(47076005)(70206006)(82740400003)(4326008)(107886003)(9786002)(8676002)(356005)(8936002)(186003)(36860700001)(426003)(2616005)(83380400001)(5660300002)(110136005)(316002)(1076003)(2906002)(54906003)(478600001)(6666004)(44832011)(36906005)(6636002)(36756003)(26005)(102446001);DIR:OUT;SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Mar 2021 16:20:16.3459 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5bfdafdb-6cdb-49ab-07c4-08d8f2ce89ee X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.62.198];Helo=[xsj-pvapexch02.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: CY1NAM02FT055.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR02MB5211 Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org From: Srinivas Goud This patch removes pr_info in stop function and adds dev_dbg() in start/stop function to display device specific debug info. Signed-off-by: Srinivas Goud Signed-off-by: Michal Simek Signed-off-by: Srinivas Neeli Reviewed-by: Guenter Roeck --- Changes in V2: -Updated minor review comments. --- drivers/watchdog/of_xilinx_wdt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/watchdog/of_xilinx_wdt.c b/drivers/watchdog/of_xilinx_wdt.c index f76ec56859a4..5f31fdea517a 100644 --- a/drivers/watchdog/of_xilinx_wdt.c +++ b/drivers/watchdog/of_xilinx_wdt.c @@ -71,6 +71,8 @@ static int xilinx_wdt_start(struct watchdog_device *wdd) spin_unlock(&xdev->spinlock); + dev_dbg(wdd->parent, "Watchdog Started!\n"); + return 0; } @@ -92,7 +94,7 @@ static int xilinx_wdt_stop(struct watchdog_device *wdd) clk_disable(xdev->clk); - pr_info("Stopped!\n"); + dev_dbg(wdd->parent, "Watchdog Stopped!\n"); return 0; } From patchwork Mon Mar 29 16:19:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Neeli X-Patchwork-Id: 12170465 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 690C8C433DB for ; Mon, 29 Mar 2021 16:21:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3E31561985 for ; Mon, 29 Mar 2021 16:21:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230397AbhC2QUu (ORCPT ); Mon, 29 Mar 2021 12:20:50 -0400 Received: from mail-bn8nam11on2051.outbound.protection.outlook.com ([40.107.236.51]:4128 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230415AbhC2QUT (ORCPT ); Mon, 29 Mar 2021 12:20:19 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=asAZHbu1pv37Ix8X8e6cQQhDkweYNHih7pi/cSwEh5zeIJS41MuJU1dhjDzyxBfYYw7L5vu0WnD2Cu8RkYIoK6RgTx2R9l4JMexvEyWaIYEfacW0xVyPo+JlJikyZ9ndmsWeLu/7Xqu63ij33iyIryC1vMWC+gFQ3X9CD5soWY/JN++LXGLOnI+ujp2KjeAWArVSzgRMnkWOyuFfM02zXt7xTalOkQo0Arj/9PmK85lQWPXVdU4FFPopKSQ9QRIUvv+HaGWvI137pVONijUxHTi/qrPYn+h4PoBZVMLOaO9UsiIsQ7mOefWzPOF/sPnZTtCz6TQhGVCb1bP5Hd2k6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8it9juZAXpUWUol4IqQ9nnZXcfgkro1GMaXOFeJGNxk=; b=eHlYP85Vpp1kShGXjvKXAYAKQ3olFxY3Z3vubMQ6y0LUJuyKntq54bKGKpuNRmupA9+N4l1yDzMKJXgE6iSQb9K5mjuCwdnwPP7NXkGLwQ/oSJaxwVuEBtaclIZ66CLAd62cXYaTjuBR2OasO8zKzFiypdLXx51EYP6lJMS+h3Ngh4NMmK3SUUHfuMbLtl02qL6kZzMiigtHb8UIz9JTpgnJ/vdAgzhqPJbbsJkwcd1kNfP7OnnjsplvtqKzHTWakvp9XtMW5hOaip2xoaK/uAF7lnEs7DAkOSwxS2KNWrFv3XCpS79Igp9a71taTYTluOUwIKGzSt+LvHWTDcjl7w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=roeck-us.net smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8it9juZAXpUWUol4IqQ9nnZXcfgkro1GMaXOFeJGNxk=; b=ZjrTbM4Q65LHuORnZesePx6WB4HWIlhkM1W4MStGGCCql9AaDReDrDnVKIxiS5mMJOAJqizV8RXpfYOMHiyGwBcgmgmKWIQ1/FKLMZpabs2Ui8hLSk8Cw2XI+sBi1LeG2Q0gycm7c1NjG4+jqrkA7p8NXuAQIJv/0wuaZOPY4yA= Received: from CY4PR22CA0092.namprd22.prod.outlook.com (2603:10b6:903:ad::30) by BN8PR02MB6001.namprd02.prod.outlook.com (2603:10b6:408:b6::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.31; Mon, 29 Mar 2021 16:20:17 +0000 Received: from CY1NAM02FT019.eop-nam02.prod.protection.outlook.com (2603:10b6:903:ad:cafe::6b) by CY4PR22CA0092.outlook.office365.com (2603:10b6:903:ad::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.26 via Frontend Transport; Mon, 29 Mar 2021 16:20:17 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; roeck-us.net; dkim=none (message not signed) header.d=none;roeck-us.net; dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch02.xlnx.xilinx.com; Received: from xsj-pvapexch02.xlnx.xilinx.com (149.199.62.198) by CY1NAM02FT019.mail.protection.outlook.com (10.152.75.177) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3977.25 via Frontend Transport; Mon, 29 Mar 2021 16:20:17 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 29 Mar 2021 09:19:57 -0700 Received: from smtp.xilinx.com (172.19.127.96) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2106.2 via Frontend Transport; Mon, 29 Mar 2021 09:19:57 -0700 Envelope-to: git@xilinx.com, linux@roeck-us.net, wim@linux-watchdog.org, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org Received: from [172.23.80.241] (port=50308 helo=xhdsneeli40x.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1lQucO-0002qR-LT; Mon, 29 Mar 2021 09:19:57 -0700 From: Srinivas Neeli To: , , , CC: , , , , Srinivas Neeli Subject: [PATCH V2 4/5] watchdog: of_xilinx_wdt: Remove passing null pointer Date: Mon, 29 Mar 2021 21:49:38 +0530 Message-ID: <20210329161939.37680-5-srinivas.neeli@xilinx.com> X-Mailer: git-send-email 2.9.1 In-Reply-To: <20210329161939.37680-1-srinivas.neeli@xilinx.com> References: <20210329161939.37680-1-srinivas.neeli@xilinx.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: eb99ee30-e123-42f8-13c9-08d8f2ce8a5f X-MS-TrafficTypeDiagnostic: BN8PR02MB6001: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:1332; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: c04vHBmHYR3o1HbzFaw2v2BR8RmIK3lt5SBmDfZQFEZBnmtjjinw+uq/Swqh/hcGEV+xwoNrNZMvAeWZpZehQw99q182r5Eiii+eyJV/n1cLA83+iRjy2+kx6yCxBzOWLckjforJtaPb5/qbCAwfiL7lrKZp8eVAwUuOdNu/D/cQ4EszhJjev169AxbKXLMDhnQny/G6GzIQ+M2mSk7iAzadfYn8oGP49Rvix2y6YSnXKVbhNCcJiHSlTQe8VOqTR2dlDrl4zAdC1RpCH62V38t5mhFk6NjSYQWxPToWMjHYvVB2dmpsHaaNNA1/aeyZvxUzCK6w7nSbYcBZ/kPaQETcPnmCGL3XT8L2V4IE8Ayb2HcV6piFBduDMLroYSIgykxYJw2GC45C1pCBeYnr5TVWs/20yhXdWwSikMZZC4PrvAr7DH9ipUSHH2ImKJ1BhR03ASW80H50kYhbdmTU2z/Xmzm1Tg3W4tYqPVkxIzGZfO+1J8DjDRPNzAtjTzDl2J3nhQ4MDxY0T7O6lD15y8N0rlLpCG/cfeTYg2MI8YigTLm/WzSIcN3V6RpJS/3j4Oo/UvlQNxTZYzg7Bs6t6pKJHzC8V8TRdo/62U/+WjvsXY1k0C1z+bTmRDBdUgYKnSd/cLsUD/FekiVO1xeMaATrnxKXIGRFEyrYOmMqUb7YQslTCVIxnQWeMD3tI85F X-Forefront-Antispam-Report: CIP:149.199.62.198;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:xsj-pvapexch02.xlnx.xilinx.com;PTR:unknown-62-198.xilinx.com;CAT:NONE;SFS:(4636009)(36840700001)(46966006)(36906005)(498600001)(6666004)(8936002)(356005)(44832011)(110136005)(1076003)(54906003)(2906002)(107886003)(70586007)(83380400001)(36860700001)(8676002)(9786002)(5660300002)(36756003)(70206006)(7696005)(336012)(82310400003)(26005)(47076005)(6636002)(7636003)(186003)(4326008)(2616005)(426003)(102446001);DIR:OUT;SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Mar 2021 16:20:17.0977 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: eb99ee30-e123-42f8-13c9-08d8f2ce8a5f X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.62.198];Helo=[xsj-pvapexch02.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: CY1NAM02FT019.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR02MB6001 Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org clk is an optional property, if clock not defined, calling clk_prepare_enable() and devm_add_action_or_reset() are not useful. so calling these two apis only when clock is present. Addresses-Coverity:"FORWARD_NULL" Signed-off-by: Srinivas Neeli Reviewed-by: Guenter Roeck --- drivers/watchdog/of_xilinx_wdt.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/watchdog/of_xilinx_wdt.c b/drivers/watchdog/of_xilinx_wdt.c index 5f31fdea517a..afbff79cce42 100644 --- a/drivers/watchdog/of_xilinx_wdt.c +++ b/drivers/watchdog/of_xilinx_wdt.c @@ -211,6 +211,15 @@ static int xwdt_probe(struct platform_device *pdev) "The watchdog clock freq cannot be obtained\n"); } else { pfreq = clk_get_rate(xdev->clk); + rc = clk_prepare_enable(xdev->clk); + if (rc) { + dev_err(dev, "unable to enable clock\n"); + return rc; + } + rc = devm_add_action_or_reset(dev, xwdt_clk_disable_unprepare, + xdev->clk); + if (rc) + return rc; } /* @@ -224,16 +233,6 @@ static int xwdt_probe(struct platform_device *pdev) spin_lock_init(&xdev->spinlock); watchdog_set_drvdata(xilinx_wdt_wdd, xdev); - rc = clk_prepare_enable(xdev->clk); - if (rc) { - dev_err(dev, "unable to enable clock\n"); - return rc; - } - rc = devm_add_action_or_reset(dev, xwdt_clk_disable_unprepare, - xdev->clk); - if (rc) - return rc; - rc = xwdt_selftest(xdev); if (rc == XWT_TIMER_FAILED) { dev_err(dev, "SelfTest routine error\n"); From patchwork Mon Mar 29 16:19:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Neeli X-Patchwork-Id: 12170461 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06A51C433C1 for ; Mon, 29 Mar 2021 16:21:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C887461964 for ; Mon, 29 Mar 2021 16:21:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231197AbhC2QUs (ORCPT ); Mon, 29 Mar 2021 12:20:48 -0400 Received: from mail-dm6nam11on2078.outbound.protection.outlook.com ([40.107.223.78]:31905 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230248AbhC2QUQ (ORCPT ); Mon, 29 Mar 2021 12:20:16 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J06dUG6mb2Z0HEmDVVcINJ0BMs0EFtmjpOhhQ/qtZU9eNN5GQ1oEQsMdVQyJjJeEYLX7EZj1qcOLLrdvNx3odx7Ga305Sog2eLZ+3ew7qXzBlubKxKRf3cePeGJC/aNKx8nrv32uKg75xdAhdQCgZ6KOHWZG8VV4GLNyItxYxh111e4atI3VpxLgkuBM7VTfX1a2670e/Z+1ZHX6QmBhqlaiNuAbakAbeEiauXDR0VT1oTZZ9x/LVm+0vz3z9G5HUgYYvF9bBNCwTJNMlZ4J5q/LvFhPsQskVMaB4eeUb3BbY4fdodeS2ifqpI9f0SbEtO9DVnYewJCYp3FwDpIQ3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yA0XV+Gknyqig2JLsiLL3A/TgDtxmHbHg/MTSn9A2wQ=; b=EZ1UfGlgXfq9Csuy51pj0TDJt4fPKgEadTq7b36F0Drr3SHpOJRsOq5Na8ioH47SpbwEbejCsCWiH6PLiT1BwEC763XQpChxhYfrvEaQ3qmXZnQbpi4gRbwpMIPahWzWV09TfOqpA7UpagbGNR1unA+TGApgno6cqUGtweZZHyOpx4Dp8qiJX1rwu5BnFzfit15qRGXJut1Xh8MEzCfilTjWUnr5whvDqD7QL1qCS+x4r0sYYEx6YRJlzv4XHVovWd6ZDoMGAHje2biToXU2hU881UfQVOr6Qsgpmxb42D+RFCrjyuxbXYv9hNYCDw1H5NRiNt/5V8pCXOG/ICw/BA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=roeck-us.net smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yA0XV+Gknyqig2JLsiLL3A/TgDtxmHbHg/MTSn9A2wQ=; b=nm/QSmGz0+5bLA8gHaO4rQabbjCCqrBKjo0oTo9lnMyvPSJc2RhjSPUV0R5IJjIZKHL4BmePGUB+R9r5T5blHJi+rKE8huPSglLeS+VlaxrTCHtHCzA0r1gyt4bCmaMZhKGpxVuVpROqQFJvhG2jMdL4ncBjaPWy7mnfs7NxKeo= Received: from CY4PR22CA0044.namprd22.prod.outlook.com (2603:10b6:903:ed::30) by DM5PR02MB3702.namprd02.prod.outlook.com (2603:10b6:4:b3::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.33; Mon, 29 Mar 2021 16:20:12 +0000 Received: from CY1NAM02FT014.eop-nam02.prod.protection.outlook.com (2603:10b6:903:ed:cafe::e) by CY4PR22CA0044.outlook.office365.com (2603:10b6:903:ed::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.24 via Frontend Transport; Mon, 29 Mar 2021 16:20:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; roeck-us.net; dkim=none (message not signed) header.d=none;roeck-us.net; dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch01.xlnx.xilinx.com; Received: from xsj-pvapexch01.xlnx.xilinx.com (149.199.62.198) by CY1NAM02FT014.mail.protection.outlook.com (10.152.75.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3977.25 via Frontend Transport; Mon, 29 Mar 2021 16:20:12 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 29 Mar 2021 09:20:00 -0700 Received: from smtp.xilinx.com (172.19.127.96) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2106.2 via Frontend Transport; Mon, 29 Mar 2021 09:20:00 -0700 Envelope-to: git@xilinx.com, linux@roeck-us.net, wim@linux-watchdog.org, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org Received: from [172.23.80.241] (port=50308 helo=xhdsneeli40x.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1lQucR-0002qR-DO; Mon, 29 Mar 2021 09:19:59 -0700 From: Srinivas Neeli To: , , , CC: , , , , Srinivas Neeli Subject: [PATCH V2 5/5] watchdog: of_xilinx_wdt: Skip printing pointer value Date: Mon, 29 Mar 2021 21:49:39 +0530 Message-ID: <20210329161939.37680-6-srinivas.neeli@xilinx.com> X-Mailer: git-send-email 2.9.1 In-Reply-To: <20210329161939.37680-1-srinivas.neeli@xilinx.com> References: <20210329161939.37680-1-srinivas.neeli@xilinx.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e9416ba6-76a9-414b-d9d5-08d8f2ce87b3 X-MS-TrafficTypeDiagnostic: DM5PR02MB3702: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:1388; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: igpZQrgbM9HBXjUVkLzHI2O7FV3YKAaxpridshMbOEfqBN+kwwTrRlEX3DgwtpVuOs5bfS1z5jcjzjx7tdWbG4NzdB360DIckqL1HuqevMe3BgJGkA9ALLt3H8orpNfwgr1LyhSlz2rJvADEQh7rs9yIIZ35EryulIeUTYIoNUU/LmfKJFePe3LfRSz0GpSWtVMhLCopBx6486ekbrOc5mvdPx+pj7oxqfmDHRjas0yUimiSMYXq89PfOdE15JxAFcDIvMstD7BE/2LRE1YPjy219cYw587PfJe+YoyABTj+dC7qTfA+30vebzfE/TGKOz9JAk83o6alqDJU/zltd28JBdxWdyV4CJicbBjnv8HVbv88wFk3QJdko3c8NNTYpiKVfleNcL19lZ07dUeWO0M+Hsy7hnzLa9BfE4TfkLYt/kAC1LkH4Qv+F2mgK4Lm9AxdsfN/H0P7Htld7hQvx05nWdnMD+C/54me5Y4Fo3oAxAKayFo7Zp9D3Le+vqW5xHfBYIaXCmG7O8QTmCRzKhP1tz50mpnc9LMI9Z9L+Ix7Kc6iHIrytvSZ5LPUkbugvQ5YvL+nDjp5ipA0OpHl9si2qBvZxdLkueSCO2FJ0tlOEesDV01LxIRqyTRTsGiEE2OAFJ1ml1yESFq7UzWJNYYa1pRdvzkrFp1tAygA353zkLyG4UDGlU6RHWTOrjWx X-Forefront-Antispam-Report: CIP:149.199.62.198;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:xsj-pvapexch01.xlnx.xilinx.com;PTR:unknown-62-198.xilinx.com;CAT:NONE;SFS:(4636009)(39860400002)(136003)(396003)(376002)(346002)(46966006)(36840700001)(8936002)(478600001)(26005)(36860700001)(107886003)(6636002)(82310400003)(426003)(82740400003)(9786002)(36906005)(54906003)(8676002)(186003)(7696005)(2906002)(110136005)(316002)(70206006)(36756003)(6666004)(4744005)(70586007)(5660300002)(336012)(356005)(4326008)(1076003)(2616005)(44832011)(83380400001)(7636003)(47076005)(102446001);DIR:OUT;SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Mar 2021 16:20:12.6181 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e9416ba6-76a9-414b-d9d5-08d8f2ce87b3 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.62.198];Helo=[xsj-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: CY1NAM02FT014.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR02MB3702 Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org "%p" is not printing the pointer value. In driver, printing pointer value is not useful so avoiding print. Signed-off-by: Srinivas Neeli Reviewed-by: Guenter Roeck --- drivers/watchdog/of_xilinx_wdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/watchdog/of_xilinx_wdt.c b/drivers/watchdog/of_xilinx_wdt.c index afbff79cce42..3318544366b8 100644 --- a/drivers/watchdog/of_xilinx_wdt.c +++ b/drivers/watchdog/of_xilinx_wdt.c @@ -245,8 +245,8 @@ static int xwdt_probe(struct platform_device *pdev) clk_disable(xdev->clk); - dev_info(dev, "Xilinx Watchdog Timer at %p with timeout %ds\n", - xdev->base, xilinx_wdt_wdd->timeout); + dev_info(dev, "Xilinx Watchdog Timer with timeout %ds\n", + xilinx_wdt_wdd->timeout); platform_set_drvdata(pdev, xdev);