Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp979610imu; Wed, 23 Jan 2019 08:52:42 -0800 (PST) X-Google-Smtp-Source: ALg8bN7kkD72vw900oRlFR7qr++PKz6yga2ZyPnNoewu/3jAHi7dyAAzc0VWTlX4FUq2PYcm3FcI X-Received: by 2002:a63:b94c:: with SMTP id v12mr2588461pgo.221.1548262362754; Wed, 23 Jan 2019 08:52:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548262362; cv=none; d=google.com; s=arc-20160816; b=nZMOUOQAEdyAPJgxI8MzsAs9WFFJ3y2PN2itlv5JkrWNonsaZ594FIx8ezN7P30NsX O82ZB92UYW8UQ/ySUXc9713wyfmAIarOB6kEqNWcnqdcVrNx1TAWUfdoRDA0A/V9UYMC 6T2qrf9ALKZ9ZHbkiY5UidFtz7uuIVaKuA3uuesvkUYC9ZM25t+pJXsQVInHebPKF5Bg t3er3xZwtvciImRFGrjx5WY6kkzhPhlyyAOBvoXKwVxfwBGP07khGFcvcpEi+q+8C1VZ UudhspdgqcrNxSHOUBAuyoJl1GQIv7h35FwxND0aamy6vUZypIId9HGou3CBkE8cjh16 IN0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:organization :references:in-reply-to:date:cc:to:reply-to:from:subject:message-id; bh=n73MorgM5BfXTEufxFwRjcabWFxMT3tYBZfPdCnZH/g=; b=Xl716afwHkYFzXOkJN4JdMSOkRZbE+SlrV79sUMkmCya3Hg2986jPnt1PHP2/GA961 z+36UKdKPqhgGGS/nq3PoP8EB6ricPyofwKoLbMTp/6gOZiFjjnHkKsUoNeXVes5DFWa NzUoZuAHK8zRdpaYWLaq86I6hLRpsRZaI0t3FlW0Ko5iv1UwY8kyG8nIbJNnUERLFy6E Rf/4NWghksKe+qTPLVvwtZLFDAXP0BhvzPsSOAM6llHYUIreW1cKIqEl3gYbL4MTkbGt 0j/X1qtrsYST5qKaU2G9V9SuVMEj7G8NRpPFpLIBF7Eo1rqMxUT4FUSLDOlueIfGNPAw IWrA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v5si18069778pfe.52.2019.01.23.08.52.27; Wed, 23 Jan 2019 08:52:42 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726875AbfAWQuj (ORCPT + 99 others); Wed, 23 Jan 2019 11:50:39 -0500 Received: from mga18.intel.com ([134.134.136.126]:19565 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725871AbfAWQuh (ORCPT ); Wed, 23 Jan 2019 11:50:37 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Jan 2019 08:50:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,512,1539673200"; d="asc'?scan'208";a="312849120" Received: from jtkirshe-desk1.jf.intel.com ([134.134.177.96]) by fmsmga006.fm.intel.com with ESMTP; 23 Jan 2019 08:50:36 -0800 Message-ID: <7d8a6120ea335d74c41a5fba3754518ea60e936e.camel@intel.com> Subject: Re: [Intel-wired-lan] [PATCH 1/3] treewide: Lift switch variables out of switches From: Jeff Kirsher Reply-To: jeffrey.t.kirsher@intel.com To: Kees Cook , linux-kernel@vger.kernel.org Cc: dev@openvswitch.org, Ard Biesheuvel , netdev@vger.kernel.org, intel-gfx@lists.freedesktop.org, linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mm@kvack.org, linux-security-module@vger.kernel.org, kernel-hardening@lists.openwall.com, intel-wired-lan@lists.osuosl.org, linux-fsdevel@vger.kernel.org, xen-devel@lists.xenproject.org, Laura Abbott , linux-kbuild@vger.kernel.org, Alexander Popov Date: Wed, 23 Jan 2019 08:51:38 -0800 In-Reply-To: <20190123110349.35882-2-keescook@chromium.org> References: <20190123110349.35882-1-keescook@chromium.org> <20190123110349.35882-2-keescook@chromium.org> Organization: Intel Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-ckUn9AFZsnGNoWsnxDog" User-Agent: Evolution 3.30.4 (3.30.4-1.fc29) Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-ckUn9AFZsnGNoWsnxDog Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2019-01-23 at 03:03 -0800, Kees Cook wrote: > Variables declared in a switch statement before any case statements > cannot be initialized, so move all instances out of the switches. > After this, future always-initialized stack variables will work > and not throw warnings like this: >=20 > fs/fcntl.c: In function =E2=80=98send_sigio_to_task=E2=80=99: > fs/fcntl.c:738:13: warning: statement will never be executed [- > Wswitch-unreachable] > siginfo_t si; > ^~ >=20 > Signed-off-by: Kees Cook Acked-by: Jeff Kirsher For the e1000 changes. > --- > arch/x86/xen/enlighten_pv.c | 7 ++++--- > drivers/char/pcmcia/cm4000_cs.c | 2 +- > drivers/char/ppdev.c | 20 ++++++++--------- > -- > drivers/gpu/drm/drm_edid.c | 4 ++-- > drivers/gpu/drm/i915/intel_display.c | 2 +- > drivers/gpu/drm/i915/intel_pm.c | 4 ++-- > drivers/net/ethernet/intel/e1000/e1000_main.c | 3 ++- > drivers/tty/n_tty.c | 3 +-- > drivers/usb/gadget/udc/net2280.c | 5 ++--- > fs/fcntl.c | 3 ++- > mm/shmem.c | 5 +++-- > net/core/skbuff.c | 4 ++-- > net/ipv6/ip6_gre.c | 4 ++-- > net/ipv6/ip6_tunnel.c | 4 ++-- > net/openvswitch/flow_netlink.c | 7 +++---- > security/tomoyo/common.c | 3 ++- > security/tomoyo/condition.c | 7 ++++--- > security/tomoyo/util.c | 4 ++-- > 18 files changed, 45 insertions(+), 46 deletions(-) --=-ckUn9AFZsnGNoWsnxDog Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiTyZWz+nnTrOJ1LZ5W/vlVpL7c4FAlxIm5oACgkQ5W/vlVpL 7c6nHA/+I5AUD+yELZtkueGqZrZ0E/i+TX7+2pxKNRieTprDcNtILryQEfP4XrvX r7X4QwfM9Rfmrlr1WcZrQW2LVn+uuflivdbtCmE0ZX4iBnIhAoeguyZ6+hInlbDY oN+TzAFm96uYB70bOnyqutGVBKfMkazDXiVtqzbu+7HAMWFnQFFzKX6/o+eL0/Np 1qBQP1okUj2dM/ujfQKLxWQu8IupAI5nDeucqFsscZO1Yh/g9IjOyClDUGSXAyBO Xr67/lCCAt1/Z0GkqN+HElzbtjokp0xitLFF9MyOkmrHiHKcvD62I4OJ97OXlFuF YXvwIg6/9NfVhGgh/k8z6xAAB9JDIZ0rb5yezcdu1FqSYVrAyzI4tmD+l3fS7zyr AnHaQ4tTzsmj0T70bz1wooR2oOnyA2MhVhGUfPXNER24TaApApki5eqydsVPpsMk 3gukrduJogzBL2AVMTp780UAj2WnHYsJhso62fYOPT0huDhAsIWaqcuVi5Fs0o94 b9t84vtQG5NHFEBmaaaVdFhB9+Tw3sOHh+nglVzHm3UZNHcFi+lEgxjtV6cTcm0C 1oIX6J17KkZPxkOf0ENU8Cj/gnvNRF/ZhkDPe0r1bMYnL8w0WxB/rCSPQfWD/F5r bdTuBQbV5MKBc4evjKtB1mFUYD9WrOMIbPjMo9pkJ0XQuttdthc= =MB+1 -----END PGP SIGNATURE----- --=-ckUn9AFZsnGNoWsnxDog--