From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40915C433E1 for ; Thu, 28 May 2020 20:06:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 216FE2088E for ; Thu, 28 May 2020 20:06:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406874AbgE1UGd (ORCPT ); Thu, 28 May 2020 16:06:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406779AbgE1UGc (ORCPT ); Thu, 28 May 2020 16:06:32 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D659C08C5C6; Thu, 28 May 2020 13:06:32 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.93 #3 (Red Hat Linux)) id 1jeOmu-00H6ZA-KK; Thu, 28 May 2020 20:06:00 +0000 Date: Thu, 28 May 2020 21:06:00 +0100 From: Al Viro To: Matthew Wilcox Cc: Joe Perches , Linus Torvalds , Christoph Hellwig , Ian Kent , David Howells , Linux Kernel Mailing List , linux-fsdevel , LSM List , NetFilter , Alex Deucher , David Airlie Subject: Re: clean up kernel_{read,write} & friends v2 Message-ID: <20200528200600.GS23230@ZenIV.linux.org.uk> References: <20200528054043.621510-1-hch@lst.de> <20200528193340.GR23230@ZenIV.linux.org.uk> <20200528194441.GQ17206@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200528194441.GQ17206@bombadil.infradead.org> Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: On Thu, May 28, 2020 at 12:44:41PM -0700, Matthew Wilcox wrote: > On Thu, May 28, 2020 at 08:33:40PM +0100, Al Viro wrote: > > On Thu, May 28, 2020 at 12:22:08PM -0700, Joe Perches wrote: > > > > > Hard limits at 80 really don't work well, especially with > > > some of the 25+ character length identifiers used today. > > > > IMO any such identifier is a good reason for a warning. > > > > The litmus test is actually very simple: how unpleasant would it be > > to mention the identifiers while discussing the code over the phone? > > Here's a good example of a function which should be taken out and shot: > > int amdgpu_atombios_get_leakage_vddc_based_on_leakage_params(struct amdgpu_devic > e *adev, > ... > switch (frev) { > case 2: > switch (crev) { > ... > if (profile->ucElbVDDC_Num > 0) { > for (i = 0; i < profile->ucElbVDDC_Num; i++) { > if (vddc_id_buf[i] == virtual_voltage_id) { > for (j = 0; j < profile->ucLeakageBinNum; j++) { > if (vbios_voltage_id <= leakage_bin[j]) { > *vddc = vddc_buf[j * profile->ucElbVDDC_Num + i]; > > I mean, I get it that AMD want to show off just how studly a monitor they > support, but good grief ... I must respectfully disagree. It clearly needs to be hanged, drawn and quartered...