Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2367372pxb; Wed, 9 Feb 2022 17:22:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJzZ4w39v8LGgTEiG4vzyacuLDaFwb5CNcRKTjT7V6QtoLmZ8B/nXWGcXRfYuQE9ZvDUDYMk X-Received: by 2002:a63:6a4a:: with SMTP id f71mr4084062pgc.252.1644456143214; Wed, 09 Feb 2022 17:22:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1644456143; cv=pass; d=google.com; s=arc-20160816; b=CMfROdpWbre75WsDUoqLn+MaFpl7lRKubtNrtwDBhxSIH2DQ9Pc4zPiON7/RaM9XVW qhAAqQNXslFuHB1dPH5dGuBZAYUZD/Iza6xdqODZfETwPiAfOfuuIxLm5uKYlCf73NE7 m/lRyXFp8AQE3Sn7inNQZ+obpkGEqD/r8nK4hnMhpxZ0N9s3RI5BnC+STuBVDh+6EiwU 5FHJ5Sg8AHZzzhKpIQoAM6lFrtVmKqTw/PTUF4T+kgxCHEZ49HWJXWEphkHK8VxpL1eJ L+SOFHOUR6QyaRW91ogLL27CknBDK+8NE22h9G6HS7bIj8Gq1rRXAO1ASwA0RaJeGj6s dCdQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=stPv0YKi4Lqk4n+FINW3zxAvHjigjJIohALT9VxQ9MA=; b=0S+OGrUJcRNY18Gl/zPjlOeV43m7uD1ns2O4tFVDXjVTKk+Kgy9ivDmPBRFPfDbrHM yQWw52y+7cjXiSV//jwOrENiWg3xR6z0AHdGqFS1AOJOZkSqoiDEgWZf0u1fgDqsN3aV jdjQ5aAM8l71N1KU4hF9QgA4B21PGeT2Cqu8QexFmBv+pfCZyYqhBOOi7wSXAdHHqGLE L/VQ6hiNEjH76/bZJspuD1JjnT0NdrgUe6eWcIQctCG5+CmpbT+IxwfrLhxbYUbYCTyV sqNR6qvmpVpuGj1vRbE3cjbYvW2Nvb0T+Wy2eQwnX4UqK6fWexPyqMAZBE0vr4MI0/5T n/ww== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=ut60iFRn; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=WpKYELYs; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id j13si18763401pfc.194.2022.02.09.17.22.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 17:22:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=ut60iFRn; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=WpKYELYs; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 991C01EC79; Wed, 9 Feb 2022 17:22:07 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231478AbiBJBV4 (ORCPT + 99 others); Wed, 9 Feb 2022 20:21:56 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:40158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231311AbiBJBVp (ORCPT ); Wed, 9 Feb 2022 20:21:45 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 532B91EC4E; Wed, 9 Feb 2022 17:21:47 -0800 (PST) Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 219NcspC008865; Thu, 10 Feb 2022 00:28:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : content-type : mime-version; s=corp-2021-07-09; bh=stPv0YKi4Lqk4n+FINW3zxAvHjigjJIohALT9VxQ9MA=; b=ut60iFRn9Nj+J+REajf5dy2aCXWn+VRcjC0XeQUZlNZomKyr/JZjSfTeoGPRQeC1Q3dh QlCdPsut7rpQ0cdw5/h74okHbz/OCqL+3X5Y+tIIv0vdntOav4EzYNoihiMDWjSgk5qh 2Kr+gHLCz5ZEY0nDEUjigLdMy6mrQp2anwvmvI5qqDVb8EufGdAqVU0su09KYGWvTBup tn8Jo8YIkZ4YjZFLbxwMOKaEvIanHF17HH+PmN1g52Ywz42dWgbGZdy46p3WqykK6/9O g9k1IL7X2rDy+vY6pt9cDw8PG6gyI1yFE1/PEKBi2jC76ur1GQo3lFHInbteqPND2YGe Ow== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by mx0b-00069f02.pphosted.com with ESMTP id 3e3fpgpd44-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 10 Feb 2022 00:28:49 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 21A0Fq4j108708; Thu, 10 Feb 2022 00:28:48 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2171.outbound.protection.outlook.com [104.47.57.171]) by userp3030.oracle.com with ESMTP id 3e1ec3nwsv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 10 Feb 2022 00:28:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=chSr7ygSIC6fHUvPyGLL6s9tsqRIkHtZpEA6RJyBbaESB2d0OYd0Ho3FlaHNmZSTU0u+EM+fnCJIv9s/jgGIv5tFXWQWzP43CD5jBT4iGcLYhD0tMVl3WhRWd6tglUjdDCz05TM4MSuchpaL8XOxJnp1FlqUWjhbJwTEdmrmzIXscImnz2i5AYxW6dojuX98tJY5Z/5Ua4NDz8XhoTeZzwrUl8LDbSU0jPMswsZMb4uq1cz4XHtq7yIKo3kxeAv0Peh5oXfGauwP5ufJbVoBe2oSHbqJi2iLeUrdH0jd1BQ4n3NndhNdt1FKg0huAzmWF90VusHA10u0SX/PXYWhdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=stPv0YKi4Lqk4n+FINW3zxAvHjigjJIohALT9VxQ9MA=; b=foSsMYnO6wmSqYAZpjyUpFDp6XjKzRKIiVtXSVgxCglpAE30F4Jpp6lGBKNGkXXecODfmxDN6rd1RUW/PIecv8PkF02obpLKI4OcDQ9Vf5Z9TsGYM1Q7FMnKo6YzKAnVzUFGg/RZNyg5KP4HjljEp0TV3jtlHvZPF+rGnCPEzxK8hiUzeQOvNqmD+wVX38Y5S6TkDGFXzgsGciAX6yYtCOtoADtPBDGfMCNY29uXKU2yI/OkMVU/LvJXeCB+JeK2AyuUN3VMy+Tk+Q2AjqY4i/yZcpO1+eobSzGVxRjzbxcXvwbgf+bbEtca3pYExd/tT45X5Y25CJDUeMUok3oFig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=stPv0YKi4Lqk4n+FINW3zxAvHjigjJIohALT9VxQ9MA=; b=WpKYELYszHOLMZikUeaOBpyFjrXElF9ykyVovpUCy500F2C4v2w11/VmDd7MI1hYctl+UjVRUQSXLCG1NOh/zDjdwxyr2xlrmkryFFvoAMHhj8g0GfXeWouPcmGX1372GeJAmvhkmBM462ZDxoKKjUY/AE+WjEf7PAIxTIUtlVQ= Received: from PH0PR10MB4472.namprd10.prod.outlook.com (2603:10b6:510:30::13) by SN6PR10MB2701.namprd10.prod.outlook.com (2603:10b6:805:45::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Thu, 10 Feb 2022 00:28:46 +0000 Received: from PH0PR10MB4472.namprd10.prod.outlook.com ([fe80::94eb:56d8:7cd8:ca76]) by PH0PR10MB4472.namprd10.prod.outlook.com ([fe80::94eb:56d8:7cd8:ca76%5]) with mapi id 15.20.4951.019; Thu, 10 Feb 2022 00:28:46 +0000 From: Victor Erminpour To: davem@davemloft.net Cc: victor.erminpour@oracle.com, kuba@kernel.org, bpoirier@nvidia.com, l4stpr0gr4m@gmail.com, jiapeng.chong@linux.alibaba.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, trivial@kernel.org Subject: [PATCH] net: mpls: Fix GCC 12 warning Date: Wed, 9 Feb 2022 16:28:38 -0800 Message-Id: <1644452918-576-1-git-send-email-victor.erminpour@oracle.com> X-Mailer: git-send-email 1.8.3.1 Content-Type: text/plain X-ClientProxiedBy: BY5PR17CA0026.namprd17.prod.outlook.com (2603:10b6:a03:1b8::39) To PH0PR10MB4472.namprd10.prod.outlook.com (2603:10b6:510:30::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 118e9d32-29fa-49a5-a802-08d9ec2c4c64 X-MS-TrafficTypeDiagnostic: SN6PR10MB2701:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:605; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xmW8I/2N43vLqw5UAbPHV1n552KuBNdIkUeE5HscSyfzpwJGIxbXYiX7XqX//KVdMgWhZnY8FgiPSq5YDlRrGqtsQggnp+uANvBXaRXI742NbfmAqGjFbeRgWeRv9LT9lOaAKnAOC/0iLz2cGAdSNHYe+xUCA4YuJzXY/fI02mphzXyxU4WuVMl66LrMCeteY9/NAFd9PNVhrLUsivRrx29HKUcbLzHT+nKcBHAVfYmtZyREtcMlOux2kqeRFG+mVMSjDTBoH0c7FDlCwW4kW+JAOu0vZ41ok7bGPBLC4txfQMMh7cDafKnGrZdq2gtRe4mFvdbZfQOH2+cg9s691Qfp3Gf/rQHm2vNHSlzrYFUax4LtFAtSS91rdUxdOUMJkTc36spL5+5gLOgvt9M2P4d10IVQ2LgugyH/CzGN7NKXXoEyd4Aq9TZ/JxxpYzetICnxsftxkH4Imc6Hjz4s68sWoiG1+Mjg9DPTBr/C7iefmaiDRCUmSLN8p1T69nNy4SNHTglts2bHyQA08hiYMXO+ccUZZdY8UNKuEsANPnatGKjaohbPiAUfNjT32S/icGwj2wjXwAqOD0CNoEdolxGG2X5C8rVEQuCrWzt5BWPn+Z5h0tvQekVIf5bXQ4SDNXYMEocFXNMa28Boi+RtyRqhlXuiWC5Qy24SGC73mSDgZrnyArJ6rk8UctCsd161KmVCKVy9CoEK7nBH81mDWQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR10MB4472.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(83380400001)(8676002)(38350700002)(186003)(4326008)(8936002)(26005)(316002)(5660300002)(6916009)(66476007)(66556008)(66946007)(36756003)(6666004)(6486002)(6512007)(52116002)(6506007)(44832011)(2616005)(508600001)(38100700002)(2906002)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?HHAjB5MVbGtdTAYEyNVNVG7vOommo3ZGpOcsvvA0Ta3M++fSeJmmsSjIjtTX?= =?us-ascii?Q?hpXow0SP6tZ2NwFwSI8kVJ/UDZRjJEiECtnDSVPwAFUukfiIvFOzhSchhKos?= =?us-ascii?Q?5BBsSkxBzp76HbgZv8sMRQunHaQSPqeTGi4v5UsrxA01zgrHXpuDnkNhmCyM?= =?us-ascii?Q?I/ZUyn75sOV/ovmXyrJhUE5WUXrcWv2U/+JHPDFSQvG3dmXyXHBNx6x5PZfO?= =?us-ascii?Q?5P+u/JJxNIkRYKMBaLtkBDoN85hUq2DVpyoQWsGIs2HDtPdDOSJMSsF8B+Lu?= =?us-ascii?Q?Qrbcufsrz1bioj4blZGSTp8inOWxkOBce6M7Ga74sIVFqW7w/BqzIcK9NEY6?= =?us-ascii?Q?BeDowyGwoV2YjTprgA+BNkxC82XT6o2/Kxb2kbAWvHWKRYZ+0lcQCPv0uYEL?= =?us-ascii?Q?LMVTyKalU303P+gH3a9lEk8myai5KZxT46b3faz1hw8XvMnISY3OtLtOfatw?= =?us-ascii?Q?zKo0iHe1u7Wo2fsZXyt3c46Am4hYfH5Ydpju7cdp2qZOsCe5G/HznOkQ63BY?= =?us-ascii?Q?RaCB3CJac0AAcs0WVRx1GY6+Ihc+0pIpMvDpD4FktQuTQmkRnvNZkesoZg+S?= =?us-ascii?Q?iAXu5dep5ZYAycamv8suWU7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?6L3KZIR+hDLGHcNMUA9OejIDlOVsNLxy6Gh/GiubEbNcS2cYKYQ6Q9BXigES?= =?us-ascii?Q?jDM3xdi3vdppaNstKmCnOKNACFucDvHtErdwINYZxmaOSANms3wEAJ71Cz36?= =?us-ascii?Q?5xMh4WpqBaBq4U8sgpgVDZYBgesFrPO1iuR5zqKSPPqAp62x2DpdNQD3f96c?= =?us-ascii?Q?+YsUaQ=3D=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 118e9d32-29fa-49a5-a802-08d9ec2c4c64 X-MS-Exchange-CrossTenant-AuthSource: PH0PR10MB4472.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2022 00:28:46.4004 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pi60mDKbNtG+4WEqVPLjcbjT8jF0SBzZZqJ4KoD+laHXVrM3VwuPA6/nGfSiLuLgVE1TNEhOiZbpPalwVhGXSdyqcZdUxFEcDOSRe74i8Ec= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR10MB2701 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10253 signatures=673431 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 suspectscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2202100000 X-Proofpoint-GUID: hwIxjDIYBqpZT3Ya9XdRCRjTbwrafDUJ X-Proofpoint-ORIG-GUID: hwIxjDIYBqpZT3Ya9XdRCRjTbwrafDUJ X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When building with automatic stack variable initialization, GCC 12 complains about variables defined outside of switch case statements. Move the variable outside the switch, which silences the warning: ./net/mpls/af_mpls.c:1624:21: error: statement will never be executed [-Werror=switch-unreachable] 1624 | int err; | ^~~ Signed-off-by: Victor Erminpour --- net/mpls/af_mpls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c index 48f75a56f4ae..d6fdc5782d33 100644 --- a/net/mpls/af_mpls.c +++ b/net/mpls/af_mpls.c @@ -1607,6 +1607,7 @@ static int mpls_dev_notify(struct notifier_block *this, unsigned long event, struct net_device *dev = netdev_notifier_info_to_dev(ptr); struct mpls_dev *mdev; unsigned int flags; + int err; if (event == NETDEV_REGISTER) { mdev = mpls_add_dev(dev); @@ -1621,7 +1622,6 @@ static int mpls_dev_notify(struct notifier_block *this, unsigned long event, return NOTIFY_OK; switch (event) { - int err; case NETDEV_DOWN: err = mpls_ifdown(dev, event);