I don't know anything which would warn about this. Generally, in the kernel we try to avoid casts but perhaps there was a static checker which likes casts? If removing these sorts of casts were an issue we would have known by now. regards, dan carpenter