linux-next bad Kconfig for drivers/hid
Commit 4f5ca836bef3 (HID: hid-input: add support for HID devices reporting Battery Strength) went into linux-next on Dec 1st since then a ppc6xx_defconfig has been failing with:
---drivers/built-in.o: In function `hidinput_cleanup_battery':
/scratch/tony/working/drivers/hid/hid-input.c:351: undefined reference to power_supply_unregister' drivers/built-in.o: In function hidinput_setup_battery':
/scratch/tony/working/drivers/hid/hid-input.c:338: undefined reference to `power_supply_register' make[1]: *** [.tmp_vmlinux1] Error 1
---
http://kisskb.ellerman.id.au/kisskb/buildresult/5012563/
vs
http://kisskb.ellerman.id.au/kisskb/buildresult/5017366/
The defconfig in question doens't mention either option (CONFIG_POWER_SUPPLY or CONFIG_HID_BATTERY_STRENGTH) and kbuild is genertaingCONFIG_HID_BATTERY_STRENGTH=yCONFIG_POWER_SUPPLY=m
which clearly isn't going to work.
The following change to HID_BATTERY_STRENGTH Kconfig "works" but seems a little gross.
drivers/hid/Kconfig +1 -1
@@ -33,7 +33,7 @@ config HID config HID_BATTERY_STRENGTH bool - depends on POWER_SUPPLY + depends on POWER_SUPPLY=y default y config HIDRAW
Any chance we can get a fix into linux-next?
Yours Tony
Quoted 40 lines · Tony Breeds
Commit
4f5ca836bef3(HID: hid-input: add support for HID devices reporting Battery Strength) went into linux-next on Dec 1st since then appc6xx_defconfighas been failing with:---
drivers/built-in.o: In function `hidinput_cleanup_battery':
/scratch/tony/working/drivers/hid/hid-input.c:351: undefined reference topower_supply_unregister' drivers/built-in.o: In functionhidinput_setup_battery':
/scratch/tony/working/drivers/hid/hid-input.c:338: undefined reference to `power_supply_register' make[1]: *** [.tmp_vmlinux1] Error 1
---http://kisskb.ellerman.id.au/kisskb/buildresult/5012563/
vs
http://kisskb.ellerman.id.au/kisskb/buildresult/5017366/The defconfig in question doens't mention either option (
CONFIG_POWER_SUPPLYorCONFIG_HID_BATTERY_STRENGTH) and kbuild is genertaingCONFIG_HID_BATTERY_STRENGTH=yCONFIG_POWER_SUPPLY=m
which clearly isn't going to work.The following change to
HID_BATTERY_STRENGTHKconfig"works" but seems a little gross.drivers/hid/Kconfig +1
-1@@ -33,7 +33,7 @@ config HID config HID_BATTERY_STRENGTH bool - depends on POWER_SUPPLY + depends on POWER_SUPPLY=y default y config HIDRAW
Quoted 1 line
Any chance we can get a fix into linux-next?
Hm. How about making it "depends on HID && POWER_SUPPLY"? I think that would needlessly disable it if HID is also modular, but I'm not sure how to fix that. "depends on HID && POWER_SUPPLY && HID == POWER_SUPPLY"?
J
Quoted 41 lines · Jeremy Fitzhardinge
Quoted 40 lines · Tony Breeds
Commit
4f5ca836bef3(HID: hid-input: add support for HID devices reporting Battery Strength) went into linux-next on Dec 1st since then appc6xx_defconfighas been failing with:---
drivers/built-in.o: In function `hidinput_cleanup_battery':
/scratch/tony/working/drivers/hid/hid-input.c:351: undefined reference to `power_supply_unregister'drivers/built-in.o: In function `hidinput_setup_battery':
/scratch/tony/working/drivers/hid/hid-input.c:338: undefined reference to `power_supply_register'
make[1]: *** [.tmp_vmlinux1] Error 1
---http://kisskb.ellerman.id.au/kisskb/buildresult/5012563/
vs
http://kisskb.ellerman.id.au/kisskb/buildresult/5017366/The defconfig in question doens't mention either option (
CONFIG_POWER_SUPPLYorCONFIG_HID_BATTERY_STRENGTH) and kbuild is genertaingCONFIG_HID_BATTERY_STRENGTH=yCONFIG_POWER_SUPPLY=m
which clearly isn't going to work.The following change to
HID_BATTERY_STRENGTHKconfig"works" but seems a little gross.drivers/hid/Kconfig +1
-1@@ -33,7 +33,7 @@ config HID config HID_BATTERY_STRENGTH bool - depends on POWER_SUPPLY + depends on POWER_SUPPLY=y default y
Quoted 7 lines
Quoted 3 lines
drivers/hid/Kconfig +0
-0config HIDRAWAny chance we can get a fix into linux-next?
Hm. How about making it "depends on HID &&
POWER_SUPPLY"? I think that would needlessly disable it if HID is also modular, but I'm not sure how to fix that. "depends on HID &&POWER_SUPPLY&& HID ==POWER_SUPPLY"?
The last suggestion looks good to me.
Signature · 1 line
~Randy
Quoted 38 lines · Jeremy Fitzhardinge
Quoted 38 lines
Commit
4f5ca836bef3(HID: hid-input: add support for HID devices reporting Battery Strength) went into linux-next on Dec 1st since then appc6xx_defconfighas been failing with:---
drivers/built-in.o: In function `hidinput_cleanup_battery':
/scratch/tony/working/drivers/hid/hid-input.c:351: undefined reference topower_supply_unregister' drivers/built-in.o: In functionhidinput_setup_battery':
/scratch/tony/working/drivers/hid/hid-input.c:338: undefined reference to `power_supply_register' make[1]: *** [.tmp_vmlinux1] Error 1
---http://kisskb.ellerman.id.au/kisskb/buildresult/5012563/
vs
http://kisskb.ellerman.id.au/kisskb/buildresult/5017366/The defconfig in question doens't mention either option (
CONFIG_POWER_SUPPLYorCONFIG_HID_BATTERY_STRENGTH) and kbuild is genertaingCONFIG_HID_BATTERY_STRENGTH=yCONFIG_POWER_SUPPLY=m
which clearly isn't going to work.The following change to
HID_BATTERY_STRENGTHKconfig"works" but seems a little gross.drivers/hid/Kconfig +1
-1@@ -33,7 +33,7 @@ config HID config HID_BATTERY_STRENGTH bool - depends on POWER_SUPPLY + depends on POWER_SUPPLY=y default y
Quoted 7 lines
Quoted 3 lines
drivers/hid/Kconfig +0
-0config HIDRAWAny chance we can get a fix into linux-next?
Hm. How about making it "depends on HID &&
POWER_SUPPLY"? I think that would needlessly disable it if HID is also modular, but I'm not sure how to fix that. "depends on HID &&POWER_SUPPLY&& HID ==POWER_SUPPLY"?
How about making it 'default POWER_SUPPLY' instead?
I somehow feel that we'd rather avoid too much 'default y's.
Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs
Quoted 5 lines · Jiri Kosina
Quoted 4 lines · Jeremy Fitzhardinge
Hm. How about making it "depends on HID &&
POWER_SUPPLY"? I think that would needlessly disable it if HID is also modular, but I'm not sure how to fix that. "depends on HID &&POWER_SUPPLY&& HID ==POWER_SUPPLY"?
That would work, but I think technically I think you could end up with HID=m and POWER_SUPPLY=m which would still allow HID_BATTERY_STRENGTH=y which is the same problem.
I don't know what kind of .config contortions you'd need to do to get there.
Quoted 1 line
How about making it 'default
POWER_SUPPLY' instead?
By itself that wont help as POWER_SUPPLY=m statisfies.
So it looks like we have Jeremy's:
HID && POWER_SUPPLY && HID == POWER_SUPPLY
or my:
POWER_SUPPLY=y
Yours Tony
Quoted 14 lines · Tony Breeds
Quoted 5 lines · Jiri Kosina
Quoted 4 lines · Jeremy Fitzhardinge
Hm. How about making it "depends on HID &&
POWER_SUPPLY"? I think that would needlessly disable it if HID is also modular, but I'm not sure how to fix that. "depends on HID &&POWER_SUPPLY&& HID ==POWER_SUPPLY"?That would work, but I think technically I think you could end up with HID=m and POWER_SUPPLY=m which would still allow HID_BATTERY_STRENGTH=y which is the same problem.
I don't know what kind of .config contortions you'd need to do to get there.
Quoted 6 lines
Quoted 1 line
How about making it 'default
POWER_SUPPLY' instead?By itself that wont help as POWER_SUPPLY=m statisfies.
So it looks like we have Jeremy's:
HID && POWER_SUPPLY && HID == POWER_SUPPLY
Tony,
have you actually tested this one to work in the configuration you have been seeing it to fail?
I don't seem to be able to find any use of '==' in other Kconfig files (and never used it myself), so I'd like to have confirmation that it actually works and fixes the problem before I apply it :)
Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs
Quoted 8 lines · Jiri Kosina
Tony,
have you actually tested this one to work in the configuration you have been seeing it to fail?
I don't seem to be able to find any use of '==' in other
Kconfigfiles (and never used it myself), so I'd like to have confirmation that it actually works and fixes the problem before I apply it :)
Sorry I used '=' instead of '==' and that worked. I figured the '==' was just a typo.
Yours Tony
Quoted 23 lines · Jiri Kosina
Quoted 14 lines · Tony Breeds
Quoted 5 lines · Jiri Kosina
Quoted 4 lines · Jeremy Fitzhardinge
Hm. How about making it "depends on HID &&
POWER_SUPPLY"? I think that would needlessly disable it if HID is also modular, but I'm not sure how to fix that. "depends on HID &&POWER_SUPPLY&& HID ==POWER_SUPPLY"?That would work, but I think technically I think you could end up with HID=m and POWER_SUPPLY=m which would still allow HID_BATTERY_STRENGTH=y which is the same problem.
I don't know what kind of .config contortions you'd need to do to get there.
Quoted 6 lines
Quoted 1 line
How about making it 'default
POWER_SUPPLY' instead?By itself that wont help as POWER_SUPPLY=m statisfies.
So it looks like we have Jeremy's:
HID && POWER_SUPPLY && HID == POWER_SUPPLY
Quoted 8 lines
Tony,
have you actually tested this one to work in the configuration you have been seeing it to fail?
I don't seem to be able to find any use of '==' in other
Kconfigfiles (and never used it myself), so I'd like to have confirmation that it actually works and fixes the problem before I apply it :)
Documentation/kbuild/kconfig-language.txt does not list "==":
<expr> ::= <symbol> (1)
<symbol> '=' <symbol> (2)
<symbol> '!=' <symbol> (3)
'(' <expr> ')' (4)
'!' <expr> (5)
<expr> '&&' <expr> (6)
<expr> '||' <expr> (7)Signature · 2 lines
~Randy *** Remember to use Documentation/SubmitChecklist when testing your code ***