2013-05-03 09:18:53

by Jan-Simon Möller

[permalink] [raw]
Subject: [PATCH] [TRIVIAL] Fix declaration of intel_gmbus_{is_forced_bit/is_port_falid} in i915 driver.

From: Jan-Simon Möller <[email protected]>

Description:
intel_gmbus_is_forced_bit is no extern as its body is right below.
Likewise for intel_gmbus_is_port_valid.

This fixes a compilation issue with clang. An initial version of this patch
was developed by PaX Team <pageexec at freemail.hu>.
This is respin of this patch.

Signed-off-by: Jan-Simon Möller <[email protected]>
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
---
drivers/gpu/drm/i915/i915_drv.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 3ac71db..3c9ebc1 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1806,7 +1806,7 @@ void i915_teardown_sysfs(struct drm_device *dev_priv);
/* intel_i2c.c */
extern int intel_setup_gmbus(struct drm_device *dev);
extern void intel_teardown_gmbus(struct drm_device *dev);
-extern inline bool intel_gmbus_is_port_valid(unsigned port)
+static bool intel_gmbus_is_port_valid(unsigned port)
{
return (port >= GMBUS_PORT_SSC && port <= GMBUS_PORT_DPD);
}
@@ -1815,7 +1815,7 @@ extern struct i2c_adapter *intel_gmbus_get_adapter(
struct drm_i915_private *dev_priv, unsigned port);
extern void intel_gmbus_set_speed(struct i2c_adapter *adapter, int speed);
extern void intel_gmbus_force_bit(struct i2c_adapter *adapter, bool force_bit);
-extern inline bool intel_gmbus_is_forced_bit(struct i2c_adapter *adapter)
+static bool intel_gmbus_is_forced_bit(struct i2c_adapter *adapter)
{
return container_of(adapter, struct intel_gmbus, adapter)->force_bit;
}
--
1.8.1.4


2013-05-03 09:20:45

by Daniel Vetter

[permalink] [raw]
Subject: Re: [PATCH] [TRIVIAL] Fix declaration of intel_gmbus_{is_forced_bit/is_port_falid} in i915 driver.

On Fri, May 03, 2013 at 11:17:42AM +0200, [email protected] wrote:
> From: Jan-Simon M?ller <[email protected]>
>
> Description:
> intel_gmbus_is_forced_bit is no extern as its body is right below.
> Likewise for intel_gmbus_is_port_valid.
>
> This fixes a compilation issue with clang. An initial version of this patch
> was developed by PaX Team <pageexec at freemail.hu>.
> This is respin of this patch.
>
> Signed-off-by: Jan-Simon M?ller <[email protected]>
> CC: [email protected]
> CC: [email protected]
> CC: [email protected]
> CC: [email protected]
> CC: [email protected]
> CC: [email protected]
Picked up for -fixes, thanks for the patch.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

2013-05-03 12:03:25

by Jani Nikula

[permalink] [raw]
Subject: Re: [Intel-gfx] [PATCH] [TRIVIAL] Fix declaration of intel_gmbus_{is_forced_bit/is_port_falid} in i915 driver.

On Fri, 03 May 2013, Daniel Vetter <[email protected]> wrote:
> On Fri, May 03, 2013 at 11:17:42AM +0200, [email protected] wrote:
>> From: Jan-Simon Möller <[email protected]>
>>
>> Description:
>> intel_gmbus_is_forced_bit is no extern as its body is right below.
>> Likewise for intel_gmbus_is_port_valid.
>>
>> This fixes a compilation issue with clang. An initial version of this patch
>> was developed by PaX Team <pageexec at freemail.hu>.
>> This is respin of this patch.
>>
>> Signed-off-by: Jan-Simon Möller <[email protected]>
>> CC: [email protected]
>> CC: [email protected]
>> CC: [email protected]
>> CC: [email protected]
>> CC: [email protected]
>> CC: [email protected]
> Picked up for -fixes, thanks for the patch.

Please drop it.

The patch removes the inline keyword, creating dozens of copies of the
functions, and consequently loads of warnings:

drivers/gpu/drm/i915/i915_drv.h:1803:13: warning: ‘intel_gmbus_is_port_valid’ defined but not used [-Wunused-function]
drivers/gpu/drm/i915/i915_drv.h:1812:13: warning: ‘intel_gmbus_is_forced_bit’ defined but not used [-Wunused-function]


