All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Marc Reilly <marc@cpdesign.com.au>
Cc: linux-arm-kernel@lists.infradead.org,
	"Samuel Ortiz" <samuel.ortiz@intel.com>,
	"Ying-Chun Liu (PaulLiu)" <paulliu@debian.org>,
	"Mark Brown" <broonie@opensource.wolfsonmicro.com>,
	linux-kernel@vger.kernel.org, kernel@pengutronix.de,
	"Philippe Rétornaz" <philippe.retornaz@epfl.ch>,
	git@vger.kernel.org
Subject: Re: [PATCH 0/7] Add support for Freescale's mc34708 to mc13xxx driver
Date: Fri, 13 Jul 2012 10:48:54 +0200	[thread overview]
Message-ID: <20120713084854.GD592@pengutronix.de> (raw)
In-Reply-To: <11987916.rOoNGcb1ly@dev1>

Hello,

[I added git@vger.k.o to Cc: please strip the recipents accordingly if
you reply.]

On Fri, Jul 13, 2012 at 09:02:56AM +1000, Marc Reilly wrote:
> Hi Uwe,
> 
> > This series was tested on a Phytec pcm038 (mc13783 on spi) using
> > traditional boot (i.e. not dt) and on a i.MX53 based machine (mc34708 on
> > i2c) using dt boot.
> > 
> > Philippe's patches are already in next, they are just included here for
> > those who want to test the patches. The 'mfd/mc13xxx: drop modifying
> > driver's id_table in probe' was already sent out yesterday and is
> > included here because the last patch depends on it.
> > 
> 
> For all patches (that don't already have it):
> Acked-by: Marc Reilly <marc@cpdesign.com.au>
Thanks.

> If for some reason you do a V2:
> - In patch 6 moves line "#define MC13XXX_NUMREGS 0x3f" around, is this 
> necessary?
It doesn't move it around, that's only how it looks. I removed enum
mc13xxx_id (above MC13XXX_NUMREGS) and added struct mc13xxx_variant
(below MC13XXX_NUMREGS). Git choosed to use the closing brace of enum
mc13xxx_id and struct mc13xxx_variant respectively as context (together
with the following empty line).
(For the new readers, here is how git represented the relevant part:

 #include <linux/regmap.h>
 #include <linux/mfd/mc13xxx.h>

-enum mc13xxx_id {
-	MC13XXX_ID_MC13783,
-	MC13XXX_ID_MC13892,
-	MC13XXX_ID_INVALID,
+#define MC13XXX_NUMREGS 0x3f
+
+struct mc13xxx;
+
+struct mc13xxx_variant {
+	const char *name;
+	void (*print_revision)(struct mc13xxx *mc13xxx, u32 revision);
 };

-#define MC13XXX_NUMREGS 0x3f
+extern struct mc13xxx_variant
+		mc13xxx_variant_mc13783,
+		mc13xxx_variant_mc13892;

 struct mc13xxx {
 	struct regmap *regmap;
...
)

The following would be an equivalent and (for humans) easier to review
patch:

 #include <linux/regmap.h>
 #include <linux/mfd/mc13xxx.h>

-enum mc13xxx_id {
-	MC13XXX_ID_MC13783,
-	MC13XXX_ID_MC13892,
-	MC13XXX_ID_INVALID,
-};
-
 #define MC13XXX_NUMREGS 0x3f

+struct mc13xxx;
+
+struct mc13xxx_variant {
+	const char *name;
+	void (*print_revision)(struct mc13xxx *mc13xxx, u32 revision);
+};
+
+extern struct mc13xxx_variant
+		mc13xxx_variant_mc13783,
+		mc13xxx_variant_mc13892;
+
 struct mc13xxx {
 	struct regmap *regmap;
...

But as this touches 17 lines compared to only 15 using the way git
choosed to represent patch 6, git used the smaller representation. (I'm
not sure this is the correct reason, but at least it sounds sensible.)
Usually this metric is sane, but here it's not. I don't know if you can
do anything about it? E.g. take the number of +, - and context blocks
into account. Then it would be 5 for the patch above vs. 7 for the
way git did it.
Or weight a context line containing

	#define MC13XXX_NUMREGS 0x3f

more than two lines one of which is empty and the other only contains a
}?

> - Patch 4 should come last, ie after "add support for mc34708"
Yeah, but it doesn't break bisectibility, and as the rtc patches go in via a
different tree (in fact akpm already took them) it doesn't matter much.

Best regards and thanks for your feedback
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

WARNING: multiple messages have this Message-ID (diff)
From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/7] Add support for Freescale's mc34708 to mc13xxx driver
Date: Fri, 13 Jul 2012 10:48:54 +0200	[thread overview]
Message-ID: <20120713084854.GD592@pengutronix.de> (raw)
In-Reply-To: <11987916.rOoNGcb1ly@dev1>

Hello,

[I added git at vger.k.o to Cc: please strip the recipents accordingly if
you reply.]

On Fri, Jul 13, 2012 at 09:02:56AM +1000, Marc Reilly wrote:
> Hi Uwe,
> 
> > This series was tested on a Phytec pcm038 (mc13783 on spi) using
> > traditional boot (i.e. not dt) and on a i.MX53 based machine (mc34708 on
> > i2c) using dt boot.
> > 
> > Philippe's patches are already in next, they are just included here for
> > those who want to test the patches. The 'mfd/mc13xxx: drop modifying
> > driver's id_table in probe' was already sent out yesterday and is
> > included here because the last patch depends on it.
> > 
> 
> For all patches (that don't already have it):
> Acked-by: Marc Reilly <marc@cpdesign.com.au>
Thanks.

> If for some reason you do a V2:
> - In patch 6 moves line "#define MC13XXX_NUMREGS 0x3f" around, is this 
> necessary?
It doesn't move it around, that's only how it looks. I removed enum
mc13xxx_id (above MC13XXX_NUMREGS) and added struct mc13xxx_variant
(below MC13XXX_NUMREGS). Git choosed to use the closing brace of enum
mc13xxx_id and struct mc13xxx_variant respectively as context (together
with the following empty line).
(For the new readers, here is how git represented the relevant part:

 #include <linux/regmap.h>
 #include <linux/mfd/mc13xxx.h>

-enum mc13xxx_id {
-	MC13XXX_ID_MC13783,
-	MC13XXX_ID_MC13892,
-	MC13XXX_ID_INVALID,
+#define MC13XXX_NUMREGS 0x3f
+
+struct mc13xxx;
+
+struct mc13xxx_variant {
+	const char *name;
+	void (*print_revision)(struct mc13xxx *mc13xxx, u32 revision);
 };

-#define MC13XXX_NUMREGS 0x3f
+extern struct mc13xxx_variant
+		mc13xxx_variant_mc13783,
+		mc13xxx_variant_mc13892;

 struct mc13xxx {
 	struct regmap *regmap;
...
)

The following would be an equivalent and (for humans) easier to review
patch:

 #include <linux/regmap.h>
 #include <linux/mfd/mc13xxx.h>

-enum mc13xxx_id {
-	MC13XXX_ID_MC13783,
-	MC13XXX_ID_MC13892,
-	MC13XXX_ID_INVALID,
-};
-
 #define MC13XXX_NUMREGS 0x3f

+struct mc13xxx;
+
+struct mc13xxx_variant {
+	const char *name;
+	void (*print_revision)(struct mc13xxx *mc13xxx, u32 revision);
+};
+
+extern struct mc13xxx_variant
+		mc13xxx_variant_mc13783,
+		mc13xxx_variant_mc13892;
+
 struct mc13xxx {
 	struct regmap *regmap;
...

But as this touches 17 lines compared to only 15 using the way git
choosed to represent patch 6, git used the smaller representation. (I'm
not sure this is the correct reason, but at least it sounds sensible.)
Usually this metric is sane, but here it's not. I don't know if you can
do anything about it? E.g. take the number of +, - and context blocks
into account. Then it would be 5 for the patch above vs. 7 for the
way git did it.
Or weight a context line containing

	#define MC13XXX_NUMREGS 0x3f

more than two lines one of which is empty and the other only contains a
}?

> - Patch 4 should come last, ie after "add support for mc34708"
Yeah, but it doesn't break bisectibility, and as the rtc patches go in via a
different tree (in fact akpm already took them) it doesn't matter much.

Best regards and thanks for your feedback
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  reply	other threads:[~2012-07-13  8:49 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-12  9:57 [PATCH 0/7] Add support for Freescale's mc34708 to mc13xxx driver Uwe Kleine-König
2012-07-12  9:57 ` Uwe Kleine-König
2012-07-12  9:57 ` [PATCH 1/7] MFD: Fix mc13xxx SPI regmap Uwe Kleine-König
2012-07-12  9:57   ` Uwe Kleine-König
2012-07-12  9:57 ` [PATCH 2/7] MFD: mc13xxx workaround SPI hardware bug on i.Mx Uwe Kleine-König
2012-07-12  9:57   ` Uwe Kleine-König
2012-07-12  9:57 ` [PATCH 3/7] rtc/mc13xxx: use MODULE_DEVICE_TABLE instead of MODULE_ALIAS Uwe Kleine-König
2012-07-12  9:57   ` Uwe Kleine-König
2012-07-12  9:57 ` [PATCH 4/7] rtc/mc13xxx: add support for the rtc in the mc34708 pmic Uwe Kleine-König
2012-07-12  9:57   ` Uwe Kleine-König
2012-07-12  9:57 ` [PATCH 5/7] mfd/mc13xxx: drop modifying driver's id_table in probe Uwe Kleine-König
2012-07-12  9:57   ` Uwe Kleine-König
2012-07-12  9:57 ` [PATCH 6/7] mfd/mc13xxx: change probing details for mc13xxx devices Uwe Kleine-König
2012-07-12  9:57   ` Uwe Kleine-König
2012-07-13 15:22   ` Uwe Kleine-König
2012-07-13 15:22     ` Uwe Kleine-König
2012-07-12  9:57 ` [PATCH 7/7] mfd/mc13xxx: add support for mc34708 Uwe Kleine-König
2012-07-12  9:57   ` Uwe Kleine-König
2012-07-12 23:02 ` [PATCH 0/7] Add support for Freescale's mc34708 to mc13xxx driver Marc Reilly
2012-07-12 23:02   ` Marc Reilly
2012-07-13  8:48   ` Uwe Kleine-König [this message]
2012-07-13  8:48     ` Uwe Kleine-König
2012-07-13 19:39     ` Junio C Hamano
2012-09-05 14:22   ` Fabio Estevam
2012-09-05 14:22     ` Fabio Estevam
2012-10-04 13:01     ` Fabio Estevam
2012-10-04 13:01       ` Fabio Estevam
2012-10-04 13:51       ` Samuel Ortiz
2012-10-04 13:51         ` Samuel Ortiz
2012-10-04 14:11         ` Uwe Kleine-König
2012-10-04 14:11           ` Uwe Kleine-König
2012-10-27 19:19         ` Fabio Estevam
2012-10-27 19:19           ` Fabio Estevam
2012-11-06 22:24           ` Samuel Ortiz
2012-11-06 22:24             ` Samuel Ortiz
2012-08-02 15:52 ` Fabio Estevam
2012-08-02 15:52   ` Fabio Estevam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120713084854.GD592@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=git@vger.kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc@cpdesign.com.au \
    --cc=paulliu@debian.org \
    --cc=philippe.retornaz@epfl.ch \
    --cc=samuel.ortiz@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.