Messages in this thread | | | Date | Wed, 24 Apr 2013 17:26:15 +0300 | From | Felipe Balbi <> | Subject | Re: [PATCH 04/10] usb: musb: ux500: harden checks for platform data |
| |
On Wed, Apr 24, 2013 at 06:00:28PM +0400, Sergei Shtylyov wrote: > Hello. > > On 24-04-2013 10:53, Lee Jones wrote: > > >>> struct musb_hdrc_platform_data *plat = dev->platform_data; > >>>- struct ux500_musb_board_data *data = plat->board_data; > >>>+ struct ux500_musb_board_data *data; > > >>>- param_array = data->dma_rx_param_array; > >>>+ param_array = (data) ? data->dma_rx_param_array : NULL; > > >> Why enclose a simple variable in parens? > > >Because 'data' is a pointer, so it contains a memory location,
heh, I don't think you fully understood Sergei's comment. He's asking why you used:
param_array = (data) ? data->dma_rx_param_array : NULL;
instead of:
param_array = data ? data->dma_rx_param_array : NULL;
He's saying, correctly so, that the parens around data is unnecessary.
-- balbi [unhandled content-type:application/pgp-signature] | |