Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp796310imm; Fri, 28 Sep 2018 07:01:42 -0700 (PDT) X-Google-Smtp-Source: ACcGV62mtt6RNNJ1gb0A6K45/OySrCvaIdYcNCM1rUePxYuBn49lbkNUR8l+TNDqvTUhfBJ5Wz/w X-Received: by 2002:a62:174a:: with SMTP id 71-v6mr17172246pfx.217.1538143302321; Fri, 28 Sep 2018 07:01:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538143302; cv=none; d=google.com; s=arc-20160816; b=c7Csek9PTl7IrdUwVvuuyq9VaPGQ0UQoV74un3ODIIlmroZi2BwgPPIk1Znt2Ov/l9 87NHCDY+ESVYpwjzgrrdhbzCREhJZH7uCpwvo8XbHqFIGRfnzfFJaKRNNV1Hl7prLsTW swbV+r/Z5aM7W9LhrELqKpp4aUEPVZeUElNL0/b5dg4oU/AHQI9BHWb3rez7Be3mX8/f 69l5+4Fjvkviw9C+ByAEqY+uutfVFE+IdrdnuF7gC9JrEcqVIs369oG+rh1RDZ3kuVf2 hmadAjt2oMJvQCVCNGNH/QzDtfLH2q4XQ0tRny6kwKXtz7SlGDf9hcGdFil/auPagoxb B0fw== 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=V1YUbtd6aFkUt0FR+y+/NkKwWjXB81Dzm7EN1IuEOTI=; b=J6Rcxyw9A8lal4RWDtp/NvJ538FGX/UTPEjCn8iASiWD+BRyiAEwhRZk8y6uB5c5uh ReuhCSTjkVLxIl2Vr6xT5mwL67rUNfZbH0BhOKy7ZpvL1M+K9ERVlWpTt+hrvWTEYPDs 0NQAI5EnA5EyvR0pPFJ6WjoJW43snHxsA+yI/a25ySppNsQ6pjHQotXIGutO8ywXOwxt ByguzVC6dyvSkp1WpsHpz+RWbuAk97ya23zfqHyY5DHERE515ju5rXbtZn0BvEjxDF9i TP7Fr9NiLleZsssCzbJ0+xhkBMeEUr5XLMRN/jMsUdr/wbiFWStOgXWcT4+OZ9yAkgBt OfTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CiF1v2wr; 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 m185-v6si5007742pgm.206.2018.09.28.07.01.25; Fri, 28 Sep 2018 07:01:42 -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=CiF1v2wr; 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 S1729176AbeI1UYp (ORCPT + 99 others); Fri, 28 Sep 2018 16:24:45 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:45344 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728889AbeI1UYo (ORCPT ); Fri, 28 Sep 2018 16:24:44 -0400 Received: by mail-io1-f65.google.com with SMTP id e12-v6so4197333iok.12 for ; Fri, 28 Sep 2018 07:00:48 -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=V1YUbtd6aFkUt0FR+y+/NkKwWjXB81Dzm7EN1IuEOTI=; b=CiF1v2wrKW0n7Eg7L1ZBJru3KvAEvaqXx01nDeXKMkrteOWJCms6c5zm8G+GVKpk78 eLbuJY6jSGI+5Oh38A5gQe4SKeR3s/KJG/3IB5QqbZ/6pt5z0SA/LnP9F4cWag2lpgwj 089qlMPO5Ko2g3MPXiSD0DlpVtK9W54yV1Ir4= 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=V1YUbtd6aFkUt0FR+y+/NkKwWjXB81Dzm7EN1IuEOTI=; b=MNPywPl3eq9h3AxEsKeJcx1SwLpJDamTjLGzvP0mKrqsC6tg1QiyLa+LxPhILz1r8u Jxv2yfOQjYa/OkPO5Zzyr/pQd5hZqXnnEISKNy8n+UR5ae/ddvN5fYpVOje6FmiCl2EX taRgPrn4FzOiEtYajJXQO9oY36RVBeDrjd31IiuQQXvyA/wed6UsKFvGm1W7I5mkZMkb l+Xc9FyrDnvi1VQFeZT5k6jW8o899hoBkiSURChMbXLqErLSqJmy0+9fff131iIRYW4T COK/lwx1gfbHoax/RBsfg4rssPTjV/NQj8GRLV8YirFLZ1gbQhEqDSyir5/pXWfiLAjx RMYA== X-Gm-Message-State: ABuFfojdRS3ObB55dUbtENd+5omPMCcoa1y08StJxdxbySYD0j9W5zJy rOHia76vhH1XRq+dqOogh5wKUF6nAL3EmfDjh01e2A== X-Received: by 2002:a6b:be83:: with SMTP id o125-v6mr11856981iof.173.1538143248302; Fri, 28 Sep 2018 07:00:48 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:2848:0:0:0:0:0 with HTTP; Fri, 28 Sep 2018 07:00:47 -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 16:00:47 +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:59, Jason A. Donenfeld wrote: > 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? Yes just switch to a struct.