From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peng Fan Date: Thu, 18 Aug 2016 14:21:22 +0800 Subject: [U-Boot] [PATCH 2/5] mmc: initialize mmc_cmd with 0 In-Reply-To: References: <1470913205-27891-1-git-send-email-peng.fan@nxp.com> <1470913205-27891-2-git-send-email-peng.fan@nxp.com> <20160813014021.GA18573@linux-7smt.suse> Message-ID: <20160818062120.GA25548@linux-7smt.suse> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Simon, On Wed, Aug 17, 2016 at 09:45:35PM -0600, Simon Glass wrote: >Hi Peng, > >On 12 August 2016 at 19:41, Peng Fan wrote: >> Hi Simon, >> On Fri, Aug 12, 2016 at 11:20:25AM -0600, Simon Glass wrote: >>>Hi Peng, >>> >>>On 11 August 2016 at 05:00, Peng Fan wrote: >>>> Using {0} to initialize mmc_cmd, before filling the structure. >>>> >>>> Signed-off-by: Peng Fan >>>> Cc: Jaehoon Chung >>>> Cc: Simon Glass >>>> Cc: Bin Meng >>>> Cc: Stefan Wahren >>>> Cc: Clemens Gruber >>>> Cc: Kever Yang >>>> Cc: Eric Nelson >>>> Cc: Stephen Warren >>>> --- >>>> drivers/mmc/mmc.c | 28 ++++++++++++++-------------- >>>> drivers/mmc/mmc_write.c | 4 ++-- >>>> 2 files changed, 16 insertions(+), 16 deletions(-) >>> >>>Why is this needed? Does it affect code size? >> >> I add a timeout entry in mmc_cmd, but I do not want to specify a value for timeout >> for each mmc_cmd. So I use {0}. >> >> Then to those who want use timeout, a value can be assigned to timeout, just like >> I added in the patchset for mmc erase. > >Instead of that, can you assign the value to 0, or whatever you want? >You might want to have a helper like mmc_init_cmd() to zero things >out. Ok. Will follow your suggestion in V3. Thanks, Peng. > >Regards, >Simon