linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [pull request] Pull request for branch yem-kconfig-for-next
@ 2013-04-29 17:59 Yann E. MORIN
  2013-04-29 17:59 ` [PATCH 1/1] kconfig: fix lists definition for C++ Yann E. MORIN
  2013-05-02  8:48 ` [pull request] Pull request for branch yem-kconfig-for-next Michal Marek
  0 siblings, 2 replies; 7+ messages in thread
From: Yann E. MORIN @ 2013-04-29 17:59 UTC (permalink / raw)
  To: linux-kbuild
  Cc: linux-kernel, linux-next, Randy Dunlap, Michal Marek, Yann E. MORIN

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Michal,

Please pull this fix to restore compilation of the qconf frontend.

Regards,
Yann E. MORIN.


The following changes since commit 23a5dfdad22a574d19d7cc19b391f9ce0d3c2f21:

  Revert "kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG" (2013-04-26 23:21:59 +0200)

are available in the git repository at:

  git://gitorious.org/linux-kconfig/linux-kconfig.git yem-kconfig-for-next

for you to fetch changes up to 21ca352b71ca252e1933b1538fe89da8a04395c3:

  kconfig: fix lists definition for C++ (2013-04-29 19:55:56 +0200)

----------------------------------------------------------------
Yann E. MORIN (1):
      kconfig: fix lists definition for C++

 scripts/kconfig/list.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [PATCH 1/1] kconfig: fix lists definition for C++
  2013-04-29 17:59 [pull request] Pull request for branch yem-kconfig-for-next Yann E. MORIN
@ 2013-04-29 17:59 ` Yann E. MORIN
  2013-04-29 19:28   ` Randy Dunlap
  2013-05-02  8:48 ` [pull request] Pull request for branch yem-kconfig-for-next Michal Marek
  1 sibling, 1 reply; 7+ messages in thread
From: Yann E. MORIN @ 2013-04-29 17:59 UTC (permalink / raw)
  To: linux-kbuild
  Cc: linux-kernel, linux-next, Randy Dunlap, Michal Marek,
	Yann E. MORIN, Benjamin Poirier

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

The C++ compiler is more strict in that it refuses to assign
a void* to a struct list_head*.

Fix that by explicitly casting the poisonning constants.

(Tested with all 5 frontends, now.)

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Benjamin Poirier <bpoirier@suse.de>
---
 scripts/kconfig/list.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/kconfig/list.h b/scripts/kconfig/list.h
index ea1d581..685d80e 100644
--- a/scripts/kconfig/list.h
+++ b/scripts/kconfig/list.h
@@ -125,7 +125,7 @@ static inline void __list_del(struct list_head *prev, struct list_head *next)
 static inline void list_del(struct list_head *entry)
 {
 	__list_del(entry->prev, entry->next);
-	entry->next = LIST_POISON1;
-	entry->prev = LIST_POISON2;
+	entry->next = (struct list_head*)LIST_POISON1;
+	entry->prev = (struct list_head*)LIST_POISON2;
 }
 #endif
-- 
1.8.1.2

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

* Re: [PATCH 1/1] kconfig: fix lists definition for C++
  2013-04-29 17:59 ` [PATCH 1/1] kconfig: fix lists definition for C++ Yann E. MORIN
@ 2013-04-29 19:28   ` Randy Dunlap
  2013-04-29 21:54     ` Rob Landley
  0 siblings, 1 reply; 7+ messages in thread
From: Randy Dunlap @ 2013-04-29 19:28 UTC (permalink / raw)
  To: Yann E. MORIN
  Cc: linux-kbuild, linux-kernel, linux-next, Michal Marek, Benjamin Poirier

On 04/29/13 10:59, Yann E. MORIN wrote:
> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> 
> The C++ compiler is more strict in that it refuses to assign
> a void* to a struct list_head*.
> 
> Fix that by explicitly casting the poisonning constants.
> 
> (Tested with all 5 frontends, now.)
> 
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Randy Dunlap <rdunlap@infradead.org>
> Cc: Benjamin Poirier <bpoirier@suse.de>

Acked-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
>  scripts/kconfig/list.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/kconfig/list.h b/scripts/kconfig/list.h
> index ea1d581..685d80e 100644
> --- a/scripts/kconfig/list.h
> +++ b/scripts/kconfig/list.h
> @@ -125,7 +125,7 @@ static inline void __list_del(struct list_head *prev, struct list_head *next)
>  static inline void list_del(struct list_head *entry)
>  {
>  	__list_del(entry->prev, entry->next);
> -	entry->next = LIST_POISON1;
> -	entry->prev = LIST_POISON2;
> +	entry->next = (struct list_head*)LIST_POISON1;
> +	entry->prev = (struct list_head*)LIST_POISON2;
>  }
>  #endif
> 


-- 
~Randy

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

* Re: [PATCH 1/1] kconfig: fix lists definition for C++
  2013-04-29 19:28   ` Randy Dunlap
@ 2013-04-29 21:54     ` Rob Landley
  2013-04-29 22:30       ` Yann E. MORIN
  0 siblings, 1 reply; 7+ messages in thread
From: Rob Landley @ 2013-04-29 21:54 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Yann E. MORIN, linux-kbuild, linux-kernel, linux-next,
	Michal Marek, Benjamin Poirier

On 04/29/2013 02:28:07 PM, Randy Dunlap wrote:
> On 04/29/13 10:59, Yann E. MORIN wrote:
> > From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> >
> > The C++ compiler is more strict in that it refuses to assign
> > a void* to a struct list_head*.

Given that the code _isn't_ C++ (because C is not a subset of C++ but a  
separate langauge in its own right where "throw" is a legitimate  
variable name and so on), how is this an issue?

Rob

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

* Re: [PATCH 1/1] kconfig: fix lists definition for C++
  2013-04-29 21:54     ` Rob Landley
@ 2013-04-29 22:30       ` Yann E. MORIN
  2013-04-29 22:57         ` Rob Landley
  0 siblings, 1 reply; 7+ messages in thread
From: Yann E. MORIN @ 2013-04-29 22:30 UTC (permalink / raw)
  To: Rob Landley
  Cc: Randy Dunlap, linux-kbuild, linux-kernel, linux-next,
	Michal Marek, Benjamin Poirier

Rob, All,

On Mon, Apr 29, 2013 at 04:54:14PM -0500, Rob Landley wrote:
> On 04/29/2013 02:28:07 PM, Randy Dunlap wrote:
> >On 04/29/13 10:59, Yann E. MORIN wrote:
> >> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> >>
> >> The C++ compiler is more strict in that it refuses to assign
> >> a void* to a struct list_head*.
> 
> Given that the code _isn't_ C++ (because C is not a subset of C++ but a
> separate langauge in its own right where "throw" is a legitimate variable
> name and so on), how is this an issue?

It's an issue because the xconfig frontends is qconf, which as the name
implies is using Qt, which *is* C++, and includes list.h.

So, list.h is included by both by C and C++ code.

So yes, list.h can be compiled by a C++ compiler.

Now, granted: list.h should all be enclosed in:
    ifdef __cpluplus
    extern "C" {
    endif
    ...
    ifdef __cpluplus
    }
    endif

Was that the fix you were suggesting between the lines? ;-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* Re: [PATCH 1/1] kconfig: fix lists definition for C++
  2013-04-29 22:30       ` Yann E. MORIN
@ 2013-04-29 22:57         ` Rob Landley
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Landley @ 2013-04-29 22:57 UTC (permalink / raw)
  To: Yann E. MORIN
  Cc: Randy Dunlap, linux-kbuild, linux-kernel, linux-next,
	Michal Marek, Benjamin Poirier

On 04/29/2013 05:30:54 PM, Yann E. MORIN wrote:
> Rob, All,
> 
> On Mon, Apr 29, 2013 at 04:54:14PM -0500, Rob Landley wrote:
> > On 04/29/2013 02:28:07 PM, Randy Dunlap wrote:
> > >On 04/29/13 10:59, Yann E. MORIN wrote:
> > >> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> > >>
> > >> The C++ compiler is more strict in that it refuses to assign
> > >> a void* to a struct list_head*.
> >
> > Given that the code _isn't_ C++ (because C is not a subset of C++  
> but a
> > separate langauge in its own right where "throw" is a legitimate  
> variable
> > name and so on), how is this an issue?
> 
> It's an issue because the xconfig frontends is qconf, which as the  
> name
> implies is using Qt, which *is* C++, and includes list.h.
> 
> So, list.h is included by both by C and C++ code.
> 
> So yes, list.h can be compiled by a C++ compiler.
> 
> Now, granted: list.h should all be enclosed in:
>     ifdef __cpluplus
>     extern "C" {
>     endif
>     ...
>     ifdef __cpluplus
>     }
>     endif
> 
> Was that the fix you were suggesting between the lines? ;-)

It does more clearly document the issue. (A comment about the QT  
front-end would also be nice. I don't use that one, so I didn't think  
of it.)

Thanks,

Rob

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

* Re: [pull request] Pull request for branch yem-kconfig-for-next
  2013-04-29 17:59 [pull request] Pull request for branch yem-kconfig-for-next Yann E. MORIN
  2013-04-29 17:59 ` [PATCH 1/1] kconfig: fix lists definition for C++ Yann E. MORIN
@ 2013-05-02  8:48 ` Michal Marek
  1 sibling, 0 replies; 7+ messages in thread
From: Michal Marek @ 2013-05-02  8:48 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: linux-kbuild, linux-kernel, linux-next, Randy Dunlap

On 29.4.2013 19:59, Yann E. MORIN wrote:
> The following changes since commit 23a5dfdad22a574d19d7cc19b391f9ce0d3c2f21:
> 
>   Revert "kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG" (2013-04-26 23:21:59 +0200)
> 
> are available in the git repository at:
> 
>   git://gitorious.org/linux-kconfig/linux-kconfig.git yem-kconfig-for-next

Pulled, thanks.

Michal

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

end of thread, other threads:[~2013-05-02  8:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-29 17:59 [pull request] Pull request for branch yem-kconfig-for-next Yann E. MORIN
2013-04-29 17:59 ` [PATCH 1/1] kconfig: fix lists definition for C++ Yann E. MORIN
2013-04-29 19:28   ` Randy Dunlap
2013-04-29 21:54     ` Rob Landley
2013-04-29 22:30       ` Yann E. MORIN
2013-04-29 22:57         ` Rob Landley
2013-05-02  8:48 ` [pull request] Pull request for branch yem-kconfig-for-next Michal Marek

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