Chuck Berry neither wrote the song or recorded it (Bob Seger).
You are thinking of a different song.
Rock and Roll Music” is a 1957 hit single written and recorded by rock and roll star Chuck Berry. The song has been widely covered and is recognized as one of Berry’s most popular and enduring compositions.[3] In the fall of 1957, his recording reached number 6 on Billboard magazine’s R&B Singles chart and number 8 on its Hot 100 chart.[4]