linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 1/6] The file ksz_common.c will be used by other KSZ switch drivers.
       [not found] <93AF473E2DA327428DE3D46B72B1E9FD411218C4@CHN-SV-EXMX02.mchp-main.com>
@ 2017-09-07 21:08 ` Tristram.Ha
  2017-09-07 21:24   ` Andrew Lunn
                     ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Tristram.Ha @ 2017-09-07 21:08 UTC (permalink / raw)
  To: andrew, muvarov, pavel, nathan.leigh.conrad, vivien.didelot,
	f.fainelli, netdev, linux-kernel, Woojung.Huh

From: Tristram Ha <Tristram.Ha@microchip.com>

Break ksz_common.c into 2 files so that the common code can be used by other KSZ switch drivers.

Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com>
---
diff --git a/drivers/net/dsa/microchip/Makefile b/drivers/net/dsa/microchip/Makefile
index ed335e2..0961c30 100644
--- a/drivers/net/dsa/microchip/Makefile
+++ b/drivers/net/dsa/microchip/Makefile
@@ -1,2 +1,2 @@
-obj-$(CONFIG_MICROCHIP_KSZ)	        += ksz_common.o
+obj-$(CONFIG_MICROCHIP_KSZ)	        += ksz9477.o ksz_common.o
 obj-$(CONFIG_MICROCHIP_KSZ_SPI_DRIVER)	+= ksz_spi.o

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH RFC 1/6] The file ksz_common.c will be used by other KSZ switch drivers.
  2017-09-07 21:08 ` [PATCH RFC 1/6] The file ksz_common.c will be used by other KSZ switch drivers Tristram.Ha
@ 2017-09-07 21:24   ` Andrew Lunn
  2017-09-07 22:26     ` Tristram.Ha
  2017-09-08  0:40   ` Andrew Lunn
  2017-09-08  8:56   ` Pavel Machek
  2 siblings, 1 reply; 7+ messages in thread
From: Andrew Lunn @ 2017-09-07 21:24 UTC (permalink / raw)
  To: Tristram.Ha
  Cc: muvarov, pavel, nathan.leigh.conrad, vivien.didelot, f.fainelli,
	netdev, linux-kernel, Woojung.Huh

On Thu, Sep 07, 2017 at 09:08:58PM +0000, Tristram.Ha@microchip.com wrote:
> From: Tristram Ha <Tristram.Ha@microchip.com>
> 
> Break ksz_common.c into 2 files so that the common code can be used by other KSZ switch drivers.
> 
> Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com>
> ---
> diff --git a/drivers/net/dsa/microchip/Makefile b/drivers/net/dsa/microchip/Makefile
> index ed335e2..0961c30 100644
> --- a/drivers/net/dsa/microchip/Makefile
> +++ b/drivers/net/dsa/microchip/Makefile
> @@ -1,2 +1,2 @@
> -obj-$(CONFIG_MICROCHIP_KSZ)	        += ksz_common.o
> +obj-$(CONFIG_MICROCHIP_KSZ)	        += ksz9477.o ksz_common.o
>  obj-$(CONFIG_MICROCHIP_KSZ_SPI_DRIVER)	+= ksz_spi.o

Hi Tristram

I would of thought this would break the build. You don't add ksz9477.c
until the next patch.

Each patch needs to compile, otherwise you break git bisect.

     Andrew

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH RFC 1/6] The file ksz_common.c will be used by other KSZ switch drivers.
  2017-09-07 21:24   ` Andrew Lunn
