Re: [bug report] mfd: tps6594: Add driver for TI TPS6594 PMIC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Special handling for 'count == 1' (or 'count < 2') makes sense indeed.

I'm not sure that I fully understand, though. Will Smatch stop complaining
for both things that you mentioned above with a patch for handling 'count < 2' ?
Or will we consider either that warnings are handled, even if they are still there.
No, don't do anything to silence the warning.  Always fix the checker
instead of working around it.

Handling the "map->format.reg_bytes + map->format.pad_bytes + val_len"
is kind of complicated but still easier than handling the:

	if (val_len % map->format.val_bytes)

condition in regmap_raw_write() just because it's closer together.  It's
quite a bit of code to write to silence this false positive but it's
something which could be done.


Who must fix 'smart' ? Me ?

I run 'smart' on my side and did not see the warnings you mentioned.
Here are the commands I run:
- [path to]/smatch/smatch_scripts/build_kernel_data.sh
- [path to]/smatch/smatch_scripts/test_kernel.sh.sh
  -> no warning for tps6594 mfd drivers in 'smatch_warns.txt'
[path to]/smatch/smatch_scripts/kchecker tps6594-i2c.c
  -> no warning
[path to]/smatch/smatch_scripts/kchecker regmap.c
  -> no warning related to tps6594 mfd driver
  -> 2 errors for "uninitialized symbol 'ret'" in _regmap_raw_write/read()

Maybe I did not use the tool properly (?)

Julien



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux