Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2098301ybl; Thu, 30 Jan 2020 11:19:26 -0800 (PST) X-Google-Smtp-Source: APXvYqwVm1hysydKGkWda9vEvDKq+Lt96n+OP8ErxaaftfnU1tqhQhsHFCzkx3CJWbi9c3+KQFJG X-Received: by 2002:aca:530e:: with SMTP id h14mr3826175oib.105.1580411966194; Thu, 30 Jan 2020 11:19:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580411966; cv=none; d=google.com; s=arc-20160816; b=t5mnyXn/glEV2KvIIunPwlpaYxqHWV7JnvZ4dbppcyEF1dy0W34LBlMVkPjwNvmb2x Vh0dBpzqKp0cr/HAUD/4QY8rFXQIOy9FBHSJ87MC0fqLv9wuFpAKBVnbU3u9LKpoXO/D wD+3Yzsped2hgCgUOC6pj6JNa1pSmeODMqJEzhnCHzsAeH8HQBZFgz4wSL1AnvL+RjlH Z53Q+twrazkfpWr8iIlAilK1eHa5zAEiiFGiIfJ+Liqcd/QeoyZVVDkXuAqBjRRgESJb NlVWYo3jgczJty4ldPoeVoHlBIw9K15k1H62ybkS4HjBOYZJROQErfFXCAMNWfkwbfyS FyYw== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=IJUj3gBnMb/fxKbQvy0ONzkNm3lDbvi2lnhMzPFeiDo=; b=cam6g5eNrnTsru+lboC3OLS3W4GQGOBHhQS2pQqzmW8lyx7Pu+bzdL69Dlo2brYVy0 4r4r1nCmFSNhfxZgWo0nbGJoqRzLZ8w4aHkmOS/TSyJWfG0ExAXsmtmx3/pOvUiYSCAo ipAa2q5ANucD2RBwT6SQXezzgI9A8lIkz3Y+OCGUR8pOYuZqAE2mohJI5YzZcxCbE/u6 rSl3Yg+44r/nHVtxSAvZYg4d++imp/9TuXh2BN2lpd6m1GQDkijzw7ugASSrUGXJeg+R ZjJy6IBtFpowhB6JxhzXJ5icjUyJEJo0zI+Lz5uCZGL4qLZyJ2rfsFKR5hEm6T0gGm12 oaew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BE72rARj; 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 l26si3732545otd.143.2020.01.30.11.19.13; Thu, 30 Jan 2020 11:19:26 -0800 (PST) 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=@kernel.org header.s=default header.b=BE72rARj; 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 S1730904AbgA3Sow (ORCPT + 99 others); Thu, 30 Jan 2020 13:44:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:54118 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730898AbgA3Sou (ORCPT ); Thu, 30 Jan 2020 13:44:50 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 993092082E; Thu, 30 Jan 2020 18:44:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580409890; bh=saXXOSjiRFcl+smuaMC7M+4L6SdqpELGKqVjGPcAly4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BE72rARjiA5Vm5AYvEZuEMi+o1em0RDEzCoGQeDgayJ1lsL6aDHyQ83etQWE6I8I9 X889iI7KoIWls/TeKdTdqYifXpZktUvHVHZmEvxRwYV88HDBtz7BUkxmTLlYVXy+E3 jgKAokmxJC+ZhJFLsaQ1+44IXS2trCUEhFi2lKvY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , "David S. Miller" , Sasha Levin Subject: [PATCH 5.4 073/110] atm: eni: fix uninitialized variable warning Date: Thu, 30 Jan 2020 19:38:49 +0100 Message-Id: <20200130183623.066069730@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200130183613.810054545@linuxfoundation.org> References: <20200130183613.810054545@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 30780d086a83332adcd9362281201cee7c3d9d19 ] With -O3, gcc has found an actual unintialized variable stored into an mmio register in two instances: drivers/atm/eni.c: In function 'discard': drivers/atm/eni.c:465:13: error: 'dma[1]' is used uninitialized in this function [-Werror=uninitialized] writel(dma[i*2+1],eni_dev->rx_dma+dma_wr*8+4); ^ drivers/atm/eni.c:465:13: error: 'dma[3]' is used uninitialized in this function [-Werror=uninitialized] Change the code to always write zeroes instead. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/atm/eni.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c index b23d1e4bad33b..9d0d65efcd94e 100644 --- a/drivers/atm/eni.c +++ b/drivers/atm/eni.c @@ -374,7 +374,7 @@ static int do_rx_dma(struct atm_vcc *vcc,struct sk_buff *skb, here = (eni_vcc->descr+skip) & (eni_vcc->words-1); dma[j++] = (here << MID_DMA_COUNT_SHIFT) | (vcc->vci << MID_DMA_VCI_SHIFT) | MID_DT_JK; - j++; + dma[j++] = 0; } here = (eni_vcc->descr+size+skip) & (eni_vcc->words-1); if (!eff) size += skip; @@ -447,7 +447,7 @@ static int do_rx_dma(struct atm_vcc *vcc,struct sk_buff *skb, if (size != eff) { dma[j++] = (here << MID_DMA_COUNT_SHIFT) | (vcc->vci << MID_DMA_VCI_SHIFT) | MID_DT_JK; - j++; + dma[j++] = 0; } if (!j || j > 2*RX_DMA_BUF) { printk(KERN_CRIT DEV_LABEL "!j or j too big!!!\n"); -- 2.20.1