@ 2017-09-07 22:26     ` Tristram.Ha
  2017-09-07 22:40       ` Andrew Lunn
  2017-09-08  8:57       ` Pavel Machek
  0 siblings, 2 replies; 7+ messages in thread
From: Tristram.Ha @ 2017-09-07 22:26 UTC (permalink / raw)
  To: andrew
  Cc: muvarov, pavel, nathan.leigh.conrad, vivien.didelot, f.fainelli,
	netdev, linux-kernel, Woojung.Huh

> -----Original Message-----
> From: Andrew Lunn [mailto:andrew@lunn.ch]
> Sent: Thursday, September 07, 2017 2:25 PM
> To: Tristram Ha - C24268
> Cc: muvarov@gmail.com; pavel@ucw.cz; nathan.leigh.conrad@gmail.com;
> vivien.didelot@savoirfairelinux.com; f.fainelli@gmail.com;
> netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Woojung Huh - C21699
> Subject: Re: [PATCH RFC 1/6] The file ksz_common.c will be used by other KSZ
> switch drivers.
> 
> On Thu, Sep 07, 2017 at 09:08:58PM +0000, Tristram.Ha@microchip.com wrote:
> > From: Tristram Ha <Tristram.Ha@microchip.com>
> >
> > Break ksz_common.c into 2 files so that the common code can be used by other
> KSZ switch drivers.
> >
> > Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com>
> > ---
> > diff --git a/drivers/net/dsa/microchip/Makefile
> > b/drivers/net/dsa/microchip/Makefile
> > index ed335e2..0961c30 100644
> > --- a/drivers/net/dsa/microchip/Makefile
> > +++ b/drivers/net/dsa/microchip/Makefile
> > @@ -1,2 +1,2 @@
> > -obj-$(CONFIG_MICROCHIP_KSZ)	        += ksz_common.o
> > +obj-$(CONFIG_MICROCHIP_KSZ)	        += ksz9477.o ksz_common.o
> >  obj-$(CONFIG_MICROCHIP_KSZ_SPI_DRIVER)	+= ksz_spi.o
> 
> Hi Tristram
> 
> I would of thought this would break the build. You don't add ksz9477.c until the
> next patch.
> 
> Each patch needs to compile, otherwise you break git bisect.
> 
>      Andrew

Eventually the file will need to be broken in two, so you would like to see all 3 changes (Makefile, ksz_common.c, and ksz9477.c) in 1 patch file?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH RFC 1/6] The file ksz_common.c will be used by other KSZ switch drivers.
  2017-09-07 22:26     ` Tristram.Ha
@ 2017-09-07 22:40       ` Andrew Lunn
  2017-09-08  8:57       ` Pavel Machek
  1 sibling, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2017-09-07 22:40 UTC (permalink / raw)
  To: Tristram.Ha
  Cc: muvarov, pavel, nathan.leigh.conrad, vivien.didelot, f.fainelli,
	netdev, linux-kernel, Woojung.Huh

> > > Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com>
> > > ---
> > > diff --git a/drivers/net/dsa/microchip/Makefile
> > > b/drivers/net/dsa/microchip/Makefile
> > > index ed335e2..0961c30 100644
> > > --- a/drivers/net/dsa/microchip/Makefile
> > > +++ b/drivers/net/dsa/microchip/Makefile
> > > @@ -1,2 +1,2 @@
> > > -obj-$(CONFIG_MICROCHIP_KSZ)	        += ksz_common.o
> > > +obj-$(CONFIG_MICROCHIP_KSZ)	        += ksz9477.o ksz_common.o
> > >  obj-$(CONFIG_MICROCHIP_KSZ_SPI_DRIVER)	+= ksz_spi.o
> > 
> > Hi Tristram
> > 
> > I would of thought this would break the build. You don't add ksz9477.c until the
> > next patch.
> > 
> > Each patch needs to compile, otherwise you break git bisect.
> > 
> >      Andrew
> 

> Eventually the file will need to be broken in two, so you would like
> to see all 3 changes (Makefile, ksz_common.c, and ksz9477.c) in 1
> patch file?

You cannot break the build. Each patch must compile on its own.

Breaking changes up into smaller chunks is good. Makes it easier to
review.  So think about how you can do it without breaking the build,
but have smaller changes. For example, move a group of functions at a
time?

	Andrew

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH RFC 1/6] The file ksz_common.c will be used by other KSZ switch drivers.
  2017-09-07 21:08 ` [PATCH RFC 1/6] The file ksz_common.c will be used by other KSZ switch drivers Tristram.Ha
  2017-09-07 21:24   ` Andrew Lunn
@ 2017-09-08  0:40   ` Andrew Lunn
  2017-09-08  8:56   ` Pavel Machek
  2 siblings, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2017-09-08  0:40 UTC (permalink / raw)
  To: Tristram.Ha
  Cc: muvarov, pavel, nathan.leigh.conrad, vivien.didelot, f.fainelli,
	netdev, linux-kernel, Woojung.Huh

On Thu, Sep 07, 2017 at 09:08:58PM +0000, Tristram.Ha@microchip.com wrote:
> From: Tristram Ha <Tristram.Ha@microchip.com>

Hi Tristram

Another process thing you are missing. Patch subject should follow a
pattern:

git log --oneline drivers/net/dsa/mv88e6xxx
bb0a2675f72b net: dsa: mv88e6xxx: Enable CMODE config support for 6390X
b3e05aa12319 net: dsa: mv88e6xxx: add a multi_chip info flag
68b8f60cf70d net: dsa: mv88e6xxx: add Energy Detect ops
9069c13a4867 net: dsa: mv88e6xxx: add a global2_addr info flag
9e907d739cc3 net: dsa: mv88e6xxx: add POT operation
a2a05db8a5ed net: dsa: mv88e6xxx: add POT flag to 88E6390
51c901a77562 net: dsa: mv88e6xxx: distinguish Global 2 Rsvd2CPU
d6c5e6aff50c net: dsa: mv88e6xxx: add number of Global 2 IRQs
74e60241ce14 net: dsa: mv88e6xxx: remove 88E6185 G2 interrupt
2466f64ae4e9 net: dsa: mv88e6xxx: remove unused capabilities

