From patchwork Thu Dec 11 21:36:00 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Eder X-Patchwork-Id: 13625 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 5EBADDDF9B for ; Fri, 12 Dec 2008 10:01:00 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759455AbYLKXAl (ORCPT ); Thu, 11 Dec 2008 18:00:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759449AbYLKXAi (ORCPT ); Thu, 11 Dec 2008 18:00:38 -0500 Received: from mail-bw0-f13.google.com ([209.85.218.13]:45427 "EHLO mail-bw0-f13.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759435AbYLKXAf (ORCPT ); Thu, 11 Dec 2008 18:00:35 -0500 Received: by bwz6 with SMTP id 6so2825272bwz.13 for ; Thu, 11 Dec 2008 15:00:33 -0800 (PST) Received: by 10.103.121.19 with SMTP id y19mr1622351mum.56.1229036088584; Thu, 11 Dec 2008 14:54:48 -0800 (PST) Received: from vmbox.hanneseder.net (chello080109038207.17.14.tuwien.teleweb.at [80.109.38.207]) by mx.google.com with ESMTPS id n10sm2360353mue.54.2008.12.11.14.54.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Dec 2008 14:54:47 -0800 (PST) Message-ID: <49419a37.0aa5660a.7d74.31a0@mx.google.com> Received: by vmbox.hanneseder.net (sSMTP sendmail emulation); Thu, 11 Dec 2008 01:00:27 +0100 To: netdev@vger.kernel.org Cc: Karsten Keil Cc: linux-kernel@vger.kernel.org Cc: kernel-janitors@vger.kernel.org Date: Thu, 11 Dec 2008 22:36:00 +0100 Subject: [PATCH 6/9][v2] mISDN: fix sparse warning: symbol 'id' shadows an earlier one From: Hannes Eder Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Impact: rename function scope variable Fix this warning: drivers/isdn/mISDN/l1oip_core.c:472:8: warning: symbol 'id' shadows an earlier one drivers/isdn/mISDN/l1oip_core.c:254:14: originally declared here Signed-off-by: Hannes Eder Acked-by: Karsten Keil --- drivers/isdn/mISDN/l1oip_core.c | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/isdn/mISDN/l1oip_core.c b/drivers/isdn/mISDN/l1oip_core.c index e42150a..0884dd6 100644 --- a/drivers/isdn/mISDN/l1oip_core.c +++ b/drivers/isdn/mISDN/l1oip_core.c @@ -469,7 +469,7 @@ l1oip_socket_recv(struct l1oip *hc, u8 remotecodec, u8 channel, u16 timebase, static void l1oip_socket_parse(struct l1oip *hc, struct sockaddr_in *sin, u8 *buf, int len) { - u32 id; + u32 packet_id; u8 channel; u8 remotecodec; u16 timebase; @@ -508,7 +508,7 @@ l1oip_socket_parse(struct l1oip *hc, struct sockaddr_in *sin, u8 *buf, int len) } /* get id flag */ - id = (*buf>>4)&1; + packet_id = (*buf>>4)&1; /* check coding */ remotecodec = (*buf) & 0x0f; @@ -520,11 +520,11 @@ l1oip_socket_parse(struct l1oip *hc, struct sockaddr_in *sin, u8 *buf, int len) buf++; len--; - /* check id */ - if (id) { + /* check packet_id */ + if (packet_id) { if (!hc->id) { printk(KERN_WARNING "%s: packet error - packet has id " - "0x%x, but we have not\n", __func__, id); + "0x%x, but we have not\n", __func__, packet_id); return; } if (len < 4) { @@ -532,16 +532,16 @@ l1oip_socket_parse(struct l1oip *hc, struct sockaddr_in *sin, u8 *buf, int len) "short for ID value\n", __func__); return; } - id = (*buf++) << 24; - id += (*buf++) << 16; - id += (*buf++) << 8; - id += (*buf++); + packet_id = (*buf++) << 24; + packet_id += (*buf++) << 16; + packet_id += (*buf++) << 8; + packet_id += (*buf++); len -= 4; - if (id != hc->id) { + if (packet_id != hc->id) { printk(KERN_WARNING "%s: packet error - ID mismatch, " "got 0x%x, we 0x%x\n", - __func__, id, hc->id); + __func__, packet_id, hc->id); return; } } else {