All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: sd: Cleanup redundant memset
@ 2010-04-08  0:40 Mark Asselstine
  2010-04-09  3:15   ` Mark Asselstine
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Mark Asselstine @ 2010-04-08  0:40 UTC (permalink / raw)
  To: kernel-janitors

The clearing of mrq via a memset at the top of the for loop in
mmc_wait_for_app_cmd() is not required as mrq is not used and
there is another clearing of mrq just below. We remove the first
memset since if the initial tests in the for loop fail the memset
is not required.

Signed-off-by: Mark Asselstine <asselsm@gmail.com>
---
 drivers/mmc/core/sd_ops.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c
index 0d96080..63772e7 100644
--- a/drivers/mmc/core/sd_ops.c
+++ b/drivers/mmc/core/sd_ops.c
@@ -79,8 +79,6 @@ int mmc_wait_for_app_cmd(struct mmc_host *host, struct mmc_card *card,
 	 * we cannot use the retries field in mmc_command.
 	 */
 	for (i = 0;i <= retries;i++) {
-		memset(&mrq, 0, sizeof(struct mmc_request));
-
 		err = mmc_app_cmd(host, card);
 		if (err) {
 			/* no point in retrying; no APP commands allowed */
-- 
1.7.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] mmc: sd: Cleanup redundant memset
@ 2010-04-09  3:15   ` Mark Asselstine
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Asselstine @ 2010-04-09  3:15 UTC (permalink / raw)
  To: kernel-janitors, akpm, linux-mmc; +Cc: asselsm

The clearing of mrq via a memset at the top of the for loop in
mmc_wait_for_app_cmd() is not required as mrq is not used and
there is another clearing of mrq just below. We remove the first
memset since if the initial tests in the for loop fail the memset
is not required.

Signed-off-by: Mark Asselstine <asselsm@gmail.com>
---
Resending to linux-mmc@vger.kernel.org and akpm@linux-foundation.org
since MMC/SD is an orphan so hopefully including these folks will allow
someone to pick this patch up.

 drivers/mmc/core/sd_ops.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c
