genesys: Perform type casts explicitly
The current code in inconsistent in cast usage. This PR changes the code to consistently use casts when converting between unrelated types.
The current code in inconsistent in cast usage. This PR changes the code to consistently use casts when converting between unrelated types.