[PATCH 0/7] i2c: improve error messages when registering an adapter

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

 



The goal of this series is to have proper error messages whenever something in
i2c_add_adapter() and friends fail. Then, we can hereafter drop all similar
messages in drivers which is largely duplicated code and often not very helpful
because they are too generic.

To achieve this goal, we make sure that dev_* is used whenever a device is
available. pr_* is used when we have at least an adapter name. If not, we use
WARN to show the user the code path that failed. Error messages were added,
fixed, and made consistent. Also, the first patch fixes a potential leak found
while creating this series. Also, i2c_register_adapter() was a bit refactored
to be easier to handle. Please look at the patch descriptions for details. A
brach is here:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git strings/i2c

Looking forward to comments.

   Wolfram

Wolfram Sang (7):
  i2c: free idr when sanity checks in i2c_register_adapter() fail
  i2c: cleanup i2c_register_adapter() by refactoring recovery init
  i2c: improve error messages in i2c_register_adapter()
  i2c: add error message when obtaining idr fails
  i2c: print more info when of_i2c_notify fails
  i2c: print more info when acpi_i2c_space_handler() fails
  i2c: use pr_fmt in the core

 drivers/i2c/i2c-core.c | 124 ++++++++++++++++++++++++++-----------------------
 1 file changed, 66 insertions(+), 58 deletions(-)

-- 
2.8.1

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux