linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the mtd tree
@ 2008-12-22  6:12 Stephen Rothwell
  2008-12-23  4:28 ` Greg KH
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Rothwell @ 2008-12-22  6:12 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-next, Artem Bityutskiy, Kay Sievers, Greg KH

Hi David,

Today's linux-next merge of the mtd tree got a conflict in
drivers/mtd/devices/m25p80.c drivers/mtd/devices/mtd_dataflash.c between
commit 0e02ed3e44ef541e4d684348d9e684ab3bdd9399 ("mtd: struct device -
replace bus_id with dev_name(), dev_set_name()") from the driver-core
tree and commits 5b7f3a500cd097d673a6283fbb748c1e4f87bac6 ("[MTD] fix
dataflash 64-bit divisions") and d85316ac459f1cdd14ea1828eebeac1f1028e167
("[MTD] fix m25p80 64-bit divisions") from the mtd tree.

I fixed it up (see below) and can carry the fix as necessary.  However, I
suggest that you apply the patch from the driver-core tree as its
prerequisites are upstream and you were cc'd on it.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff --cc drivers/mtd/devices/m25p80.c
index 5733f06,9be0229..0000000
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@@ -169,9 -170,9 +170,9 @@@ static int wait_till_ready(struct m25p 
   */
  static int erase_chip(struct m25p *flash)
  {
- 	DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %dKiB\n",
+ 	DEBUG(MTD_DEBUG_LEVEL3, "%s: %s %lldKiB\n",
 -			flash->spi->dev.bus_id, __func__,
 +			dev_name(&flash->spi->dev), __func__,
- 			flash->mtd.size / 1024);
+ 			(long long)(flash->mtd.size >> 10));
  
  	/* Wait until finished previous write command. */
  	if (wait_till_ready(flash))
@@@ -232,10 -233,11 +233,11 @@@ static int m25p80_erase(struct mtd_inf
  {
  	struct m25p *flash = mtd_to_m25p(mtd);
  	u32 addr,len;
+ 	uint32_t rem;
  
- 	DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%08x, len %d\n",
+ 	DEBUG(MTD_DEBUG_LEVEL2, "%s: %s %s 0x%llx, len %lld\n",
 -			flash->spi->dev.bus_id, __func__, "at",
 +			dev_name(&flash->spi->dev), __func__, "at",
- 			(u32)instr->addr, instr->len);
+ 			(long long)instr->addr, (long long)instr->len);
  
  	/* sanity checks */
  	if (instr->addr + instr->len > flash->mtd.size)
diff --cc drivers/mtd/devices/mtd_dataflash.c
index 65126cd,6806897..0000000
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@@ -152,15 -153,20 +153,20 @@@ static int dataflash_erase(struct mtd_i
  	struct spi_message	msg;
  	unsigned		blocksize = priv->page_size << 3;
  	uint8_t			*command;
+ 	uint32_t		rem;
  
- 	DEBUG(MTD_DEBUG_LEVEL2, "%s: erase addr=0x%x len 0x%x\n",
- 			dev_name(&spi->dev),
- 			instr->addr, instr->len);
+ 	DEBUG(MTD_DEBUG_LEVEL2, "%s: erase addr=0x%llx len 0x%llx\n",
 -			spi->dev.bus_id, (long long)instr->addr,
++			dev_name(&spi->dev), (long long)instr->addr,
+ 			(long long)instr->len);
  
  	/* Sanity checks */
- 	if ((instr->addr + instr->len) > mtd->size
- 			|| (instr->len % priv->page_size) != 0
- 			|| (instr->addr % priv->page_size) != 0)
+ 	if (instr->addr + instr->len > mtd->size)
+ 		return -EINVAL;
+ 	div_u64_rem(instr->len, priv->page_size, &rem);
+ 	if (rem)
+ 		return -EINVAL;
+ 	div_u64_rem(instr->addr, priv->page_size, &rem);
+ 	if (rem)
  		return -EINVAL;
  
  	spi_message_init(&msg);

^ permalink raw reply	[flat|nested] 17+ messages in thread
* linux-next: manual merge of the mtd tree
@ 2008-12-11  2:43 Stephen Rothwell
  2008-12-11 10:11 ` Dmitry Eremin-Solenikov
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Rothwell @ 2008-12-11  2:43 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-next, Dmitry Baryshkov, Eric Miao, Russell King

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

