Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp787190imm; Fri, 28 Sep 2018 06:52:33 -0700 (PDT) X-Google-Smtp-Source: ACcGV61tzRLccPU1PbP+SNwSW/K+gVYjL5vG3mWSvzkbjDXobePcho9aX16QHAnHz2AVh3gJTPzC X-Received: by 2002:a17:902:710e:: with SMTP id a14-v6mr16757055pll.179.1538142753892; Fri, 28 Sep 2018 06:52:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538142753; cv=none; d=google.com; s=arc-20160816; b=sYC7cFWDFh8chNsIBVcOYVO1bBYEPz/s1O6jkEs0enb2Dfgr2GMM0Ukd8vXNE75Jox S5I26y1+acaRhy+D8EKeHOXLXdggGbMtaXXuDj437arIxFYJYzKCmxVoN4qOWFXXBph7 fMZeyoGJbkvEjazjZnP/LGR3GAvLPwOAM28NDHHi4kMedrfWwGp1QFbks5KCrA/X/Ul6 pieXsTtwhOOS9ZaWnlm+wYuCDFmy3GO7HcLb2CU4CUp9mOlqVF6HlwwXNlsW8FLPeFtF f2DnYZ7SAPQkk0alRzytNUE+mvrxCopjnF99Edn/rRfvmnvK/7gTEiANuyeRvRoTD5qG VDoA== 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 :references:in-reply-to:mime-version:dkim-signature; bh=I8vXbrqB5BF4OtvkNXYZLxzdp/koegsaDLHAuHoixQk=; b=gzXT1bCpW94KiggxUIjlZyX+6x+wmjqvnfeSVXnu4Hk/Poi1GyR2YCOvCJHDHAXgBr Yfsvf4GgKOyNVT3FE8zwjbMQjFY7SKb0Dk+prC8LA5j1qeZTEZxFfh/0JN7SfVkN356Q xEo9vCmD9LbWhFRA+5dm54QvMQ3X+cgrin/X508tc3YLpT9hTxZgX4WEiuxn8EF/khGB MKIVK9psZ5I0wiXaWO2dKeBsJ9By+IO5dDEJzDXVdKm4ECDGZGA9feLQLgqL1eK7O/bu JwK8LDrupW/AaCSPKubYsdKa087VuwBQXprzG0QabMOwLSUZtIBiymFylbTeKERN4KHr tDfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RNMNFA+g; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b14-v6si4766127pgk.169.2018.09.28.06.52.17; Fri, 28 Sep 2018 06:52:33 -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=@linaro.org header.s=google header.b=RNMNFA+g; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728953AbeI1UQC (ORCPT + 99 others); Fri, 28 Sep 2018 16:16:02 -0400 Received: from mail-it1-f193.google.com ([209.85.166.193]:55737 "EHLO mail-it1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727676AbeI1UQC (ORCPT ); Fri, 28 Sep 2018 16:16:02 -0400 Received: by mail-it1-f193.google.com with SMTP id c23-v6so2528509itd.5 for ; Fri, 28 Sep 2018 06:52:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=I8vXbrqB5BF4OtvkNXYZLxzdp/koegsaDLHAuHoixQk=; b=RNMNFA+gK3oYxwcvXZ1rNhZZNTyT2usHOaui/A4uzkNinQl9SvuMe57Ia5EkWLkKV+ 3HKVLv883xMf3I6Kmh6TDnewNusqAle9sa4EWYgLo51cNMJ4KQd6oMu6fzzNX4Omn/km 07RF4VhXYKZc3oQb84JenLw2XpzIUMIBOt30g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=I8vXbrqB5BF4OtvkNXYZLxzdp/koegsaDLHAuHoixQk=; b=QmTrudbKBqtZOPdb+vddPMUtGRmj/fA9DKepHJqP1qbZP/WZ8in/3bxrx+5j7M9l0k 37xhMqnWiEdkuEIPm2FAjbFcPdaHOdguiFjsCwVlQ3rP7pjqVcW+p3UbPjnu/yPwsS7M a7pwDfxMSpKUHWbj8eQbWEcTvgcdFBYgqNf8pxLgCiZqYesonb2Uvyrp8uMazfATNLSb JKfBVBn9YTsrgHLK1t78R9hsJvZXsAmIVxhhPJ3lbOtA7Q7gliBxXBV/t27YJ8b4WTzl sVN/M9wD7n6DnInhDTzKNOfektf7CvD8F8uecBPyDOynJYTD5ijdzfyoURAy6RuDoehV wzMg== X-Gm-Message-State: ABuFfoi6LO+vS+Tt6pfzXLrsj07qQRF+Y6bxrsqlXeoX3kQypN1JN0sz RQHbMk+1jVurxGnU+C0YxfSv6QVxWV6GTi5YPXJL6w== X-Received: by 2002:a24:57cb:: with SMTP id u194-v6mr1605523ita.148.1538142728281; Fri, 28 Sep 2018 06:52:08 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:2848:0:0:0:0:0 with HTTP; Fri, 28 Sep 2018 06:52:07 -0700 (PDT) In-Reply-To: References: <20180925145622.29959-1-Jason@zx2c4.com> <20180925145622.29959-2-Jason@zx2c4.com> From: Ard Biesheuvel Date: Fri, 28 Sep 2018 15:52:07 +0200 Message-ID: Subject: Re: [PATCH net-next v6 01/23] asm: simd context helper API To: "Jason A. Donenfeld" Cc: Joe Perches , LKML , Netdev , Linux Crypto Mailing List , David Miller , Greg Kroah-Hartman , Samuel Neves , Andrew Lutomirski , Thomas Gleixner , linux-arch 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 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