Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp841057imm; Mon, 1 Oct 2018 21:00:58 -0700 (PDT) X-Google-Smtp-Source: ACcGV62PEimskchmfBy8aGvfewsNt2r7ZRy5TPwaGAa2ctWy+sssWP49GPWx5eEQj0dNzRFMvxkb X-Received: by 2002:a63:e04d:: with SMTP id n13-v6mr12993508pgj.426.1538452858184; Mon, 01 Oct 2018 21:00:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538452858; cv=none; d=google.com; s=arc-20160816; b=suejtcSrUD/D/L4v6ryGcz0gUOVckKzG4ZCOGosv+0ufGsS1VuzUva2xuK2zNonZvZ xc1nE7z4Do1B3hdjszR10kRpcfmeAnMnMC9KuJ8nvDpQDGV5wSTtrD95FSIv/YXbouj4 IcbQfgNN2UKOez05t14PX/TT7jqO50Xhw45SgItpswkFqspG54SdPstF09U9wreaIQj1 dSxz2dVXMd5x8WZ4ZT/K1Oe4xw8uJXaYtjwLX5+YbZpFKYdPtjEUZU1Xe93oxDsT5+fB iiFmlatPJ2PEsHyzWXcOeUucjA9j3aTm36ltJNMlUmI6xsuldwt3g35zf4qnXwQ6i3mp G/7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=/5d8uorx7U6Dee3mqvNCLdO68Q0EvuZKXeJY08UnPcQ=; b=Zy6CE+1aGcLn9Kbqkm0yn7qPM69SEN8sxY6em/gJKEf4dJteNgOZrnMPr06PdGopra y3aLHnCS6YxlrHM0hVwEUaGDEst5twnIzxiAfD5JrHqXc3esmCr7f2lRW+StgRjrAujK SXHSq8WPB7Rvvjc1jqOdZqw2O5nvc5bZKKfVaTXcB21/sz/mLfS5x+NfwsxesPK8Sk/C Gn27wOFsEijW1UtW797YpA3/JxfAxFbb02ML6tQKpsm9c7PG1BdxGaY3BZAzW8Fz7glt p7Y8XghtWuhSEO+dkxfHk58SJ2kwdv1pL/ygPT6TdixcPaDZviwHSVyd57Vdav1nUUCf cAzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=HGptZyOA; 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 l12-v6si14453408plc.332.2018.10.01.21.00.43; Mon, 01 Oct 2018 21:00:58 -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=HGptZyOA; 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 S1726936AbeJBKlo (ORCPT + 99 others); Tue, 2 Oct 2018 06:41:44 -0400 Received: from frisell.zx2c4.com ([192.95.5.64]:37685 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726758AbeJBKln (ORCPT ); Tue, 2 Oct 2018 06:41:43 -0400 Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 0febcb99; Tue, 2 Oct 2018 04:00:34 +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:content-transfer-encoding; s=mail; bh=6+otpgUArBWY RR44p0ZEL5TsnsQ=; b=HGptZyOANAXtkyV7TjIplI/5PR0I1Z9mD9VEwr/nozqu KatYCXJsc3E6ijcp7soruhKZz3MsCHzbW5Nd5BaHSHaWmCkaBXxd0g/HPdJO7WXd IZvseECPHVFD4qTGxVnGvM0kJENvmqiK9ak0Il2/cDCWVrFhx0sGltI9xVsYge3V 3gKNoJyuiHoxLuyyrankIIQzDju0pGp2tEhF6GeHIB8bxVaKlC/I1Zlkf67Db15c Ro6CPgwENuGBzdrNllO0POQbPztqJ1lYF3zx/ZPrqBc8m8n8AS0zJVWSMNV7EfVc mTKfazUtTYVq3cdDYgl9L7nVwPcH3J5Wt3tNKXpj5g== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 3d9cd7ce (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO); Tue, 2 Oct 2018 04:00:34 +0000 (UTC) Received: by mail-ot1-f54.google.com with SMTP id c20-v6so563989otl.6; Mon, 01 Oct 2018 21:00:35 -0700 (PDT) X-Gm-Message-State: ABuFfohj8hdCZo7kSbkzzjFH1c6t/0fbVOTROqThrZctSl60CDc64lBA jzOZux+TXTXWeVOmJezjEbmc7g4bYiSablXoZxw= X-Received: by 2002:a9d:17d0:: with SMTP id j74-v6mr4813928otj.268.1538358216583; Sun, 30 Sep 2018 18:43:36 -0700 (PDT) MIME-Version: 1.0 References: <20180925145622.29959-1-Jason@zx2c4.com> <20180925145622.29959-2-Jason@zx2c4.com> <8afdd3b1c51587708db6ae878eb0a7e9f8b5673a.camel@perches.com> <3E9E1888-026E-45C1-8AA7-DADA211EDBDF@amacapital.net> In-Reply-To: <3E9E1888-026E-45C1-8AA7-DADA211EDBDF@amacapital.net> From: "Jason A. Donenfeld" Date: Mon, 1 Oct 2018 03:43:25 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH net-next v6 01/23] asm: simd context helper API To: Andy Lutomirski Cc: Joe Perches , Ard Biesheuvel , 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" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Sep 30, 2018 at 7:35 AM Andy Lutomirski wrote= : > >>>>>>> Oh, and another thing (and I'm surprised checkpatch.pl didn't com= plain > >>>>>>> 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. > >> > >> Okay. No problem with that, but will wait to hear from Joe first. > > > > Why do you need to hear from me again? > > > > As far as I know, the only info about typedef avoidance are in > > Documentation/process/coding-style.rst section 5. > > > > > > I personally prefer it with the typedef. If this were my code, I=E2=80=99= d say the coding style is silly for opaque tiny structs like this. I'll stick with a typedef. Reading the style guide, this clearly falls into 5.a, 5.b, and maybe 5.c. For 5.a, at some point this will possibly contain architecture specific blobs. For 5.b, it is just an enum (integer) right now.