Hello, Yes, no bug in current code. But it is better to return the default switch case with -EINVAL (not 0), in case new commands are added. Such patch should target net-next, it is just for compiler
Yeah. If it is a false positive just ignore it, do not bother to silence wrong static checker warnings. The code in question here is: if (len != set_arglen[CMDID(cmd)]) { The only time that condition
20221202 18:07, Dan Carpenter : It is not a real bug, I use tool (eg: smatch, sparse) to audit the code, got this warning and check it, found may be a real problem.
If this is a real bug, then it needs a fixes tag. The fixes tag helps us know whether to back port or not and it also helps in reviewing the patch. Also get_maintainer.pl will CC the person who intro
Thanks, I agree there seems to be a problem here. But perhaps it's nicer to solve it by adding a default case to the switch statement? Also, if we update the declaration of ret, perhaps we could also
The 'ret' should need to be initialized to 0, in case return a uninitialized value because no default process for "switch (cmd)". Signed-off-by: Li Qiong <liqiong@xxxxxxxxxxxx> -- net/netfilter/ipvs/