Documentation/HOWTO: Broken URL
Hi, I was reading Documentation/HOWTO and it mentions: ---8<- Other excellent descriptions of how to create patches properly are: "The Perfect Patch" http://userweb.kernel.org/~akpm/stuff/tpp.txt "Linux kernel patch submission format" http://linux.yyz.us/patch-format.html ---8<- The first URL (http://userweb.kernel.org/~akpm/stuff/tpp.txt) seems broken (?) When I tried to access, its getting timed out. Thanks and Regards, Adil Mujeeb -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Documentation/HOWTO: Broken URL
On Wed, Sep 19, 2012 at 2:28 PM, Adil Mujeeb wrote: > Hi, > > I was reading Documentation/HOWTO and it mentions: > > ---8<- > Other excellent descriptions of how to create patches properly are: > "The Perfect Patch" > http://userweb.kernel.org/~akpm/stuff/tpp.txt > "Linux kernel patch submission format" > http://linux.yyz.us/patch-format.html > ---8<- > > The first URL (http://userweb.kernel.org/~akpm/stuff/tpp.txt) seems broken (?) > When I tried to access, its getting timed out. Sorry, I have realized that the same problem has been reported recently and the thread is going on: https://lkml.org/lkml/2012/9/12/419 > > Thanks and Regards, > Adil Mujeeb -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Staging: panel: Fixed a macro coding style issue
Removed do {} while (0) loop for a single statement macros Signed-off-by: Adil Mujeeb --- linux-3.6-rc6/drivers/staging/panel/panel.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-3.6-rc6/drivers/staging/panel/panel.c b/linux-3.6-rc6/drivers/staging/panel/panel.c index 39f9982..d9fec5b 100644 --- a/linux-3.6-rc6/drivers/staging/panel/panel.c +++ b/linux-3.6-rc6/drivers/staging/panel/panel.c @@ -137,8 +137,8 @@ #define r_ctr(x)(parport_read_control((x)->port)) #define r_dtr(x)(parport_read_data((x)->port)) #define r_str(x)(parport_read_status((x)->port)) -#define w_ctr(x, y) do { parport_write_control((x)->port, (y)); } while (0) -#define w_dtr(x, y) do { parport_write_data((x)->port, (y)); } while (0) +#define w_ctr(x, y) (parport_write_control((x)->port, (y))) +#define w_dtr(x, y) (parport_write_data((x)->port, (y))) /* this defines which bits are to be used and which ones to be ignored */ /* logical or of the output bits involved in the scan matrix */ -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Staging: panel: Fixed a macro coding style issue
Removed do {} while (0) loop for a single statement macros Signed-off-by: Adil Mujeeb --- linux-3.6-rc6/drivers/staging/panel/panel.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-3.6-rc6/drivers/staging/panel/panel.c b/linux-3.6-rc6/drivers/staging/panel/panel.c index 39f9982..d9fec5b 100644 --- a/linux-3.6-rc6/drivers/staging/panel/panel.c +++ b/linux-3.6-rc6/drivers/staging/panel/panel.c @@ -137,8 +137,8 @@ #define r_ctr(x)(parport_read_control((x)->port)) #define r_dtr(x)(parport_read_data((x)->port)) #define r_str(x)(parport_read_status((x)->port)) -#define w_ctr(x, y) do { parport_write_control((x)->port, (y)); } while (0) -#define w_dtr(x, y) do { parport_write_data((x)->port, (y)); } while (0) +#define w_ctr(x, y) (parport_write_control((x)->port, (y))) +#define w_dtr(x, y) (parport_write_data((x)->port, (y))) /* this defines which bits are to be used and which ones to be ignored */ /* logical or of the output bits involved in the scan matrix */ -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Staging: panel: Fixed a macro coding style issue
On Thu, Sep 20, 2012 at 2:09 AM, Willy Tarreau wrote: > On Wed, Sep 19, 2012 at 12:44:58PM -0700, Joe Perches wrote: >> On Thu, 2012-09-20 at 01:07 +0530, Adil Mujeeb wrote: >> > Removed do {} while (0) loop for a single statement macros >> > >> > Signed-off-by: Adil Mujeeb >> > --- >> > linux-3.6-rc6/drivers/staging/panel/panel.c |4 ++-- >> > 1 files changed, 2 insertions(+), 2 deletions(-) >> > >> > diff --git a/linux-3.6-rc6/drivers/staging/panel/panel.c >> > b/linux-3.6-rc6/drivers/staging/panel/panel.c >> > index 39f9982..d9fec5b 100644 >> > --- a/linux-3.6-rc6/drivers/staging/panel/panel.c >> > +++ b/linux-3.6-rc6/drivers/staging/panel/panel.c >> > @@ -137,8 +137,8 @@ >> > #define r_ctr(x)(parport_read_control((x)->port)) >> > #define r_dtr(x)(parport_read_data((x)->port)) >> > #define r_str(x)(parport_read_status((x)->port)) >> > -#define w_ctr(x, y) do { parport_write_control((x)->port, (y)); } >> > while (0) >> > -#define w_dtr(x, y) do { parport_write_data((x)->port, (y)); } while >> > (0) >> > +#define w_ctr(x, y) (parport_write_control((x)->port, (y))) >> > +#define w_dtr(x, y) (parport_write_data((x)->port, (y))) >> >> Unnecessary parentheses too. >> It might be better to use static inlines instead. I just did this change only as per checkpatch script warning. Also the parentheses is added similar to other macros. So should i removed all the macros and convert it to static inlines ? > Agreed. We already got bugs in the cyrix register manipulation for > years because of the use of macros which caused registers to be set > in the wrong order, let's not redo that mistake again. hmmm macros seems too dangerous but does it mean we should not use macros altogether? So should i create a single patch which replaces all macros of this file into inline function? This is my first effort in submitting a patch :) PS: I have correct the email id from e...@driverdev.osuosl.org to de...@driverdev.osuosl.org. My mistake while submitting the patch in first post :( > > Willy > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Staging: panel: Fixed a macro coding style issue
Hi, On Thu, Sep 20, 2012 at 10:52 AM, Willy Tarreau wrote: > On Thu, Sep 20, 2012 at 09:19:42AM +0530, Adil Mujeeb wrote: >> On Thu, Sep 20, 2012 at 2:09 AM, Willy Tarreau wrote: >> > On Wed, Sep 19, 2012 at 12:44:58PM -0700, Joe Perches wrote: >> >> On Thu, 2012-09-20 at 01:07 +0530, Adil Mujeeb wrote: >> >> > Removed do {} while (0) loop for a single statement macros >> >> > >> >> > Signed-off-by: Adil Mujeeb >> >> > --- >> >> > linux-3.6-rc6/drivers/staging/panel/panel.c |4 ++-- >> >> > 1 files changed, 2 insertions(+), 2 deletions(-) >> >> > >> >> > diff --git a/linux-3.6-rc6/drivers/staging/panel/panel.c >> >> > b/linux-3.6-rc6/drivers/staging/panel/panel.c >> >> > index 39f9982..d9fec5b 100644 >> >> > --- a/linux-3.6-rc6/drivers/staging/panel/panel.c >> >> > +++ b/linux-3.6-rc6/drivers/staging/panel/panel.c >> >> > @@ -137,8 +137,8 @@ >> >> > #define r_ctr(x)(parport_read_control((x)->port)) >> >> > #define r_dtr(x)(parport_read_data((x)->port)) >> >> > #define r_str(x)(parport_read_status((x)->port)) >> >> > -#define w_ctr(x, y) do { parport_write_control((x)->port, (y)); } >> >> > while (0) >> >> > -#define w_dtr(x, y) do { parport_write_data((x)->port, (y)); } >> >> > while (0) >> >> > +#define w_ctr(x, y) (parport_write_control((x)->port, (y))) >> >> > +#define w_dtr(x, y) (parport_write_data((x)->port, (y))) >> >> >> >> Unnecessary parentheses too. >> >> It might be better to use static inlines instead. >> >> I just did this change only as per checkpatch script warning. Also the >> parentheses is added similar to other macros. >> So should i removed all the macros and convert it to static inlines ? >> >> > Agreed. We already got bugs in the cyrix register manipulation for >> > years because of the use of macros which caused registers to be set >> > in the wrong order, let's not redo that mistake again. >> >> hmmm macros seems too dangerous but does it mean we should not use >> macros altogether? > > As long as we can easily replace them with static inline, we should > avoid them. They're pretty useful for many things (eg: type-agnostic > data manipulation) but what you see above does not provide much value > in my opinion. And I wrote this something like 10 years ago but since > then I learned from my mistakes :-) Thanks for sharing :) >> So should i create a single patch which replaces all macros of this >> file into inline function? > > It might be possible, but what are you trying to do ? If it's just a > minor cleanup patch, there is always the risk of breaking something > for zero value added. This driver needs a major lifting, it needs to > be cut into smaller functions for example. Maybe this is something > you should try to do instead of just changing a few defines ? Yes I was just doing minor cleanup and one of TODO item. > Also, do you have such a device to test your changes ? No I dont have. >> This is my first effort in submitting a patch :) > > You're welcome in this effort, but you should be very careful. > Playing with driver code is fun and addictive, but that breaks much > faster than you can imagine and it becomes frustrating to see your > cleanup patch reverted two days after its inclusion. Thanks for advice, I'll keep this in mind while doing the changes next time :) Regards, Adil > > Regards, > Willy > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Staging: winbond: wbusb: Fixed coding style issue
Repalces printk's with pr_debug Signed-off-by: Adil Mujeeb --- linux-3.6-rc7/drivers/staging/winbond/wbusb.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/linux-3.6-rc7/drivers/staging/winbond/wbusb.c b/linux-3.6-rc7/drivers/staging/winbond/wbusb.c index 0ca857a..48fe622 100644 --- a/linux-3.6-rc7/drivers/staging/winbond/wbusb.c +++ b/linux-3.6-rc7/drivers/staging/winbond/wbusb.c @@ -79,18 +79,18 @@ static int wbsoft_add_interface(struct ieee80211_hw *dev, static void wbsoft_remove_interface(struct ieee80211_hw *dev, struct ieee80211_vif *vif) { - printk("wbsoft_remove interface called\n"); + pr_debug("wbsoft_remove interface called\n"); } static void wbsoft_stop(struct ieee80211_hw *hw) { - printk(KERN_INFO "%s called\n", __func__); + pr_debug("%s called\n", __func__); } static int wbsoft_get_stats(struct ieee80211_hw *hw, struct ieee80211_low_level_stats *stats) { - printk(KERN_INFO "%s called\n", __func__); + pr_debug("%s called\n", __func__); return 0; } @@ -177,7 +177,7 @@ static void hal_set_current_channel_ex(struct hw_data *pHwData, struct chan_info if (pHwData->SurpriseRemove) return; - printk("Going to channel: %d/%d\n", channel.band, channel.ChanNo); + pr_debug("Going to channel: %d/%d\n", channel.band, channel.ChanNo); RFSynthesizer_SwitchingChannel(pHwData, channel); /* Switch channel */ pHwData->Channel = channel.ChanNo; @@ -262,7 +262,7 @@ static int wbsoft_config(struct ieee80211_hw *dev, u32 changed) struct wbsoft_priv *priv = dev->priv; struct chan_info ch; - printk("wbsoft_config called\n"); + pr_debug("wbsoft_config called\n"); /* Should use channel_num, or something, as that is already pre-translated */ ch.band = 1; @@ -280,7 +280,7 @@ static int wbsoft_config(struct ieee80211_hw *dev, u32 changed) static u64 wbsoft_get_tsf(struct ieee80211_hw *dev, struct ieee80211_vif *vif) { - printk("wbsoft_get_tsf called\n"); + pr_debug("wbsoft_get_tsf called\n"); return 0; } @@ -781,7 +781,7 @@ static int wb35_probe(struct usb_interface *intf, endpoint = &interface->endpoint[0].desc; if (endpoint[2].wMaxPacketSize == 512) - printk("[w35und] Working on USB 2.0\n"); + pr_debug("[w35und] Working on USB 2.0\n"); err = wb35_hw_init(dev); if (err) -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Staging: winbond: wbusb: Fixed coding style issue
On Tue, Oct 9, 2012 at 10:16 PM, Greg KH wrote: > On Tue, Oct 09, 2012 at 09:22:18AM -0700, Joe Perches wrote: >> On Tue, 2012-10-09 at 21:40 +0530, Adil Mujeeb wrote: >> > Repalces printk's with pr_debug >> [] >> > diff --git a/linux-3.6-rc7/drivers/staging/winbond/wbusb.c >> > b/linux-3.6-rc7/drivers/staging/winbond/wbusb.c >> > index 0ca857a..48fe622 100644 >> > --- a/linux-3.6-rc7/drivers/staging/winbond/wbusb.c >> > +++ b/linux-3.6-rc7/drivers/staging/winbond/wbusb.c >> > @@ -79,18 +79,18 @@ static int wbsoft_add_interface(struct ieee80211_hw >> > *dev, >> > static void wbsoft_remove_interface(struct ieee80211_hw *dev, >> > struct ieee80211_vif *vif) >> > { >> > - printk("wbsoft_remove interface called\n"); >> > + pr_debug("wbsoft_remove interface called\n"); >> >> It'd be more consistent to use >> pr_debug("%s called\n", __func__); >> everywhere. >> >> It might be even nicer to remove almost all of these. >> > > Yes, "tracing" type debug calls like this should all be removed, now > that we have built-in function call tracing in the core kernel itself. Thanks Joe and Greg for your quick comments. I will remove such tracing calls and resubmit the patch. Regards, Adil > > greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Staging: winbond: wbusb: Fixed coding style issue
Removed unnecessary printk and pr_debug tracing calls Signed-off-by: Adil Mujeeb --- linux-3.6-rc7/drivers/staging/winbond/wbusb.c | 14 -- 1 files changed, 0 insertions(+), 14 deletions(-) diff --git a/linux-3.6-rc7/drivers/staging/winbond/wbusb.c b/linux-3.6-rc7/drivers/staging/winbond/wbusb.c index 0ca857a..a0497ea 100644 --- a/linux-3.6-rc7/drivers/staging/winbond/wbusb.c +++ b/linux-3.6-rc7/drivers/staging/winbond/wbusb.c @@ -79,18 +79,15 @@ static int wbsoft_add_interface(struct ieee80211_hw *dev, static void wbsoft_remove_interface(struct ieee80211_hw *dev, struct ieee80211_vif *vif) { - printk("wbsoft_remove interface called\n"); } static void wbsoft_stop(struct ieee80211_hw *hw) { - printk(KERN_INFO "%s called\n", __func__); } static int wbsoft_get_stats(struct ieee80211_hw *hw, struct ieee80211_low_level_stats *stats) { - printk(KERN_INFO "%s called\n", __func__); return 0; } @@ -177,12 +174,9 @@ static void hal_set_current_channel_ex(struct hw_data *pHwData, struct chan_info if (pHwData->SurpriseRemove) return; - printk("Going to channel: %d/%d\n", channel.band, channel.ChanNo); - RFSynthesizer_SwitchingChannel(pHwData, channel); /* Switch channel */ pHwData->Channel = channel.ChanNo; pHwData->band = channel.band; - pr_debug("Set channel is %d, band =%d\n", pHwData->Channel, pHwData->band); reg->M28_MacControl &= ~0xff; /* Clean channel information field */ reg->M28_MacControl |= channel.ChanNo; Wb35Reg_WriteWithCallbackValue(pHwData, 0x0828, reg->M28_MacControl, @@ -262,8 +256,6 @@ static int wbsoft_config(struct ieee80211_hw *dev, u32 changed) struct wbsoft_priv *priv = dev->priv; struct chan_info ch; - printk("wbsoft_config called\n"); - /* Should use channel_num, or something, as that is already pre-translated */ ch.band = 1; ch.ChanNo = 1; @@ -280,7 +272,6 @@ static int wbsoft_config(struct ieee80211_hw *dev, u32 changed) static u64 wbsoft_get_tsf(struct ieee80211_hw *dev, struct ieee80211_vif *vif) { - printk("wbsoft_get_tsf called\n"); return 0; } @@ -714,7 +705,6 @@ static int wb35_hw_init(struct ieee80211_hw *hw) } priv->sLocalPara.bAntennaNo = hal_get_antenna_number(pHwData); - pr_debug("Driver init, antenna no = %d\n", priv->sLocalPara.bAntennaNo); hal_get_hw_radio_off(pHwData); /* Waiting for HAL setting OK */ @@ -780,9 +770,6 @@ static int wb35_probe(struct usb_interface *intf, interface = intf->cur_altsetting; endpoint = &interface->endpoint[0].desc; - if (endpoint[2].wMaxPacketSize == 512) - printk("[w35und] Working on USB 2.0\n"); - err = wb35_hw_init(dev); if (err) goto error_free_hw; @@ -834,7 +821,6 @@ static void wb35_hw_halt(struct wbsoft_priv *adapter) { /* Turn off Rx and Tx hardware ability */ hal_stop(&adapter->sHwData); - pr_debug("[w35und] Hal_stop O.K.\n"); /* Waiting Irp completed */ msleep(100); -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 0/9] Staging: winbond: Fixed coding style issues
winbond directory files have lots of coding style issues. The patch set tries to remove *most* (if not all) of the coding style issues. checkpatch.pl script is still complaining (like 80 characters limit) but major part of the serious coding style issues have been rectified. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/9] Staging: winbond: wbusb: Fixed coding style issue
Removed unnecessary printk and pr_debug tracing calls Signed-off-by: Adil Mujeeb --- linux-3.6-rc7/drivers/staging/winbond/wbusb.c | 14 -- 1 files changed, 0 insertions(+), 14 deletions(-) diff --git a/linux-3.6-rc7/drivers/staging/winbond/wbusb.c b/linux-3.6-rc7/drivers/staging/winbond/wbusb.c index 0ca857a..a0497ea 100644 --- a/linux-3.6-rc7/drivers/staging/winbond/wbusb.c +++ b/linux-3.6-rc7/drivers/staging/winbond/wbusb.c @@ -79,18 +79,15 @@ static int wbsoft_add_interface(struct ieee80211_hw *dev, static void wbsoft_remove_interface(struct ieee80211_hw *dev, struct ieee80211_vif *vif) { - printk("wbsoft_remove interface called\n"); } static void wbsoft_stop(struct ieee80211_hw *hw) { - printk(KERN_INFO "%s called\n", __func__); } static int wbsoft_get_stats(struct ieee80211_hw *hw, struct ieee80211_low_level_stats *stats) { - printk(KERN_INFO "%s called\n", __func__); return 0; } @@ -177,12 +174,9 @@ static void hal_set_current_channel_ex(struct hw_data *pHwData, struct chan_info if (pHwData->SurpriseRemove) return; - printk("Going to channel: %d/%d\n", channel.band, channel.ChanNo); - RFSynthesizer_SwitchingChannel(pHwData, channel); /* Switch channel */ pHwData->Channel = channel.ChanNo; pHwData->band = channel.band; - pr_debug("Set channel is %d, band =%d\n", pHwData->Channel, pHwData->band); reg->M28_MacControl &= ~0xff; /* Clean channel information field */ reg->M28_MacControl |= channel.ChanNo; Wb35Reg_WriteWithCallbackValue(pHwData, 0x0828, reg->M28_MacControl, @@ -262,8 +256,6 @@ static int wbsoft_config(struct ieee80211_hw *dev, u32 changed) struct wbsoft_priv *priv = dev->priv; struct chan_info ch; - printk("wbsoft_config called\n"); - /* Should use channel_num, or something, as that is already pre-translated */ ch.band = 1; ch.ChanNo = 1; @@ -280,7 +272,6 @@ static int wbsoft_config(struct ieee80211_hw *dev, u32 changed) static u64 wbsoft_get_tsf(struct ieee80211_hw *dev, struct ieee80211_vif *vif) { - printk("wbsoft_get_tsf called\n"); return 0; } @@ -714,7 +705,6 @@ static int wb35_hw_init(struct ieee80211_hw *hw) } priv->sLocalPara.bAntennaNo = hal_get_antenna_number(pHwData); - pr_debug("Driver init, antenna no = %d\n", priv->sLocalPara.bAntennaNo); hal_get_hw_radio_off(pHwData); /* Waiting for HAL setting OK */ @@ -780,9 +770,6 @@ static int wb35_probe(struct usb_interface *intf, interface = intf->cur_altsetting; endpoint = &interface->endpoint[0].desc; - if (endpoint[2].wMaxPacketSize == 512) - printk("[w35und] Working on USB 2.0\n"); - err = wb35_hw_init(dev); if (err) goto error_free_hw; @@ -834,7 +821,6 @@ static void wb35_hw_halt(struct wbsoft_priv *adapter) { /* Turn off Rx and Tx hardware ability */ hal_stop(&adapter->sHwData); - pr_debug("[w35und] Hal_stop O.K.\n"); /* Waiting Irp completed */ msleep(100); -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/9] Staging: winbond: phy_calibration: Fixed coding style issue
Removed checkpatch.pl script reported ERRORs Signed-off-by: Adil Mujeeb --- .../drivers/staging/winbond/phy_calibration.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-3.6-rc7/drivers/staging/winbond/phy_calibration.c b/linux-3.6-rc7/drivers/staging/winbond/phy_calibration.c index 77a3fff..b881980 100644 --- a/linux-3.6-rc7/drivers/staging/winbond/phy_calibration.c +++ b/linux-3.6-rc7/drivers/staging/winbond/phy_calibration.c @@ -22,7 +22,7 @@ #define LOOP_TIMES 20 #define US 1000/* MICROSECOND*/ -#define AG_CONST0.6072529350 +#define AG_CONST(0.6072529350) #define FIXED(X)((s32)((X) * 32768.0)) #define DEG2RAD(X) (0.017453 * (X)) @@ -296,7 +296,7 @@ void _sin_cos(s32 angle, s32 *sin, s32 *cos) } } -static unsigned char hal_get_dxx_reg(struct hw_data *pHwData, u16 number, u32 * pValue) +static unsigned char hal_get_dxx_reg(struct hw_data *pHwData, u16 number, u32 *pValue) { if (number < 0x1000) number += 0x1000; -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 3/9] Staging: winbond: mds: Fixed coding style issues
Removed printk tracing call Signed-off-by: Adil Mujeeb --- linux-3.6-rc7/drivers/staging/winbond/mds.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/linux-3.6-rc7/drivers/staging/winbond/mds.c b/linux-3.6-rc7/drivers/staging/winbond/mds.c index c9f0e8f..d76172e 100644 --- a/linux-3.6-rc7/drivers/staging/winbond/mds.c +++ b/linux-3.6-rc7/drivers/staging/winbond/mds.c @@ -476,11 +476,8 @@ Mds_Tx(struct wbsoft_priv *adapter) /* 931130.5.b */ FragmentCount = PacketSize/FragmentThreshold + 1; stmp = PacketSize + FragmentCount*32 + 8; /* 931130.5.c 8:MIC */ - if ((XmitBufSize + stmp) >= MAX_USB_TX_BUFFER) { - printk("[Mds_Tx] Excess max tx buffer.\n"); + if ((XmitBufSize + stmp) >= MAX_USB_TX_BUFFER) break; /* buffer is not enough */ - } - /* * Start transmitting -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 4/9] Staging: winbond: sem_api: Fixed coding style issue
Fixed checkpatch.pl reported ERROR Signed-off-by: Adil Mujeeb --- linux-3.6-rc7/drivers/staging/winbond/sme_api.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/linux-3.6-rc7/drivers/staging/winbond/sme_api.h b/linux-3.6-rc7/drivers/staging/winbond/sme_api.h index 8f4596c..47b7238 100644 --- a/linux-3.6-rc7/drivers/staging/winbond/sme_api.h +++ b/linux-3.6-rc7/drivers/staging/winbond/sme_api.h @@ -138,7 +138,7 @@ s8 sme_set_txrate_policy(void *pcore_data, u8 policy); s8 sme_get_txrate_policy(void *pcore_data, u8 *policy); s8 sme_get_cwmin_value(void *pcore_data, u8 *cwmin); s8 sme_get_cwmax_value(void *pcore_data, u16 *cwmax); -s8 sme_get_ms_radio_mode(void *pcore_data, u8 * pMsRadioOff); +s8 sme_get_ms_radio_mode(void *pcore_data, u8 *pMsRadioOff); s8 sme_set_ms_radio_mode(void *pcore_data, u8 boMsRadioOff); void sme_get_tx_power_level(void *pcore_data, u32 *TxPower); -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 5/9] Staging: winbond: wb35reg: Fixed coding style issues
Fixed some of checkpatch.pl reported ERRORs and WARNING of similar types: 1. trailing statements should be on next line 2. no spaces at the start of a line Signed-off-by: Adil Mujeeb --- linux-3.6-rc7/drivers/staging/winbond/wb35reg.c | 142 +-- 1 files changed, 106 insertions(+), 36 deletions(-) diff --git a/linux-3.6-rc7/drivers/staging/winbond/wb35reg.c b/linux-3.6-rc7/drivers/staging/winbond/wb35reg.c index da595f1..476f4db 100644 --- a/linux-3.6-rc7/drivers/staging/winbond/wb35reg.c +++ b/linux-3.6-rc7/drivers/staging/winbond/wb35reg.c @@ -69,48 +69,118 @@ unsigned char Wb35Reg_BurstWrite(struct hw_data *pHwData, u16 RegisterNo, u32 *p kfree(reg_queue); return false; } - return false; + return false; } void Wb35Reg_Update(struct hw_data *pHwData, u16 RegisterNo, u32 RegisterValue) { struct wb35_reg *reg = &pHwData->reg; switch (RegisterNo) { - case 0x3b0: reg->U1B0 = RegisterValue; break; - case 0x3bc: reg->U1BC_LEDConfigure = RegisterValue; break; - case 0x400: reg->D00_DmaControl = RegisterValue; break; - case 0x800: reg->M00_MacControl = RegisterValue; break; - case 0x804: reg->M04_MulticastAddress1 = RegisterValue; break; - case 0x808: reg->M08_MulticastAddress2 = RegisterValue; break; - case 0x824: reg->M24_MacControl = RegisterValue; break; - case 0x828: reg->M28_MacControl = RegisterValue; break; - case 0x82c: reg->M2C_MacControl = RegisterValue; break; - case 0x838: reg->M38_MacControl = RegisterValue; break; - case 0x840: reg->M40_MacControl = RegisterValue; break; - case 0x844: reg->M44_MacControl = RegisterValue; break; - case 0x848: reg->M48_MacControl = RegisterValue; break; - case 0x84c: reg->M4C_MacStatus = RegisterValue; break; - case 0x860: reg->M60_MacControl = RegisterValue; break; - case 0x868: reg->M68_MacControl = RegisterValue; break; - case 0x870: reg->M70_MacControl = RegisterValue; break; - case 0x874: reg->M74_MacControl = RegisterValue; break; - case 0x878: reg->M78_ERPInformation = RegisterValue; break; - case 0x87C: reg->M7C_MacControl = RegisterValue; break; - case 0x880: reg->M80_MacControl = RegisterValue; break; - case 0x884: reg->M84_MacControl = RegisterValue; break; - case 0x888: reg->M88_MacControl = RegisterValue; break; - case 0x898: reg->M98_MacControl = RegisterValue; break; - case 0x100c: reg->BB0C = RegisterValue; break; - case 0x102c: reg->BB2C = RegisterValue; break; - case 0x1030: reg->BB30 = RegisterValue; break; - case 0x103c: reg->BB3C = RegisterValue; break; - case 0x1048: reg->BB48 = RegisterValue; break; - case 0x104c: reg->BB4C = RegisterValue; break; - case 0x1050: reg->BB50 = RegisterValue; break; - case 0x1054: reg->BB54 = RegisterValue; break; - case 0x1058: reg->BB58 = RegisterValue; break; - case 0x105c: reg->BB5C = RegisterValue; break; - case 0x1060: reg->BB60 = RegisterValue; break; + case 0x3b0: + reg->U1B0 = RegisterValue; + break; + case 0x3bc: + reg->U1BC_LEDConfigure = RegisterValue; + break; + case 0x400: + reg->D00_DmaControl = RegisterValue; + break; + case 0x800: + reg->M00_MacControl = RegisterValue; + break; + case 0x804: + reg->M04_MulticastAddress1 = RegisterValue; + break; + case 0x808: + reg->M08_MulticastAddress2 = RegisterValue; + break; + case 0x824: + reg->M24_MacControl = RegisterValue; + break; + case 0x828: + reg->M28_MacControl = RegisterValue; + break; + case 0x82c: + reg->M2C_MacControl = RegisterValue; + break; + case 0x838: + reg->M38_MacControl = RegisterValue; + break; + case 0x840: + reg->M40_MacControl = RegisterValue; + break; + case 0x844: + reg->M44_MacControl = RegisterValue; + break; + case 0x848: + reg->M48_MacControl = RegisterValue; + break; + case 0x84c: + reg->M4C_MacStatus = RegisterValue; + break; + case 0x860: + reg->M60_MacControl = RegisterValue; + break; + case 0x868: + reg->M68_MacControl = RegisterValue; + break; + case 0x870: + reg->M70_MacControl = RegisterValue; + break; + case 0x874: + reg->M74_MacControl = RegisterValue; +
[PATCH 6/9] Staging: winbond: wb35rx_f: Fixed coding style issues
Fixed checkpatch.pl reported ERRORs Signed-off-by: Adil Mujeeb --- linux-3.6-rc7/drivers/staging/winbond/wb35rx_f.h | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/linux-3.6-rc7/drivers/staging/winbond/wb35rx_f.h b/linux-3.6-rc7/drivers/staging/winbond/wb35rx_f.h index 1fdf65e..559bdca 100644 --- a/linux-3.6-rc7/drivers/staging/winbond/wb35rx_f.h +++ b/linux-3.6-rc7/drivers/staging/winbond/wb35rx_f.h @@ -4,12 +4,12 @@ #include #include "wbhal.h" -// -// Interface function declare -// -unsigned char Wb35Rx_initial( struct hw_data * pHwData ); -void Wb35Rx_destroy( struct hw_data * pHwData ); -void Wb35Rx_stop( struct hw_data * pHwData ); +/* + * Interface function declaration + */ +unsigned char Wb35Rx_initial(struct hw_data *pHwData); +void Wb35Rx_destroy(struct hw_data *pHwData); +void Wb35Rx_stop(struct hw_data *pHwData); void Wb35Rx_start(struct ieee80211_hw *hw); #endif -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 7/9] Staging: winbond: wb35rx_s: Fixed coding style issue
Fixed checpatch.pl reported ERRORs (excluding WARNING of line over 80 characters) Signed-off-by: Adil Mujeeb --- linux-3.6-rc7/drivers/staging/winbond/wb35rx_s.h | 62 +++--- 1 files changed, 31 insertions(+), 31 deletions(-) diff --git a/linux-3.6-rc7/drivers/staging/winbond/wb35rx_s.h b/linux-3.6-rc7/drivers/staging/winbond/wb35rx_s.h index 4b03274..545bc95 100644 --- a/linux-3.6-rc7/drivers/staging/winbond/wb35rx_s.h +++ b/linux-3.6-rc7/drivers/staging/winbond/wb35rx_s.h @@ -1,44 +1,44 @@ -// -// wb35rx.h -- -// +#ifndef __WINBOND_35RX_S_H +#define __WINBOND_35RX_S_H -// Definition for this module used -#define MAX_USB_RX_BUFFER 4096// This parameter must be 4096 931130.4.f +/* Definition for this module used */ +#define MAX_USB_RX_BUFFER 4096/* This parameter must be 4096 931130.4.f */ +#define MAX_USB_RX_BUFFER_NUMBER ETHERNET_RX_DESCRIPTORS /* Maximum 254, 255 is RESERVED ID */ +#define RX_INTERFACE 0 /* Interface 1 */ +#define RX_PIPE2 /* Pipe 3 */ +#define MAX_PACKET_SIZE1600/* 1568 = 8 + 1532 + 4 + 24(IV EIV MIC ICV CRC) for check DMA data 931130.4.g */ +#define RX_END_TAG 0x0badbeef -#define MAX_USB_RX_BUFFER_NUMBER ETHERNET_RX_DESCRIPTORS // Maximum 254, 255 is RESERVED ID -#define RX_INTERFACE 0 // Interface 1 -#define RX_PIPE2 // Pipe 3 -#define MAX_PACKET_SIZE1600 //1568 // 8 + 1532 + 4 + 24(IV EIV MIC ICV CRC) for check DMA data 931130.4.g -#define RX_END_TAG 0x0badbeef - -// -// Internal variable for module -// +/* + * Internal variable for module + */ struct wb35_rx { - u32 ByteReceived;// For calculating throughput of BulkIn - atomic_tRxFireCounter;// Does Wb35Rx module fire? + u32 ByteReceived; /* For calculating throughput of BulkIn */ + atomic_tRxFireCounter;/* Does Wb35Rx module fire? */ - u8 RxBuffer[ MAX_USB_RX_BUFFER_NUMBER ][ ((MAX_USB_RX_BUFFER+3) & ~0x03 ) ]; - u16 RxBufferSize[ ((MAX_USB_RX_BUFFER_NUMBER+1) & ~0x01) ]; - u8 RxOwner[ ((MAX_USB_RX_BUFFER_NUMBER+3) & ~0x03 ) ];//Ownership of buffer 0: SW 1:HW + u8 RxBuffer[MAX_USB_RX_BUFFER_NUMBER][((MAX_USB_RX_BUFFER+3) & ~0x03)]; + u16 RxBufferSize[((MAX_USB_RX_BUFFER_NUMBER+1) & ~0x01)]; + u8 RxOwner[((MAX_USB_RX_BUFFER_NUMBER+3) & ~0x03)]; /* Ownership of buffer 0:SW 1:HW */ - u32 RxProcessIndex;//The next index to process - u32 RxBufferId; - u32 EP3vm_state; + u32 RxProcessIndex; /* The next index to process */ + u32 RxBufferId; + u32 EP3vm_state; - u32 rx_halt; // For VM stopping + u32 rx_halt; /* For VM stopping */ - u16 MoreDataSize; - u16 PacketSize; + u16 MoreDataSize; + u16 PacketSize; - u32 CurrentRxBufferId; // For complete routine usage - u32 Rx3UrbCancel; + u32 CurrentRxBufferId; /* For complete routine usage */ + u32 Rx3UrbCancel; - u32 LastR1; // For RSSI reporting - struct urb *RxUrb; - u32 Ep3ErrorCount2; // 20060625.1 Usbd for Rx DMA error count + u32 LastR1; /* For RSSI reporting */ + struct urb *RxUrb; + u32 Ep3ErrorCount2; /* 20060625.1 Usbd for Rx DMA error count */ int EP3VM_status; - u8 *pDRx; + u8 *pDRx; }; + +#endif /* __WINBOND_35RX_S_H */ -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 8/9] taging: winbond: wb35tx: Fixed coding style issues
Fixed most of the checkpatch.pl reported ERRORs and WARNINGs (still few are there). Signed-off-by: Adil Mujeeb --- linux-3.6-rc7/drivers/staging/winbond/wb35tx.c | 160 +++- 1 files changed, 71 insertions(+), 89 deletions(-) diff --git a/linux-3.6-rc7/drivers/staging/winbond/wb35tx.c b/linux-3.6-rc7/drivers/staging/winbond/wb35tx.c index 5df39d4..8beeb4d 100644 --- a/linux-3.6-rc7/drivers/staging/winbond/wb35tx.c +++ b/linux-3.6-rc7/drivers/staging/winbond/wb35tx.c @@ -1,13 +1,13 @@ -// -// Copyright (c) 1996-2002 Winbond Electronic Corporation -// -// Module Name: -//Wb35Tx.c -// -// Abstract: -//Processing the Tx message and put into down layer -// -// +/* + * Copyright (c) 1996-2002 Winbond Electronic Corporation + * + * Module Name: + *Wb35Tx.c + * + * Abstract: + *Processing the Tx message and put into down layer + */ + #include #include @@ -15,7 +15,7 @@ #include "mds_f.h" unsigned char -Wb35Tx_get_tx_buffer(struct hw_data * pHwData, u8 **pBuffer) +Wb35Tx_get_tx_buffer(struct hw_data *pHwData, u8 **pBuffer) { struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; @@ -25,30 +25,28 @@ Wb35Tx_get_tx_buffer(struct hw_data * pHwData, u8 **pBuffer) static void Wb35Tx(struct wbsoft_priv *adapter); -static void Wb35Tx_complete(struct urb * pUrb) +static void Wb35Tx_complete(struct urb *pUrb) { struct wbsoft_priv *adapter = pUrb->context; - struct hw_data *pHwData = &adapter->sHwData; + struct hw_data *pHwData = &adapter->sHwData; struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; struct wb35_mds *pMds = &adapter->Mds; - printk("wb35: tx complete\n"); - // Variable setting + /* Variable setting */ pWb35Tx->EP4vm_state = VM_COMPLETED; - pWb35Tx->EP4VM_status = pUrb->status; //Store the last result of Irp - pMds->TxOwner[ pWb35Tx->TxSendIndex ] = 0;// Set the owner. Free the owner bit always. + pWb35Tx->EP4VM_status = pUrb->status; /* Store the last result of Irp */ + pMds->TxOwner[pWb35Tx->TxSendIndex] = 0; /* Set the owner. Free the owner bit always. */ pWb35Tx->TxSendIndex++; pWb35Tx->TxSendIndex %= MAX_USB_TX_BUFFER_NUMBER; - if (pHwData->SurpriseRemove) // Let WbWlanHalt to handle surprise remove + if (pHwData->SurpriseRemove) /* Let WbWlanHalt to handle surprise remove */ goto error; if (pWb35Tx->tx_halt) goto error; - // The URB is completed, check the result + /* The URB is completed, check the result */ if (pWb35Tx->EP4VM_status != 0) { - printk("URB submission failed\n"); pWb35Tx->EP4vm_state = VM_STOP; goto error; } @@ -64,12 +62,12 @@ error: static void Wb35Tx(struct wbsoft_priv *adapter) { - struct hw_data *pHwData = &adapter->sHwData; - struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; + struct hw_data *pHwData = &adapter->sHwData; + struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; u8 *pTxBufferAddress; struct wb35_mds *pMds = &adapter->Mds; - struct urb *pUrb = (struct urb *)pWb35Tx->Tx4Urb; - int retv; + struct urb *pUrb = (struct urb *)pWb35Tx->Tx4Urb; + int retv; u32 SendIndex; @@ -79,28 +77,25 @@ static void Wb35Tx(struct wbsoft_priv *adapter) if (pWb35Tx->tx_halt) goto cleanup; - // Ownership checking + /* Ownership checking */ SendIndex = pWb35Tx->TxSendIndex; - if (!pMds->TxOwner[SendIndex]) //No more data need to be sent, return immediately + if (!pMds->TxOwner[SendIndex]) /* No more data need to be sent, return immediately */ goto cleanup; pTxBufferAddress = pWb35Tx->TxBuffer[SendIndex]; - // - // Issuing URB - // + + /* Issuing URB */ usb_fill_bulk_urb(pUrb, pHwData->udev, usb_sndbulkpipe(pHwData->udev, 4), - pTxBufferAddress, pMds->TxBufferSize[ SendIndex ], + pTxBufferAddress, pMds->TxBufferSize[SendIndex], Wb35Tx_complete, adapter); pWb35Tx->EP4vm_state = VM_RUNNING; retv = usb_submit_urb(pUrb, GFP_ATOMIC); - if (retv<0) { - printk("EP4 Tx Irp sending error\n"); + if (retv < 0) goto cleanup; - } - // Check if driver needs issue Irp for EP2 + /* Check if driver needs issue Irp for EP2 */ pWb35Tx
[PATCH 9/9] Staging: winbond: wb35tx_s: Fixed coding style issues
Fixed most of the checkpatch.pl reported ERRORs and WARNINGs. Some "line over 80 characters" warning left. Signed-off-by: Adil Mujeeb --- linux-3.6-rc7/drivers/staging/winbond/wb35tx_s.h | 49 + 1 files changed, 21 insertions(+), 28 deletions(-) diff --git a/linux-3.6-rc7/drivers/staging/winbond/wb35tx_s.h b/linux-3.6-rc7/drivers/staging/winbond/wb35tx_s.h index f70f433..02a1f27 100644 --- a/linux-3.6-rc7/drivers/staging/winbond/wb35tx_s.h +++ b/linux-3.6-rc7/drivers/staging/winbond/wb35tx_s.h @@ -3,45 +3,38 @@ #include "mds_s.h" -// -// IS89C35 Tx related definition -// -#define TX_INTERFACE 0 // Interface 1 -#define TX_PIPE3 // endpoint 4 -#define TX_INTERRUPT 1 // endpoint 2 -#define MAX_INTERRUPT_LENGTH 64 // It must be 64 for EP2 hardware - - - -// -// Internal variable for module -// +/* IS89C35 Tx related definition */ +#define TX_INTERFACE 0 /* Interface 1 */ +#define TX_PIPE3 /* endpoint 4 */ +#define TX_INTERRUPT 1 /* endpoint 2 */ +#define MAX_INTERRUPT_LENGTH 64 /* It must be 64 for EP2 hardware */ +/* Internal variable for module */ struct wb35_tx { - // For Tx buffer - u8 TxBuffer[ MAX_USB_TX_BUFFER_NUMBER ][ MAX_USB_TX_BUFFER ]; + /* For Tx buffer */ + u8 TxBuffer[MAX_USB_TX_BUFFER_NUMBER][MAX_USB_TX_BUFFER]; - // For Interrupt pipe - u8 EP2_buf[MAX_INTERRUPT_LENGTH]; + /* For Interrupt pipe */ + u8 EP2_buf[MAX_INTERRUPT_LENGTH]; - atomic_tTxResultCount;// For thread control of EP2 931130.4.m - atomic_tTxFireCounter;// For thread control of EP4 931130.4.n - u32 ByteTransfer; + atomic_tTxResultCount; /* For thread control of EP2 931130.4.m */ + atomic_tTxFireCounter; /* For thread control of EP4 931130.4.n */ + u32 ByteTransfer; - u32 TxSendIndex;// The next index of Mds array to be sent - u32 EP2vm_state; // for EP2vm state - u32 EP4vm_state; // for EP4vm state - u32 tx_halt; // Stopping VM + u32 TxSendIndex; /* next index of Mds array to be sent */ + u32 EP2vm_state; /* for EP2vm state */ + u32 EP4vm_state; /* for EP4vm state */ + u32 tx_halt; /* Stopping VM */ - struct urb *Tx4Urb; - struct urb *Tx2Urb; + struct urb *Tx4Urb; + struct urb *Tx2Urb; int EP2VM_status; int EP4VM_status; - u32 TxFillCount; // 20060928 - u32 TxTimer; // 20060928 Add if sending packet not great than 13 + u32 TxFillCount; /* 20060928 */ + u32 TxTimer; /* 20060928 Add if sending packet not great than 13 */ }; #endif -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/9] Staging: winbond: Fixed coding style issues
Hi Pavel, On Sun, Oct 21, 2012 at 4:12 PM, Pavel Machek wrote: > On Fri 2012-10-12 22:07:06, Adil Mujeeb wrote: >> >> winbond directory files have lots of coding style issues. The patch > set tries to remove *most* (if not all) of the coding style > issues. checkpatch.pl script is still complaining (like 80 characters > limit) but major part of the serious coding style issues have been > rectified. > > ACK on patches except 2 and 5. Plus if you could keep the printks, > that would be great. When the driver is debugged and in wide use, we > can remove them, but now they are useful... Thanks Pavel for acknowledgement. I removed printk's as Joe and Greg recommended to remove "tracing" type debug calls. Let me know if I need to resubmit the patch. Regards, Adil > > Thanks, > Pavel > > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) > http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/9] Staging: winbond: Fixed coding style issues
On Tue, Oct 23, 2012 at 2:04 AM, Greg KH wrote: > On Fri, Oct 12, 2012 at 10:07:06PM +0530, Adil Mujeeb wrote: >> >> winbond directory files have lots of coding style issues. The patch set >> tries to remove *most* (if not all) of the coding style issues. >> checkpatch.pl script is still complaining (like 80 characters limit) but >> major part of the serious coding style issues have been rectified. > > None of your patches can be applied due to the wrong patch level they > were generated at. Please redo them, drop the two offending patches, > and resend the whole series. > > thanks, > > greg k-h Thanks Greg. I will recreate the patches and shall drop the mentioned ones. But I am still not able find where I am doing wrong in generating the patches. I am following your tutorial :) but may be missing something. Please help. I am doing in the following ways: 1. I am downloading the latest rc source archive from ftp.kernel.org under directory /pub/linux/kernel/v3.x/testing 2. Then creating my own git repository treating the base source as master. 3. Creating a branch from it and tries to fix some sources. 4. Create the patch through git format-patch 5. Submit the patch through git send-email command. Dry run works fine with my repository. Could you please help? Regards, Adil -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 0/4] Staging: winbond: wbusb: Fixed coding style issue
winbond directory files have lots of coding style issues. The patch set tries to remove *most* (if not all) of the coding style issues. checkpatch.pl script can still complain but major part of the serious coding style issues have been rectified. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/4] Staging: winbond: wbusb: Fixed coding style issue
Removed unnecessary printk and pr_debug tracing calls Signed-off-by: Adil Mujeeb --- drivers/staging/winbond/wbusb.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c index 48aa136..3fa1ae4 100644 --- a/drivers/staging/winbond/wbusb.c +++ b/drivers/staging/winbond/wbusb.c @@ -79,18 +79,15 @@ static int wbsoft_add_interface(struct ieee80211_hw *dev, static void wbsoft_remove_interface(struct ieee80211_hw *dev, struct ieee80211_vif *vif) { - printk("wbsoft_remove interface called\n"); } static void wbsoft_stop(struct ieee80211_hw *hw) { - printk(KERN_INFO "%s called\n", __func__); } static int wbsoft_get_stats(struct ieee80211_hw *hw, struct ieee80211_low_level_stats *stats) { - printk(KERN_INFO "%s called\n", __func__); return 0; } @@ -179,12 +176,9 @@ static void hal_set_current_channel_ex(struct hw_data *pHwData, struct chan_info if (pHwData->SurpriseRemove) return; - printk("Going to channel: %d/%d\n", channel.band, channel.ChanNo); - RFSynthesizer_SwitchingChannel(pHwData, channel); /* Switch channel */ pHwData->Channel = channel.ChanNo; pHwData->band = channel.band; - pr_debug("Set channel is %d, band =%d\n", pHwData->Channel, pHwData->band); reg->M28_MacControl &= ~0xff; /* Clean channel information field */ reg->M28_MacControl |= channel.ChanNo; Wb35Reg_WriteWithCallbackValue(pHwData, 0x0828, reg->M28_MacControl, @@ -264,8 +258,6 @@ static int wbsoft_config(struct ieee80211_hw *dev, u32 changed) struct wbsoft_priv *priv = dev->priv; struct chan_info ch; - printk("wbsoft_config called\n"); - /* Should use channel_num, or something, as that is already pre-translated */ ch.band = 1; ch.ChanNo = 1; @@ -282,7 +274,6 @@ static int wbsoft_config(struct ieee80211_hw *dev, u32 changed) static u64 wbsoft_get_tsf(struct ieee80211_hw *dev, struct ieee80211_vif *vif) { - printk("wbsoft_get_tsf called\n"); return 0; } @@ -716,7 +707,6 @@ static int wb35_hw_init(struct ieee80211_hw *hw) } priv->sLocalPara.bAntennaNo = hal_get_antenna_number(pHwData); - pr_debug("Driver init, antenna no = %d\n", priv->sLocalPara.bAntennaNo); hal_get_hw_radio_off(pHwData); /* Waiting for HAL setting OK */ @@ -782,9 +772,6 @@ static int wb35_probe(struct usb_interface *intf, interface = intf->cur_altsetting; endpoint = &interface->endpoint[0].desc; - if (endpoint[2].wMaxPacketSize == 512) - printk("[w35und] Working on USB 2.0\n"); - err = wb35_hw_init(dev); if (err) goto error_free_hw; @@ -836,7 +823,6 @@ static void wb35_hw_halt(struct wbsoft_priv *adapter) { /* Turn off Rx and Tx hardware ability */ hal_stop(&adapter->sHwData); - pr_debug("[w35und] Hal_stop O.K.\n"); /* Waiting Irp completed */ msleep(100); -- 1.7.10.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/4] Staging: winbond: mds: Fixed coding style issues
Removed printk tracing call Signed-off-by: Adil Mujeeb --- drivers/staging/winbond/mds.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/winbond/mds.c b/drivers/staging/winbond/mds.c index 43990e8..faa93f0 100644 --- a/drivers/staging/winbond/mds.c +++ b/drivers/staging/winbond/mds.c @@ -476,11 +476,8 @@ Mds_Tx(struct wbsoft_priv *adapter) /* 931130.5.b */ FragmentCount = PacketSize/FragmentThreshold + 1; stmp = PacketSize + FragmentCount*32 + 8; /* 931130.5.c 8:MIC */ - if ((XmitBufSize + stmp) >= MAX_USB_TX_BUFFER) { - printk("[Mds_Tx] Excess max tx buffer.\n"); + if ((XmitBufSize + stmp) >= MAX_USB_TX_BUFFER) break; /* buffer is not enough */ - } - /* * Start transmitting -- 1.7.10.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 3/4] Staging: winbond: wb35rx_f: Fixed coding style issues
Fixed checkpatch.pl reported ERRORs Signed-off-by: Adil Mujeeb --- drivers/staging/winbond/wb35rx_f.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/winbond/wb35rx_f.h b/drivers/staging/winbond/wb35rx_f.h index 1fdf65e..559bdca 100644 --- a/drivers/staging/winbond/wb35rx_f.h +++ b/drivers/staging/winbond/wb35rx_f.h @@ -4,12 +4,12 @@ #include #include "wbhal.h" -// -// Interface function declare -// -unsigned char Wb35Rx_initial( struct hw_data * pHwData ); -void Wb35Rx_destroy( struct hw_data * pHwData ); -void Wb35Rx_stop( struct hw_data * pHwData ); +/* + * Interface function declaration + */ +unsigned char Wb35Rx_initial(struct hw_data *pHwData); +void Wb35Rx_destroy(struct hw_data *pHwData); +void Wb35Rx_stop(struct hw_data *pHwData); void Wb35Rx_start(struct ieee80211_hw *hw); #endif -- 1.7.10.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 4/4] Staging: winbond: wb35rx_s: Fixed coding style issue
Fixed checpatch.pl reported ERRORs (excluding WARNING of line over 80 characters) Signed-off-by: Adil Mujeeb --- drivers/staging/winbond/wb35rx_s.h | 62 ++-- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/drivers/staging/winbond/wb35rx_s.h b/drivers/staging/winbond/wb35rx_s.h index 4b03274..545bc95 100644 --- a/drivers/staging/winbond/wb35rx_s.h +++ b/drivers/staging/winbond/wb35rx_s.h @@ -1,44 +1,44 @@ -// -// wb35rx.h -- -// +#ifndef __WINBOND_35RX_S_H +#define __WINBOND_35RX_S_H -// Definition for this module used -#define MAX_USB_RX_BUFFER 4096// This parameter must be 4096 931130.4.f +/* Definition for this module used */ +#define MAX_USB_RX_BUFFER 4096/* This parameter must be 4096 931130.4.f */ +#define MAX_USB_RX_BUFFER_NUMBER ETHERNET_RX_DESCRIPTORS /* Maximum 254, 255 is RESERVED ID */ +#define RX_INTERFACE 0 /* Interface 1 */ +#define RX_PIPE2 /* Pipe 3 */ +#define MAX_PACKET_SIZE1600/* 1568 = 8 + 1532 + 4 + 24(IV EIV MIC ICV CRC) for check DMA data 931130.4.g */ +#define RX_END_TAG 0x0badbeef -#define MAX_USB_RX_BUFFER_NUMBER ETHERNET_RX_DESCRIPTORS // Maximum 254, 255 is RESERVED ID -#define RX_INTERFACE 0 // Interface 1 -#define RX_PIPE2 // Pipe 3 -#define MAX_PACKET_SIZE1600 //1568 // 8 + 1532 + 4 + 24(IV EIV MIC ICV CRC) for check DMA data 931130.4.g -#define RX_END_TAG 0x0badbeef - -// -// Internal variable for module -// +/* + * Internal variable for module + */ struct wb35_rx { - u32 ByteReceived;// For calculating throughput of BulkIn - atomic_tRxFireCounter;// Does Wb35Rx module fire? + u32 ByteReceived; /* For calculating throughput of BulkIn */ + atomic_tRxFireCounter;/* Does Wb35Rx module fire? */ - u8 RxBuffer[ MAX_USB_RX_BUFFER_NUMBER ][ ((MAX_USB_RX_BUFFER+3) & ~0x03 ) ]; - u16 RxBufferSize[ ((MAX_USB_RX_BUFFER_NUMBER+1) & ~0x01) ]; - u8 RxOwner[ ((MAX_USB_RX_BUFFER_NUMBER+3) & ~0x03 ) ];//Ownership of buffer 0: SW 1:HW + u8 RxBuffer[MAX_USB_RX_BUFFER_NUMBER][((MAX_USB_RX_BUFFER+3) & ~0x03)]; + u16 RxBufferSize[((MAX_USB_RX_BUFFER_NUMBER+1) & ~0x01)]; + u8 RxOwner[((MAX_USB_RX_BUFFER_NUMBER+3) & ~0x03)]; /* Ownership of buffer 0:SW 1:HW */ - u32 RxProcessIndex;//The next index to process - u32 RxBufferId; - u32 EP3vm_state; + u32 RxProcessIndex; /* The next index to process */ + u32 RxBufferId; + u32 EP3vm_state; - u32 rx_halt; // For VM stopping + u32 rx_halt; /* For VM stopping */ - u16 MoreDataSize; - u16 PacketSize; + u16 MoreDataSize; + u16 PacketSize; - u32 CurrentRxBufferId; // For complete routine usage - u32 Rx3UrbCancel; + u32 CurrentRxBufferId; /* For complete routine usage */ + u32 Rx3UrbCancel; - u32 LastR1; // For RSSI reporting - struct urb *RxUrb; - u32 Ep3ErrorCount2; // 20060625.1 Usbd for Rx DMA error count + u32 LastR1; /* For RSSI reporting */ + struct urb *RxUrb; + u32 Ep3ErrorCount2; /* 20060625.1 Usbd for Rx DMA error count */ int EP3VM_status; - u8 *pDRx; + u8 *pDRx; }; + +#endif /* __WINBOND_35RX_S_H */ -- 1.7.10.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/9] Staging: winbond: Fixed coding style issues
Hi, On Wed, Oct 24, 2012 at 12:15 AM, Greg KH wrote: > On Tue, Oct 23, 2012 at 03:41:08PM +0530, Adil Mujeeb wrote: >> On Tue, Oct 23, 2012 at 2:04 AM, Greg KH wrote: >> > On Fri, Oct 12, 2012 at 10:07:06PM +0530, Adil Mujeeb wrote: >> >> >> >> winbond directory files have lots of coding style issues. The patch set >> >> tries to remove *most* (if not all) of the coding style issues. >> >> checkpatch.pl script is still complaining (like 80 characters limit) but >> >> major part of the serious coding style issues have been rectified. >> > >> > None of your patches can be applied due to the wrong patch level they >> > were generated at. Please redo them, drop the two offending patches, >> > and resend the whole series. >> > >> > thanks, >> > >> > greg k-h >> >> Thanks Greg. I will recreate the patches and shall drop the mentioned >> ones. But I am still not able find where I am doing wrong in >> generating the patches. I am following your tutorial :) but may be >> missing something. Please help. I am doing in the following ways: >> >> 1. I am downloading the latest rc source archive from ftp.kernel.org >> under directory /pub/linux/kernel/v3.x/testing >> 2. Then creating my own git repository treating the base source as master. > > Why not just use the kernel git tree? You will have to work off of > linux-next if you want to send staging patches, you can not keep up with > development otherwise. Thanks Gree for your suggestion. I am using now linux-next tree. Interestingly some of my patches already submitted by now :) > >> 3. Creating a branch from it and tries to fix some sources. >> 4. Create the patch through git format-patch >> 5. Submit the patch through git send-email command. >> >> Dry run works fine with my repository. Could you please help? > > Your patches could not be applied with "patch -p1" from the root of the > kernel source tree, I think you created your git repo one directory too > deep. Thanks for correcting me. I have realized my mistake. I have submitted fresh patches. Thanks, Adil > > greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 4/4] Staging: winbond: wb35rx_s: Fixed coding style issue
On Thu, Nov 8, 2012 at 12:59 PM, Dan Carpenter wrote: > It's better to use more descriptive subjects on the patches. > > This one could probably have been broken into smaller patches > [patch 4/x] Staging: winbond: wb35rx_s: fix white space > [patch 5/x] Staging: winbond: wb35rx_s: fix comments > [patch 6/x] Staging: winbond: wb35rx_s: allow header to be included twice > > It's small enough that I don't have strong feelings about it, but > in general that's how you should do it. > Thanks Dan for your comment. I'll keep this in mind during my future work. Regards, Adil > regards, > dan carpenter > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 01/10] ext4: balloc: Fixed coding style issue
Fixed checkpatch.pl reported ERRORs Signed-off-by: Adil Mujeeb --- linux-3.7-rc1/fs/ext4/balloc.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/linux-3.7-rc1/fs/ext4/balloc.c b/linux-3.7-rc1/fs/ext4/balloc.c index 1b50890..395418d 100644 --- a/linux-3.7-rc1/fs/ext4/balloc.c +++ b/linux-3.7-rc1/fs/ext4/balloc.c @@ -246,7 +246,7 @@ unsigned ext4_free_clusters_after_init(struct super_block *sb, * @bh:pointer to the buffer head to store the block * group descriptor */ -struct ext4_group_desc * ext4_get_group_desc(struct super_block *sb, +struct ext4_group_desc *ext4_get_group_desc(struct super_block *sb, ext4_group_t block_group, struct buffer_head **bh) { @@ -700,7 +700,7 @@ static unsigned long ext4_bg_num_gdb_nometa(struct super_block *sb, if (!ext4_bg_has_super(sb, group)) return 0; - if (EXT4_HAS_INCOMPAT_FEATURE(sb,EXT4_FEATURE_INCOMPAT_META_BG)) + if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_META_BG)) return le32_to_cpu(EXT4_SB(sb)->s_es->s_first_meta_bg); else return EXT4_SB(sb)->s_gdb_count; @@ -721,11 +721,11 @@ unsigned long ext4_bg_num_gdb(struct super_block *sb, ext4_group_t group) le32_to_cpu(EXT4_SB(sb)->s_es->s_first_meta_bg); unsigned long metagroup = group / EXT4_DESC_PER_BLOCK(sb); - if (!EXT4_HAS_INCOMPAT_FEATURE(sb,EXT4_FEATURE_INCOMPAT_META_BG) || + if (!EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_META_BG) || metagroup < first_meta_bg) return ext4_bg_num_gdb_nometa(sb, group); - return ext4_bg_num_gdb_meta(sb,group); + return ext4_bg_num_gdb_meta(sb, group); } -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 02/10] ext4: block_validity: Fixed coding style issue
Fixed checkpatch.pl reported issue Signed-off-by: Adil Mujeeb --- linux-3.7-rc1/fs/ext4/block_validity.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/linux-3.7-rc1/fs/ext4/block_validity.c b/linux-3.7-rc1/fs/ext4/block_validity.c index 3f11656..d04018a 100644 --- a/linux-3.7-rc1/fs/ext4/block_validity.c +++ b/linux-3.7-rc1/fs/ext4/block_validity.c @@ -154,7 +154,7 @@ int ext4_setup_system_zone(struct super_block *sb) if (EXT4_SB(sb)->system_blks.rb_node) return 0; - for (i=0; i < ngroups; i++) { + for (i = 0; i < ngroups; i++) { if (ext4_bg_has_super(sb, i) && ((i < 5) || ((i % flex_size) == 0))) add_system_zone(sbi, ext4_group_first_block_no(sb, i), -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 03/10] ext4: ext4.h: fixed coding style issue
Fixed some of issues reported by checkpatch.pl Signed-off-by: Adil Mujeeb --- linux-3.7-rc1/fs/ext4/ext4.h | 27 --- 1 files changed, 12 insertions(+), 15 deletions(-) diff --git a/linux-3.7-rc1/fs/ext4/ext4.h b/linux-3.7-rc1/fs/ext4/ext4.h index 3ab2539..60e3802 100644 --- a/linux-3.7-rc1/fs/ext4/ext4.h +++ b/linux-3.7-rc1/fs/ext4/ext4.h @@ -289,8 +289,7 @@ struct ext4_io_submit { /* * Structure of a blocks group descriptor */ -struct ext4_group_desc -{ +struct ext4_group_desc { __le32 bg_block_bitmap_lo; /* Blocks bitmap block */ __le32 bg_inode_bitmap_lo; /* Inodes bitmap block */ __le32 bg_inode_table_lo; /* Inodes table block */ @@ -721,17 +720,17 @@ struct move_extent { static inline __le32 ext4_encode_extra_time(struct timespec *time) { - return cpu_to_le32((sizeof(time->tv_sec) > 4 ? + return cpu_to_le32((sizeof(time->tv_sec) > 4 ? (time->tv_sec >> 32) & EXT4_EPOCH_MASK : 0) | ((time->tv_nsec << EXT4_EPOCH_BITS) & EXT4_NSEC_MASK)); } static inline void ext4_decode_extra_time(struct timespec *time, __le32 extra) { - if (sizeof(time->tv_sec) > 4) + if (sizeof(time->tv_sec) > 4) time->tv_sec |= (__u64)(le32_to_cpu(extra) & EXT4_EPOCH_MASK) << 32; - time->tv_nsec = (le32_to_cpu(extra) & EXT4_NSEC_MASK) >> EXT4_EPOCH_BITS; + time->tv_nsec = (le32_to_cpu(extra) & EXT4_NSEC_MASK) >> EXT4_EPOCH_BITS; } #define EXT4_INODE_SET_XTIME(xtime, inode, raw_inode) \ @@ -1099,7 +1098,7 @@ struct ext4_super_block { __le32 s_r_blocks_count_hi;/* Reserved blocks count */ __le32 s_free_blocks_count_hi; /* Free blocks count */ __le16 s_min_extra_isize; /* All inodes have at least # bytes */ - __le16 s_want_extra_isize; /* New inodes should reserve # bytes */ + __le16 s_want_extra_isize; /* New inodes should reserve # bytes */ __le32 s_flags;/* Miscellaneous flags */ __le16 s_raid_stride; /* RAID stride */ __le16 s_mmp_update_interval; /* # seconds to wait in MMP checking */ @@ -1164,7 +1163,7 @@ struct ext4_sb_info { unsigned int s_cluster_ratio; /* Number of blocks per cluster */ unsigned int s_cluster_bits;/* log2 of s_cluster_ratio */ loff_t s_bitmap_maxbytes; /* max bytes for bitmap files */ - struct buffer_head * s_sbh; /* Buffer containing the super block */ + struct buffer_head *s_sbh; /* Buffer containing the super block */ struct ext4_super_block *s_es; /* Pointer to the super block in the buffer */ struct buffer_head **s_group_desc; unsigned int s_mount_opt; @@ -1686,7 +1685,7 @@ static inline u32 ext4_chksum(struct ext4_sb_info *sbi, u32 crc, } desc; int err; - BUG_ON(crypto_shash_descsize(sbi->s_chksum_driver)!=sizeof(desc.ctx)); + BUG_ON(crypto_shash_descsize(sbi->s_chksum_driver) != sizeof(desc.ctx)); desc.shash.tfm = sbi->s_chksum_driver; desc.shash.flags = 0; @@ -1701,8 +1700,7 @@ static inline u32 ext4_chksum(struct ext4_sb_info *sbi, u32 crc, #ifdef __KERNEL__ /* hash info structure used by the directory hash */ -struct dx_hash_info -{ +struct dx_hash_info { u32 hash; u32 minor_hash; int hash_version; @@ -1724,8 +1722,7 @@ struct dx_hash_info /* * Describe an inode's exact location on disk and in memory */ -struct ext4_iloc -{ +struct ext4_iloc { struct buffer_head *bh; unsigned long offset; ext4_group_t block_group; @@ -1908,9 +1905,9 @@ extern int ext4_claim_free_clusters(struct ext4_sb_info *sbi, s64 nclusters, unsigned int flags); extern ext4_fsblk_t ext4_count_free_clusters(struct super_block *); extern void ext4_check_blocks_bitmap(struct super_block *); -extern struct ext4_group_desc * ext4_get_group_desc(struct super_block * sb, +extern struct ext4_group_desc *ext4_get_group_desc(struct super_block *sb, ext4_group_t block_group, - struct buffer_head ** bh); + struct buffer_head **bh); extern int ext4_should_retry_alloc(struct super_block *sb, int *retries); extern struct buffer_head *ext4_read_block_bitmap_nowait(struct super_block *sb, @@ -1958,7 +1955,7 @@ extern struct inode *ext4_new_inode(handle_t *, struct inode *, umode_t, const struct qstr *qstr, __u32 goal, uid_t *owner); extern void ext4_free_inode(handle_t *, struct inode *); -extern str
[PATCH 04/10] ext4: extents: Fixed coding style issue
Fixed checkpatch.pl reported issue Signed-off-by: Adil Mujeeb --- linux-3.7-rc1/fs/ext4/extents.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/linux-3.7-rc1/fs/ext4/extents.c b/linux-3.7-rc1/fs/ext4/extents.c index 1c94cca..599ce00 100644 --- a/linux-3.7-rc1/fs/ext4/extents.c +++ b/linux-3.7-rc1/fs/ext4/extents.c @@ -3367,7 +3367,7 @@ static void unmap_underlying_metadata_blocks(struct block_device *bdev, { int i; for (i = 0; i < count; i++) -unmap_underlying_metadata(bdev, block + i); + unmap_underlying_metadata(bdev, block + i); } /* @@ -4096,7 +4096,7 @@ got_allocated_blocks: ext4_ext_store_pblock(&newex, newblock + offset); newex.ee_len = cpu_to_le16(ar.len); /* Mark uninitialized */ - if (flags & EXT4_GET_BLOCKS_UNINIT_EXT){ + if (flags & EXT4_GET_BLOCKS_UNINIT_EXT) { ext4_ext_mark_uninitialized(&newex); /* * io_end structure was created for every IO write to an @@ -4527,7 +4527,7 @@ int ext4_convert_unwritten_extents(struct inode *inode, loff_t offset, } ext4_mark_inode_dirty(handle, inode); ret2 = ext4_journal_stop(handle); - if (ret <= 0 || ret2 ) + if (ret <= 0 || ret2) break; } return ret > 0 ? ret2 : ret; -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 05/10] ext4: file: Fixed coding style issue
Removed errors reported by checkpatch.pl Signed-off-by: Adil Mujeeb --- linux-3.7-rc1/fs/ext4/file.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/linux-3.7-rc1/fs/ext4/file.c b/linux-3.7-rc1/fs/ext4/file.c index bf3966b..17068a7 100644 --- a/linux-3.7-rc1/fs/ext4/file.c +++ b/linux-3.7-rc1/fs/ext4/file.c @@ -43,8 +43,7 @@ static int ext4_release_file(struct inode *inode, struct file *filp) /* if we are the last writer on the inode, drop the block reservation */ if ((filp->f_mode & FMODE_WRITE) && (atomic_read(&inode->i_writecount) == 1) && - !EXT4_I(inode)->i_reserved_data_blocks) - { + !EXT4_I(inode)->i_reserved_data_blocks) { down_write(&EXT4_I(inode)->i_data_sem); ext4_discard_preallocations(inode); up_write(&EXT4_I(inode)->i_data_sem); @@ -221,7 +220,7 @@ static int ext4_file_mmap(struct file *file, struct vm_area_struct *vma) return 0; } -static int ext4_file_open(struct inode * inode, struct file * filp) +static int ext4_file_open(struct inode *inode, struct file *filp) { struct super_block *sb = inode->i_sb; struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 06/10] ext4: ialloc: Fixed coding style issue
Fixed one of checkpatch.pl reported issue Signed-off-by: Adil Mujeeb --- linux-3.7-rc1/fs/ext4/ialloc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/linux-3.7-rc1/fs/ext4/ialloc.c b/linux-3.7-rc1/fs/ext4/ialloc.c index fa36372..2e63f4a 100644 --- a/linux-3.7-rc1/fs/ext4/ialloc.c +++ b/linux-3.7-rc1/fs/ext4/ialloc.c @@ -1086,7 +1086,7 @@ unsigned long ext4_count_free_inodes(struct super_block *sb) } /* Called at mount-time, super-block is locked */ -unsigned long ext4_count_dirs(struct super_block * sb) +unsigned long ext4_count_dirs(struct super_block *sb) { unsigned long count = 0; ext4_group_t i, ngroups = ext4_get_groups_count(sb); -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 07/10] ext4: inode: Fixed coding style issue
Fixed coding style issue reported by checkpatch.pl Signed-off-by: Adil Mujeeb --- linux-3.7-rc1/fs/ext4/inode.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/linux-3.7-rc1/fs/ext4/inode.c b/linux-3.7-rc1/fs/ext4/inode.c index b3c243b..a174620 100644 --- a/linux-3.7-rc1/fs/ext4/inode.c +++ b/linux-3.7-rc1/fs/ext4/inode.c @@ -2880,7 +2880,7 @@ static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset, bool is_async) { struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode; -ext4_io_end_t *io_end = iocb->private; + ext4_io_end_t *io_end = iocb->private; /* if not async direct IO or dio with 0 bytes write, just return */ if (!io_end || !size) @@ -3435,9 +3435,9 @@ static int ext4_discard_partial_page_buffers_no_lock(handle_t *handle, zero_user(page, pos, range_to_discard); err = 0; - if (ext4_should_journal_data(inode)) { + if (ext4_should_journal_data(inode)) err = ext4_handle_dirty_metadata(handle, inode, bh); - } else + else mark_buffer_dirty(bh); BUFFER_TRACE(bh, "Partial buffer zeroed"); -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 08/10] ext4: ioctl: Fixed coding style issue
Fixed checkpatch.pl reported issue Signed-off-by: Adil Mujeeb --- linux-3.7-rc1/fs/ext4/ioctl.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-3.7-rc1/fs/ext4/ioctl.c b/linux-3.7-rc1/fs/ext4/ioctl.c index 5747f52..a534615 100644 --- a/linux-3.7-rc1/fs/ext4/ioctl.c +++ b/linux-3.7-rc1/fs/ext4/ioctl.c @@ -194,7 +194,7 @@ setversion_out: } case EXT4_IOC_GROUP_EXTEND: { ext4_fsblk_t n_blocks_count; - int err, err2=0; + int err, err2 = 0; err = ext4_resize_begin(sb); if (err) @@ -280,7 +280,7 @@ mext_out: case EXT4_IOC_GROUP_ADD: { struct ext4_new_group_data input; - int err, err2=0; + int err, err2 = 0; err = ext4_resize_begin(sb); if (err) -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 09/10] ext4: namei: Fixed coding style issue
Fixed checkpatch.pl reported issues Signed-off-by: Adil Mujeeb --- linux-3.7-rc1/fs/ext4/namei.c | 135 ++--- 1 files changed, 58 insertions(+), 77 deletions(-) diff --git a/linux-3.7-rc1/fs/ext4/namei.c b/linux-3.7-rc1/fs/ext4/namei.c index 6d600a6..44b7d09 100644 --- a/linux-3.7-rc1/fs/ext4/namei.c +++ b/linux-3.7-rc1/fs/ext4/namei.c @@ -47,7 +47,7 @@ #define NAMEI_RA_CHUNKS 2 #define NAMEI_RA_BLOCKS 4 #define NAMEI_RA_SIZE (NAMEI_RA_CHUNKS * NAMEI_RA_BLOCKS) -#define NAMEI_RA_INDEX(c,b) (((c) * NAMEI_RA_BLOCKS) + (b)) +#define NAMEI_RA_INDEX(c , b) (((c) * NAMEI_RA_BLOCKS) + (b)) static struct buffer_head *ext4_append(handle_t *handle, struct inode *inode, @@ -93,22 +93,19 @@ static struct buffer_head *ext4_append(handle_t *handle, #define dxtrace(command) #endif -struct fake_dirent -{ +struct fake_dirent { __le32 inode; __le16 rec_len; u8 name_len; u8 file_type; }; -struct dx_countlimit -{ +struct dx_countlimit { __le16 limit; __le16 count; }; -struct dx_entry -{ +struct dx_entry { __le32 hash; __le32 block; }; @@ -119,14 +116,12 @@ struct dx_entry * hash version mod 4 should never be 0. Sincerely, the paranoia department. */ -struct dx_root -{ +struct dx_root { struct fake_dirent dot; char dot_name[4]; struct fake_dirent dotdot; char dotdot_name[4]; - struct dx_root_info - { + struct dx_root_info { __le32 reserved_zero; u8 hash_version; u8 info_length; /* 8 */ @@ -137,22 +132,19 @@ struct dx_root struct dx_entry entries[0]; }; -struct dx_node -{ +struct dx_node { struct fake_dirent fake; struct dx_entry entries[0]; }; -struct dx_frame -{ +struct dx_frame { struct buffer_head *bh; struct dx_entry *entries; struct dx_entry *at; }; -struct dx_map_entry -{ +struct dx_map_entry { u32 hash; u16 offs; u16 size; @@ -187,14 +179,14 @@ static int dx_make_map(struct ext4_dir_entry_2 *de, unsigned blocksize, static void dx_sort_map(struct dx_map_entry *map, unsigned count); static struct ext4_dir_entry_2 *dx_move_dirents(char *from, char *to, struct dx_map_entry *offsets, int count, unsigned blocksize); -static struct ext4_dir_entry_2* dx_pack_dirents(char *base, unsigned blocksize); +static struct ext4_dir_entry_2 *dx_pack_dirents(char *base, unsigned blocksize); static void dx_insert_block(struct dx_frame *frame, u32 hash, ext4_lblk_t block); static int ext4_htree_next_block(struct inode *dir, __u32 hash, struct dx_frame *frame, struct dx_frame *frames, __u32 *start_hash); -static struct buffer_head * ext4_dx_find_entry(struct inode *dir, +static struct buffer_head *ext4_dx_find_entry(struct inode *dir, const struct qstr *d_name, struct ext4_dir_entry_2 **res_dir, int *err); @@ -505,9 +497,9 @@ static inline unsigned dx_node_limit(struct inode *dir) * Debug */ #ifdef DX_DEBUG -static void dx_show_index(char * label, struct dx_entry *entries) +static void dx_show_index(char *label, struct dx_entry *entries) { - int i, n = dx_get_count (entries); + int i, n = dx_get_count(entries); printk(KERN_DEBUG "%s index ", label); for (i = 0; i < n; i++) { printk("%x->%lu ", i ? dx_get_hash(entries + i) : @@ -516,8 +508,7 @@ static void dx_show_index(char * label, struct dx_entry *entries) printk("\n"); } -struct stats -{ +struct stats { unsigned names; unsigned space; unsigned bcount; @@ -531,12 +522,9 @@ static struct stats dx_show_leaf(struct dx_hash_info *hinfo, struct ext4_dir_ent struct dx_hash_info h = *hinfo; printk("names: "); - while ((char *) de < base + size) - { - if (de->inode) - { - if (show_names) - { + while ((char *) de < base + size) { + if (de->inode) { + if (show_names) { int len = de->name_len; char *name = de->name; while (len--) printk("%c", *name++); @@ -562,14 +550,13 @@ struct stats dx_show_entries(struct dx_hash_info *hinfo, struct inode *dir, struct buffer_head *bh; int err; printk("%i indexed blocks...\n", count); - for (i = 0; i < count; i++, entries++) - { + for (i = 0; i < count; i++, entries++) { ext4_lblk_t block = dx_get_block(entries);
[PATCH 10/10] ext4: resize: Fixed coding style issue
Fixed checkpatch.pl reported issues Signed-off-by: Adil Mujeeb --- linux-3.7-rc1/fs/ext4/resize.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/linux-3.7-rc1/fs/ext4/resize.c b/linux-3.7-rc1/fs/ext4/resize.c index 7a75e10..c00bb81 100644 --- a/linux-3.7-rc1/fs/ext4/resize.c +++ b/linux-3.7-rc1/fs/ext4/resize.c @@ -691,7 +691,7 @@ static int verify_reserved_gdb(struct super_block *sb, while ((grp = ext4_list_backups(sb, &three, &five, &seven)) < end) { if (le32_to_cpu(*p++) != - grp * EXT4_BLOCKS_PER_GROUP(sb) + blk){ + grp * EXT4_BLOCKS_PER_GROUP(sb) + blk) { ext4_warning(sb, "reserved GDT %llu" " missing grp %d (%llu)", blk, grp, @@ -917,7 +917,7 @@ static int reserve_backup_gdb(handle_t *handle, struct inode *inode, ext4_group_t group) { struct super_block *sb = inode->i_sb; - int reserved_gdb =le16_to_cpu(EXT4_SB(sb)->s_es->s_reserved_gdt_blocks); + int reserved_gdb = le16_to_cpu(EXT4_SB(sb)->s_es->s_reserved_gdt_blocks); struct buffer_head **primary; struct buffer_head *dind; struct ext4_iloc iloc; @@ -1232,7 +1232,7 @@ static int ext4_setup_new_descs(handle_t *handle, struct super_block *sb, ext4_group_tgroup; __u16 *bg_flags = flex_gd->bg_flags; int i, gdb_off, gdb_num, err = 0; - + for (i = 0; i < flex_gd->count; i++, group_data++, bg_flags++) { group = group_data->group; -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/