Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1768613imc; Mon, 11 Mar 2019 23:37:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqx60X9igKdPALlBU4XIWlZn8UfeQw/UoFdNXA+IKJCeRdmXFvCVuFEcD8cmN8l5wdf2VnnV X-Received: by 2002:a65:52cd:: with SMTP id z13mr34076056pgp.134.1552372666387; Mon, 11 Mar 2019 23:37:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552372666; cv=none; d=google.com; s=arc-20160816; b=XIf+93IIil1oegOl45Ew0pkDKqDwiO80L6moo8oLKg/KnE3V29UH37MNOWKoakOYmT Xl04IquGJ98qI2bcqmMPnsy03QUGzJU7Qd7Nk0JyRAVxlDe7lmNtTGAmsLjOAs/nFjSa lPgCMFz5KH0G65uiGP6tgRoNnTBcDadbo/09Je1uInIgL9A1Vrypu6717Fl5kCrmy6nc f4VnprMEfahR3RNT8/+SgXbNtNhDHz7g0mrpeO1O6/2ZUJXHQgesgwcc1B2HoNwhQIbU TBcf4a0IMc5fWQg2HjrVeml59hWMctDk+j3GFCApNorh0rZ44IzOeTO7I7WkDq9sbREy W3Bg== 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:to:from:subject:message-id; bh=9i7hwqMY+eCfguvoLXBfnrGqlIJg7PEofGwH7ToFPkw=; b=uChTPSm2SI6TtnFRpqgiRUguO9jyLBIOjhVaTvmWB+m0zFm++Vhs2xi8X31+g5Ivan E9sqT2FlJ0ifH2IiNZAqyj7YiXCg7E39uPXHbpkjjTdrMhwPu1RSJkdVhpQgBVCbY9nd rjw6MKxKZxPA+WTo41s/r6KLhUPSJqCSO5qa6+zbZ2TvF+i/rilfEv0CH+at75iUuWcg ghRCN+pWlwtFdf2VKYrjChoB+Bhypcc9//viGo571fvvMZzTgQTvRXvVSuqK3fMnn5fR +Y8RXW34LiS0xwSVKTc+iqyLy+MaVhXihyl+Nr8DzuKyM5OEVqGmKOMtaO37SnlWwLqv 2zKw== ARC-Authentication-Results: i=1; mx.google.com; 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 u31si6696165pgm.352.2019.03.11.23.37.30; Mon, 11 Mar 2019 23:37:46 -0700 (PDT) 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; 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 S1727168AbfCLGff (ORCPT + 99 others); Tue, 12 Mar 2019 02:35:35 -0400 Received: from smtprelay0052.hostedemail.com ([216.40.44.52]:44299 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726218AbfCLGfe (ORCPT ); Tue, 12 Mar 2019 02:35:34 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay04.hostedemail.com (Postfix) with ESMTP id 03025180A8128; Tue, 12 Mar 2019 06:35:33 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::,RULES_HIT:41:355:379:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1381:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:2915:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3871:3873:3874:4321:5007:10004:10400:10481:10848:11026:11232:11657:11658:11914:12043:12048:12114:12296:12740:12760:12895:13069:13255:13311:13357:13439:14659:14721:19900:21080:21627:21740:30003:30054:30069:30091,0,RBL:47.151.153.53:@perches.com:.lbl8.mailshell.net-62.14.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:33,LUA_SUMMARY:none X-HE-Tag: feast78_4d5733bdfe242 X-Filterd-Recvd-Size: 1746 Received: from XPS-9350.home (unknown [47.151.153.53]) (Authenticated sender: joe@perches.com) by omf03.hostedemail.com (Postfix) with ESMTPA; Tue, 12 Mar 2019 06:35:31 +0000 (UTC) Message-ID: Subject: Re: [PATCH net] staging: rtl8188eu: use is_zero_ether_addr() instead of memcmp() From: Joe Perches To: maowenan , Larry.Finger@lwfinger.net, gregkh@linuxfoundation.org, straube.linux@gmail.com, jananis37@gmail.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, davem@davemloft.net Date: Mon, 11 Mar 2019 23:35:30 -0700 In-Reply-To: <951c83d2-fa0d-11ed-96a9-cee620c9c096@huawei.com> References: <20190309032600.98732-1-maowenan@huawei.com> <951c83d2-fa0d-11ed-96a9-cee620c9c096@huawei.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.30.1-1build1 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 Tue, 2019-03-12 at 14:29 +0800, maowenan wrote: > ping... > > On 2019/3/9 11:26, Mao Wenan wrote: > > Using is_zero_ether_addr() instead of directly use > > memcmp() to determine if the ethernet address is all > > zeros. [] > > diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c [] > > @@ -180,9 +180,8 @@ struct wlan_network *rtw_find_network(struct __queue *scanned_queue, u8 *addr) > > { > > struct list_head *phead, *plist; > > struct wlan_network *pnetwork = NULL; > > - u8 zero_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0}; > > > > - if (!memcmp(zero_addr, addr, ETH_ALEN)) { > > + if (is_zero_ether_addr(addr)) { How did you verify that addr is __aligned(2)?