Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1205896 > unrolled thread

[PATCH 02/20] regmap: Remove regmap_bulk_write 64bit support

Started byMarkus Pargmann <mpa@pengutronix.de>
First post2015-08-12 12:20 +0200
Last post2015-08-12 17:00 +0200
Articles 8 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 02/20] regmap: Remove regmap_bulk_write 64bit support Markus Pargmann <mpa@pengutronix.de> - 2015-08-12 12:20 +0200
    Re: [PATCH 02/20] regmap: Remove regmap_bulk_write 64bit support Mark Brown <broonie@kernel.org> - 2015-08-12 12:30 +0200
      Re: [PATCH 02/20] regmap: Remove regmap_bulk_write 64bit support Markus Pargmann <mpa@pengutronix.de> - 2015-08-12 12:50 +0200
        Re: [PATCH 02/20] regmap: Remove regmap_bulk_write 64bit support Mark Brown <broonie@kernel.org> - 2015-08-12 13:00 +0200
          Re: [PATCH 02/20] regmap: Remove regmap_bulk_write 64bit support Markus Pargmann <mpa@pengutronix.de> - 2015-08-12 14:30 +0200
            Re: [PATCH 02/20] regmap: Remove regmap_bulk_write 64bit support Mark Brown <broonie@kernel.org> - 2015-08-12 14:40 +0200
              Re: [PATCH 02/20] regmap: Remove regmap_bulk_write 64bit support Markus Pargmann <mpa@pengutronix.de> - 2015-08-12 15:10 +0200
                Re: [PATCH 02/20] regmap: Remove regmap_bulk_write 64bit support Mark Brown <broonie@kernel.org> - 2015-08-12 17:00 +0200

#1205896 — [PATCH 02/20] regmap: Remove regmap_bulk_write 64bit support

FromMarkus Pargmann <mpa@pengutronix.de>
Date2015-08-12 12:20 +0200
Subject[PATCH 02/20] regmap: Remove regmap_bulk_write 64bit support
Message-ID<pWBiz-1oV-53@gated-at.bofh.it>
Regmap does not support 64bit. The ival that is used to write the 64bit
data to, is unsigned int and can't hold 64bit. _regmap_write also just
supports unsigend int.

This patch removes the 64bit case as it may lead to compile warnings.

Cc: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 drivers/base/regmap/regmap.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 7111d04f2621..64a106af174f 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -1694,11 +1694,6 @@ int regmap_bulk_write(struct regmap *map, unsigned int reg, const void *val,
 			case 4:
 				ival = *(u32 *)(val + (i * val_bytes));
 				break;
-#ifdef CONFIG_64BIT
-			case 8:
-				ival = *(u64 *)(val + (i * val_bytes));
-				break;
-#endif
 			default:
 				ret = -EINVAL;
 				goto out;
-- 
2.4.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1205906

FromMark Brown <broonie@kernel.org>
Date2015-08-12 12:30 +0200
Message-ID<pWBsd-1Ag-5@gated-at.bofh.it>
In reply to#1205896

[Multipart message — attachments visible in raw view] — view raw

On Wed, Aug 12, 2015 at 12:12:27PM +0200, Markus Pargmann wrote:
> Regmap does not support 64bit. The ival that is used to write the 64bit
> data to, is unsigned int and can't hold 64bit. _regmap_write also just
> supports unsigend int.

What makes you say that unsigned int can't hold 64 bit?  An architecture
can have 64 bit ints if it likes.

[toc] | [prev] | [next] | [standalone]


#1205944

FromMarkus Pargmann <mpa@pengutronix.de>
Date2015-08-12 12:50 +0200
Message-ID<pWBLB-1Xg-39@gated-at.bofh.it>
In reply to#1205906

[Multipart message — attachments visible in raw view] — view raw

On Wed, Aug 12, 2015 at 11:25:50AM +0100, Mark Brown wrote:
> On Wed, Aug 12, 2015 at 12:12:27PM +0200, Markus Pargmann wrote:
> > Regmap does not support 64bit. The ival that is used to write the 64bit
> > data to, is unsigned int and can't hold 64bit. _regmap_write also just
> > supports unsigend int.
> 
> What makes you say that unsigned int can't hold 64 bit?  An architecture
> can have 64 bit ints if it likes.

I wasn't aware that any 64 bit architecture actually has unsigned ints
that are 64 bit in size. So wouldn't at least on x86_64 this would lead
to a compiler warning as unsigned int is 4 byte and u64 8 bytes?

Best Regards,

Markus

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

[toc] | [prev] | [next] | [standalone]


#1205958

FromMark Brown <broonie@kernel.org>
Date2015-08-12 13:00 +0200
Message-ID<pWBVg-28z-23@gated-at.bofh.it>
In reply to#1205944

[Multipart message — attachments visible in raw view] — view raw

On Wed, Aug 12, 2015 at 12:44:36PM +0200, Markus Pargmann wrote:

> I wasn't aware that any 64 bit architecture actually has unsigned ints
> that are 64 bit in size. So wouldn't at least on x86_64 this would lead
> to a compiler warning as unsigned int is 4 byte and u64 8 bytes?

Nobody complained about warnings yet.  The compiler probably shouldn't
be complaining given the casts, they're supposed to be an "I know what
I'm doing" thing.  If you want to change something here it's changing
the test to be based on sizeof(unsigned int).

[toc] | [prev] | [next] | [standalone]


#1206001

FromMarkus Pargmann <mpa@pengutronix.de>
Date2015-08-12 14:30 +0200
Message-ID<pWDkm-4hj-1@gated-at.bofh.it>
In reply to#1205958

[Multipart message — attachments visible in raw view] — view raw

On Wed, Aug 12, 2015 at 11:57:58AM +0100, Mark Brown wrote:
> On Wed, Aug 12, 2015 at 12:44:36PM +0200, Markus Pargmann wrote:
> 
> > I wasn't aware that any 64 bit architecture actually has unsigned ints
> > that are 64 bit in size. So wouldn't at least on x86_64 this would lead
> > to a compiler warning as unsigned int is 4 byte and u64 8 bytes?
> 
> Nobody complained about warnings yet.  The compiler probably shouldn't
> be complaining given the casts, they're supposed to be an "I know what
> I'm doing" thing.  If you want to change something here it's changing
> the test to be based on sizeof(unsigned int).

Ok, would work for me as well although sizeof is not a preprocessor
macro so I would probably leave it as it is. The whole regmap framework
just didn't seem to support 64bit so I thought this was just not
working.

Thanks,

Markus

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

[toc] | [prev] | [next] | [standalone]


#1206030

FromMark Brown <broonie@kernel.org>
Date2015-08-12 14:40 +0200
Message-ID<pWDu3-4ta-41@gated-at.bofh.it>
In reply to#1206001

[Multipart message — attachments visible in raw view] — view raw

On Wed, Aug 12, 2015 at 02:28:56PM +0200, Markus Pargmann wrote:

> Ok, would work for me as well although sizeof is not a preprocessor
> macro so I would probably leave it as it is. The whole regmap framework
> just didn't seem to support 64bit so I thought this was just not
> working.

I'd expect the framework to cope with things when ints are 64 bit.  We
don't try to support anything else, though.

[toc] | [prev] | [next] | [standalone]


#1206068

FromMarkus Pargmann <mpa@pengutronix.de>
Date2015-08-12 15:10 +0200
Message-ID<pWDX4-5h7-33@gated-at.bofh.it>
In reply to#1206030

[Multipart message — attachments visible in raw view] — view raw

On Wed, Aug 12, 2015 at 01:35:37PM +0100, Mark Brown wrote:
> On Wed, Aug 12, 2015 at 02:28:56PM +0200, Markus Pargmann wrote:
> 
> > Ok, would work for me as well although sizeof is not a preprocessor
> > macro so I would probably leave it as it is. The whole regmap framework
> > just didn't seem to support 64bit so I thought this was just not
> > working.
> 
> I'd expect the framework to cope with things when ints are 64 bit.  We
> don't try to support anything else, though.

For all non-busses it probably will. All the format functions are not
working for 64bit at the moment. But that's something different, also I
didn't see a bus device with 64bit yet.

Best Regards,

Markus

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

[toc] | [prev] | [next] | [standalone]


#1206185

FromMark Brown <broonie@kernel.org>
Date2015-08-12 17:00 +0200
Message-ID<pWFFw-7yz-23@gated-at.bofh.it>
In reply to#1206068

[Multipart message — attachments visible in raw view] — view raw

On Wed, Aug 12, 2015 at 03:08:38PM +0200, Markus Pargmann wrote:
> On Wed, Aug 12, 2015 at 01:35:37PM +0100, Mark Brown wrote:

> > I'd expect the framework to cope with things when ints are 64 bit.  We
> > don't try to support anything else, though.

> For all non-busses it probably will. All the format functions are not
> working for 64bit at the moment. But that's something different, also I
> didn't see a bus device with 64bit yet.

This is expected to be used by memory mapped devices.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web