diff mbox

[v2,1/2] regmap: include <linux/ktime.h> from include/linux/regmap.h

Message ID ccea364eeb830b2092987d271c8308b97fe59d8f.1524465345.git.sean.wang@mediatek.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Sean Wang April 23, 2018, 6:42 a.m. UTC
From: Sean Wang <sean.wang@mediatek.com>

Similar to the readx_poll_timeout() macro calling ktime_* and using
ktime_t type, which is declared in <linux/ktime.h>. So, make
include/linux/regmap.h explicitly include <linux/ktime.h>, like
include/linux/iopoll.h does.  Otherwise, users of the macro will see
below errors.

error: implicit declaration of function ‘ktime_add_us’
[-Werror=implicit-function-declaration]

error: implicit declaration of function ‘ktime_get’
[-Werror=implicit-function-declaration]

error: implicit declaration of function ‘ktime_compare’
[-Werror=implicit-function-declaration]

include/linux/regmap.h:128:2: error: unknown type name ‘ktime_t’
  ktime_t __timeout = ktime_add_us(ktime_get(), __timeout_us); \

Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 include/linux/regmap.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Mark Brown April 23, 2018, 10:03 a.m. UTC | #1
On Mon, Apr 23, 2018 at 02:42:44PM +0800, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
> 
> Similar to the readx_poll_timeout() macro calling ktime_* and using
> ktime_t type, which is declared in <linux/ktime.h>. So, make

I'm missing patch 2 here - what's the story, are there any
dependencies?
Matthias Brugger April 23, 2018, 10:11 a.m. UTC | #2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256



On 04/23/2018 12:03 PM, Mark Brown wrote:
> On Mon, Apr 23, 2018 at 02:42:44PM +0800, sean.wang@mediatek.com wrote:
>> From: Sean Wang <sean.wang@mediatek.com>
>> 
>> Similar to the readx_poll_timeout() macro calling ktime_* and using 
>> ktime_t type, which is declared in <linux/ktime.h>. So, make
> 
> I'm missing patch 2 here - what's the story, are there any dependencies?
> 

You can find the second patch here:
https://patchwork.kernel.org/patch/10356237/

Regards,
Matthias
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEiUuSfQSYnG8EMsBltDliWyzx00MFAlrdsS4ACgkQtDliWyzx
00PC6Q/9EqSQ24OeBB6lqD/V58ZEwRP/w6fE9viRP/T0xsa+7NAw3oT5W79ULFYT
TSjllZ3yytjRCx5UUnLlkNgEN5UPrUUxkmqJH/q2JMuMgmxn1uRWQuyuqWD78RDG
FQqchWWuOhAf8PNR9ZeHhyRrp2E2RQWzYQ4wj49ZPU/eDFP7IiE8O/wcQ9hU/zNe
O0r7lnCi7mHHkcns2biOl4WDlkuYVRAQkMYO2w632lO0EiNrKIwyULCzy1s3r21i
C/9AMi42hAqtGYtfIEPedNvGpJllyitRmZcK0DQCXQJ8z7UKlAHhvU2GRhkHdERR
bQr/cuFXdUMaiOG6yBYSLOYIsCcXqI1NOLK0j8e7IxN36Lq+3fcyp5O6uTheHBGF
N/6Kp/fmV+v1dPsWGPOOe5Zxa0yOUSiZglhtEV+YwDrOsUyANMeLkZIeKXERA1WX
FI6uPF3eJvThMy5uEmAkmfCSlVIGCqyITg6lIOKiC/dY23H4HFrUlzf3+I8Qmmuy
In4Hk61bS1jQWFU5sWMy6/ptG2TV30sf/PJtWjGYONS4DrN6vXwTE+Sdgz1793cO
jzo1KHuGjfN7efBwlFykJZ8NLU3EAyStini+uXS24W0Rv6M/wcfNpjELIEnEw9db
rNqkp/ySzkV+uJf/4Fvpt6ysQgofuJpkM6bWDfbrg8jKpYfwid0=
=mFXy
-----END PGP SIGNATURE-----
Mark Brown April 23, 2018, 11:50 a.m. UTC | #3
On Mon, Apr 23, 2018 at 12:11:01PM +0200, Matthias Brugger wrote:

> On 04/23/2018 12:03 PM, Mark Brown wrote:
> > On Mon, Apr 23, 2018 at 02:42:44PM +0800, sean.wang@mediatek.com wrote:
> >> From: Sean Wang <sean.wang@mediatek.com>

> >> Similar to the readx_poll_timeout() macro calling ktime_* and using 
> >> ktime_t type, which is declared in <linux/ktime.h>. So, make

