You will receive a 1099-SA in early 2019 reporting the excess contributions distributed and (more importantly) the earnings on those excess contributions earned during the time that the excess contributions were in the HSA.
But since part of those earnings were not acquired until after January 1, 2018, the rule is that you report all the earnings on your 2018 tax return - the one that you will file in early 2019.
Your excess contributions that were withdrawn appeared on Line 21 (Other Income) on your 2017 tax return - so only the earnings will appear on your 2018 tax return.