Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp450848ybr; Fri, 22 May 2020 10:24:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7WwedpqbOM9AXo+6xvkBqltMhBWL7nebgQWiIyqge2kBm66zC9ayP2FbTvuFIZqlBvuEQ X-Received: by 2002:a17:906:d141:: with SMTP id br1mr9328620ejb.333.1590168243966; Fri, 22 May 2020 10:24:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590168243; cv=none; d=google.com; s=arc-20160816; b=tI4jMMIrDwB5tm/iHDDH/hpVgwmtQ/AWWDDqIUG/hDqMhRP4M3HDNVfIhuedtYD0od VJ8Wj8cXoT4qiNgPmJkXSTTptlaJ4P3XH/axQ54BHl1ixHlzMw/bJ6BV8tXS94/ijLAq GLy9WXS9RMnQeD0KB7ENI8zcCRef+gVtLyz3YXmu/U9V+9mw0BcwOwmOXxUWWhBdUkXi /IWfftCLLpSD1jGbqYwXW5fgGFoxBqROtgvRfemgTih8VTNXN6N95VdiWLJKfh9vIpqz 3xOmDygxmyGKa21zhabXXX8eJtg+N8+7IwnRMB6BiLSxAXMz9Rx75KHLQ9JpROhiZAwm z5Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=9m0J8mKl0IQH4KQoXlVim+kTM9lgd2ToqoeO26JMPzs=; b=ppQHEMAS+djWqy3w9q+1GcizRT3ctLaILUN3NDHu2lX0VsfbvPk38seUdMDwUSniiA X5V6JOsoFoygUL3641GF9tMt01sBH4ujUFBp6770LUDmZKb3dqTh0eZm/l/F1+I9Rc0t NGEynxOfxFnG+jfUyspS15pkY8t46EUK4BrqTIu3OLMlnuUDjH9pQJZ2GqbT8/W0YIj4 88/G+uOaUwfLhzFDrXOGUgNvOrXmnP8IcRHbBcR7dXq5J4jIp3EWj6boxQOtM4ZO+x2K mSxGKeccg5ilaFw4gstTwiwY33KFx3hEhUjgfKNu9QRjwDxQy+u0YRzpxBwu/Xhbbu6g TYQg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cd12si700996ejb.219.2020.05.22.10.23.40; Fri, 22 May 2020 10:24:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730700AbgEVRWJ (ORCPT + 99 others); Fri, 22 May 2020 13:22:09 -0400 Received: from smtprelay0183.hostedemail.com ([216.40.44.183]:59076 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730471AbgEVRWI (ORCPT ); Fri, 22 May 2020 13:22:08 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay04.hostedemail.com (Postfix) with ESMTP id 452C2180A8153; Fri, 22 May 2020 17:22:07 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 10,1,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:800:960:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2553:2559:2562:2693:2828:2897:3138:3139:3140:3141:3142:3355:3622:3865:3866:3867:3868:3870:3871:3872:3874:4031:4321:5007:6119:7514:7903:8909:8957:10007:10400:10848:10967:11232:11658:11914:12043:12297:12740:12760:12895:13439:14096:14097:14181:14659:14721:21080:21324:21451:21611:21627:21740:21939:30012:30020:30029:30054:30056:30070:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:1:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: wall47_0510ab926d28 X-Filterd-Recvd-Size: 3359 Received: from XPS-9350.home (unknown [47.151.136.130]) (Authenticated sender: joe@perches.com) by omf12.hostedemail.com (Postfix) with ESMTPA; Fri, 22 May 2020 17:22:05 +0000 (UTC) Message-ID: <162676bb69044efadd31daa9ea49fc6fb9664297.camel@perches.com> Subject: Re: [PATCH] taging: speakup: remove volatile From: Joe Perches To: Samuel Thibault Cc: Dan Carpenter , MugilRaj , devel@driverdev.osuosl.org, Kirk Reiser , Greg Kroah-Hartman , speakup@linux-speakup.org, linux-kernel@vger.kernel.org, Chris Brannon Date: Fri, 22 May 2020 10:22:03 -0700 In-Reply-To: <20200522171312.s2ciifuxozwav2ym@function> References: <1590138989-6091-1-git-send-email-dmugil2000@gmail.com> <20200522103406.GK30374@kadam> <6ab4139ec78928961a19e5fdbda139bb8cff9cb5.camel@perches.com> <20200522171312.s2ciifuxozwav2ym@function> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.36.2-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2020-05-22 at 19:13 +0200, Samuel Thibault wrote: > Joe Perches, le ven. 22 mai 2020 09:36:05 -0700, a ecrit: > > On Fri, 2020-05-22 at 13:34 +0300, Dan Carpenter wrote: > > > On Fri, May 22, 2020 at 02:46:28PM +0530, MugilRaj wrote: > > > > fix checkpatch.pl warning, which is Use of volatile is usually wrong: see > > > > Documentation/process/volatile-considered-harmful.rst > > > > Signed-off-by: MugilRaj > > > > > > Please put a blank before the Signed-off-by line. > > > > > > Probably there should be a space between your first and last name. It's > > > supposed to your legal name like for signing a legal document so use > > > whatever is appropriate legal documents in your country. > > > > > > Also the Documentation/process/volatile-considered-harmful.rst explains > > > that people often use "volatile" when they should be using locking for > > > synchronization. That seems to be the case here. So the correct fix is > > > to add locking. That's a little bit complicated to do and requires > > > testing. > > > > > > If we apply this patch, then we have silenced the warning so now someone > > > will have to look for the bug. But if we leave it as-is, then everyone > > > will know that the code is buggy. So let's leave it as-is until we are > > > able to fix the bug. > > > > > > It's always better to have easy to find bugs, than hidden bugs. > > > > And better still to comment known opportunities to > > improve the code so the next time someone tries to > > remove this volatile, there's a comment right there > > showing what's necessary instead. > > Actually I don't think adding the suggestion is a good thing if it's > only a "rule-of-thumb-replace-volatile-with-lock". > > Actually possibly volatile might not even be needed because there could > be already a lock protecting this. > > Put another way: I don't think putting any hint here would help, on the > contrary, somebody has to really look at what protection is needed, > without getting influenced by rules-of-thumb. checkpatch newbies/robots will submit this change again otherwise. Comment wording can always be improved.