All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] UBI(FS): fixing IS_ENABLED() usage + backport trees
@ 2012-06-18 23:31 Brian Norris
  2012-06-18 23:31 ` [PATCH 1/2] UBIFS: correct usage of IS_ENABLED() Brian Norris
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Brian Norris @ 2012-06-18 23:31 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: Brian Norris, linux-mtd

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2627 bytes --]

Hi Artem,

It looks like your ubifs-v3.3.git tree does not compile successfully. I
think there are two issues:

 1) IS_ENABLED() should be used with the CONFIG_ prefix. i.e.,
 IS_ENABLED(CONFIG_DEBUG_FS) instead of IS_ENABLED(DEBUG_FS)

 2) IS_ENABLED() has changed some between v3.3 and when this commit was
 originally integrated in mainline, so it masks a compile error in the
 mainline version

This patch series addresses issue 1. I suggest that this be backported to
the appropriate UBIFS tree to solve some build failures. But I think issue
2 may still be a problem, so perhaps the mainline IS_ENABLED() fix should
be backported as well?

BTW, there may be more than one backport tree that fails; I just tested
v3.3.

UBIFS commit (mainline) that breaks when ported to v3.3:
5e0c43e74d16db5710caebe8169995c9a13807f9

Upstream commit that fixes IS_ENABLED:
69349c2dc01c489eccaa4c472542c08e370c6d7e

Build failure in ubifs-v3.3.git:

  CC      drivers/mtd/ubi/debug.o
drivers/mtd/ubi/debug.c: In function ‘ubi_debugfs_init’:
drivers/mtd/ubi/debug.c:267: error: ‘__enabled_DEBUG_FS’ undeclared (first use in this function)
drivers/mtd/ubi/debug.c:267: error: (Each undeclared identifier is reported only once
drivers/mtd/ubi/debug.c:267: error: for each function it appears in.)
drivers/mtd/ubi/debug.c:267: error: ‘__enabled_DEBUG_FS_MODULE’ undeclared (first use in this function)
drivers/mtd/ubi/debug.c: In function ‘ubi_debugfs_exit’:
drivers/mtd/ubi/debug.c:287: error: ‘__enabled_DEBUG_FS’ undeclared (first use in this function)
drivers/mtd/ubi/debug.c:287: error: ‘__enabled_DEBUG_FS_MODULE’ undeclared (first use in this function)
drivers/mtd/ubi/debug.c: In function ‘ubi_debugfs_init_dev’:
drivers/mtd/ubi/debug.c:418: error: ‘__enabled_DEBUG_FS’ undeclared (first use in this function)
drivers/mtd/ubi/debug.c:418: error: ‘__enabled_DEBUG_FS_MODULE’ undeclared (first use in this function)
drivers/mtd/ubi/debug.c: In function ‘ubi_debugfs_exit_dev’:
drivers/mtd/ubi/debug.c:488: error: ‘__enabled_DEBUG_FS’ undeclared (first use in this function)
drivers/mtd/ubi/debug.c:488: error: ‘__enabled_DEBUG_FS_MODULE’ undeclared (first use in this function)
make[3]: *** [drivers/mtd/ubi/debug.o] Error 1
make[2]: *** [drivers/mtd/ubi] Error 2
make[1]: *** [drivers/mtd] Error 2
make[1]: *** Waiting for unfinished jobs....

Regards,
Brian

Brian Norris (2):
  UBIFS: correct usage of IS_ENABLED()
  UBI: correct usage of IS_ENABLED()

 drivers/mtd/ubi/debug.c |    8 ++++----
 fs/ubifs/debug.c        |    8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

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

* [PATCH 1/2] UBIFS: correct usage of IS_ENABLED()
  2012-06-18 23:31 [PATCH 0/2] UBI(FS): fixing IS_ENABLED() usage + backport trees Brian Norris
@ 2012-06-18 23:31 ` Brian Norris
  2012-06-18 23:31 ` [PATCH 2/2] UBI: " Brian Norris
  2012-06-27 11:34 ` [PATCH 0/2] UBI(FS): fixing IS_ENABLED() usage + backport trees Artem Bityutskiy
  2 siblings, 0 replies; 6+ messages in thread
From: Brian Norris @ 2012-06-18 23:31 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: Brian Norris, linux-mtd

IS_ENABLED() arguments should be used with the CONFIG_* prefix.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
based on ubifs.git

 fs/ubifs/debug.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c
index 84a7e6f..92df3b0 100644
--- a/fs/ubifs/debug.c
+++ b/fs/ubifs/debug.c
@@ -2918,7 +2918,7 @@ int dbg_debugfs_init_fs(struct ubifs_info *c)
 	struct dentry *dent;
 	struct ubifs_debug_info *d = c->dbg;
 
-	if (!IS_ENABLED(DEBUG_FS))
+	if (!IS_ENABLED(CONFIG_DEBUG_FS))
 		return 0;
 
 	n = snprintf(d->dfs_dir_name, UBIFS_DFS_DIR_LEN + 1, UBIFS_DFS_DIR_NAME,
@@ -3013,7 +3013,7 @@ out:
  */
 void dbg_debugfs_exit_fs(struct ubifs_info *c)
 {
-	if (IS_ENABLED(DEBUG_FS))
+	if (IS_ENABLED(CONFIG_DEBUG_FS))
 		debugfs_remove_recursive(c->dbg->dfs_dir);
 }
 
@@ -3099,7 +3099,7 @@ int dbg_debugfs_init(void)
 	const char *fname;
 	struct dentry *dent;
 
-	if (!IS_ENABLED(DEBUG_FS))
+	if (!IS_ENABLED(CONFIG_DEBUG_FS))
 		return 0;
 
 	fname = "ubifs";
@@ -3166,7 +3166,7 @@ out:
  */
 void dbg_debugfs_exit(void)
 {
-	if (IS_ENABLED(DEBUG_FS))
+	if (IS_ENABLED(CONFIG_DEBUG_FS))
 		debugfs_remove_recursive(dfs_rootdir);
 }
 
-- 
1.7.0.4

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

* [PATCH 2/2] UBI: correct usage of IS_ENABLED()
  2012-06-18 23:31 [PATCH 0/2] UBI(FS): fixing IS_ENABLED() usage + backport trees Brian Norris
  2012-06-18 23:31 ` [PATCH 1/2] UBIFS: correct usage of IS_ENABLED() Brian Norris
@ 2012-06-18 23:31 ` Brian Norris
  2012-06-27 11:34 ` [PATCH 0/2] UBI(FS): fixing IS_ENABLED() usage + backport trees Artem Bityutskiy
  2 siblings, 0 replies; 6+ messages in thread
From: Brian Norris @ 2012-06-18 23:31 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: Brian Norris, linux-mtd

IS_ENABLED() arguments should be used with the CONFIG_* prefix.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
based on ubifs.git

 drivers/mtd/ubi/debug.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/ubi/debug.c b/drivers/mtd/ubi/debug.c
index 09d4f8d..7c13803 100644
--- a/drivers/mtd/ubi/debug.c
+++ b/drivers/mtd/ubi/debug.c
@@ -264,7 +264,7 @@ static struct dentry *dfs_rootdir;
  */
 int ubi_debugfs_init(void)
 {
-	if (!IS_ENABLED(DEBUG_FS))
+	if (!IS_ENABLED(CONFIG_DEBUG_FS))
 		return 0;
 
 	dfs_rootdir = debugfs_create_dir("ubi", NULL);
@@ -284,7 +284,7 @@ int ubi_debugfs_init(void)
  */
 void ubi_debugfs_exit(void)
 {
-	if (IS_ENABLED(DEBUG_FS))
+	if (IS_ENABLED(CONFIG_DEBUG_FS))
 		debugfs_remove(dfs_rootdir);
 }
 
@@ -407,7 +407,7 @@ int ubi_debugfs_init_dev(struct ubi_device *ubi)
 	struct dentry *dent;
 	struct ubi_debug_info *d = ubi->dbg;
 
-	if (!IS_ENABLED(DEBUG_FS))
+	if (!IS_ENABLED(CONFIG_DEBUG_FS))
 		return 0;
 
 	n = snprintf(d->dfs_dir_name, UBI_DFS_DIR_LEN + 1, UBI_DFS_DIR_NAME,
@@ -477,6 +477,6 @@ out:
  */
 void ubi_debugfs_exit_dev(struct ubi_device *ubi)
 {
-	if (IS_ENABLED(DEBUG_FS))
+	if (IS_ENABLED(CONFIG_DEBUG_FS))
 		debugfs_remove_recursive(ubi->dbg->dfs_dir);
 }
-- 
1.7.0.4

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

* Re: [PATCH 0/2] UBI(FS): fixing IS_ENABLED() usage + backport trees
  2012-06-18 23:31 [PATCH 0/2] UBI(FS): fixing IS_ENABLED() usage + backport trees Brian Norris
  2012-06-18 23:31 ` [PATCH 1/2] UBIFS: correct usage of IS_ENABLED() Brian Norris
  2012-06-18 23:31 ` [PATCH 2/2] UBI: " Brian Norris
@ 2012-06-27 11:34 ` Artem Bityutskiy
  2012-07-02 16:13   ` Brian Norris
  2 siblings, 1 reply; 6+ messages in thread
From: Artem Bityutskiy @ 2012-06-27 11:34 UTC (permalink / raw)
  To: Brian Norris; +Cc: linux-mtd

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

On Mon, 2012-06-18 at 16:31 -0700, Brian Norris wrote:
> Hi Artem,
> 
> It looks like your ubifs-v3.3.git tree does not compile successfully. I
> think there are two issues:
> 
>  1) IS_ENABLED() should be used with the CONFIG_ prefix. i.e.,
>  IS_ENABLED(CONFIG_DEBUG_FS) instead of IS_ENABLED(DEBUG_FS)

Thanks, I've pushed this to linux-ubifs.git. I'll let is sit there for
few days and get exposed to linux-next and then send a pull request to
Linus.

> 
>  2) IS_ENABLED() has changed some between v3.3 and when this commit was
>  originally integrated in mainline, so it masks a compile error in the
>  mainline version

Not sure what you mean. It was introduced in 3.1
(2a11c8ea20bf850b3a2c60db8c2e7497d28aba99), so I have to back-port it
older ubifs backport trees.

> This patch series addresses issue 1. I suggest that this be backported to
> the appropriate UBIFS tree to solve some build failures. But I think issue
> 2 may still be a problem, so perhaps the mainline IS_ENABLED() fix should
> be backported as well?

I guess you are talking about commit
69349c2dc01c489eccaa4c472542c08e370c6d7e ? I'll port it too, thanks.

> BTW, there may be more than one backport tree that fails; I just tested
> v3.3.

I'll check.

Thanks!

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 0/2] UBI(FS): fixing IS_ENABLED() usage + backport trees
  2012-06-27 11:34 ` [PATCH 0/2] UBI(FS): fixing IS_ENABLED() usage + backport trees Artem Bityutskiy
@ 2012-07-02 16:13   ` Brian Norris
  2012-07-16  6:34     ` Artem Bityutskiy
  0 siblings, 1 reply; 6+ messages in thread
From: Brian Norris @ 2012-07-02 16:13 UTC (permalink / raw)
  To: dedekind1; +Cc: linux-mtd

On Wed, Jun 27, 2012 at 4:34 AM, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> On Mon, 2012-06-18 at 16:31 -0700, Brian Norris wrote:
>>  2) IS_ENABLED() has changed some between v3.3 and when this commit was
>>  originally integrated in mainline, so it masks a compile error in the
>>  mainline version
>
> Not sure what you mean. It was introduced in 3.1
> (2a11c8ea20bf850b3a2c60db8c2e7497d28aba99), so I have to back-port it
> older ubifs backport trees.

I was referring to
kconfig: fix IS_ENABLED to not require all options to be defined
69349c2dc01c489eccaa4c472542c08e370c6d7e
which was introduced in 3.4. I think this masks some errors in your
mainline patch, but when you backport between 3.1..3.4-rc2, you get
compilation errors.

>> This patch series addresses issue 1. I suggest that this be backported to
>> the appropriate UBIFS tree to solve some build failures. But I think issue
>> 2 may still be a problem, so perhaps the mainline IS_ENABLED() fix should
>> be backported as well?
>
> I guess you are talking about commit
> 69349c2dc01c489eccaa4c472542c08e370c6d7e ? I'll port it too, thanks.

Right, I was talking about this fix (above); but on second thought,
you may not need to port it. It is only needed to mask your error, but
now that it's fixed, you don't need the port. But I didn't look very
closely :)

Regards,
Brian

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

* Re: [PATCH 0/2] UBI(FS): fixing IS_ENABLED() usage + backport trees
  2012-07-02 16:13   ` Brian Norris
@ 2012-07-16  6:34     ` Artem Bityutskiy
  0 siblings, 0 replies; 6+ messages in thread
From: Artem Bityutskiy @ 2012-07-16  6:34 UTC (permalink / raw)
  To: Brian Norris; +Cc: linux-mtd

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

On Mon, 2012-07-02 at 09:13 -0700, Brian Norris wrote:
> On Wed, Jun 27, 2012 at 4:34 AM, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> > On Mon, 2012-06-18 at 16:31 -0700, Brian Norris wrote:
> >>  2) IS_ENABLED() has changed some between v3.3 and when this commit was
> >>  originally integrated in mainline, so it masks a compile error in the
> >>  mainline version
> >
> > Not sure what you mean. It was introduced in 3.1
> > (2a11c8ea20bf850b3a2c60db8c2e7497d28aba99), so I have to back-port it
> > older ubifs backport trees.
> 
> I was referring to
> kconfig: fix IS_ENABLED to not require all options to be defined
> 69349c2dc01c489eccaa4c472542c08e370c6d7e
> which was introduced in 3.4. I think this masks some errors in your
> mainline patch, but when you backport between 3.1..3.4-rc2, you get
> compilation errors.

I think I fixed all the backport trees, thanks!

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2012-07-16  6:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-18 23:31 [PATCH 0/2] UBI(FS): fixing IS_ENABLED() usage + backport trees Brian Norris
2012-06-18 23:31 ` [PATCH 1/2] UBIFS: correct usage of IS_ENABLED() Brian Norris
2012-06-18 23:31 ` [PATCH 2/2] UBI: " Brian Norris
2012-06-27 11:34 ` [PATCH 0/2] UBI(FS): fixing IS_ENABLED() usage + backport trees Artem Bityutskiy
2012-07-02 16:13   ` Brian Norris
2012-07-16  6:34     ` Artem Bityutskiy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.