* [PATCH] net: sfp: Clean up errors in sfp.h @ 2023-10-13 3:01 chenguohua 2023-10-15 5:14 ` Bagas Sanjaya 0 siblings, 1 reply; 3+ messages in thread From: chenguohua @ 2023-10-13 3:01 UTC (permalink / raw) To: linux; +Cc: netdev, linux-kernel Fix the following errors reported by checkpatch: ERROR: spaces required around that '=' (ctx:VxW) Signed-off-by: GuoHua Cheng <chenguohua@jari.cn> --- 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, -- 2.17.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: sfp: Clean up errors in sfp.h 2023-10-13 3:01 [PATCH] net: sfp: Clean up errors in sfp.h chenguohua @ 2023-10-15 5:14 ` Bagas Sanjaya 2023-10-15 16:54 ` Russell King (Oracle) 0 siblings, 1 reply; 3+ messages in thread From: Bagas Sanjaya @ 2023-10-15 5:14 UTC (permalink / raw) To: chenguohua, linux; +Cc: netdev, linux-kernel [-- Attachment #1: Type: text/plain, Size: 1897 bytes --] 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 <chenguohua@jari.cn> > --- > 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. Thanks. -- An old man doll... just what I always wanted! - Clara [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: sfp: Clean up errors in sfp.h 2023-10-15 5:14 ` Bagas Sanjaya @ 2023-10-15 16:54 ` Russell King (Oracle) 0 siblings, 0 replies; 3+ messages in thread From: Russell King (Oracle) @ 2023-10-15 16:54 UTC (permalink / raw) To: Bagas Sanjaya; +Cc: chenguohua, netdev, linux-kernel 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 <chenguohua@jari.cn> > > --- > > 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! ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-15 16:54 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-10-13 3:01 [PATCH] net: sfp: Clean up errors in sfp.h chenguohua 2023-10-15 5:14 ` Bagas Sanjaya 2023-10-15 16:54 ` Russell King (Oracle)
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).