Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2861358imm; Sun, 17 Jun 2018 06:04:23 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJDG2ebpTo/gRjkm4rgqBTPAr3iZNW/bsRP4ugWfvwWIFbAWEpuAI+Vzzfm673aKqRqHaz/ X-Received: by 2002:a17:902:43a4:: with SMTP id j33-v6mr10050084pld.118.1529240663275; Sun, 17 Jun 2018 06:04:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529240663; cv=none; d=google.com; s=arc-20160816; b=km3TouQ+f+CpwXA7BTltKxrENnj4dGfF7/En6OHlaqB1/SS4DLi+pW290daf+FS/pO llNOuoiifYkuWz6piNYSp0AsQlx3vWWy/4EcPAyIgoI3oWH689M2anSiDYp2Nf9dY94N 9ekH2WKD9gnSLPTfUD7JsqFPk+G9+rfnAvggVX9JdNZaa5fLG5p91VkWVz2m8pjtys2B zUnS60XvW7SwSAkPugd7xrnqKKSPABbRpIXWhrn8Gv9RHFMftbRt8n/iK0k3kgi9aFFk eRRuTSfPWGU8bDEbUdoQu0bCDXYDClTLgDSs1jDMa70Z3F/TAO9LDmf4TrxbX2wCPElk lozQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=KSDO7pvIMo2QkcUx+p1tvfNslYfN4zzKMRszNYUzGkM=; b=l378EUdq+oNZG4LVSmLjDJBu105IVgQFo6PBHyitB4hAP87PlyhOm7wEjoTW7hQTM5 aeoF+HnExsh2EDxezmHQaDNjk8v8+D788TH9yP1nFCt7RkAPmmObOUL4GkB9cb1z9DzO 8p7dmbcwU/IGiBvawD02sZbCUzUru1KwXGIb2dhpQ4mqVmbTAMrSTiObz8Njzc+Xve7c U/K4lOp52wlcYc6d+OZ5MUPeHlYQsjpP8qTWDGC6yuRFR5d69BWNg7YX8HKeh2yN68VL k9cbrLSirxBTVBFQxBB3r5UlKhTfRtwZr3uoLQmg8TNzqVUo3pizAA299ka+O3Fl/5Da 9Pmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=B9VldBEb; 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 a3-v6si14854916pll.412.2018.06.17.06.04.06; Sun, 17 Jun 2018 06:04:23 -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; dkim=pass header.i=@agner.ch header.s=dkim header.b=B9VldBEb; 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 S933506AbeFQNDo (ORCPT + 99 others); Sun, 17 Jun 2018 09:03:44 -0400 Received: from mail.kmu-office.ch ([178.209.48.109]:45232 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933241AbeFQNDm (ORCPT ); Sun, 17 Jun 2018 09:03:42 -0400 Received: from trochilidae.lan (unknown [37.17.239.3]) by mail.kmu-office.ch (Postfix) with ESMTPSA id E593A5C002A; Sun, 17 Jun 2018 15:03:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1529240620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:content-type:content-transfer-encoding: in-reply-to:references; bh=KSDO7pvIMo2QkcUx+p1tvfNslYfN4zzKMRszNYUzGkM=; b=B9VldBEb5rtnZLl4gfLQVV1VKutQiVMzUi4uR3N9rsglBJ181ni3QLN16/KbVSKFyjz3wz b0JMwc12s0X3kssNNiqFtYeimPMt/hb/9tov/Rqn8PPw5bm+Hd0rb5i0CxixWciepIBTEm wgAkJ8zBw+414pYYysVvCkhfemXTU74= From: Stefan Agner To: "David S. Miller" Cc: Stefan Agner , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: hamradio: remove unused variable Date: Sun, 17 Jun 2018 15:03:30 +0200 Message-Id: <20180617130335.3947-1-stefan@agner.ch> X-Mailer: git-send-email 2.17.1 X-Spamd-Result: default: False [-2.10 / 15.00]; TO_MATCH_ENVRCPT_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FROM_EQ_ENVFROM(0.00)[]; DKIM_SIGNED(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; MID_CONTAINS_FROM(1.00)[]; ASN(0.00)[asn:13030, ipnet:37.17.238.0/23, country:CH]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The array bpq_eth_addr is only used to get the size of an address. Remove the array and use the size of the array bcast_addr which is actually copied. Also constify and tidy up the bcast_addr declaration. This fixes a warning seen with clang: drivers/net/hamradio/bpqether.c:94:13: warning: variable 'bpq_eth_addr' is not needed and will not be emitted [-Wunneeded-internal-declaration] static char bpq_eth_addr[6]; ^ 1 warning generated. Signed-off-by: Stefan Agner --- drivers/net/hamradio/bpqether.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c index f347fd9c5b28..8c9c9977241e 100644 --- a/drivers/net/hamradio/bpqether.c +++ b/drivers/net/hamradio/bpqether.c @@ -89,9 +89,7 @@ static const char banner[] __initconst = KERN_INFO \ "AX.25: bpqether driver version 004\n"; -static char bcast_addr[6]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}; - -static char bpq_eth_addr[6]; +static const char bcast_addr[6] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; static int bpq_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *); static int bpq_device_event(struct notifier_block *, unsigned long, void *); @@ -501,8 +499,8 @@ static int bpq_new_device(struct net_device *edev) bpq->ethdev = edev; bpq->axdev = ndev; - memcpy(bpq->dest_addr, bcast_addr, sizeof(bpq_eth_addr)); - memcpy(bpq->acpt_addr, bcast_addr, sizeof(bpq_eth_addr)); + memcpy(bpq->dest_addr, bcast_addr, sizeof(bcast_addr)); + memcpy(bpq->acpt_addr, bcast_addr, sizeof(bcast_addr)); err = register_netdevice(ndev); if (err) -- 2.17.1