Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2075763rdg; Sun, 15 Oct 2023 09:54:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF9cdrLBxLuQ8eF97v0zKgAn92yL6oSuOfOoIWPaIYoV3RgNVyd7VGMIzJVySeDkpzu3aya X-Received: by 2002:a05:6a20:3d1b:b0:12e:4d86:c017 with SMTP id y27-20020a056a203d1b00b0012e4d86c017mr39168919pzi.10.1697388878489; Sun, 15 Oct 2023 09:54:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697388878; cv=none; d=google.com; s=arc-20160816; b=v2CySIgM7uFbIXeHvvYKaU+jE4FN0raWpjqEHkGiM6fU5IyHnd6fiC8ld2fSTs3+jo 3lGp2/PNZCc4a8uenvPNQ3FUdaWkz/SmwECkpjh5GoYMDMNlXffqH1kwKe5sJ4EwDyVc SN6yDLahZfYQuwEuev90yVXCFGOMBVVM1p77CWAUmxjypT1lMz+68w3JkoERaWTKGo2i q+0E2qxP22DAWV3nQKGKpJH5TxUUa6ZJVj1YvF75IfMBxVLYGp/6GWXj54mmxdPSHQMS jBMCu0Gzn2mAXdKXtjh6EvtEUkOWkldy6KHoNAb9oAEXOvQWkLlcc26Peq+WjVvmjfIe vFkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=5lYjWxgb2hkXC5DfKD5kKE3Wbfr+WClUFqRfhj+rB+s=; fh=A232pJ4jk6bPIpDtwN2F+v2cyX7jYfSfYShxQ+OHoBw=; b=xFRDIkiUxBDKKcw3MJV4GVY9sLhvPNQKSi9609oTjKuK29ZakyVZdsnpY6Yfkl88uu 6nmOaM0gxMMie5ClCh2S+5PajwZkIk9sT6j4ff3TU5o24v5fYXJ5iCau89T2DRnX6YxE eXECFfTqinE5Sfrk74fa7flaVHSFCmSAlcyGBjyddk+I0Oz15LJ/WK2DYURFN/SrH6OC O6QxAo8VQ8n+Cihh7YaHeIKH+6NQeO1aJlHzKlhMsNgaA24tJBcvNRw8rDXzIhRbgEPx W+1kr41HdDhMHddqy7jpjTJfA9KSdEePmNv7/LtaxUlbt8WPCtXb3SnXpO5K/Szfbo1R jHhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=jmuClvXq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id x8-20020a63b348000000b005aa45782ef5si1381894pgt.337.2023.10.15.09.54.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Oct 2023 09:54:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=jmuClvXq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id CE7CF806082B; Sun, 15 Oct 2023 09:54:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229839AbjJOQyU (ORCPT + 99 others); Sun, 15 Oct 2023 12:54:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229603AbjJOQyT (ORCPT ); Sun, 15 Oct 2023 12:54:19 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EA65AB; Sun, 15 Oct 2023 09:54:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=5lYjWxgb2hkXC5DfKD5kKE3Wbfr+WClUFqRfhj+rB+s=; b=jmuClvXqMWBUDuIPZDs9nfLbZx hjb7QTF7MymsYfsF/OJuQXdV88VqHni3iDXxdHUtt9q6im1T712xDgjUItnqW2hl9apB9ywu9TbeQ sr2RZROehujHH78Woi4uB8vVcs8plmMMm9M7WoQSEVC6xdD7WNH3kWqjZtJ5JG7M5abwqWrzWtxTm bkHBPVRsNBMYNE6HqRn5lPhRLwNU9qGVHpaiWFZ4t9DtuucqG4i+GrKeifflRcSOiP6+/EMNA39g+ KWcSnitPC6Uypshus4cSnXjZ8XMA5xEJNhoS4pIgWfe0bok2zX1oCC2///YU2U2XofQJdTZ2s71js PbgtAOVg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:53444) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qs4NV-0008KF-33; Sun, 15 Oct 2023 17:54:09 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qs4NV-0004gk-9y; Sun, 15 Oct 2023 17:54:09 +0100 Date: Sun, 15 Oct 2023 17:54:09 +0100 From: "Russell King (Oracle)" To: Bagas Sanjaya Cc: chenguohua@jari.cn, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: sfp: Clean up errors in sfp.h Message-ID: References: <1a7c167f.942.18b26fb3ec9.Coremail.chenguohua@jari.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Sun, 15 Oct 2023 09:54:36 -0700 (PDT) On Sun, Oct 15, 2023 at 12:14:02PM +0700, Bagas Sanjaya wrote: > On Fri, Oct 13, 2023 at 11:01:21AM +0800, chenguohua@jari.cn wrote: > > Fix the following errors reported by checkpatch: > > > > ERROR: spaces required around that '=' (ctx:VxW) > > > > Signed-off-by: GuoHua Cheng > > --- > > include/linux/sfp.h | 8 ++++---- > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > diff --git a/include/linux/sfp.h b/include/linux/sfp.h > > index 9346cd44814d..725c8381a347 100644 > > --- a/include/linux/sfp.h > > +++ b/include/linux/sfp.h > > @@ -289,10 +289,10 @@ enum { > > SFF8024_ENCODING_8B10B = 0x01, > > SFF8024_ENCODING_4B5B = 0x02, > > SFF8024_ENCODING_NRZ = 0x03, > > - SFF8024_ENCODING_8472_MANCHESTER= 0x04, > > + SFF8024_ENCODING_8472_MANCHESTER = 0x04, > > SFF8024_ENCODING_8472_SONET = 0x05, > > SFF8024_ENCODING_8472_64B66B = 0x06, > > - SFF8024_ENCODING_8436_MANCHESTER= 0x06, > > + SFF8024_ENCODING_8436_MANCHESTER = 0x06, > > SFF8024_ENCODING_8436_SONET = 0x04, > > SFF8024_ENCODING_8436_64B66B = 0x05, > > SFF8024_ENCODING_256B257B = 0x07, > > @@ -306,11 +306,11 @@ enum { > > SFF8024_CONNECTOR_MT_RJ = 0x08, > > SFF8024_CONNECTOR_MU = 0x09, > > SFF8024_CONNECTOR_SG = 0x0a, > > - SFF8024_CONNECTOR_OPTICAL_PIGTAIL= 0x0b, > > + SFF8024_CONNECTOR_OPTICAL_PIGTAIL = 0x0b, > > SFF8024_CONNECTOR_MPO_1X12 = 0x0c, > > SFF8024_CONNECTOR_MPO_2X16 = 0x0d, > > SFF8024_CONNECTOR_HSSDC_II = 0x20, > > - SFF8024_CONNECTOR_COPPER_PIGTAIL= 0x21, > > + SFF8024_CONNECTOR_COPPER_PIGTAIL = 0x21, > > SFF8024_CONNECTOR_RJ45 = 0x22, > > SFF8024_CONNECTOR_NOSEPARATE = 0x23, > > SFF8024_CONNECTOR_MXC_2X16 = 0x24, > > To be consistent, other enum's indentation should also be aligned to match > the longest ones (MANCHESTER and PIGTAIL). > > In netdev, though, checkpatch fixes are not welcome (auto-rejected) as these > make stable backports more convoluted. And I, as the author of the file, prefer the "=" to all line up here without being indented excessively. Given the low number that are like this, on balance, it's not a huge problem. That's the thing with coding style - does fixing a coding style issue make the code more or less readable, and does it introduce a maintenance issue going forward to fix it. Arguably, indenting all the constants by an addtional tab _could_ be done, but that becomes a big change, which as pointed out, can make future maintenance in terms of backporting a nightmare. Does fixing the style make the code more readable? Not at all, it's no different. So on balance, the right answer is definitely to leave it as-is. Thanks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!