Hi, On 07/01/20 12:23, Wolfram Sang wrote: > >>>> https://lore.kernel.org/lkml/20191121135743.GA552517@xxxxxxxxx/ >>> >>> Huh? This renders WARN completely useless, or? If somebody wants panic >>> on warn, this person should get it? >> >> I also have my doubts... > > Good to know :) > >> What other information will you have in the backtrace, that you don't have >> available inside the function? >> Would printing the i2c_driver name be sufficient? > > Yes, but we don't have the client struct, only the adapter and the > address: > > +static int i2c_scan_for_client(struct i2c_adapter *adap, unsigned short addr, > + int (*probe)(struct i2c_adapter *adap, unsigned short addr)) > > And even if we had the client struct, it would be empty because for most > cases scanning happens before binding to the driver. We don't even have > the name/type in case of i2c_detect(). > Maybe dev_warn() + dump_stack()? Just my 2c, -- Luca