Re: [PATCH v4 2/3] mmc: core: Factor out the alignment of erase size

2016-09-06 Thread Baolin Wang
On 6 September 2016 at 15:52, Adrian Hunter wrote: > On 6/09/2016 9:26 a.m., Baolin Wang wrote: >> >> Hi Andreas, >> >> On 6 September 2016 at 12:34, Andreas Mohr wrote: >>> >>> On Tue, Sep 06, 2016 at 10:55:11AM +0800, Baolin Wang wrote: In

Re: [PATCH v4 2/3] mmc: core: Factor out the alignment of erase size

2016-09-06 Thread Baolin Wang
On 6 September 2016 at 15:52, Adrian Hunter wrote: > On 6/09/2016 9:26 a.m., Baolin Wang wrote: >> >> Hi Andreas, >> >> On 6 September 2016 at 12:34, Andreas Mohr wrote: >>> >>> On Tue, Sep 06, 2016 at 10:55:11AM +0800, Baolin Wang wrote: In order to clean up the mmc_erase() function

Re: [PATCH v4 2/3] mmc: core: Factor out the alignment of erase size

2016-09-06 Thread Baolin Wang
On 6 September 2016 at 15:19, Andreas Mohr wrote: > On Tue, Sep 06, 2016 at 02:26:06PM +0800, Baolin Wang wrote: >> On 6 September 2016 at 12:34, Andreas Mohr wrote: >> >> - to = from + nr; >> >> - >> >> - if (to <= from) >> >> - return -EINVAL;

Re: [PATCH v4 2/3] mmc: core: Factor out the alignment of erase size

2016-09-06 Thread Baolin Wang
On 6 September 2016 at 15:19, Andreas Mohr wrote: > On Tue, Sep 06, 2016 at 02:26:06PM +0800, Baolin Wang wrote: >> On 6 September 2016 at 12:34, Andreas Mohr wrote: >> >> - to = from + nr; >> >> - >> >> - if (to <= from) >> >> - return -EINVAL; >> > >> > Hmm, this is

Re: [PATCH v4 2/3] mmc: core: Factor out the alignment of erase size

2016-09-06 Thread Adrian Hunter
On 6/09/2016 9:26 a.m., Baolin Wang wrote: Hi Andreas, On 6 September 2016 at 12:34, Andreas Mohr wrote: On Tue, Sep 06, 2016 at 10:55:11AM +0800, Baolin Wang wrote: In order to clean up the mmc_erase() function and do some optimization for erase size alignment, factor out the

Re: [PATCH v4 2/3] mmc: core: Factor out the alignment of erase size

2016-09-06 Thread Adrian Hunter
On 6/09/2016 9:26 a.m., Baolin Wang wrote: Hi Andreas, On 6 September 2016 at 12:34, Andreas Mohr wrote: On Tue, Sep 06, 2016 at 10:55:11AM +0800, Baolin Wang wrote: In order to clean up the mmc_erase() function and do some optimization for erase size alignment, factor out the guts of erase

Re: [PATCH v4 2/3] mmc: core: Factor out the alignment of erase size

2016-09-06 Thread Andreas Mohr
On Tue, Sep 06, 2016 at 02:26:06PM +0800, Baolin Wang wrote: > On 6 September 2016 at 12:34, Andreas Mohr wrote: > >> - to = from + nr; > >> - > >> - if (to <= from) > >> - return -EINVAL; > > > > Hmm, this is swallowing -EINVAL behaviour > > i.e., now possibly

Re: [PATCH v4 2/3] mmc: core: Factor out the alignment of erase size

2016-09-06 Thread Andreas Mohr
On Tue, Sep 06, 2016 at 02:26:06PM +0800, Baolin Wang wrote: > On 6 September 2016 at 12:34, Andreas Mohr wrote: > >> - to = from + nr; > >> - > >> - if (to <= from) > >> - return -EINVAL; > > > > Hmm, this is swallowing -EINVAL behaviour > > i.e., now possibly violating

Re: [PATCH v4 2/3] mmc: core: Factor out the alignment of erase size

2016-09-06 Thread Baolin Wang
Hi Andreas, On 6 September 2016 at 12:34, Andreas Mohr wrote: > On Tue, Sep 06, 2016 at 10:55:11AM +0800, Baolin Wang wrote: >> In order to clean up the mmc_erase() function and do some optimization >> for erase size alignment, factor out the guts of erase size alignment >> into

Re: [PATCH v4 2/3] mmc: core: Factor out the alignment of erase size

2016-09-06 Thread Baolin Wang
Hi Andreas, On 6 September 2016 at 12:34, Andreas Mohr wrote: > On Tue, Sep 06, 2016 at 10:55:11AM +0800, Baolin Wang wrote: >> In order to clean up the mmc_erase() function and do some optimization >> for erase size alignment, factor out the guts of erase size alignment >> into

Re: [PATCH v4 2/3] mmc: core: Factor out the alignment of erase size

2016-09-05 Thread Andreas Mohr
On Tue, Sep 06, 2016 at 10:55:11AM +0800, Baolin Wang wrote: > In order to clean up the mmc_erase() function and do some optimization > for erase size alignment, factor out the guts of erase size alignment > into mmc_align_erase_size() function. > > Signed-off-by: Baolin Wang

Re: [PATCH v4 2/3] mmc: core: Factor out the alignment of erase size

2016-09-05 Thread Andreas Mohr
On Tue, Sep 06, 2016 at 10:55:11AM +0800, Baolin Wang wrote: > In order to clean up the mmc_erase() function and do some optimization > for erase size alignment, factor out the guts of erase size alignment > into mmc_align_erase_size() function. > > Signed-off-by: Baolin Wang > Tested-by: Shawn

[PATCH v4 2/3] mmc: core: Factor out the alignment of erase size

2016-09-05 Thread Baolin Wang
In order to clean up the mmc_erase() function and do some optimization for erase size alignment, factor out the guts of erase size alignment into mmc_align_erase_size() function. Signed-off-by: Baolin Wang Tested-by: Shawn Lin ---

[PATCH v4 2/3] mmc: core: Factor out the alignment of erase size

2016-09-05 Thread Baolin Wang
In order to clean up the mmc_erase() function and do some optimization for erase size alignment, factor out the guts of erase size alignment into mmc_align_erase_size() function. Signed-off-by: Baolin Wang Tested-by: Shawn Lin --- drivers/mmc/core/core.c | 60