Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7924679ybl; Thu, 16 Jan 2020 07:50:30 -0800 (PST) X-Google-Smtp-Source: APXvYqwhUBYXbM1FqAeUJX9ImYvBM+NaNftu/ssgWmnebR6ojt4k6zTGDElk2Vn8duE12BdymQGn X-Received: by 2002:a05:6808:907:: with SMTP id w7mr4585080oih.91.1579189830353; Thu, 16 Jan 2020 07:50:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579189830; cv=none; d=google.com; s=arc-20160816; b=p1U1Araw+1dhVeGikFSyVTIqJKJqbPe8A5BKjAWUyVZvRP2inp5uGBlH6rsmdUHJHZ 2BmJxULDlZLdwmZqikIC6ojvxLZOWSmb5G7uSOw+qQ4ZEY1cQ6th18mJMULQeTD+xiVO RTIbnnbHXeV8f9LBLWvqpRmMe9Pa10cxF1IpMg68qUAP1Fm98ficI+RKykrWVbiVeSge CTz3pHmbxitc8ewnjf7L5w5c0+h9jr664LeZKyVaTMxM4v2uAt12EADDlfPBD9ffyrFb IIY6a7WCMbeKhCLGh72x0+EE12vcvX8CipmX5uCQWqzqOylCXEDRyEcb1ZpfLZzaqQl4 Av6A== 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; bh=huTcCeKRdO6T2NesAaGqeynPCc8WvA8tugh/WJ8Dtbc=; b=hdYKjxtegxO7HSCTHiOeNKrRGkuH1glxjUBBrKOwP4JEpEcbCqHK/QH/dTn85dqjD2 oMGWt6GjybpOMsveUtGfgsHYuk0VRDMCGJMdzFs3nOy5U/gsWHdUlDsgoc6rHiLRDRp7 hUtiPuPp8jYY56iPwxZLOYRJslPTrimfGUzsPS/qpHORGr9z38t1fN7vurkyB9fibrQJ cQpYXehhcDOlleA9gviU6urOXecQli+XG9yKZhG8THgvCQDN+xhR1dSsbbagH1OyUi3V ccOlxF/tmu6GNkDXzBWcYC8eDmoBshYwwgcWUPQe9aXMc09TrIfcICxy51AK4VUSPs6D ZHmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=G0x92qOp; 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 h14si11641993oie.98.2020.01.16.07.50.17; Thu, 16 Jan 2020 07:50:30 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=G0x92qOp; 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 S1726827AbgAPPsS (ORCPT + 99 others); Thu, 16 Jan 2020 10:48:18 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:45718 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726553AbgAPPsS (ORCPT ); Thu, 16 Jan 2020 10:48:18 -0500 Received: by mail-pl1-f194.google.com with SMTP id b22so8469937pls.12; Thu, 16 Jan 2020 07:48:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=huTcCeKRdO6T2NesAaGqeynPCc8WvA8tugh/WJ8Dtbc=; b=G0x92qOpFp0qKI6nZ7kGQOhD71Zn/VDKWFJJCIrflldCLCzZXOHAORHnXkmDRhvFfy 5zUGA5yj0/lLifVw4OCSmPfgq29wdN92rwS5addh6NEsEpUCmxii5jch9eJdJuEKH2oD CKSWUCQbU1UozBSDGofweLzCC/1HV5/Q1PI6gw4wBFCtwm5HQPV5Y56GaBXgnfcH5ZQj 2414/2w2MxK10PI3mHJS3cybbwxRPMQVLKh/VjbaMK/B3E3x0RJZ7WrXE2piq3FvhuTr 20ls3AX5kjhhCCOKeRzNx7oKXw9v3oSQtvs+QHjUrcYBdpFFvCTmmygweiAqCD1T5G8M pbXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=huTcCeKRdO6T2NesAaGqeynPCc8WvA8tugh/WJ8Dtbc=; b=oGCy50e5zpNSkQ8mn32rR8PP+Bk0d5FfgakGuxqizir95ZRasnL1ZsGSYadaYfLM1f WBry2ZnKGAzvyBNdZFdmwZOlP94kDtdzF6gn+y6Jz2+5m1djKmDNGUTgi4EHF2goFNRy u9Emindl1lIr+DBkulZcR4vPB6n88R266DJ/zuUxLuTO7y+P4MLpLSY4Dw3P/TWAikzT oddg5O+3R8OXmYZTrHnn+dagnRyNhPkPWoTDKOOMcmEAD3Hrms64ieR7Z+ROYGDeDZe5 A1kQxKXIx9fi8iXO9TuPWGJlIj0uuiCeE9h2KrqO/8ozOjNVGhBgX0U25bAYVlFJvdCH RPSg== X-Gm-Message-State: APjAAAXvk/OBEuZzVhalKua5dIXcr7TjIum57dgP+4mtKNZ5JvxfgcX8 kto8M4pWQ0mhUjNFubmf8rI6l2JN X-Received: by 2002:a17:90a:246c:: with SMTP id h99mr7613283pje.134.1579189697928; Thu, 16 Jan 2020 07:48:17 -0800 (PST) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id s13sm8048976pjp.1.2020.01.16.07.48.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2020 07:48:17 -0800 (PST) Date: Thu, 16 Jan 2020 07:48:15 -0800 From: Guenter Roeck To: Srinivas Neeli Cc: michal.simek@xilinx.com, shubhrajyoti.datta@xilinx.com, sgoud@xilinx.com, wim@linux-watchdog.org, linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, git@xilinx.com Subject: Re: [PATCH 1/9] watchdog: of_xilinx_wdt: Add comment to spinlock Message-ID: <20200116154815.GA23637@roeck-us.net> References: <1579181217-31127-1-git-send-email-srinivas.neeli@xilinx.com> <1579181217-31127-2-git-send-email-srinivas.neeli@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1579181217-31127-2-git-send-email-srinivas.neeli@xilinx.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 16, 2020 at 06:56:49PM +0530, Srinivas Neeli wrote: > 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; One of the most useless feedback messages from checkpatch. > > Signed-off-by: Srinivas Goud > Signed-off-by: Michal Simek > --- > 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 */ I don't see the added value here. Besides, what does the lock actually do ? Watchdog drivers are single-open, so it seems quite difficult for any of the protected functions to be called multiple times. The spinlock doesn't disable interrupts, so register accesses by other drivers are still possible. What am I missing ? Guenter > struct watchdog_device xilinx_wdt_wdd; > struct clk *clk; > }; > -- > 2.7.4 >