Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752076AbbKYRoY (ORCPT ); Wed, 25 Nov 2015 12:44:24 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:44639 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751723AbbKYRoN (ORCPT ); Wed, 25 Nov 2015 12:44:13 -0500 Message-ID: <1448473436.27159.15.camel@decadent.org.uk> Subject: Re: [PATCH 3.2 00/52] 3.2.74-rc1 review From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: torvalds@linux-foundation.org, Guenter Roeck , Phil Jensen , akpm@linux-foundation.org Date: Wed, 25 Nov 2015 17:43:56 +0000 In-Reply-To: References: Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-LxaCZ5XKKrN3jb0ndyLT" X-Mailer: Evolution 3.18.1-1 Mime-Version: 1.0 X-SA-Exim-Connect-IP: 192.168.4.247 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 74806 Lines: 1002 --=-LxaCZ5XKKrN3jb0ndyLT Content-Type: multipart/mixed; boundary="=-L0QVQxC3xm0nCB+PYv9x" --=-L0QVQxC3xm0nCB+PYv9x Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable This is the combined diff for 3.2.74-rc1 relative to 3.2.73. Ben. --=20 Ben Hutchings This sentence contradicts itself - no actually it doesn't. --=-L0QVQxC3xm0nCB+PYv9x Content-Disposition: attachment; filename="linux-3.2.74-rc1.patch" Content-Type: text/x-patch; name="linux-3.2.74-rc1.patch"; charset="UTF-8" Content-Transfer-Encoding: base64 LS0tIGEvRG9jdW1lbnRhdGlvbi9zeXNjdGwvZnMudHh0CisrKyBiL0R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QgfAorCSAgQVpYX0RDQVBTX05PXzY0QklUIHwKIAkgIEFaWF9EQ0FQU19SSVJC X1BSRV9ERUxBWSB8IEFaWF9EQ0FQU19QT1NGSVhfTFBJQiB9LAogI2VuZGlmCiAJLyogVm9ydGV4 ODZNWCAqLwotLS0gYS9zb3VuZC9wY2kvaGRhL3BhdGNoX3NpZ21hdGVsLmMKKysrIGIvc291bmQv cGNpL2hkYS9wYXRjaF9zaWdtYXRlbC5jCkBAIC00OTgwLDYgKzQ5ODAsNyBAQAogc3RhdGljIGlu dCBocF9ibGlrZV9zeXN0ZW0odTMyIHN1YnN5c3RlbV9pZCkKIHsKIAlzd2l0Y2ggKHN1YnN5c3Rl bV9pZCkgeworCWNhc2UgMHgxMDNjMTQ3MzogLyogSFAgUHJvQm9vayA2NTUwYiAqLwogCWNhc2Ug MHgxMDNjMTUyMDoKIAljYXNlIDB4MTAzYzE1MjE6CiAJY2FzZSAweDEwM2MxNTIzOgo= --=-L0QVQxC3xm0nCB+PYv9x-- --=-LxaCZ5XKKrN3jb0ndyLT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIVAwUAVlXzXOe/yOyVhhEJAQqn4BAAuLbOtMkuwpbTy59mAiYOyb7YHj0vGU8d IeAOPnMwaGH7e/kBuHAVDXYv4VuGC2TRAegSIKP4SpDtQf9uZWAYqQuVA0M8od8n +Wf0lCzi+tdZ+EER9/FDyKfHRKBxIl76hwMKQbs5bPogRZYzi0AnyoarK3dV7yrd 5uKXDs2ASIkSboyM3sGbipLVw0KI+WGS/CZcsWvaEqJmKJFZX0MAw36RGuaOhgVv romg0ppVlBifdS7UlLCwZFIzBBOFy/mzm33MyIwpPpuMrqMdLhllr1ATDSim/6Ac UFF08Ng/j5CpSVjDrvREc2B/UR2r0tsSzWwKJcLa4w9HU2W9LZRn5Cwd6Nj1YaaN Ebk2LRCvPbf3ZLCXp6deSmWMkJB3Sti5uMcv0yydP7MgGlLzrHCY80jnc+EQRqjo bpkAvaH8lBsi2rSDAZ9dKO01btDkgNQJq2muB1WVeNM4lx5ZiBwQtKl/cBstcTE7 vsMaAP5ABY9wsyBtC/jQKcsCzE8q1gijJ8OCeVjzBKluVZNtGmNeeiIrsb2+Cy59 M3IEVrhxcYACvspBxYyTAZS83W7+pT8wfn6WjAoGgObHvRe6NanNInxzRM9frbn/ it65Yuf7EWE2UJjxSLTXC4oSh3T/nNPCmypJ6+o0Fj2mRN0INXue0xy1v+ZEdrE4 Q87agv900KA= =EJJd -----END PGP SIGNATURE----- --=-LxaCZ5XKKrN3jb0ndyLT-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/