Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753253AbdF2NWr (ORCPT ); Thu, 29 Jun 2017 09:22:47 -0400 Received: from smtprelay0033.hostedemail.com ([216.40.44.33]:45743 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752809AbdF2NWl (ORCPT ); Thu, 29 Jun 2017 09:22:41 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::,RULES_HIT:41:355:379:541:599:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3870:3871:3872:3873:3874:4321:5007:6119:10004:10400:10848:11026:11232:11658:11914:12043:12296:12740:12760:12895:13069:13255:13311:13357:13439:14181:14659:14721:21063:21080:21434:21627:30012:30045:30051:30054: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:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: mine72_51431e18d4332 X-Filterd-Recvd-Size: 1776 Message-ID: <1498742557.8633.12.camel@perches.com> Subject: Re: [PATCH v2 6/6] Staging: wlan-ng: hfa384x.h:Fix use of volatile is usually wrong From: Joe Perches To: Jaya Durga , gregkh@linuxfoundation.org Cc: sergio.paracuellos@gmail.com, juliana.orod@gmail.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Jaya Durga Date: Thu, 29 Jun 2017 06:22:37 -0700 In-Reply-To: <1498741260-23676-7-git-send-email-rjdurga@gmail.com> References: <1498741260-23676-7-git-send-email-rjdurga@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 856 Lines: 23 On Thu, 2017-06-29 at 18:31 +0530, Jaya Durga wrote: > Fix checkpatch.pl issue > WARNING: Use of volatile is usually wrong: > see Documentation/process/volatile-considered-harmful.rst > > The variables in the private data that are > marked volatile don't need to be. Remove the volatile. If you examine the code that uses reapable, it appears reapable should not be an int but instead should be an enum cmd_mode. > diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h [] > @@ -1175,7 +1175,7 @@ struct hfa384x_usbctlx { > enum ctlx_state state; /* Tracks running state */ > > struct completion done; > - volatile int reapable; /* Food for the reaper task */ > + int reapable; /* Food for the reaper task */ > > ctlx_cmdcb_t cmdcb; /* Async command callback */ > ctlx_usercb_t usercb; /* Async user callback, */