Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp794828imm; Fri, 28 Sep 2018 07:00:34 -0700 (PDT) X-Google-Smtp-Source: ACcGV63dewkGLFV8nTPklscLUKwqkZN/8TbCRfBBNP3X5PyaWl9A8pANgJM7WywRDrfP8sVCr2qm X-Received: by 2002:a63:2f81:: with SMTP id v123-v6mr6803548pgv.223.1538143234601; Fri, 28 Sep 2018 07:00:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538143234; cv=none; d=google.com; s=arc-20160816; b=KiYwo63nJFpWQcFx9PhuGX8BW9F/VB4/aRHV6eLbixImKqC4ykiVWJNO6MOxSo9i3M ptwJjlh9ohAGKgK+Fhqh2s3dsGA3AGySJwdB54uLHuMf1JjSmCg2s2BXHtAMCAirrz8/ Ia2GuShx0ZQ5haBwG8Pmpiswy+m6scICuSYKoLCxTTSPCtruqbx7oqGeQ+jq31iN8vE+ H5FqoQvToG5wJsrq5qV7qKCB6UtxdJhQggEARdnDKwtu6ftaq9QcgaHgYAJ25FG/NkCr dnNbSAFFGhPIwErEWrUoz+zWG1fx0If56b4yYUXAHtMwn/+PC0cmPzRQmwmhxzhveJeM m0gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Mvado2FhW2mGA4rzeCNzmDJgepAWHV7QKmQqED13Uu8=; b=lMsDi8VVIibTVs+h0/AOllRwocldLvQicMRmrk1aBJh/gPHArxyh0IumG1y0NeLqLI /Y0oLNWXTCui3kuOz5rh0oIugTMkx0YA2g2vzpjEmmebGzssconB0aX6iHRtSBc2gkHF 9W0+1DjdB6I1mcKR76bgp5czJbwiASyJX/UmBtHnQCal5ZLUWuqKjToF5KN4d+EIbq+e sP+cBF3/cMuh1D0U/DyeUMlT/Urd3S1uOOSVDgdTnU34dfyqKpcmeuDFNVKVkeXmL6Re y8RqbYcqYf7LlBkL1zmV206Vd0twNFKWsBs/qNzfkWA1z0HHL3yqxiCu3wljUMuWAYTK M5xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=aR9vzWVj; 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=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cd9-v6si5170532plb.222.2018.09.28.07.00.17; Fri, 28 Sep 2018 07:00:34 -0700 (PDT) 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=@zx2c4.com header.s=mail header.b=aR9vzWVj; 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=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729022AbeI1UYB (ORCPT + 99 others); Fri, 28 Sep 2018 16:24:01 -0400 Received: from frisell.zx2c4.com ([192.95.5.64]:36395 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726665AbeI1UYA (ORCPT ); Fri, 28 Sep 2018 16:24:00 -0400 Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 320dfc32; Fri, 28 Sep 2018 13:41:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; s=mail; bh=w4pl3cZcJHCvoD1JXphNb2Nx4BU=; b=aR9vzW Vj7GAnQdR1rjK8W7IHz4ldOBLpAFc9nzmgISfUpmjLJS4AdAHTu0CySFvu638PYF UqobQ+ADGXvFXZgJASOFxMN3lMfE3ciissi97uDOvsVWHfLmNJ0/ZZAPXP2zD7Fn h1hNcMA/URY2xDG3vxHTovrJ9bVRY4EPgfAQPnFEw3+4MvfpJaIUSPI5ywY7+bLN fT21sL5FGPuJKhuxaMDXCai7Wfm44yp7UhZ/th+YI+bMUOrr9lEpZS8hWwpAqi4s JMlDxxzMkiT9t9QT/dvJt4zvB5J+j3tVUukzy0qEbAHtA7AgewsgGpuZuJGiaKsO oeW190Vp1wj63tiw== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id e273ed41 (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO); Fri, 28 Sep 2018 13:41:16 +0000 (UTC) Received: by mail-ot1-f47.google.com with SMTP id i12-v6so6143367otl.1; Fri, 28 Sep 2018 07:00:03 -0700 (PDT) X-Gm-Message-State: ABuFfoh00KI04DmTJO+XKZSl7jgBj5gxhwWTMCkZqFVafb0ULVfdnKO5 iyD/7wuqaamx2uE3UGQ7OXZfR1cpLI3zHrItiXA= X-Received: by 2002:a9d:48ac:: with SMTP id d41-v6mr2148395otf.144.1538143202793; Fri, 28 Sep 2018 07:00:02 -0700 (PDT) MIME-Version: 1.0 References: <20180925145622.29959-1-Jason@zx2c4.com> <20180925145622.29959-2-Jason@zx2c4.com> In-Reply-To: From: "Jason A. Donenfeld" Date: Fri, 28 Sep 2018 15:59:51 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH net-next v6 01/23] asm: simd context helper API To: Ard Biesheuvel Cc: Joe Perches , LKML , Netdev , Linux Crypto Mailing List , David Miller , Greg Kroah-Hartman , Samuel Neves , Andrew Lutomirski , Thomas Gleixner , linux-arch@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 28, 2018 at 3:58 PM Ard Biesheuvel wrote: > > On 28 September 2018 at 15:47, Jason A. Donenfeld wrote: > > On Fri, Sep 28, 2018 at 10:49 AM Ard Biesheuvel > > wrote: > >> >> +typedef enum { > >> >> + HAVE_NO_SIMD = 1 << 0, > >> >> + HAVE_FULL_SIMD = 1 << 1, > >> >> + HAVE_SIMD_IN_USE = 1 << 31 > >> >> +} simd_context_t; > >> >> + > >> > >> Oh, and another thing (and I'm surprised checkpatch.pl didn't complain > >> about it): the use of typedef in new code is strongly discouraged. > >> This policy predates my involvement, so perhaps Joe can elaborate on > >> the rationale? > > > > In case it matters, the motivation for making this a typedef is I > > could imagine this at some point turning into a more complicated > > struct on certain platforms and that would make refactoring easier. I > > could just make it `struct simd_context` now with 1 member though... > > Yes that makes sense The rationale for it being a typedef or moving to a struct now?