* Patch submission issue
@ 2014-06-11 1:53 Raghavendra
2014-06-11 2:29 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Raghavendra @ 2014-06-11 1:53 UTC (permalink / raw)
To: kernelnewbies
Hello,
I am new to the kernel development community and I started off by fixing
small coding style errors in the drivers/staging directory. I've created
a patch for the same and sent it to the maintainer. The maintainer
replied to me something like this :
"
Please don't do multiple things in the same patch, a single patch should
only do 1 thing. So break this up into multiple patches.
"
And my patch looks something like this :
From 7effd3d61c6ce08cd44df0a5ba3d1e9ac9ab5a98 Mon Sep 17 00:00:00 2001
From: Raghavendra <arrao@cdac.in>
Date: Tue, 10 Jun 2014 22:04:52 +0530
Subject: [PATCH] Staging: rtl8192e: dot11d: Fixed coding style issues
Replaced 'printk' with 'netdev_info' and 'netdev_err' wherever necessary.
Also fixed the coding issue cooresponding to line gap after the declarations.
Signed-off-by: Raghavendra <arrao@cdac.in>
---
drivers/staging/rtl8192e/dot11d.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8192e/dot11d.c b/drivers/staging/rtl8192e/dot11d.c
index 53da610..ef9da86 100644
--- a/drivers/staging/rtl8192e/dot11d.c
+++ b/drivers/staging/rtl8192e/dot11d.c
@@ -49,6 +49,7 @@ static struct channel_list ChannelPlan[] = {
void dot11d_init(struct rtllib_device *ieee)
{
struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(ieee);
+
pDot11dInfo->bEnabled = false;
pDot11dInfo->State = DOT11D_STATE_NONE;
@@ -133,12 +134,12 @@ void Dot11d_UpdateCountryIe(struct rtllib_device *dev, u8 *pTaddr,
pTriple = (struct chnl_txpow_triple *)(pCoutryIe + 3);
for (i = 0; i < NumTriples; i++) {
if (MaxChnlNum >= pTriple->FirstChnl) {
- printk(KERN_INFO "Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n");
+ netdev_info(dev->dev, "Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n");
return;
}
if (MAX_CHANNEL_NUMBER < (pTriple->FirstChnl +
pTriple->NumChnls)) {
- printk(KERN_INFO "Dot11d_UpdateCountryIe(): Invalid country IE, skip it........2\n");
+ netdev_info(dev->dev, "Dot11d_UpdateCountryIe(): Invalid country IE, skip it........2\n");
return;
}
@@ -165,7 +166,7 @@ u8 DOT11D_GetMaxTxPwrInDbm(struct rtllib_device *dev, u8 Channel)
u8 MaxTxPwrInDbm = 255;
if (MAX_CHANNEL_NUMBER < Channel) {
- printk(KERN_INFO "DOT11D_GetMaxTxPwrInDbm(): Invalid Channel\n");
+ netdev_info(dev->dev, "DOT11D_GetMaxTxPwrInDbm(): Invalid Channel\n");
return MaxTxPwrInDbm;
}
if (pDot11dInfo->channel_map[Channel])
@@ -204,7 +205,7 @@ int ToLegalChannel(struct rtllib_device *dev, u8 channel)
}
if (MAX_CHANNEL_NUMBER < channel) {
- printk(KERN_ERR "%s(): Invalid Channel\n", __func__);
+ netdev_err(dev->dev, "%s(): Invalid Channel\n", __func__);
return default_chn;
}
--
1.8.1.2
Can anyone please guide me through my mistake.
Thank you.
-------------------------------------------------------------------------------------------------------------------------------
[ C-DAC is on Social-Media too. Kindly follow us at:
Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]
This e-mail is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. If you are not the
intended recipient, please contact the sender by reply e-mail and destroy
all copies and the original message. Any unauthorized review, use,
disclosure, dissemination, forwarding, printing or copying of this email
is strictly prohibited and appropriate legal action will be taken.
-------------------------------------------------------------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread* Patch submission issue
2014-06-11 1:53 Patch submission issue Raghavendra
@ 2014-06-11 2:29 ` Greg KH
2014-06-11 13:25 ` Scott Lovenberg
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2014-06-11 2:29 UTC (permalink / raw)
To: kernelnewbies
On Wed, Jun 11, 2014 at 07:23:08AM +0530, Raghavendra wrote:
> Hello,
>
> I am new to the kernel development community and I started off by fixing
> small coding style errors in the drivers/staging directory. I've created
> a patch for the same and sent it to the maintainer. The maintainer
> replied to me something like this :
>
> "
> Please don't do multiple things in the same patch, a single patch should
> only do 1 thing. So break this up into multiple patches.
> "
>
> And my patch looks something like this :
>
> From 7effd3d61c6ce08cd44df0a5ba3d1e9ac9ab5a98 Mon Sep 17 00:00:00 2001
>
> From: Raghavendra <arrao@cdac.in>
>
> Date: Tue, 10 Jun 2014 22:04:52 +0530
>
> Subject: [PATCH] Staging: rtl8192e: dot11d: Fixed coding style issues
>
> Replaced 'printk' with 'netdev_info' and 'netdev_err' wherever necessary.
>
> Also fixed the coding issue cooresponding to line gap after the declarations.
You said "also", so that means you did 2 different things. Split this
up into two different patches, one doing the first thing, and the second
the second thing.
See the documentation for how to do multiple patches in an email series.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Patch submission issue
2014-06-11 2:29 ` Greg KH
@ 2014-06-11 13:25 ` Scott Lovenberg
0 siblings, 0 replies; 3+ messages in thread
From: Scott Lovenberg @ 2014-06-11 13:25 UTC (permalink / raw)
To: kernelnewbies
On Tue, Jun 10, 2014 at 10:29 PM, Greg KH <greg@kroah.com> wrote:
> On Wed, Jun 11, 2014 at 07:23:08AM +0530, Raghavendra wrote:
>> Hello,
>>
>> I am new to the kernel development community and I started off by fixing
>> small coding style errors in the drivers/staging directory. I've created
>> a patch for the same and sent it to the maintainer. The maintainer
>> replied to me something like this :
>>
>> "
>> Please don't do multiple things in the same patch, a single patch should
>> only do 1 thing. So break this up into multiple patches.
>> "
>>
>> And my patch looks something like this :
>>
>> From 7effd3d61c6ce08cd44df0a5ba3d1e9ac9ab5a98 Mon Sep 17 00:00:00 2001
>>
>> From: Raghavendra <arrao@cdac.in>
>>
>> Date: Tue, 10 Jun 2014 22:04:52 +0530
>>
>> Subject: [PATCH] Staging: rtl8192e: dot11d: Fixed coding style issues
>>
>> Replaced 'printk' with 'netdev_info' and 'netdev_err' wherever necessary.
>>
>> Also fixed the coding issue cooresponding to line gap after the declarations.
>
> You said "also", so that means you did 2 different things. Split this
> up into two different patches, one doing the first thing, and the second
> the second thing.
>
> See the documentation for how to do multiple patches in an email series.
To follow up on what Greg KH said, once you learn the git-send-email
workflow, you'll love it. That being said, I still do a dry run and
only send to myself first (I have a gmail filter for this that tags my
own stuff) for larger sets of patches. Make everyone's life easier by
testing your workflow once or twice before sending multi-patch sets.
It's embarrassing to have to send a series of patches three times
because you set the incorrect flag or forgot to add a signed-off-by
when you git-format-patch (and then forget to add it when using
git-send-email). Please learn from my mistakes, I know I haven't. :)
-Scott.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-06-11 13:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-11 1:53 Patch submission issue Raghavendra
2014-06-11 2:29 ` Greg KH
2014-06-11 13:25 ` Scott Lovenberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).