Hi David,

Today's linux-next merge of the mtd tree got conflicts in
arch/arm/mach-pxa/corgi.c, arch/arm/mach-pxa/poodle.c and
arch/arm/mach-pxa/spitz.c between commits
4a9295ccb43ead9ec054d0bd374c992c692b2cf4 ("[ARM] pxa/corgi: add physmap
mapping for ROM"), 431a2cff07446b0325ec063e5b401ca7c11e0058 ("[ARM]
pxa/poodle: add physmap mapping for ROM") and
e5d3bf3c106c0557199076a57800adb85206c1ce ("[ARM] pxa/spitz: add physmap
mapping for ROM") from the arm tree and commit
6af7a8eb1eb2b5a0967fccf61e750b085d60ad48 ("[MTD] sharpsl-nand: move
registration to board code") from the mtd tree.

They seem to be overlapping changes.  Can you guys rationalise this,
please, as I am in no position to fix these conflicts up.

I have dropped the mtd tree for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

^ permalink raw reply	[flat|nested] 17+ messages in thread
* linux-next: manual merge of the mtd tree
@ 2008-11-27  4:15 Stephen Rothwell
  2008-11-27  5:25 ` Greg KH
  2008-12-10  2:08 ` Stephen Rothwell
  0 siblings, 2 replies; 17+ messages in thread
From: Stephen Rothwell @ 2008-11-27  4:15 UTC (permalink / raw)
  To: David Woodhouse
  Cc: linux-next, Atsushi Nemoto, Andrew Morton, Kay Sievers, Greg KH

Hi David,

Today's linux-next merge of the mtd tree got a conflict in
drivers/mtd/maps/physmap.c between commit
a64cbdb4da5c8482929e7bc9c542e9757ad3e0f1 ("mtd: struct device - replace
bus_id with dev_name(), dev_set_name()") from the driver-core tree and
commit 3136e903fa2d493ebc1b8a8fbdde2d3a17f85acd ("[MTD] physmap: fix
memory leak on physmap_flash_remove by using devres") from the mtd tree.

I fixed it up (see below) and can carry it for a short while.

Dave, you should apply the patch from the driver-core tree (which was
cc:d to you) (and cope with the rejects :-)) and let Greg KH know when
you have.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff --cc drivers/mtd/maps/physmap.c
index 8e2ee92,dfbf3f2..0000000
--- a/drivers/mtd/maps/physmap.c
+++ b/drivers/mtd/maps/physmap.c
@@@ -114,10 -105,10 +105,10 @@@ static int physmap_flash_probe(struct p
  		       (unsigned long long)(dev->resource[i].end - dev->resource[i].start + 1),
  		       (unsigned long long)dev->resource[i].start);
  
- 		info->res = request_mem_region(dev->resource[i].start,
- 					       dev->resource[i].end - dev->resource[i].start + 1,
- 					       dev_name(&dev->dev));
- 		if (info->res == NULL) {
+ 		if (!devm_request_mem_region(&dev->dev,
+ 			dev->resource[i].start,
+ 			dev->resource[i].end - dev->resource[i].start + 1,
 -			dev->dev.bus_id)) {
++			dev_name(&dev->dev))) {
  			dev_err(&dev->dev, "Could not reserve memory region\n");
  			err = -ENOMEM;
  			goto err_out;

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

end of thread, other threads:[~2009-01-02  2:07 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-22  6:12 linux-next: manual merge of the mtd tree Stephen Rothwell
2008-12-23  4:28 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2008-12-11  2:43 Stephen Rothwell
2008-12-11 10:11 ` Dmitry Eremin-Solenikov
2008-12-11 10:23   ` Stephen Rothwell
2008-12-11 10:32     ` Eric Miao
2008-12-12 10:29     ` Dmitry Eremin-Solenikov
2008-12-12 11:11       ` David Woodhouse
2008-12-12 23:05       ` Stephen Rothwell
2008-12-15  4:15         ` Stephen Rothwell
2009-01-02  2:07           ` Stephen Rothwell
2008-11-27  4:15 Stephen Rothwell
2008-11-27  5:25 ` Greg KH
2008-12-10  2:08 ` Stephen Rothwell
2008-12-10  2:27   ` Greg KH
2008-12-10  2:34     ` Stephen Rothwell
2008-12-10  4:04       ` Greg KH

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