US STOCKS-Wall Street ends stronger after volatile session
* S&P 500 ends higher after early decline
* U.S. oil prices reverse losses
* China slowdown fears have dragged commodities towards 2015 lows
* AMD revenue warning weighs on semiconductor companies
* Indexes end higher: Dow 0.53 pct, S&P 0.61 pct, Nasdaq 0.11 pct (Updates with comment, closing prices)
By Noel Randewich
July 7 (Reuters) - U.S. stocks ended higher after a choppy session on Tuesday, as a rebound in U.S. oil prices helped offset concerns about a slowdown in China and the Greek debt crisis.
The S&P energy index reversed course to trade up 0.9 percent as U.S. crude oil rose 0.7 percent after trading as much as 3.7 percent lower earlier in the day.
Oil markets have been keeping a close eye on negotiations between Iran and six major powers over a nuclear deal. A source close to the talks said there must be an agreement soon if there is to be an accord to end sanctions in exchange for curbs on Tehran's atomic program. Continuación...