Please set the subject line in your patches similarly.

       Andrew

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH RFC 1/6] The file ksz_common.c will be used by other KSZ switch drivers.
  2017-09-07 21:08 ` [PATCH RFC 1/6] The file ksz_common.c will be used by other KSZ switch drivers Tristram.Ha
  2017-09-07 21:24   ` Andrew Lunn
  2017-09-08  0:40   ` Andrew Lunn
@ 2017-09-08  8:56   ` Pavel Machek
  2 siblings, 0 replies; 7+ messages in thread
From: Pavel Machek @ 2017-09-08  8:56 UTC (permalink / raw)
  To: Tristram.Ha
  Cc: andrew, muvarov, nathan.leigh.conrad, vivien.didelot, f.fainelli,
	netdev, linux-kernel, Woojung.Huh

[-- Attachment #1: Type: text/plain, Size: 970 bytes --]

On Thu 2017-09-07 21:08:58, Tristram.Ha@microchip.com wrote:
> From: Tristram Ha <Tristram.Ha@microchip.com>
> 
> Break ksz_common.c into 2 files so that the common code can be used by other KSZ switch drivers.
> 
> Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com>
> ---
> diff --git a/drivers/net/dsa/microchip/Makefile b/drivers/net/dsa/microchip/Makefile
> index ed335e2..0961c30 100644
> --- a/drivers/net/dsa/microchip/Makefile
> +++ b/drivers/net/dsa/microchip/Makefile
> @@ -1,2 +1,2 @@
> -obj-$(CONFIG_MICROCHIP_KSZ)	        += ksz_common.o
> +obj-$(CONFIG_MICROCHIP_KSZ)	        += ksz9477.o ksz_common.o
>  obj-$(CONFIG_MICROCHIP_KSZ_SPI_DRIVER)	+= ksz_spi.o

I believe you should also rename option to CONFIG_MICROCHIP_KSZ_9477
here... and introduce appropriate Kconfig change.

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH RFC 1/6] The file ksz_common.c will be used by other KSZ switch drivers.
  2017-09-07 22:26     ` Tristram.Ha
  2017-09-07 22:40       ` Andrew Lunn
@ 2017-09-08  8:57       ` Pavel Machek
  1 sibling, 0 replies; 7+ messages in thread
From: Pavel Machek @ 2017-09-08  8:57 UTC (permalink / raw)
  To: Tristram.Ha
  Cc: andrew, muvarov, nathan.leigh.conrad, vivien.didelot, f.fainelli,
	netdev, linux-kernel, Woojung.Huh

[-- Attachment #1: Type: text/plain, Size: 1076 bytes --]


> > > Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com>
> > > ---
> > > diff --git a/drivers/net/dsa/microchip/Makefile
> > > b/drivers/net/dsa/microchip/Makefile
> > > index ed335e2..0961c30 100644
> > > --- a/drivers/net/dsa/microchip/Makefile
> > > +++ b/drivers/net/dsa/microchip/Makefile
> > > @@ -1,2 +1,2 @@
> > > -obj-$(CONFIG_MICROCHIP_KSZ)	        += ksz_common.o
> > > +obj-$(CONFIG_MICROCHIP_KSZ)	        += ksz9477.o ksz_common.o
> > >  obj-$(CONFIG_MICROCHIP_KSZ_SPI_DRIVER)	+= ksz_spi.o
> > 
> > Hi Tristram
> > 
> > I would of thought this would break the build. You don't add ksz9477.c until the
> > next patch.
> > 
> > Each patch needs to compile, otherwise you break git bisect.
> > 
> >      Andrew
> 
> Eventually the file will need to be broken in two, so you would like
>to see all 3 changes (Makefile, ksz_common.c, and ksz9477.c) in 1
> patch file?

Yes please.
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-09-08  8:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <93AF473E2DA327428DE3D46B72B1E9FD411218C4@CHN-SV-EXMX02.mchp-main.com>
2017-09-07 21:08 ` [PATCH RFC 1/6] The file ksz_common.c will be used by other KSZ switch drivers Tristram.Ha
2017-09-07 21:24   ` Andrew Lunn
2017-09-07 22:26     ` Tristram.Ha
2017-09-07 22:40       ` Andrew Lunn
2017-09-08  8:57       ` Pavel Machek
2017-09-08  0:40   ` Andrew Lunn
2017-09-08  8:56   ` Pavel Machek

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).