BR,
Jani.

2013-05-03 16:13:35

by Daniel Vetter

[permalink] [raw]
Subject: Re: [Intel-gfx] [PATCH] [TRIVIAL] Fix declaration of intel_gmbus_{is_forced_bit/is_port_falid} in i915 driver.

On Fri, May 03, 2013 at 03:03:37PM +0300, Jani Nikula wrote:
> On Fri, 03 May 2013, Daniel Vetter <[email protected]> wrote:
> > On Fri, May 03, 2013 at 11:17:42AM +0200, [email protected] wrote:
> >> From: Jan-Simon Möller <[email protected]>
> >>
> >> Description:
> >> intel_gmbus_is_forced_bit is no extern as its body is right below.
> >> Likewise for intel_gmbus_is_port_valid.
> >>
> >> This fixes a compilation issue with clang. An initial version of this patch
> >> was developed by PaX Team <pageexec at freemail.hu>.
> >> This is respin of this patch.
> >>
> >> Signed-off-by: Jan-Simon Möller <[email protected]>
> >> CC: [email protected]
> >> CC: [email protected]
> >> CC: [email protected]
> >> CC: [email protected]
> >> CC: [email protected]
> >> CC: [email protected]
> > Picked up for -fixes, thanks for the patch.
>
> Please drop it.
>
> The patch removes the inline keyword, creating dozens of copies of the
> functions, and consequently loads of warnings:
>
> drivers/gpu/drm/i915/i915_drv.h:1803:13: warning: ‘intel_gmbus_is_port_valid’ defined but not used [-Wunused-function]
> drivers/gpu/drm/i915/i915_drv.h:1812:13: warning: ‘intel_gmbus_is_forced_bit’ defined but not used [-Wunused-function]

Meh, rather embarrassing patch reading fail here. Dropped.

Thanks, Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

2013-05-04 08:56:42

by PaX Team

[permalink] [raw]
Subject: Re: [Intel-gfx] [PATCH] [TRIVIAL] Fix declaration of intel_gmbus_{is_forced_bit/is_port_falid} in i915 driver.

On 3 May 2013 at 15:03, Jani Nikula wrote:

> >> This fixes a compilation issue with clang. An initial version of this patch
> >> was developed by PaX Team <pageexec at freemail.hu>.
> >> This is respin of this patch.
> >>
> >> Signed-off-by: Jan-Simon Möller <[email protected]>
> >> CC: [email protected]
> >> CC: [email protected]
> >> CC: [email protected]
> >> CC: [email protected]
> >> CC: [email protected]
> >> CC: [email protected]
> > Picked up for -fixes, thanks for the patch.
>
> Please drop it.
>
> The patch removes the inline keyword, creating dozens of copies of the
> functions, and consequently loads of warnings:

in my original patch they were both static inline, not sure where the
inline got lost...

2013-05-06 12:47:20

by Jan-Simon Möller

[permalink] [raw]
Subject: Re: [Intel-gfx] [PATCH] [TRIVIAL] Fix declaration of intel_gmbus_{is_forced_bit/is_port_falid} in i915 driver.

Ok, so let me resend a version with "static inline" .

Best,
JS


On Saturday 04 May 2013 10:55:50 PaX Team wrote:
> On 3 May 2013 at 15:03, Jani Nikula wrote:
> > >> This fixes a compilation issue with clang. An initial version of this
> > >> patch
> > >> was developed by PaX Team <pageexec at freemail.hu>.
> > >> This is respin of this patch.
> > >>
> > >> Signed-off-by: Jan-Simon M?ller <[email protected]>
> > >> CC: [email protected]
> > >> CC: [email protected]
> > >> CC: [email protected]
> > >> CC: [email protected]
> > >> CC: [email protected]
> > >> CC: [email protected]
> > >
> > > Picked up for -fixes, thanks for the patch.
> >
> > Please drop it.
> >
> > The patch removes the inline keyword, creating dozens of copies of the
>
> > functions, and consequently loads of warnings:
> in my original patch they were both static inline, not sure where the
> inline got lost...
--

Dipl.-Ing.
Jan-Simon M?ller

[email protected]