From patchwork Sun Jun 21 05:26:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaishali Thakkar X-Patchwork-Id: 6651971 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 829D7C05AC for ; Sun, 21 Jun 2015 05:26:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E058F20681 for ; Sun, 21 Jun 2015 05:26:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3C9A42067A for ; Sun, 21 Jun 2015 05:26:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751405AbbFUF02 (ORCPT ); Sun, 21 Jun 2015 01:26:28 -0400 Received: from mail-pd0-f182.google.com ([209.85.192.182]:33666 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750723AbbFUF00 (ORCPT ); Sun, 21 Jun 2015 01:26:26 -0400 Received: by pdjn11 with SMTP id n11so117112496pdj.0; Sat, 20 Jun 2015 22:26:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=Uoe3IbjvQGtLgfXvsoyBQnVcLRXlLjAPaNc/94KLvn8=; b=HXrCT/o+TEJxYB9ngGpiGXfD/swDZN/pDjmD4BgQm83KrYZoHu0CG/FliLXOdP8E1m 2mTAtCX+KBMYC4b5q5jRhr0/v07IgmgdyJynetZX/dbduS486ZZfTj+v3i0HlF28gLRv OtKz0R+p6qURa52CEYlA2OLauYAr1Upf2z8CDMsnCecXwSIcYWSChSp+YLe7a4QY84M3 spLzkLREu7gIYHYjFDpn2NfLsmWradgiPUXwLDylz+5B5iML35aLaNin+ZNKbQ6U+pxS M1ux+Nussz2xOTeBLt5E2CHv6yhzJoZwgnN2H0e9CsjlCFA6jUf6+dREeFrWquj0aFWo DF9g== X-Received: by 10.66.66.202 with SMTP id h10mr46620244pat.145.1434864386279; Sat, 20 Jun 2015 22:26:26 -0700 (PDT) Received: from vaishali-Ideapad-Z570 ([43.249.235.75]) by mx.google.com with ESMTPSA id qt4sm15719386pbc.86.2015.06.20.22.26.24 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 20 Jun 2015 22:26:25 -0700 (PDT) Date: Sun, 21 Jun 2015 10:56:21 +0530 From: Vaishali Thakkar To: Johnny Kim Cc: Rachel Kim , Dean Lee , Chris Park , Greg Kroah-Hartman , linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Julia Lawall Subject: [PATCH] Staging: wilc1000: Replace memset with eth_zero_addr Message-ID: <20150621052620.GA14059@vaishali-Ideapad-Z570> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use eth_zero_addr to assign the zero address to the given address array instead of memset when second argument is address of zero. The Coccinelle semantic patch that makes this change is as follows: // @eth_zero_addr@ expression e; @@ -memset(e,0x00,ETH_ALEN); +eth_zero_addr(e); // Signed-off-by: Vaishali Thakkar --- drivers/staging/wilc1000/linux_mon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c index f5296f5..2a3d875 100644 --- a/drivers/staging/wilc1000/linux_mon.c +++ b/drivers/staging/wilc1000/linux_mon.c @@ -495,7 +495,7 @@ static void WILC_WFI_mon_setup(struct net_device *dev) ether_setup(dev); dev->tx_queue_len = 0; dev->type = ARPHRD_IEEE80211_RADIOTAP; - memset(dev->dev_addr, 0, ETH_ALEN); + eth_zero_addr(dev->dev_addr); #ifdef USE_WIRELESS {