ChanServ changed the topic of #armlinux to: ARM kernel talk [Upstream kernel, find your vendor forums for questions about their kernels] | https://libera.irclog.whitequark.org/armlinux
Pali has quit [Ping timeout: 256 seconds]
djrscally has quit [Ping timeout: 240 seconds]
apritzel has quit [Ping timeout: 240 seconds]
prabhakarlad has joined #armlinux
mripard has quit [Read error: Connection reset by peer]
mripard has joined #armlinux
amitk has joined #armlinux
<mvaittin>
ukleinek: out of the curiosity - isn't a warning in a log for a 'remove failure' seen worthy? I guess that could be a hint that there may be something to fix in a driver?
tlwoerner has quit [Ping timeout: 240 seconds]
tlwoerner has joined #armlinux
tlwoerner has quit [Ping timeout: 268 seconds]
tlwoerner has joined #armlinux
<wens>
robher: is it possible to describe two DT properties as mutually exclusive? I tried having "oneOf" under properties and it wasn't accepted.
mcoquelin has quit [Ping timeout: 250 seconds]
ravan has joined #armlinux
apritzel has joined #armlinux
<ukleinek>
mvaittin: returning an error code isn't a sane way to handle an error.
<ukleinek>
(in this case that is)
<ukleinek>
mvaittin: Most drivers that I fixed to return 0 unconditionally and obviously in .remove either already did return 0 or had wrong expectations and created a resource leak.
<mvaittin>
ukleinek: I think returning error has benefits. At least having logging of failure centered in one place instead of adding prints in all of the individual drivers. Not going to argue that though - just wanted to know why you think the return value should be removed && got the response - thanks.
<ukleinek>
mvaittin: see commits like 61b738e938ef091e0c4c4e8eadeaf27502732e97 or 5d354dc35ebb0b224d627264c60f60dbda3a1bc3
<ukleinek>
mvaittin: regarding the error log I have two concerns: a) nobody reads the error log anyhow; and b) If there is a problem and the driver just returns (say) -EIO, you get "yourdev: Failed to unbind driver (-EIO), ignoring". Something like "yourdev: Failed to disable clk (-EIO)" is muuuch more valuable.
<ukleinek>
see for example 48f45c2a969b5a012fda468350706c3a479f0707
<ukleinek>
(this is about i2c, but in this regard it the same)
iivanov__ has joined #armlinux
iivanov__ has quit [Remote host closed the connection]
iivanov__ has joined #armlinux
frieder has joined #armlinux
iivanov has quit [Ping timeout: 268 seconds]
djrscally has joined #armlinux
apritzel has quit [Ping timeout: 268 seconds]
milkylainen has quit [Quit: Connection closed]
milkylainen has joined #armlinux
abelvesa has quit [Ping timeout: 250 seconds]
abelvesa has joined #armlinux
mcoquelin has joined #armlinux
sszy has joined #armlinux
mcoquelin has quit [Ping timeout: 268 seconds]
<mvaittin>
ukleinek: regarding the two concerns - I feel a) is false statement. I for example do read logs. And I bet quite a few others do so too. Especially if something does not work as expected. Regarding b) - the "Failed to unbind driver" is still _far_ better than silently failing. After that one has a driver which he can further study. (It seems I started arguing anyways ;) )
<mvaittin>
"Failed to disable clk" is for sure better for debugging - but also adds the print footprint.
<mvaittin>
because that needs to be added to every spi driver
<geertu>
wens: yes, but you have to move the "oneOf" outside the properties, i.e. at top indentation
<geertu>
See e.g. interruots{,-extended} in Documentation/devicetree/bindings/timer/arm,arch_timer.yaml
<mvaittin>
By the way, I checked the 61b738e938ef091e0c4c4e8eadeaf27502732e97 . I don't see your concern of not freeing the resource there :) (If the removed checks can never trigger - then resources never leak. If the checks would trigger (for example as a result of some spi-core change) - then the resource freeing would not be possible. But yes - I see why you removed those code lines and I agree that change is reasonable - just don't share your concern
<mvaittin>
with the leak there
abelvesa has quit [Ping timeout: 256 seconds]
<ukleinek>
mvaittin: leaking resources was not a problem everywhere
<ukleinek>
and for a good error message the overhead is justified
mcoquelin has joined #armlinux
abelvesa has joined #armlinux
mcoquelin has quit [Ping timeout: 256 seconds]
guillaume_g has joined #armlinux
Pali has joined #armlinux
<mvaittin>
ukleinek: I agree that for a good error message we can in many cases accept the overhead. Yet, in many cases the return value and source gives you the same information. Removes in drivers rarely have that many error branches (my gut feeling - no proper statistics to back that up). Anyways - the worst scenario is that we have neither specific error message from driver, nor generic one from the framework. And in my (limited) experience the real
<mvaittin>
world developers are damn lazy adding the prints - but far better in using error codes in return values. I don't think you find that many remove() functions with accurate error prints... Well, I feel this is not much of my business though - as I said, I just wanted to hear the rationale for dropping the returnvalue
<ukleinek>
mvaittin: most remove functions are sane and there is nothing that can go wrong
mcoquelin has joined #armlinux
<mvaittin>
ukleinek: Thanks for the patience :) I am not fully buying this - but luckily there are more clever people than me taking care of the decisions like this one ;)
mcoquelin has quit [Ping timeout: 240 seconds]
mcoquelin has joined #armlinux
headless has joined #armlinux
mcoquelin has quit [Ping timeout: 268 seconds]
apritzel_ has joined #armlinux
mcoquelin has joined #armlinux
ravan_ has joined #armlinux
ravan_ has quit [Max SendQ exceeded]
ravan_ has joined #armlinux
ravan has quit [Ping timeout: 250 seconds]
iivanov has joined #armlinux
iivanov__ has quit [Ping timeout: 268 seconds]
mcoquelin has quit [Ping timeout: 268 seconds]
iivanov has quit [Remote host closed the connection]
iivanov has joined #armlinux
mcoquelin has joined #armlinux
mcoquelin has quit [Read error: Network is unreachable]
mcoquelin has joined #armlinux
alexels has joined #armlinux
System_Error has quit [Ping timeout: 276 seconds]
headless has quit [Quit: Konversation terminated!]
_whitelogger has joined #armlinux
TheCoffeMaker has joined #armlinux
pg12_ has quit [Ping timeout: 256 seconds]
rfs613- has quit [Ping timeout: 256 seconds]
rfs613 has joined #armlinux
pg12_ has joined #armlinux
System_Error has joined #armlinux
nullheroes2 has joined #armlinux
System_Error has quit [Ping timeout: 276 seconds]
matthias_bgg has joined #armlinux
gdd has joined #armlinux
jlinton has joined #armlinux
sudeepholla has quit [Ping timeout: 268 seconds]
headless has joined #armlinux
sudeepholla has joined #armlinux
gpiccoli has quit [Remote host closed the connection]
gpiccoli has joined #armlinux
amitk has quit [Ping timeout: 240 seconds]
headless has quit [Quit: Konversation terminated!]