Skip to contentSkip to conversation

3.0-rc3: new sparse noise on module_param_named: "error: Syntax error in unary expression"

DISCUSSION Stefan Richter 1 participant 2 messages Jun 21, 2011 – Jun 23, 2011 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,

make C=1 in 3.0-rc3 but not in 2.6.39 complains:

CHECK drivers/firewire/ohci.c
drivers/firewire/ohci.c:308:1: error: Syntax error in unary expression drivers/firewire/ohci.c:325:1: error: Syntax error in unary expression
CC [M] drivers/firewire/ohci.o
CHECK drivers/firewire/sbp2.c
drivers/firewire/sbp2.c:70:1: error: Syntax error in unary expression drivers/firewire/sbp2.c:116:1: error: Syntax error in unary expression
CC [M] drivers/firewire/sbp2.o

These lines are the module_param_named lines of:

static int param_quirks; module_param_named(quirks, param_quirks, int, 0644); MODULE_PARM_DESC(quirks, "Chip quirks (default = 0" [...]
static int param_debug; module_param_named(debug, param_debug, int, 0644); MODULE_PARM_DESC(debug, "Verbose logging (default = 0" [...]

and

static int sbp2_param_exclusive_login = 1; module_param_named(exclusive_login, sbp2_param_exclusive_login, bool, 0644); MODULE_PARM_DESC(exclusive_login, "Exclusive login to sbp2 device " [...]
static int sbp2_param_workarounds; module_param_named(workarounds, sbp2_param_workarounds, int, 0644); MODULE_PARM_DESC(workarounds, "Work around device bugs (default = 0" [...]

Seen with an older version of sparse (perhaps 0.4.2) and the current from sparse.git (0.4.3 plus 13 commmits).

There is only a single change to the kernel's include/linux/moduleparam.h after v2.6.39, "module: reorder kparam_array to remove alignment padding on 64 bit builds", and that one is apparently not the cause of the noise.

Puzzled,

Signature · 3 lines
Stefan Richter
-=====-==-== -==- =-=-=
http://arcgraph.de/sr/
#2 lore raw
In reply to a message not in the archive
Quoted 6 lines · On Jun 22 Randy Dunlap wrote:
Quoted 5 lines · On Tue, 21 Jun 2011 16:30:40 +0200 Stefan Richter wrote:

make C=1 in 3.0-rc3 but not in 2.6.39 complains:

CHECK drivers/firewire/ohci.c
drivers/firewire/ohci.c:308:1: error: Syntax error in unary expression drivers/firewire/ohci.c:325:1: error: Syntax error in unary expression

[...]

Quoted 2 lines

Please see if http://marc.info/?l=linux-kernel&m=130677145629121&w=2
fixes the breakage.

Apparently it does. I didn't check this particular patch, but these errors do not appear anymore in 3.0-rc4 which has got this patch. Thanks.

Signature · 3 lines
Stefan Richter
-=====-==-== -==- =-===
http://arcgraph.de/sr/