From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938948AbcKXK1n (ORCPT ); Thu, 24 Nov 2016 05:27:43 -0500 Received: from smtprelay0075.hostedemail.com ([216.40.44.75]:39818 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S938834AbcKXK1k (ORCPT ); Thu, 24 Nov 2016 05:27:40 -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:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3867:3870:3873:3874:4321:5007:10004:10400:10848:11026:11232:11473:11658:11914:12043:12296:12438:12555:12702:12737:12740:12760:13069:13161:13229:13311:13357:13439:14096:14097:14181:14659:14721:21080:30054:30075: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: iron82_1fd6cbab77b49 X-Filterd-Recvd-Size: 2339 Message-ID: <1479983217.19726.5.camel@perches.com> Subject: Re: [PATCH] staging: ks7010: fixed 'space prohibited after that *' erros. From: Joe Perches To: Yamanappagouda Patil , gregkh@linuxfoundation.org Cc: wsa@the-dreams.de, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, driverdev-devel@linuxdriverproject.org Date: Thu, 24 Nov 2016 02:26:57 -0800 In-Reply-To: <1479979778-9333-1-git-send-email-goudapatilk@gmail.com> References: <1479979778-9333-1-git-send-email-goudapatilk@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.1-0ubuntu2 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 Thu, 2016-11-24 at 14:59 +0530, Yamanappagouda Patil wrote: > Fixed checkpatch.pl errors related to "space prohibited after that '*' > or '&'" in ks_wlan_net.c file. trivia: > diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c [] > @@ -389,7 +389,7 @@ static int ks_wlan_set_wap(struct net_device *dev, struct iw_request_info *info, > /* for SLEEP MODE */ > if (priv->reg.operation_mode == MODE_ADHOC || > priv->reg.operation_mode == MODE_INFRASTRUCTURE) { > - memcpy(priv->reg.bssid, (u8 *) & ap_addr->sa_data, ETH_ALEN); > + memcpy(priv->reg.bssid, (u8 *) &ap_addr->sa_data, ETH_ALEN); You could remove the useless cast to (u8 *) too > if (is_valid_ether_addr((u8 *) priv->reg.bssid)) > priv->need_commit |= SME_MODE_SET; > @@ -2681,7 +2681,7 @@ static int ks_wlan_set_phy_information_timer(struct net_device *dev, > return -EPERM; > /* for SLEEP MODE */ > if (*uwrq >= 0 && *uwrq <= 0xFFFF) /* 0-65535 */ > - priv->reg.phy_info_timer = (uint16_t) * uwrq; > + priv->reg.phy_info_timer = (uint16_t) *uwrq; These could be written without the space after the casts priv->reg.phy_info_timer = (uint16_t)*uwrq; etc... > else > return -EINVAL; > These tests could be reversed to reduce indentation for the expected cases if (*uwrq < 0 || *uwrq > 0xffff)etc return -EINVAL; priv->reg.phy_info_timer = (uint16_t)*uwrq; etc...