> > I'm missing patch 2 here - what's the story, are there any dependencies?

> You can find the second patch here:
> https://patchwork.kernel.org/patch/10356237/

So it looks like there is a dependency here...?
Matthias Brugger April 23, 2018, 2:07 p.m. UTC | #4
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256



On 04/23/2018 01:50 PM, Mark Brown wrote:
> On Mon, Apr 23, 2018 at 12:11:01PM +0200, Matthias Brugger wrote:
> 
>> On 04/23/2018 12:03 PM, Mark Brown wrote:
>>> On Mon, Apr 23, 2018 at 02:42:44PM +0800, sean.wang@mediatek.com
>>> wrote:
>>>> From: Sean Wang <sean.wang@mediatek.com>
> 
>>>> Similar to the readx_poll_timeout() macro calling ktime_* and using 
>>>> ktime_t type, which is declared in <linux/ktime.h>. So, make
> 
>>> I'm missing patch 2 here - what's the story, are there any
>>> dependencies?
> 
>> You can find the second patch here: 
>> https://patchwork.kernel.org/patch/10356237/
> 
> So it looks like there is a dependency here...?
> 

Yes, regmap_read_poll_timeout macro uses for example ktime_compare which is
defined in linux/ktime.h

That's my understanding.

Regards,
Matthias
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEiUuSfQSYnG8EMsBltDliWyzx00MFAlrd6IYACgkQtDliWyzx
00MiNQ/5ASP4bK0FTkrulj6hCQbOaDXQcYB6wmrZGeWse4PXhAaehGBjursRlE96
SjkAa/ZDXjDIhEDHNjO2QONdkDCBiUKp1/Mp8HJeeOTne5yy9V7mFrVxxLCIoqrk
nlu8I9AY608fjUMiWHtt/nNa91QCjjYUfz/S74FhO0bB4tKBvIQb3zV0HGmqM2s2
HSxPJhXhlfQIBO5rUcVPsrndfNMDMyCHdxWF7fjN8Gm9aSDIq/j0BvUlxJXm3CmP
P3AsW1Wdom86IoLJAwCo8dAaPsHos3u7kCK1IWLxDIxl0x9ruHSTKrML01e9o0M9
VlhqdM8GfoTG4cegRHiBQRVuHNbySpSw15WmuQtvPMKfHRpUThzHFiKawhpLvN5G
Q/lnNehJvLQ/L7vaiy4kkq4PkppBGutIGobRmG5WU0NwI3sGzrAGev5IBUgkMn5w
YfMyk/Yxn39aXdOZFSViA1zOYiEfjOnxkDQoxyW/TkyA5NCBG4tAn8Mz8qRH9Z5N
G8lQ2UiLzxvhe007Ce0PXofkO6TbYoup4YebyOh7RIo13L5xsmmyenQxDb0DqpXH
g1KDhz+hijenE6/ppEKBSFg8z1NMY+ZWjFWfTV6NB96WrG8Qh+EJ4gODIQCbvYY1
xEGs3TLuyPuXAz+2pFOK5FEExskrzLnlJ+Mg1wXrJfqs3OWS2EE=
=fHpR
-----END PGP SIGNATURE-----
Mark Brown April 24, 2018, 5:31 p.m. UTC | #5
On Mon, Apr 23, 2018 at 04:07:10PM +0200, Matthias Brugger wrote:
> On 04/23/2018 01:50 PM, Mark Brown wrote:

> > So it looks like there is a dependency here...?

> Yes, regmap_read_poll_timeout macro uses for example ktime_compare which is
> defined in linux/ktime.h

> That's my understanding.

OK, it's important to make sure that people getting a patch series know
about stuff like this as it will affect how things are reviewed and
applied.  

The following changes since commit e241e3f2bf975788a1b70dff2eb5180ca395b28e:

  Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost (2018-04-11 18:58:27 -0700)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git tags/regmap-ktime-fix

for you to fetch changes up to f15cd6d99198e9c15229aefec639a34a6e8174c6:

  regmap: include <linux/ktime.h> from include/linux/regmap.h (2018-04-24 18:11:50 +0100)

----------------------------------------------------------------
regmap: Fix missing include of ktime.h

Required for some dependencies.

----------------------------------------------------------------
Sean Wang (1):
      regmap: include <linux/ktime.h> from include/linux/regmap.h

 include/linux/regmap.h | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 5f7ad05..b6865f0 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -15,6 +15,7 @@ 
 
 #include <linux/list.h>
 #include <linux/rbtree.h>
+#include <linux/ktime.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/bug.h>