index 0d96080..63772e7 100644
--- a/drivers/mmc/core/sd_ops.c
+++ b/drivers/mmc/core/sd_ops.c
@@ -79,8 +79,6 @@ int mmc_wait_for_app_cmd(struct mmc_host *host, struct mmc_card *card,
 	 * we cannot use the retries field in mmc_command.
 	 */
 	for (i = 0;i <= retries;i++) {
-		memset(&mrq, 0, sizeof(struct mmc_request));
-
 		err = mmc_app_cmd(host, card);
 		if (err) {
 			/* no point in retrying; no APP commands allowed */
-- 
1.7.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] mmc: sd: Cleanup redundant memset
@ 2010-04-09  3:15   ` Mark Asselstine
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Asselstine @ 2010-04-09  3:15 UTC (permalink / raw)
  To: kernel-janitors, akpm, linux-mmc; +Cc: asselsm

The clearing of mrq via a memset at the top of the for loop in
mmc_wait_for_app_cmd() is not required as mrq is not used and
there is another clearing of mrq just below. We remove the first
memset since if the initial tests in the for loop fail the memset
is not required.

Signed-off-by: Mark Asselstine <asselsm@gmail.com>
---
Resending to linux-mmc@vger.kernel.org and akpm@linux-foundation.org
since MMC/SD is an orphan so hopefully including these folks will allow
someone to pick this patch up.

 drivers/mmc/core/sd_ops.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c
index 0d96080..63772e7 100644
--- a/drivers/mmc/core/sd_ops.c
+++ b/drivers/mmc/core/sd_ops.c
@@ -79,8 +79,6 @@ int mmc_wait_for_app_cmd(struct mmc_host *host, struct mmc_card *card,
 	 * we cannot use the retries field in mmc_command.
 	 */
 	for (i = 0;i <= retries;i++) {
-		memset(&mrq, 0, sizeof(struct mmc_request));
-
 		err = mmc_app_cmd(host, card);
 		if (err) {
 			/* no point in retrying; no APP commands allowed */
-- 
1.7.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] mmc: sd: Cleanup redundant memset
  2010-04-08  0:40 [PATCH] mmc: sd: Cleanup redundant memset Mark Asselstine
  2010-04-09  3:15   ` Mark Asselstine
@ 2010-04-18 18:38 ` Dan Carpenter
  2010-04-19 19:51 ` Mark Asselstine
  2 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2010-04-18 18:38 UTC (permalink / raw)
  To: kernel-janitors

On Wed, Apr 07, 2010 at 08:40:56PM -0400, Mark Asselstine wrote:
> The clearing of mrq via a memset at the top of the for loop in
> mmc_wait_for_app_cmd() is not required as mrq is not used and
> there is another clearing of mrq just below. We remove the first
> memset since if the initial tests in the for loop fail the memset
> is not required.
> 

This patch is good.

MMC is orphan, but there is a mailing list.  

Does anyone on kernel-janitors actually collect patches?  Otherwise if you
send this to lkml Andrew Morton quite often picks these up.

regards,
dan carpenter

> Signed-off-by: Mark Asselstine <asselsm@gmail.com>
> ---
>  drivers/mmc/core/sd_ops.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c
> index 0d96080..63772e7 100644
> --- a/drivers/mmc/core/sd_ops.c
> +++ b/drivers/mmc/core/sd_ops.c
> @@ -79,8 +79,6 @@ int mmc_wait_for_app_cmd(struct mmc_host *host, struct mmc_card *card,
>  	 * we cannot use the retries field in mmc_command.
>  	 */
>  	for (i = 0;i <= retries;i++) {
> -		memset(&mrq, 0, sizeof(struct mmc_request));
> -
>  		err = mmc_app_cmd(host, card);
>  		if (err) {
>  			/* no point in retrying; no APP commands allowed */
> -- 
> 1.7.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mmc: sd: Cleanup redundant memset
  2010-04-08  0:40 [PATCH] mmc: sd: Cleanup redundant memset Mark Asselstine
  2010-04-09  3:15   ` Mark Asselstine
  2010-04-18 18:38 ` Dan Carpenter
@ 2010-04-19 19:51 ` Mark Asselstine
  2 siblings, 0 replies; 5+ messages in thread
From: Mark Asselstine @ 2010-04-19 19:51 UTC (permalink / raw)
  To: kernel-janitors

On Sun, Apr 18, 2010 at 2:38 PM, Dan Carpenter <error27@gmail.com> wrote:
> On Wed, Apr 07, 2010 at 08:40:56PM -0400, Mark Asselstine wrote:
>> The clearing of mrq via a memset at the top of the for loop in
>> mmc_wait_for_app_cmd() is not required as mrq is not used and
>> there is another clearing of mrq just below. We remove the first
>> memset since if the initial tests in the for loop fail the memset
>> is not required.
>>
>
> This patch is good.
>
> MMC is orphan, but there is a mailing list.
>
> Does anyone on kernel-janitors actually collect patches?  Otherwise if you
> send this to lkml Andrew Morton quite often picks these up.

Done already. Andrew picked it up and it should be in his -mm tree now.

Mark

>
> regards,
> dan carpenter
>
>> Signed-off-by: Mark Asselstine <asselsm@gmail.com>
>> ---
>>  drivers/mmc/core/sd_ops.c |    2 --
>>  1 files changed, 0 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c
>> index 0d96080..63772e7 100644
>> --- a/drivers/mmc/core/sd_ops.c
>> +++ b/drivers/mmc/core/sd_ops.c
>> @@ -79,8 +79,6 @@ int mmc_wait_for_app_cmd(struct mmc_host *host, struct mmc_card *card,
>>        * we cannot use the retries field in mmc_command.
>>        */
>>       for (i = 0;i <= retries;i++) {
>> -             memset(&mrq, 0, sizeof(struct mmc_request));
>> -
>>               err = mmc_app_cmd(host, card);
>>               if (err) {
>>                       /* no point in retrying; no APP commands allowed */
>> --
>> 1.7.0
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-04-19 19:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-08  0:40 [PATCH] mmc: sd: Cleanup redundant memset Mark Asselstine
2010-04-09  3:15 ` Mark Asselstine
2010-04-09  3:15   ` Mark Asselstine
2010-04-18 18:38 ` Dan Carpenter
2010-04-19 19:51 ` Mark Asselstine

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.