Staging: rtlwifi: Remove unnecessary 'out of memory' message.
PATCH v4 1/1 Staging: rtlwifi: Remove unnecessary 'out of memory' message.
Logging messages that show some type of 'out of memory' error are generally unnecessary as there is a generic message and a stack dump done by the memory subsystem.
These messages generally increase kernel size without much added value.
Problem found by checkpatch.
---
Changes in v4:
-Include v2 and v3 in the patch.
Changes in v3:
-Make the commit message more appropriate.
changes in v2:
-Original patch was not sent to the mailing list.
Also, add a tab before the return statement.
drivers/staging/rtlwifi/rc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/rtlwifi/rc.c +0 -0
@@ -281,10 +281,8 @@ static void *rtl_rate_alloc_sta(void *ppriv,
struct rtl_rate_priv *rate_priv;
rate_priv = kzalloc(sizeof(*rate_priv), gfp);
- if (!rate_priv) {
- pr_err("Unable to allocate private rc structure\n");
+ if (!rate_priv)
return NULL;- }
rtlpriv->rate_priv = rate_priv;
--
2.7.4
Quoted 10 lines · Shreeya Patel
Logging messages that show some type of 'out of memory' error are generally unnecessary as there is a generic message and a stack dump done by the memory subsystem.
These messages generally increase kernel size without much added value.
Problem found by checkpatch.
Signed-off-by Shreeya Patel <[email protected]>
Quoted 41 lines
---
Changes in v4:
-Include v2 and v3 in the patch.Changes in v3:
-Make the commit message more appropriate.changes in v2:
-Original patch was not sent to the mailing list.
Also, add a tab before the return statement.drivers/staging/rtlwifi/rc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/staging/rtlwifi/rc.c +1
-4@@ -281,10 +281,8 @@ static void *rtl_rate_alloc_sta(void *ppriv,struct rtl_rate_priv *rate_priv; rate_priv =kzalloc (sizeof (*rate_priv), gfp); -if (!rate_priv) { -pr_err ("Unable to allocate private rc structure\n" ); +if (!rate_priv)return NULL ; - } rtlpriv->rate_priv = rate_priv; --2.7.4
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1505036405-3702-1-git-send-email-shreeya.patel23498%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Greg KH
maintainerQuoted 32 lines · Shreeya Patel
Logging messages that show some type of 'out of memory' error are generally unnecessary as there is a generic message and a stack dump done by the memory subsystem.
These messages generally increase kernel size without much added value.
Problem found by checkpatch.
Signed-off-by Shreeya Patel <[email protected]>Acked-by Julia Lawall <[email protected]>---
Changes in v4:
-Include v2 and v3 in the patch.Changes in v3:
-Make the commit message more appropriate.changes in v2:
-Original patch was not sent to the mailing list.
Also, add a tab before the return statement.drivers/staging/rtlwifi/rc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/staging/rtlwifi/rc.c +0
-0@@ -281,10 +281,8 @@ static void *rtl_rate_alloc_sta(void *ppriv,struct rtl_rate_priv *rate_priv;
drivers/staging/rtlwifi/rc.c static void *rtl_rate_alloc_sta(void *ppriv, · line 288
Quoted 10 lines
drivers/staging/rtlwifi/rc.c +1
-3rate_priv =kzalloc (sizeof (*rate_priv), gfp); -if (!rate_priv) { -pr_err ("Unable to allocate private rc structure\n" ); +if (!rate_priv)return NULL ; - } rtlpriv->rate_priv = rate_priv;
This patch is sent corrupted (leading space is gone), and git doesn't like it. Can you please fix it up and resend?
thanks,
greg k-h
Quoted 41 lines · Greg KH
Quoted 40 lines · Shreeya Patel
Logging messages that show some type of 'out of memory' error are generally unnecessary as there is a generic message and a stack dump done by the memory subsystem.
These messages generally increase kernel size without much added value.
Problem found by checkpatch.
Signed-off-by Shreeya Patel <[email protected]>Acked-by Julia Lawall <[email protected]>---
Changes in v4:
-Include v2 and v3 in the patch.Changes in v3:
-Make the commit message more appropriate.changes in v2:
-Original patch was not sent to the mailing list.
Also, add a tab before the return statement.drivers/staging/rtlwifi/rc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/staging/rtlwifi/rc.c +1
-3@@ -281,10 +281,8 @@ static void *rtl_rate_alloc_sta(void *ppriv,struct rtl_rate_priv *rate_priv; rate_priv =kzalloc (sizeof (*rate_priv), gfp); -if (!rate_priv) { -pr_err ("Unable to allocate private rc structure\n" ); +if (!rate_priv)return NULL ; - }
Quoted 8 lines
drivers/staging/rtlwifi/rc.c static void *rtl_rate_alloc_sta(void *ppriv, · line 288
Quoted 2 lines
drivers/staging/rtlwifi/rc.c +0
-0rtlpriv->rate_priv = rate_priv;This patch is sent corrupted (leading space is gone), and git doesn't like it. Can you please fix it up and resend?
thanks,
greg k-h
Hello sir,
If i am not removing the leading spaces then checkpatch is showing me errors for trailing whitespace. But there are no leading spaces present in the file which i have modified.
When i convert my changes into the patch, the whitespace errors are shown up.
Can you please help me with this to make me understand why this is happening?
Greg KH
maintainerQuoted 1 line · Shreeya Patel
Please turn html email off in your email client, the kernel mailing lists will reject it.
Quoted 9 lines · Greg KH
This patch is sent corrupted (leading space is gone), and git doesn't like it. Can you please fix it up and resend?
Hello sir,
If i am not removing the leading spaces then checkpatch is showing me errors for trailing whitespace.
That is correct.
Quoted 3 lines
But there are no leading spaces present in the file which i have modified. When i convert my changes into the patch, the whitespace errors are shown up. Can you please help me with this to make me understand why this is happening?
The problem isn't in the original file, but in the patch format itself that you sent. What ever tool you used, stripped off the leading space, making it impossible to apply. So please fix that.
Try emailing the patch to yourself and applying it to ensure you are doing this correctly.
thanks,
greg k-h
Quoted 22 lines · Greg KH
On Mon, Sep 11, 2017 at 09:48:15PM +0530, Shreeya Patel wrote:
Please turn html email off in your email client, the kernel mailing lists will reject it.Quoted 9 lines · Greg KH
This patch is sent corrupted (leading space is gone), and git doesn't like it. Can you please fix it up and resend?
Hello sir,
If i am not removing the leading spaces then checkpatch is showing me errors for trailing whitespace.
That is correct.
Quoted 3 lines
But there are no leading spaces present in the file which i have modified. When i convert my changes into the patch, the whitespace errors are shown up. Can you please help me with this to make me understand why this is happening?
The problem isn't in the original file, but in the patch format itself that you sent. What ever tool you used, stripped off the leading space, making it impossible to apply. So please fix that.
Quoted 6 lines
Try emailing the patch to yourself and applying it to ensure you are doing this correctly.
thanks,
greg k-h
ok, i will do that.
Thank you.
Quoted 54 lines · Shreeya Patel
On Monday 11 September 2017 10:02 PM, Greg KH wrote:
On Sun, Sep 10, 2017 at 03:10:05PM +0530, Shreeya Patel wrote:
Logging messages that show some type of 'out of memory' error are generally unnecessary as there is a generic message and a stack dump done by the memory subsystem.
These messages generally increase kernel size without much added value.
Problem found by checkpatch.
Signed-off-by Shreeya Patel <[email protected]>Acked-by Julia Lawall <[email protected]>---
Changes in v4:
-Include v2 and v3 in the patch.Changes in v3:
-Make the commit message more appropriate.changes in v2:
-Original patch was not sent to the mailing list.
Also, add a tab before the return statement.drivers/staging/rtlwifi/rc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/staging/rtlwifi/rc.c +1
-3@@ -281,10 +281,8 @@ static void *rtl_rate_alloc_sta(void *ppriv,struct rtl_rate_priv *rate_priv; rate_priv =kzalloc (sizeof (*rate_priv), gfp); -if (!rate_priv) { -pr_err ("Unable to allocate private rc structure\n" ); +if (!rate_priv)return NULL ; - } rtlpriv->rate_priv = rate_priv;This patch is sent corrupted (leading space is gone), and git doesn't like it. Can you please fix it up and resend?
thanks,
Quoted 7 lines
greg k-h
Hello sir,
If i am not removing the leading spaces then checkpatch is showing me errors for trailing whitespace.
Maybe you are not using checkpatch properly? What is your command line?
julia
Quoted 18 lines
But there are no leading spaces present in the file which i have modified. When i convert my changes into the patch, the whitespace errors are shown up.
Can you please help me with this to make me understand why this is happening?--
You received this message because you are subscribed to the Google Groups
"outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/6e7b1bf6-89b9-a40e-4a67- af79312b12a7%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Quoted 59 lines · Julia Lawall
Quoted 56 lines · Shreeya Patel
On Monday 11 September 2017 10:02 PM, Greg KH wrote:
On Sun, Sep 10, 2017 at 03:10:05PM +0530, Shreeya Patel wrote:
Logging messages that show some type of 'out of memory' error are generally unnecessary as there is a generic message and a stack dump done by the memory subsystem.
These messages generally increase kernel size without much added value.
Problem found by checkpatch.
Signed-off-by Shreeya Patel <[email protected]>Acked-by Julia Lawall <[email protected]>---
Changes in v4:
-Include v2 and v3 in the patch.Changes in v3:
-Make the commit message more appropriate.changes in v2:
-Original patch was not sent to the mailing list.
Also, add a tab before the return statement.drivers/staging/rtlwifi/rc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/staging/rtlwifi/rc.c +1
-3@@ -281,10 +281,8 @@ static void *rtl_rate_alloc_sta(void *ppriv,struct rtl_rate_priv *rate_priv; rate_priv =kzalloc (sizeof (*rate_priv), gfp); -if (!rate_priv) { -pr_err ("Unable to allocate private rc structure\n" ); +if (!rate_priv)return NULL ; - } rtlpriv->rate_priv = rate_priv;This patch is sent corrupted (leading space is gone), and git doesn't like it. Can you please fix it up and resend?
thanks,
greg k-h
Quoted 7 lines
Quoted 4 lines
Hello sir,
If i am not removing the leading spaces then checkpatch is showing me errors for trailing whitespace.
Maybe you are not using checkpatch properly? What is your command line?
julia
perl scripts/checkpatch.pl -f /tmp/0001-Staging-rtlwifi-Remove-unnecessary-out-of-memory-mes.patch
Quoted 19 lines
Quoted 19 lines
But there are no leading spaces present in the file which i have modified. When i convert my changes into the patch, the whitespace errors are shown up.
Can you please help me with this to make me understand why this is happening?--
You received this message because you are subscribed to the Google Groups
"outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/6e7b1bf6-89b9-a40e-4a67- af79312b12a7%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Quoted 69 lines · Shreeya Patel
On Monday 11 September 2017 10:31 PM, Julia Lawall wrote:
On Mon, 11 Sep 2017, Shreeya Patel wrote:
On Monday 11 September 2017 10:02 PM, Greg KH wrote:
On Sun, Sep 10, 2017 at 03:10:05PM +0530, Shreeya Patel wrote:
Logging messages that show some type of 'out of memory' error are generally unnecessary as there is a generic message and a stack dump done by the memory subsystem.
These messages generally increase kernel size without much added value.
Problem found by checkpatch.
Signed-off-by Shreeya Patel <[email protected]>Acked-by Julia Lawall <[email protected]>---
Changes in v4:
-Include v2 and v3 in the patch.Changes in v3:
-Make the commit message more appropriate.changes in v2:
-Original patch was not sent to the mailing list.
Also, add a tab before the return statement.drivers/staging/rtlwifi/rc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/staging/rtlwifi/rc.c +1
-3@@ -281,10 +281,8 @@ static void *rtl_rate_alloc_sta(void *ppriv,struct rtl_rate_priv *rate_priv; rate_priv =kzalloc (sizeof (*rate_priv), gfp); -if (!rate_priv) { -pr_err ("Unable to allocate private rc structure\n" ); +if (!rate_priv)return NULL ; - } rtlpriv->rate_priv = rate_priv;This patch is sent corrupted (leading space is gone), and git doesn't like it. Can you please fix it up and resend?
thanks,
greg k-h
Hello sir,
If i am not removing the leading spaces then checkpatch is showing me errors for trailing whitespace.
Quoted 6 lines
Maybe you are not using checkpatch properly? What is your command line?
julia
perl
scripts/checkpatch.pl-f/tmp/0001-Staging-rtlwifi-Remove-unnecessary-out-of-memory-mes.patch
-f is for files, eg foo.c, not for patches. You should be able to just give the patch file name directly.
Also, could you change your mailer to make something visible when you quote other people? Otherwise, it's hard to sort out what is new and what is quoted from others.
thanks,
julia
Quoted 25 lines
But there are no leading spaces present in the file which i have modified. When i convert my changes into the patch, the whitespace errors are shown up.
Can you please help me with this to make me understand why this is happening?--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected]. To view this discussion on the web visithttps://groups.google.com/d/msgid/ou treachy-kernel/6e7b1bf6-89b9-a40e-4a67- af79312b12a7%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Quoted 75 lines · Julia Lawall
Quoted 72 lines · Shreeya Patel
On Monday 11 September 2017 10:31 PM, Julia Lawall wrote:
On Mon, 11 Sep 2017, Shreeya Patel wrote:
On Monday 11 September 2017 10:02 PM, Greg KH wrote:
On Sun, Sep 10, 2017 at 03:10:05PM +0530, Shreeya Patel wrote:
Logging messages that show some type of 'out of memory' error are generally unnecessary as there is a generic message and a stack dump done by the memory subsystem.
These messages generally increase kernel size without much added value.
Problem found by checkpatch.
Signed-off-by Shreeya Patel <[email protected]>Acked-by Julia Lawall <[email protected]>---
Changes in v4:
-Include v2 and v3 in the patch.Changes in v3:
-Make the commit message more appropriate.changes in v2:
-Original patch was not sent to the mailing list.
Also, add a tab before the return statement.drivers/staging/rtlwifi/rc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/staging/rtlwifi/rc.c +1
-3@@ -281,10 +281,8 @@ static void *rtl_rate_alloc_sta(void *ppriv,struct rtl_rate_priv *rate_priv; rate_priv =kzalloc (sizeof (*rate_priv), gfp); -if (!rate_priv) { -pr_err ("Unable to allocate private rc structure\n" ); +if (!rate_priv)return NULL ; - } rtlpriv->rate_priv = rate_priv;This patch is sent corrupted (leading space is gone), and git doesn't like it. Can you please fix it up and resend?
thanks,
greg k-h
Hello sir,
If i am not removing the leading spaces then checkpatch is showing me errors for trailing whitespace.
Maybe you are not using checkpatch properly? What is your command line?
julia
Quoted 8 lines
Quoted 2 lines
perl
scripts/checkpatch.pl-f/tmp/0001-Staging-rtlwifi-Remove-unnecessary-out-of-memory-mes.patch-f is for files, eg
foo.c, not for patches. You should be able to just give the patch file name directly.Also, could you change your mailer to make something visible when you quote other people? Otherwise, it's hard to sort out what is new and what is quoted from others.
Ok. I will do that soon.
Thanks.
Quoted 28 lines
thanks,
juliaQuoted 24 lines
But there are no leading spaces present in the file which i have modified. When i convert my changes into the patch, the whitespace errors are shown up.
Can you please help me with this to make me understand why this is happening?--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected]. To view this discussion on the web visithttps://groups.google.com/d/msgid/ou treachy-kernel/6e7b1bf6-89b9-a40e-4a67- af79312b12a7%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Quoted 71 lines · Julia Lawall
Quoted 68 lines · Shreeya Patel
On Monday 11 September 2017 10:31 PM, Julia Lawall wrote:
On Mon, 11 Sep 2017, Shreeya Patel wrote:
On Monday 11 September 2017 10:02 PM, Greg KH wrote:
On Sun, Sep 10, 2017 at 03:10:05PM +0530, Shreeya Patel wrote:
Logging messages that show some type of 'out of memory' error are generally unnecessary as there is a generic message and a stack dump done by the memory subsystem.
These messages generally increase kernel size without much added value.
Problem found by checkpatch.
Signed-off-by Shreeya Patel <[email protected]>Acked-by Julia Lawall <[email protected]>---
Changes in v4:
-Include v2 and v3 in the patch.Changes in v3:
-Make the commit message more appropriate.changes in v2:
-Original patch was not sent to the mailing list.
Also, add a tab before the return statement.drivers/staging/rtlwifi/rc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/staging/rtlwifi/rc.c +1
-3@@ -281,10 +281,8 @@ static void *rtl_rate_alloc_sta(void *ppriv,struct rtl_rate_priv *rate_priv; rate_priv =kzalloc (sizeof (*rate_priv), gfp); -if (!rate_priv) { -pr_err ("Unable to allocate private rc structure\n" ); +if (!rate_priv)return NULL ; - } rtlpriv->rate_priv = rate_priv;This patch is sent corrupted (leading space is gone), and git doesn't like it. Can you please fix it up and resend?
thanks,
greg k-h
Hello sir,
If i am not removing the leading spaces then checkpatch is showing me errors for trailing whitespace.
Quoted 8 lines
Quoted 6 lines
Maybe you are not using checkpatch properly? What is your command line?
julia
perl
scripts/checkpatch.pl-f/tmp/0001-Staging-rtlwifi-Remove-unnecessary-out-of-memory-mes.patch-f is for files, eg
foo.c, not for patches. You should be able to just give the patch file name directly.
When I give the file name, it is showing me 'permission denied'.
Quoted 32 lines
Also, could you change your mailer to make something visible when you quote other people? Otherwise, it's hard to sort out what is new and what is quoted from others.
thanks,
juliaQuoted 24 lines
But there are no leading spaces present in the file which i have modified. When i convert my changes into the patch, the whitespace errors are shown up.
Can you please help me with this to make me understand why this is happening?--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected]. To view this discussion on the web visithttps://groups.google.com/d/msgid/ou treachy-kernel/6e7b1bf6-89b9-a40e-4a67- af79312b12a7%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
perl
scripts/checkpatch.pl-f/tmp/0001-Staging-rtlwifi-Remove-unnecessary-out-of-memory-mes.patch-f is for files, eg
foo.c, not for patches. You should be able to just give the patch file name directly.When I give the file name, it is showing me 'permission denied'.
What is the exact command line?
scripts/checkpatch.pl patchfile
should work.
julia
Quoted 4 lines · Julia Lawall
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
perl
scripts/checkpatch.pl-f/tmp/0001-Staging-rtlwifi-Remove-unnecessary-out-of-memory-mes.patch-f is for files, eg
foo.c, not for patches. You should be able to just give the patch file name directly.
Quoted 8 lines
Quoted 1 line
When I give the file name, it is showing me 'permission denied'.
What is the exact command line?
scripts/checkpatch.plpatchfileshould work.
julia
Oh, yes.
Sorry, my mistake, it worked with 0 errors now :)
Thanks.