From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934905AbdBQTwQ (ORCPT ); Fri, 17 Feb 2017 14:52:16 -0500 Received: from smtprelay0233.hostedemail.com ([216.40.44.233]:44639 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934182AbdBQTwP (ORCPT ); Fri, 17 Feb 2017 14:52:15 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:960:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:2901:2915:3138:3139:3140:3141:3142:3353:3622:3865:3867:3868:3871:3873:3874:4250:4321:5007:6742:10004:10400:10848:11026:11232:11473:11658:11914:12043:12438:12740:12760:12895:13161:13229:13439:14096:14097:14181:14659:14721:21080:21433:21451:30046:30054:30069:30070:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: straw62_130917e70501f X-Filterd-Recvd-Size: 3415 Message-ID: <1487361129.2198.4.camel@perches.com> Subject: Re: [PATCH] staging: bcm2835-audio: bcm2835.h: fix various coding style issues From: Joe Perches To: Nathan Howard Cc: Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Stephen Warren , Lee Jones , Eric Anholt , Michael Zoran , devel@driverdev.osuosl.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Date: Fri, 17 Feb 2017 11:52:09 -0800 In-Reply-To: <1487356776-11449-1-git-send-email-adanhawthorn@gmail.com> References: <1487356776-11449-1-git-send-email-adanhawthorn@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.3-0ubuntu0.1 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 On Fri, 2017-02-17 at 13:39 -0500, Nathan Howard wrote: > The following coding style issues (as per checkpatch.pl) were resolved. What Greg said is true, and the volatile conversion especially needs to be verified. > diff --git a/drivers/staging/bcm2835-audio/bcm2835.h b/drivers/staging/bcm2835-audio/bcm2835.h [] > @@ -27,8 +27,8 @@ > #include > > /* > -#define AUDIO_DEBUG_ENABLE > -#define AUDIO_VERBOSE_DEBUG_ENABLE > + * #define AUDIO_DEBUG_ENABLE > + * #define AUDIO_VERBOSE_DEBUG_ENABLE > */ Using #define DEBUG would be more common. > /* Debug macros */ > @@ -37,10 +37,10 @@ > #ifdef AUDIO_VERBOSE_DEBUG_ENABLE > > #define audio_debug(fmt, arg...) \ > - printk(KERN_INFO"%s:%d " fmt, __func__, __LINE__, ##arg) > + pr_info("%s:%d " fmt, __func__, __LINE__, ##arg) > > #define audio_info(fmt, arg...) \ > - printk(KERN_INFO"%s:%d " fmt, __func__, __LINE__, ##arg) > + pr_info("%s:%d " fmt, __func__, __LINE__, ##arg) > > #else > > @@ -59,13 +59,13 @@ > #endif /* AUDIO_DEBUG_ENABLE */ > > #define audio_error(fmt, arg...) \ > - printk(KERN_ERR"%s:%d " fmt, __func__, __LINE__, ##arg) > + pr_err("%s:%d " fmt, __func__, __LINE__, ##arg) > > #define audio_warning(fmt, arg...) \ > - printk(KERN_WARNING"%s:%d " fmt, __func__, __LINE__, ##arg) > + pr_warn("%s:%d " fmt, __func__, __LINE__, ##arg) > > #define audio_alert(fmt, arg...) \ > - printk(KERN_ALERT"%s:%d " fmt, __func__, __LINE__, ##arg) > + pr_alert("%s:%d " fmt, __func__, __LINE__, ##arg) These might as well be removed and converted to the direct pr_ equivalents and have #define pr_fmt(fmt) "%s:%d: " fmt, __func__, __LINE__ added before any include, but honestly the __func__ and __LINE__ aren't particularly useful. > @@ -122,8 +125,8 @@ struct bcm2835_alsa_stream { > struct semaphore buffers_update_sem; > struct semaphore control_sem; > spinlock_t lock; > - volatile unsigned int control; > - volatile unsigned int status; > + unsigned int control; > + unsigned int status; Unless you can absolutely verify that that doesn't change hardware access, you should leave this alone. '