From patchwork Thu Jan 18 08:05:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 862787 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=resnulli-us.20150623.gappssmtp.com header.i=@resnulli-us.20150623.gappssmtp.com header.b="SsOVxEKI"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zMc3H3GlKz9s7M for ; Thu, 18 Jan 2018 19:06:03 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753394AbeARIF7 (ORCPT ); Thu, 18 Jan 2018 03:05:59 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35978 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753332AbeARIF5 (ORCPT ); Thu, 18 Jan 2018 03:05:57 -0500 Received: by mail-wm0-f66.google.com with SMTP id f3so20893520wmc.1 for ; Thu, 18 Jan 2018 00:05:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=d6igi8yOsrXnWL/XWyRMO6U2sWyPtmiptSvg+Z5DWCg=; b=SsOVxEKIYWbdnXBppAGVoruBm9Byt5bBTw4Zd97C2zyUisG8TmstiyjF+IQQNhUPKw DMyqfmWle1ymIUhYJ8iXbVmiZ2fb1m6SMIXhxwi1HKGUWKM9d17i8rlpAdJn7fy6qPhX DwsYUJ4WNy4HcSLwsk7ZeK9f6qIozKqxCrHOiAUc7AL0sFcJPJu68UDiD921MhM1qmz2 8XCvxnjA9bpkhBK1D6kdOn7AWVZ9Rg5QyjUy69WyT+uN6QDP6vGg1BrEhA7c60RhHmFv hoFJTp7MWhKia1WflC3U5Vttm9wApaFl1C0dZvN/dOVCCDnXVtSnHr5tlGFZOWzodLeP fVfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=d6igi8yOsrXnWL/XWyRMO6U2sWyPtmiptSvg+Z5DWCg=; b=WSxIa5TZJXw+QruQQpYxYizaZ4oYFtku53/4PeQ0c2D0CnnOeuC0Ex+kAb8vhWPDds 8hmW1oR3c2LypNu+tYl1mdkyKo1hF6FYCuf8g9ZWkY9WU2jcphwShVbod/+WO0MNFTeZ ccPykZ5OQ7L2nMRBCXa7U99esOgL9eu2MSDIPvzdwcf5TwPGHFR4uEok1KlpZ/6cyWwR tj1v22FCT+vtwmMCtVcAamx8YP5H+G4Rsnmp3IrRqKsg4XSfbOA8U6P6laAPxh4SfZZN gxksx4v3GrRVCOQHXrOi2x4jL/teVjtDcx9B+i8Bp03ewDBVitVheO9B5kHCL5hioBvv aObg== X-Gm-Message-State: AKwxytfFNGYcQilmHFTaLklF8vEzbvbRJQz/H1umBQT7oVktkkcI387z /AC4wKhkiP9jhj2ECiYWAR5DlkLh X-Google-Smtp-Source: ACJfBovGUrA1Q2qhehzzaLqcSKF4zdPXFQVIPgfZamcfnqsmmbLEi8uCA2aLsKE6AL/T8d50eA8L2g== X-Received: by 10.28.87.138 with SMTP id l132mr3540737wmb.27.1516262755974; Thu, 18 Jan 2018 00:05:55 -0800 (PST) Received: from localhost (ip-89-177-135-29.net.upcbroadband.cz. [89.177.135.29]) by smtp.gmail.com with ESMTPSA id b8sm2485379wma.2.2018.01.18.00.05.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jan 2018 00:05:55 -0800 (PST) From: Jiri Pirko To: netdev@vger.kernel.org Cc: davem@davemloft.net, jhs@mojatatu.com, xiyou.wangcong@gmail.com, mlxsw@mellanox.com, sfr@canb.auug.org.au Subject: [patch net-next] net: sched: silence uninitialized parent variable warning in tc_dump_tfilter Date: Thu, 18 Jan 2018 09:05:55 +0100 Message-Id: <20180118080555.1627-1-jiri@resnulli.us> X-Mailer: git-send-email 2.14.3 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jiri Pirko When tcm->tcm_ifindex == TCM_IFINDEX_MAGIC_BLOCK, parent is still passed down but the value is never used. Compiler does not recognize it and issues a warning. Silence it down initializing parent to 0. Reported-by: David Miller Reported-by: Stephen Rothwell Signed-off-by: Jiri Pirko --- net/sched/cls_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index e500d11da9cd..9683f8550f6f 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -1303,7 +1303,7 @@ static int tc_dump_tfilter(struct sk_buff *skb, struct netlink_callback *cb) struct tcmsg *tcm = nlmsg_data(cb->nlh); long index_start; long index; - u32 parent; + u32 parent = 0; int err; if (nlmsg_len(cb->nlh) < sizeof(*tcm))