[PATCH] Drivers:staging:wlan-ng: Fixed checkpatch warning
The following checkpatch warning was fixed WARNING: line over 80 characters Signed-off-by: Athira Lekshmi C V --- drivers/staging/wlan-ng/prism2fw.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wlan-ng/prism2fw.c b/drivers/staging/wlan-ng/prism2fw.c index e907380..8e1da3c 100644 --- a/drivers/staging/wlan-ng/prism2fw.c +++ b/drivers/staging/wlan-ng/prism2fw.c @@ -238,7 +238,8 @@ static int prism2_fwtry(struct usb_device *udev, wlandevice_t *wlandev) * 0 - success * ~0 - failure */ -static int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev) +static int prism2_fwapply(const struct ihex_binrec *rfptr, + wlandevice_t *wlandev) { signed int result = 0; struct p80211msg_dot11req_mibget getmsg; @@ -707,7 +708,9 @@ static int plugimage(struct imgchunk *fchunk, unsigned int nfchunks, continue; } - /* Validate plug address against chunk data and identify chunk */ + /* Validate plug address against chunk data and +* identify chunk +*/ for (c = 0; c < nfchunks; c++) { cstart = fchunk[c].addr; cend = fchunk[c].addr + fchunk[c].len; @@ -922,7 +925,8 @@ static int read_fwfile(const struct ihex_binrec *record) rcnt, s3info[ns3info].len, s3info[ns3info].type); - if (((s3info[ns3info].len - 1) * sizeof(u16)) > sizeof(s3info[ns3info].info)) { + if (((s3info[ns3info].len - 1) * sizeof(u16)) > + sizeof(s3info[ns3info].info)) { pr_err("S3 inforec length too long - aborting\n"); return 1; } -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: media: lirc: lirc_serial: replaced printk with pr_debug
Em Fri, 21 Nov 2014 14:21:40 +0100 Abel Moyo escreveu: > Replaced printk with pr_debug in dprintk > > Signed-off-by: Abel Moyo > --- > drivers/staging/media/lirc/lirc_serial.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/media/lirc/lirc_serial.c > b/drivers/staging/media/lirc/lirc_serial.c > index 181b92b..86c5274 100644 > --- a/drivers/staging/media/lirc/lirc_serial.c > +++ b/drivers/staging/media/lirc/lirc_serial.c > @@ -116,7 +116,7 @@ static bool txsense; /* 0 = active high, 1 = active > low */ > #define dprintk(fmt, args...)\ > do {\ > if (debug) \ > - printk(KERN_DEBUG LIRC_DRIVER_NAME ": " \ > + pr_debug(LIRC_DRIVER_NAME ": " \ > fmt, ## args); \ > } while (0) > No, this is a bad idea. If dynamic_printk is enabled, in order to activate the debug messages, it would be required to enable debug modprobe parameter _and_ to enable each debug msg individually. We should either use one or the other approach. Regards, Mauro ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Drivers:staging:vt6656: Fixed checkpatch warning
Fixed the checkpatch warning: WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2) Signed-off-by: Athira Lekshmi C V --- drivers/staging/vt6656/rxtx.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index ea5140a..ede71a4 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c @@ -392,8 +392,8 @@ static int vnt_fill_ieee80211_rts(struct vnt_usb_send_context *tx_context, rts->frame_control = cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_RTS); - memcpy(rts->ra, hdr->addr1, ETH_ALEN); - memcpy(rts->ta, hdr->addr2, ETH_ALEN); + ether_addr_copy(rts->ra, hdr->addr1); + ether_addr_copy(rts->ta, hdr->addr2); return 0; } @@ -552,7 +552,7 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context, buf->data.frame_control = cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CTS); - memcpy(buf->data.ra, priv->current_net_addr, ETH_ALEN); + ether_addr_copy(buf->data.ra, priv->current_net_addr); return vnt_rxtx_datahead_g_fb(tx_context, &buf->data_head); } else { @@ -570,7 +570,7 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context, buf->data.frame_control = cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CTS); - memcpy(buf->data.ra, priv->current_net_addr, ETH_ALEN); + ether_addr_copy(buf->data.ra, priv->current_net_addr); return vnt_rxtx_datahead_g(tx_context, &buf->data_head); } @@ -739,7 +739,7 @@ static void vnt_fill_txkey(struct vnt_usb_send_context *tx_context, mic_hdr->id = 0x59; mic_hdr->payload_len = cpu_to_be16(payload_len); - memcpy(mic_hdr->mic_addr2, hdr->addr2, ETH_ALEN); + ether_addr_copy(mic_hdr->mic_addr2, hdr->addr2); ieee80211_get_key_tx_seq(tx_key, &seq); @@ -750,9 +750,9 @@ static void vnt_fill_txkey(struct vnt_usb_send_context *tx_context, else mic_hdr->hlen = cpu_to_be16(22); - memcpy(mic_hdr->addr1, hdr->addr1, ETH_ALEN); - memcpy(mic_hdr->addr2, hdr->addr2, ETH_ALEN); - memcpy(mic_hdr->addr3, hdr->addr3, ETH_ALEN); + ether_addr_copy(mic_hdr->addr1, hdr->addr1); + ether_addr_copy(mic_hdr->addr2, hdr->addr2); + ether_addr_copy(mic_hdr->addr3, hdr->addr3); mic_hdr->frame_control = cpu_to_le16( le16_to_cpu(hdr->frame_control) & 0xc78f); @@ -760,7 +760,7 @@ static void vnt_fill_txkey(struct vnt_usb_send_context *tx_context, le16_to_cpu(hdr->seq_ctrl) & 0xf); if (ieee80211_has_a4(hdr->frame_control)) - memcpy(mic_hdr->addr4, hdr->addr4, ETH_ALEN); + ether_addr_copy(mic_hdr->addr4, hdr->addr4); memcpy(key_buffer, tx_key->key, WLAN_KEY_LEN_CCMP); -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Drivers:staging:vt6656: Fixed checkpatch warning
On Tue, Nov 25, 2014 at 05:45:40PM +0530, Athira Lekshmi C V wrote: > Fixed the checkpatch warning: > WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are > __aligned(2) For these changes the change log must say how you determined both source and destination are aligned correctly. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: octeon: Fix checkpatch warning
This patch fixes the checkpatch.pl warnings: WARNING: line over 80 characters + int cores_in_use = core_state.baseline_cores - atomic_read(&core_state.available_cores); WARNING: line over 80 characters + skb->data = skb->head + work->packet_ptr.s.addr - cvmx_ptr_to_phys(skb->head); Signed-off-by: Luis de Bethencourt --- drivers/staging/octeon/ethernet-rx.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c index 44e372f..bd83f55 100644 --- a/drivers/staging/octeon/ethernet-rx.c +++ b/drivers/staging/octeon/ethernet-rx.c @@ -295,7 +295,8 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) */ union cvmx_pow_wq_int_cntx counts; int backlog; - int cores_in_use = core_state.baseline_cores - atomic_read(&core_state.available_cores); + int cores_in_use = core_state.baseline_cores - + atomic_read(&core_state.available_cores); counts.u64 = cvmx_read_csr(CVMX_POW_WQ_INT_CNTX(pow_receive_group)); backlog = counts.s.iq_cnt + counts.s.ds_cnt; if (backlog > budget * cores_in_use && napi != NULL) @@ -324,7 +325,8 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) * buffer. */ if (likely(skb_in_hw)) { - skb->data = skb->head + work->packet_ptr.s.addr - cvmx_ptr_to_phys(skb->head); + skb->data = skb->head + work->packet_ptr.s.addr - + cvmx_ptr_to_phys(skb->head); prefetch(skb->data); skb->len = work->len; skb_set_tail_pointer(skb, skb->len); -- 2.1.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Drivers:Staging:vt6656: Fixed checkpatch warning
Fixed the checkpatch warning: WARNING: else is not generally useful after a break or return Signed-off-by: Athira Lekshmi C V --- drivers/staging/vt6656/rxtx.c | 35 --- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index ea5140a..af79be8 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c @@ -555,27 +555,24 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context, memcpy(buf->data.ra, priv->current_net_addr, ETH_ALEN); return vnt_rxtx_datahead_g_fb(tx_context, &buf->data_head); - } else { - struct vnt_cts *buf = &head->cts_g; - /* Get SignalField,ServiceField,Length */ - vnt_get_phy_field(priv, cts_frame_len, - priv->top_cck_basic_rate, PK_TYPE_11B, &buf->b); - /* Get CTSDuration_ba */ - buf->duration_ba = - vnt_get_rtscts_duration_le(tx_context, CTSDUR_BA, - tx_context->pkt_type, - current_rate); - /*Get CTS Frame body*/ - buf->data.duration = buf->duration_ba; - buf->data.frame_control = - cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CTS); - - memcpy(buf->data.ra, priv->current_net_addr, ETH_ALEN); - - return vnt_rxtx_datahead_g(tx_context, &buf->data_head); } + struct vnt_cts *buf = &head->cts_g; + /* Get SignalField,ServiceField,Length */ + vnt_get_phy_field(priv, cts_frame_len, + priv->top_cck_basic_rate, PK_TYPE_11B, &buf->b); + /* Get CTSDuration_ba */ + buf->duration_ba = + vnt_get_rtscts_duration_le(tx_context, CTSDUR_BA, + tx_context->pkt_type, + current_rate); + /*Get CTS Frame body*/ + buf->data.duration = buf->duration_ba; + buf->data.frame_control = + cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CTS); - return 0; + memcpy(buf->data.ra, priv->current_net_addr, ETH_ALEN); + + return vnt_rxtx_datahead_g(tx_context, &buf->data_head); } static u16 vnt_rxtx_rts(struct vnt_usb_send_context *tx_context, -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Drivers:Staging:vt6656: Fixed checkpatch warning
On Tue, Nov 25, 2014 at 07:05:51PM +0530, Athira Lekshmi C V wrote: > Fixed the checkpatch warning: > WARNING: else is not generally useful after a break or return > This patch adds a compile warning. > Signed-off-by: Athira Lekshmi C V Btw, signing and from should be your legal name that you would use for signing a document. The signed off by is supposed to mean that you didn't violate copyrights. If you normally sign with "C V" that's fine as well. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/1] IMX-DRM-core: Deletion of a check before drm_fbdev_cma_restore_mode()
From: Markus Elfring Date: Tue, 25 Nov 2014 16:06:19 +0100 The drm_fbdev_cma_restore_mode() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/staging/imx-drm/imx-drm-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c index 6b22106..0a1ecef 100644 --- a/drivers/staging/imx-drm/imx-drm-core.c +++ b/drivers/staging/imx-drm/imx-drm-core.c @@ -64,8 +64,7 @@ static void imx_drm_driver_lastclose(struct drm_device *drm) #if IS_ENABLED(CONFIG_DRM_IMX_FB_HELPER) struct imx_drm_device *imxdrm = drm->dev_private; - if (imxdrm->fbhelper) - drm_fbdev_cma_restore_mode(imxdrm->fbhelper); + drm_fbdev_cma_restore_mode(imxdrm->fbhelper); #endif } -- 2.1.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/1] staging: ozwpan: Deletion of unnecessary checks before the function call "oz_free_urb_link"
From: Markus Elfring Date: Tue, 25 Nov 2014 16:51:08 +0100 The oz_free_urb_link() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/staging/ozwpan/ozhcd.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c index 30bd928..c9b6d98 100644 --- a/drivers/staging/ozwpan/ozhcd.c +++ b/drivers/staging/ozwpan/ozhcd.c @@ -411,8 +411,7 @@ static void oz_complete_urb(struct usb_hcd *hcd, struct urb *urb, } spin_lock(&g_tasklet_lock); spin_unlock_irqrestore(&g_tasklet_lock, irq_state); - if (cancel_urbl) - oz_free_urb_link(cancel_urbl); + oz_free_urb_link(cancel_urbl); } /* @@ -581,8 +580,7 @@ static int oz_dequeue_ep_urb(struct oz_port *port, u8 ep_addr, int in_dir, } } spin_unlock_bh(&port->ozhcd->hcd_lock); - if (urbl) - oz_free_urb_link(urbl); + oz_free_urb_link(urbl); return urbl ? 0 : -EIDRM; } -- 2.1.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: bcm: nvm: Fixed spelling errors, that may break grep.
Changing the following: Adapater -> Adapter STATUS_SUCESS -> STATUS_SUCCESS Signed-off by: Siddharth Kannan --- drivers/staging/bcm/nvm.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/bcm/nvm.c b/drivers/staging/bcm/nvm.c index ce09473..3cb6eed 100644 --- a/drivers/staging/bcm/nvm.c +++ b/drivers/staging/bcm/nvm.c @@ -2953,7 +2953,7 @@ int BcmFlash2xBulkWrite(struct bcm_mini_adapter *Adapter, * @Adapter :-Drivers private Data Structure * * Return Value:- - * Return STATUS_SUCESS if get success in setting the right DSD else negative error code + * Return STATUS_SUCCESS if get success in setting the right DSD else negative error code * */ @@ -2994,7 +2994,7 @@ static int BcmGetActiveDSD(struct bcm_mini_adapter *Adapter) * @Adapter : Driver private Data Structure * * Return Value:- - * Sucsess:- STATUS_SUCESS + * Success:- STATUS_SUCCESS * Failure- : negative erro code * */ @@ -3083,7 +3083,7 @@ static int BcmDumpFlash2xSectionBitMap(struct bcm_flash2x_bitmap *psFlash2xBitMa * @Adapter:-Driver private Data Structure * * Return value:- - * Success:- STATUS_SUCESS + * Success:- STATUS_SUCCESS * Failure:- negative error code */ @@ -3330,7 +3330,7 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl * BcmSetActiveSection :- Set Active section is used to make priority field highest over other * section of same type. * - * @Adapater :- Bcm Driver Private Data Structure + * @Adapter :- Bcm Driver Private Data Structure * @eFlash2xSectionVal :- Flash section val whose priority has to be made highest. * * Return Value:- Make the priorit highest else return erorr code @@ -3510,7 +3510,7 @@ int BcmSetActiveSection(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_secti /* * BcmCopyISO - Used only for copying the ISO section - * @Adapater :- Bcm Driver Private Data Structure + * @Adapter :- Bcm Driver Private Data Structure * @sCopySectStrut :- Section copy structure * * Return value:- SUCCESS if copies successfully else negative error code @@ -3792,7 +3792,7 @@ out: /* * BcmFlash2xCorruptSig : this API is used to corrupt the written sig in Bcm Header present in flash section. * It will corrupt the sig, if Section is writable, by making first bytes as zero. - * @Adapater :- Bcm Driver Private Data Structure + * @Adapter :- Bcm Driver Private Data Structure * @eFlash2xSectionVal :- Flash section val which has header * * Return Value :- @@ -3820,7 +3820,7 @@ int BcmFlash2xCorruptSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_sect /* *BcmFlash2xWriteSig :-this API is used to Write the sig if requested Section has * header and Write Permission. - * @Adapater :- Bcm Driver Private Data Structure + * @Adapter :- Bcm Driver Private Data Structure * @eFlashSectionVal :- Flash section val which has header * * Return Value :- @@ -3882,7 +3882,7 @@ int BcmFlash2xWriteSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_sectio /* * validateFlash2xReadWrite :- This API is used to validate the user request for Read/Write. * if requested Bytes goes beyond the Requested section, it reports error. - * @Adapater :- Bcm Driver Private Data Structure + * @Adapter :- Bcm Driver Private Data Structure * @psFlash2xReadWrite :-Flash2x Read/write structure pointer * * Return values:-Return TRUE is request is valid else false. @@ -3950,7 +3950,7 @@ int validateFlash2xReadWrite(struct bcm_mini_adapter *Adapter, struct bcm_flash2 /* * IsFlash2x :- check for Flash 2.x - * Adapater :- Bcm Driver Private Data Structure + * Adapter :- Bcm Driver Private Data Structure * * Return value:- * return TRUE if flah2.x of hgher version else return false. @@ -3966,7 +3966,7 @@ int IsFlash2x(struct bcm_mini_adapter *Adapter) /* * GetFlashBaseAddr :- Calculate the Flash Base address - * @Adapater :- Bcm Driver Private Data Structure + * @Adapter :- Bcm Driver Private Data Structure * * Return Value:- * Success :- Base Address of the Flash @@ -4005,7 +4005,7 @@ static int GetFlashBaseAddr(struct bcm_mini_adapter *Adapter) * BcmCopySection :- This API is used to copy the One section in another. Both section should * be contiuous and of same size. Hence this Will not be applicabe to copy ISO. * - * @Adapater :- Bcm Driver Private Data Structure + * @Adapter :- Bcm Driver Private Data Structure * @SrcSection :- Source section From where data has to be copied * @DstSection :- Destination section to which data has to be copied * @offset :- Offset from/to where data has to be copied from one section to another. @@ -4112,7 +4112,7 @@ int BcmCopySection(struct bcm_mini_adapter *Adapter, /* * SaveHeaderIfPresent :- This API is use to Protect the Header in case of Header Sector write
Re: [PATCH] staging: bcm: nvm: Fixed spelling errors, that may break grep.
On Tue, Nov 25, 2014 at 11:00:35PM +0530, icyflame wrote: > Changing the following: > > Adapater -> Adapter > STATUS_SUCESS -> STATUS_SUCCESS > > Signed-off by: Siddharth Kannan > --- > drivers/staging/bcm/nvm.c | 26 +- > 1 file changed, 13 insertions(+), 13 deletions(-) Your "From:" line name does not match your Signed-off-by: line (and you typoed Signed-off-by:), so I can't take this patch, sorry. Please fix and resend. greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: bcm: nvm: Fixed spelling errors, that may break grep.
Your From email header should match your signed-off-by line. The BCM driver was deleted. You should be working against linux-next. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: bcm: nvm: Fixed spelling errors, that may break grep.
Don't send private messages. On Tue, Nov 25, 2014 at 06:18:55PM +, Siddharth Kannan wrote: > Due to some network limitations, I was unable to clone the repository using > the ssh URL given on the KernelBuild Linux Newbies page. > > So, I cloned it from the github repo. (Linus Torvalds. torvalds/linux on > github using HTTPS). It had only one branch "master" when I cloned it. How > do I get the linux-next branch? > After the first clone then you can use any network. I have used really bad internet cafes in Africa and it was ok. https://www.kernel.org/doc/man-pages/linux-next.html regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: bcm: nvm: Fixed spelling errors, that may break grep.
Changing the following: Adapater -> Adapter STATUS_SUCESS -> STATUS_SUCCESS Signed-off-by: Siddharth Kannan --- drivers/staging/bcm/nvm.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/bcm/nvm.c b/drivers/staging/bcm/nvm.c index ce09473..3cb6eed 100644 --- a/drivers/staging/bcm/nvm.c +++ b/drivers/staging/bcm/nvm.c @@ -2953,7 +2953,7 @@ int BcmFlash2xBulkWrite(struct bcm_mini_adapter *Adapter, * @Adapter :-Drivers private Data Structure * * Return Value:- - * Return STATUS_SUCESS if get success in setting the right DSD else negative error code + * Return STATUS_SUCCESS if get success in setting the right DSD else negative error code * */ @@ -2994,7 +2994,7 @@ static int BcmGetActiveDSD(struct bcm_mini_adapter *Adapter) * @Adapter : Driver private Data Structure * * Return Value:- - * Sucsess:- STATUS_SUCESS + * Success:- STATUS_SUCCESS * Failure- : negative erro code * */ @@ -3083,7 +3083,7 @@ static int BcmDumpFlash2xSectionBitMap(struct bcm_flash2x_bitmap *psFlash2xBitMa * @Adapter:-Driver private Data Structure * * Return value:- - * Success:- STATUS_SUCESS + * Success:- STATUS_SUCCESS * Failure:- negative error code */ @@ -3330,7 +3330,7 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl * BcmSetActiveSection :- Set Active section is used to make priority field highest over other * section of same type. * - * @Adapater :- Bcm Driver Private Data Structure + * @Adapter :- Bcm Driver Private Data Structure * @eFlash2xSectionVal :- Flash section val whose priority has to be made highest. * * Return Value:- Make the priorit highest else return erorr code @@ -3510,7 +3510,7 @@ int BcmSetActiveSection(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_secti /* * BcmCopyISO - Used only for copying the ISO section - * @Adapater :- Bcm Driver Private Data Structure + * @Adapter :- Bcm Driver Private Data Structure * @sCopySectStrut :- Section copy structure * * Return value:- SUCCESS if copies successfully else negative error code @@ -3792,7 +3792,7 @@ out: /* * BcmFlash2xCorruptSig : this API is used to corrupt the written sig in Bcm Header present in flash section. * It will corrupt the sig, if Section is writable, by making first bytes as zero. - * @Adapater :- Bcm Driver Private Data Structure + * @Adapter :- Bcm Driver Private Data Structure * @eFlash2xSectionVal :- Flash section val which has header * * Return Value :- @@ -3820,7 +3820,7 @@ int BcmFlash2xCorruptSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_sect /* *BcmFlash2xWriteSig :-this API is used to Write the sig if requested Section has * header and Write Permission. - * @Adapater :- Bcm Driver Private Data Structure + * @Adapter :- Bcm Driver Private Data Structure * @eFlashSectionVal :- Flash section val which has header * * Return Value :- @@ -3882,7 +3882,7 @@ int BcmFlash2xWriteSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_sectio /* * validateFlash2xReadWrite :- This API is used to validate the user request for Read/Write. * if requested Bytes goes beyond the Requested section, it reports error. - * @Adapater :- Bcm Driver Private Data Structure + * @Adapter :- Bcm Driver Private Data Structure * @psFlash2xReadWrite :-Flash2x Read/write structure pointer * * Return values:-Return TRUE is request is valid else false. @@ -3950,7 +3950,7 @@ int validateFlash2xReadWrite(struct bcm_mini_adapter *Adapter, struct bcm_flash2 /* * IsFlash2x :- check for Flash 2.x - * Adapater :- Bcm Driver Private Data Structure + * Adapter :- Bcm Driver Private Data Structure * * Return value:- * return TRUE if flah2.x of hgher version else return false. @@ -3966,7 +3966,7 @@ int IsFlash2x(struct bcm_mini_adapter *Adapter) /* * GetFlashBaseAddr :- Calculate the Flash Base address - * @Adapater :- Bcm Driver Private Data Structure + * @Adapter :- Bcm Driver Private Data Structure * * Return Value:- * Success :- Base Address of the Flash @@ -4005,7 +4005,7 @@ static int GetFlashBaseAddr(struct bcm_mini_adapter *Adapter) * BcmCopySection :- This API is used to copy the One section in another. Both section should * be contiuous and of same size. Hence this Will not be applicabe to copy ISO. * - * @Adapater :- Bcm Driver Private Data Structure + * @Adapter :- Bcm Driver Private Data Structure * @SrcSection :- Source section From where data has to be copied * @DstSection :- Destination section to which data has to be copied * @offset :- Offset from/to where data has to be copied from one section to another. @@ -4112,7 +4112,7 @@ int BcmCopySection(struct bcm_mini_adapter *Adapter, /* * SaveHeaderIfPresent :- This API is use to Protect the Header in case of Header Sector write
Re: [PATCH] staging: bcm: nvm: Fixed spelling errors, that may break grep.
On Tue, Nov 25, 2014 at 11:58:18PM +0530, Siddharth Kannan wrote: > Changing the following: > > Adapater -> Adapter > STATUS_SUCESS -> STATUS_SUCCESS > The driver you are changing doesn't exist any more. Work against linux-next. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: media: lirc: lirc_zilog.c: fix quoted strings split across lines
checkpatch makes an exception to the 80-colum rule for quotes strings, and Documentation/CodingStyle recommends not splitting quotes strings across lines because it breaks the ability to grep for the string. Fixing these. WARNING: quoted string split across lines Signed-off-by: Luis de Bethencourt --- drivers/staging/media/lirc/lirc_zilog.c | 39 ++--- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/drivers/staging/media/lirc/lirc_zilog.c b/drivers/staging/media/lirc/lirc_zilog.c index dca806a..07675f1 100644 --- a/drivers/staging/media/lirc/lirc_zilog.c +++ b/drivers/staging/media/lirc/lirc_zilog.c @@ -372,14 +372,12 @@ static int add_to_buf(struct IR *ir) ret); if (failures >= 3) { mutex_unlock(&ir->ir_lock); - dev_err(ir->l.dev, "unable to read from the IR chip " - "after 3 resets, giving up\n"); + dev_err(ir->l.dev, "unable to read from the IR chip after 3 resets, giving up\n"); break; } /* Looks like the chip crashed, reset it */ - dev_err(ir->l.dev, "polling the IR receiver chip failed, " - "trying reset\n"); + dev_err(ir->l.dev, "polling the IR receiver chip failed, trying reset\n"); set_current_state(TASK_UNINTERRUPTIBLE); if (kthread_should_stop()) { @@ -405,8 +403,8 @@ static int add_to_buf(struct IR *ir) ret = i2c_master_recv(rx->c, keybuf, sizeof(keybuf)); mutex_unlock(&ir->ir_lock); if (ret != sizeof(keybuf)) { - dev_err(ir->l.dev, "i2c_master_recv failed with %d -- " - "keeping last read buffer\n", ret); + dev_err(ir->l.dev, "i2c_master_recv failed with %d -- keeping last read buffer\n", + ret); } else { rx->b[0] = keybuf[3]; rx->b[1] = keybuf[4]; @@ -713,8 +711,8 @@ static int send_boot_data(struct IR_tx *tx) buf[0]); return 0; } - dev_notice(tx->ir->l.dev, "Zilog/Hauppauge IR blaster firmware version " -"%d.%d.%d loaded\n", buf[1], buf[2], buf[3]); + dev_notice(tx->ir->l.dev, "Zilog/Hauppauge IR blaster firmware version %d.%d.%d loaded\n", +buf[1], buf[2], buf[3]); return 0; } @@ -794,8 +792,7 @@ static int fw_load(struct IR_tx *tx) if (!read_uint8(&data, tx_data->endp, &version)) goto corrupt; if (version != 1) { - dev_err(tx->ir->l.dev, "unsupported code set file version (%u, expected" - "1) -- please upgrade to a newer driver", + dev_err(tx->ir->l.dev, "unsupported code set file version (%u, expected1) -- please upgrade to a newer driver", version); fw_unload_locked(); ret = -EFAULT; @@ -983,8 +980,8 @@ static int send_code(struct IR_tx *tx, unsigned int code, unsigned int key) ret = get_key_data(data_block, code, key); if (ret == -EPROTO) { - dev_err(tx->ir->l.dev, "failed to get data for code %u, key %u -- check " - "lircd.conf entries\n", code, key); + dev_err(tx->ir->l.dev, "failed to get data for code %u, key %u -- check lircd.conf entries\n", + code, key); return ret; } else if (ret != 0) return ret; @@ -1059,8 +1056,8 @@ static int send_code(struct IR_tx *tx, unsigned int code, unsigned int key) ret = i2c_master_send(tx->c, buf, 1); if (ret == 1) break; - dev_dbg(tx->ir->l.dev, "NAK expected: i2c_master_send " - "failed with %d (try %d)\n", ret, i+1); + dev_dbg(tx->ir->l.dev, "NAK expected: i2c_master_send failed with %d (try %d)\n", + ret, i+1); } if (ret != 1) { dev_err(tx->ir->l.dev, "IR TX chip never got ready: last i2c_master_send " @@ -1167,12 +1164,10 @@ static ssize_t write(struct file *filep, const char __user *buf, size_t n, */ if (ret != 0) { /* Looks like the chip crashed, reset it */ - dev_err(tx->ir->l.dev, "sending to the IR transmitter chip " - "failed, trying reset\n"); + dev_err(tx->ir->l.dev, "sending to the IR transmitter chip failed, trying reset\n"); if (
Re: [PATCH] staging: media: lirc: lirc_zilog.c: fix quoted strings split across lines
On Tue, 2014-11-25 at 20:19 +, Luis de Bethencourt wrote: > checkpatch makes an exception to the 80-colum rule for quotes strings, and > Documentation/CodingStyle recommends not splitting quotes strings across lines > because it breaks the ability to grep for the string. Fixing these. [] > diff --git a/drivers/staging/media/lirc/lirc_zilog.c > b/drivers/staging/media/lirc/lirc_zilog.c [] > @@ -794,8 +792,7 @@ static int fw_load(struct IR_tx *tx) > if (!read_uint8(&data, tx_data->endp, &version)) > goto corrupt; > if (version != 1) { > - dev_err(tx->ir->l.dev, "unsupported code set file version (%u, > expected" > - "1) -- please upgrade to a newer driver", > + dev_err(tx->ir->l.dev, "unsupported code set file version (%u, > expected1) -- please upgrade to a newer driver", > version); Hello Luis. Please look at the strings being coalesced before submitting patches. It's a fairly common defect to have either a missing space between the coalesced fragments or too many spaces. It's almost certain that there should be a space between the "expected" and "1" here. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] staging: media: lirc: lirc_zilog.c: fix quoted strings split across lines
checkpatch makes an exception to the 80-colum rule for quotes strings, and Documentation/CodingStyle recommends not splitting quotes strings across lines because it breaks the ability to grep for the string. Fixing these. WARNING: quoted string split across lines Signed-off-by: Luis de Bethencourt --- Changes in v2: - As pointed out by Joe Perches I missed a space when joining a set of strings Thanks for the review Joe drivers/staging/media/lirc/lirc_zilog.c | 39 ++--- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/drivers/staging/media/lirc/lirc_zilog.c b/drivers/staging/media/lirc/lirc_zilog.c index dca806a..a35d6f2 100644 --- a/drivers/staging/media/lirc/lirc_zilog.c +++ b/drivers/staging/media/lirc/lirc_zilog.c @@ -372,14 +372,12 @@ static int add_to_buf(struct IR *ir) ret); if (failures >= 3) { mutex_unlock(&ir->ir_lock); - dev_err(ir->l.dev, "unable to read from the IR chip " - "after 3 resets, giving up\n"); + dev_err(ir->l.dev, "unable to read from the IR chip after 3 resets, giving up\n"); break; } /* Looks like the chip crashed, reset it */ - dev_err(ir->l.dev, "polling the IR receiver chip failed, " - "trying reset\n"); + dev_err(ir->l.dev, "polling the IR receiver chip failed, trying reset\n"); set_current_state(TASK_UNINTERRUPTIBLE); if (kthread_should_stop()) { @@ -405,8 +403,8 @@ static int add_to_buf(struct IR *ir) ret = i2c_master_recv(rx->c, keybuf, sizeof(keybuf)); mutex_unlock(&ir->ir_lock); if (ret != sizeof(keybuf)) { - dev_err(ir->l.dev, "i2c_master_recv failed with %d -- " - "keeping last read buffer\n", ret); + dev_err(ir->l.dev, "i2c_master_recv failed with %d -- keeping last read buffer\n", + ret); } else { rx->b[0] = keybuf[3]; rx->b[1] = keybuf[4]; @@ -713,8 +711,8 @@ static int send_boot_data(struct IR_tx *tx) buf[0]); return 0; } - dev_notice(tx->ir->l.dev, "Zilog/Hauppauge IR blaster firmware version " -"%d.%d.%d loaded\n", buf[1], buf[2], buf[3]); + dev_notice(tx->ir->l.dev, "Zilog/Hauppauge IR blaster firmware version %d.%d.%d loaded\n", +buf[1], buf[2], buf[3]); return 0; } @@ -794,8 +792,7 @@ static int fw_load(struct IR_tx *tx) if (!read_uint8(&data, tx_data->endp, &version)) goto corrupt; if (version != 1) { - dev_err(tx->ir->l.dev, "unsupported code set file version (%u, expected" - "1) -- please upgrade to a newer driver", + dev_err(tx->ir->l.dev, "unsupported code set file version (%u, expected 1) -- please upgrade to a newer driver", version); fw_unload_locked(); ret = -EFAULT; @@ -983,8 +980,8 @@ static int send_code(struct IR_tx *tx, unsigned int code, unsigned int key) ret = get_key_data(data_block, code, key); if (ret == -EPROTO) { - dev_err(tx->ir->l.dev, "failed to get data for code %u, key %u -- check " - "lircd.conf entries\n", code, key); + dev_err(tx->ir->l.dev, "failed to get data for code %u, key %u -- check lircd.conf entries\n", + code, key); return ret; } else if (ret != 0) return ret; @@ -1059,8 +1056,8 @@ static int send_code(struct IR_tx *tx, unsigned int code, unsigned int key) ret = i2c_master_send(tx->c, buf, 1); if (ret == 1) break; - dev_dbg(tx->ir->l.dev, "NAK expected: i2c_master_send " - "failed with %d (try %d)\n", ret, i+1); + dev_dbg(tx->ir->l.dev, "NAK expected: i2c_master_send failed with %d (try %d)\n", + ret, i+1); } if (ret != 1) { dev_err(tx->ir->l.dev, "IR TX chip never got ready: last i2c_master_send " @@ -1167,12 +1164,10 @@ static ssize_t write(struct file *filep, const char __user *buf, size_t n, */ if (ret != 0) { /* Looks like the chip crashed, reset it */ - dev_err(tx->ir->l.dev, "sending to the IR transmitter chip " - "failed, trying reset\n"); +
Re: [PATCH] staging: media: lirc: lirc_zilog.c: fix quoted strings split across lines
On Tue, Nov 25, 2014 at 12:27:24PM -0800, Joe Perches wrote: > On Tue, 2014-11-25 at 20:19 +, Luis de Bethencourt wrote: > > checkpatch makes an exception to the 80-colum rule for quotes strings, and > > Documentation/CodingStyle recommends not splitting quotes strings across > > lines > > because it breaks the ability to grep for the string. Fixing these. > [] > > diff --git a/drivers/staging/media/lirc/lirc_zilog.c > > b/drivers/staging/media/lirc/lirc_zilog.c > [] > > @@ -794,8 +792,7 @@ static int fw_load(struct IR_tx *tx) > > if (!read_uint8(&data, tx_data->endp, &version)) > > goto corrupt; > > if (version != 1) { > > - dev_err(tx->ir->l.dev, "unsupported code set file version (%u, > > expected" > > - "1) -- please upgrade to a newer driver", > > + dev_err(tx->ir->l.dev, "unsupported code set file version (%u, > > expected1) -- please upgrade to a newer driver", > > version); > > Hello Luis. > > Please look at the strings being coalesced before > submitting patches. > > It's a fairly common defect to have either a missing > space between the coalesced fragments or too many > spaces. > > It's almost certain that there should be a space > between the "expected" and "1" here. > > Hello Joe, Thanks for taking the time to review this. I sent a new version fixing the missing space. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: lustre: fix pointer declarations
This patch fixes pointer declarations from void * to void __user * in order to remove some sparse warnings. lib-lnet.h:798:48: warning: incorrect type in initializer (different address spaces) lib-lnet.h:798:48:expected void [noderef] *iov_base lib-lnet.h:798:48:got void *dest lib-lnet.h:787:47: warning: incorrect type in initializer (different address spaces) lib-lnet.h:787:47:expected void [noderef] *iov_base lib-lnet.h:787:47:got void *dest lib-lnet.h:819:48: warning: incorrect type in initializer (different address spaces) lib-lnet.h:819:48:expected void [noderef] *iov_base lib-lnet.h:819:48:got void *src lib-lnet.h:808:47: warning: incorrect type in initializer (different address spaces) lib-lnet.h:808:47:expected void [noderef] *iov_base lib-lnet.h:808:47:got void *src Signed-off-by: Zahari Doychev --- drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h index 7e89b3b..e60ce56 100644 --- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h +++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h @@ -780,22 +780,22 @@ void lnet_copy_kiov2kiov(unsigned int ndkiov, lnet_kiov_t *dkiov, unsigned int soffset, unsigned int nob); static inline void -lnet_copy_iov2flat(int dlen, void *dest, unsigned int doffset, +lnet_copy_iov2flat(int dlen, void __user *dest, unsigned int doffset, unsigned int nsiov, struct iovec *siov, unsigned int soffset, unsigned int nob) { - struct iovec diov = {/*.iov_base = */ dest, /*.iov_len = */ dlen}; + struct iovec diov = {.iov_base = dest, .iov_len = dlen}; lnet_copy_iov2iov(1, &diov, doffset, nsiov, siov, soffset, nob); } static inline void -lnet_copy_kiov2flat(int dlen, void *dest, unsigned int doffset, +lnet_copy_kiov2flat(int dlen, void __user *dest, unsigned int doffset, unsigned int nsiov, lnet_kiov_t *skiov, unsigned int soffset, unsigned int nob) { - struct iovec diov = {/* .iov_base = */ dest, /* .iov_len = */ dlen}; + struct iovec diov = {.iov_base = dest, .iov_len = dlen}; lnet_copy_kiov2iov(1, &diov, doffset, nsiov, skiov, soffset, nob); @@ -803,9 +803,10 @@ lnet_copy_kiov2flat(int dlen, void *dest, unsigned int doffset, static inline void lnet_copy_flat2iov(unsigned int ndiov, struct iovec *diov, unsigned int doffset, - int slen, void *src, unsigned int soffset, unsigned int nob) + int slen, void __user *src, unsigned int soffset, + unsigned int nob) { - struct iovec siov = {/*.iov_base = */ src, /*.iov_len = */slen}; + struct iovec siov = {.iov_base = src, .iov_len = slen}; lnet_copy_iov2iov(ndiov, diov, doffset, 1, &siov, soffset, nob); @@ -813,10 +814,10 @@ lnet_copy_flat2iov(unsigned int ndiov, struct iovec *diov, unsigned int doffset, static inline void lnet_copy_flat2kiov(unsigned int ndiov, lnet_kiov_t *dkiov, - unsigned int doffset, int slen, void *src, + unsigned int doffset, int slen, void __user *src, unsigned int soffset, unsigned int nob) { - struct iovec siov = {/* .iov_base = */ src, /* .iov_len = */ slen}; + struct iovec siov = {.iov_base = src, .iov_len = slen}; lnet_copy_iov2kiov(ndiov, dkiov, doffset, 1, &siov, soffset, nob); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: media: lirc: lirc_zilog.c: fix quoted strings split across lines
On Tue, Nov 25, 2014 at 01:00:07PM -0800, Joe Perches wrote: > On Tue, 2014-11-25 at 20:40 +, Luis de Bethencourt wrote: > > On Tue, Nov 25, 2014 at 12:27:24PM -0800, Joe Perches wrote: > > > On Tue, 2014-11-25 at 20:19 +, Luis de Bethencourt wrote: > > > > checkpatch makes an exception to the 80-colum rule for quotes strings, > > > > and > > > > Documentation/CodingStyle recommends not splitting quotes strings > > > > across lines > > > > because it breaks the ability to grep for the string. Fixing these. > > > [] > > > > diff --git a/drivers/staging/media/lirc/lirc_zilog.c > > > > b/drivers/staging/media/lirc/lirc_zilog.c > > > [] > > > > @@ -794,8 +792,7 @@ static int fw_load(struct IR_tx *tx) > > > > if (!read_uint8(&data, tx_data->endp, &version)) > > > > goto corrupt; > > > > if (version != 1) { > > > > - dev_err(tx->ir->l.dev, "unsupported code set file > > > > version (%u, expected" > > > > - "1) -- please upgrade to a newer driver", > > > > + dev_err(tx->ir->l.dev, "unsupported code set file > > > > version (%u, expected1) -- please upgrade to a newer driver", > > > > version); > > > > > > Hello Luis. > > > > > > Please look at the strings being coalesced before > > > submitting patches. > > > > > > It's a fairly common defect to have either a missing > > > space between the coalesced fragments or too mano > > > spaces. > > > > > > It's almost certain that there should be a space > > > between the "expected" and "1" here. > > > > > > > > > > Hello Joe, > > > > Thanks for taking the time to review this. I sent a new > > version fixing the missing space. > > Thanks. > > In the future, you might consider being more > comprehensive with your patches. Wasn't sure about the scope of the style fixing patches. I've been reading Kernel Newbies and this looked like a good way to start contributing. Good to know more exhaustive changes are welcome. > > This code could be neatened a bit by: > > o using another set of logging macros > o removing the unnecessary ftrace like logging > o realigning arguments Great ideas. Should this have been all included in one patch, or each as part of a series with the previous one? Want to take the opportunity to learn about the process. > > Something like: > > --- > drivers/staging/media/lirc/lirc_zilog.c | 151 > +++- > 1 file changed, 73 insertions(+), 78 deletions(-) > > diff --git a/drivers/staging/media/lirc/lirc_zilog.c > b/drivers/staging/media/lirc/lirc_zilog.c > index bebb9f1..523af12 100644 > --- a/drivers/staging/media/lirc/lirc_zilog.c > +++ b/drivers/staging/media/lirc/lirc_zilog.c > @@ -158,6 +158,17 @@ static bool debug; /* debug output */ > static bool tx_only; /* only handle the IR Tx function */ > static int minor = -1; /* minor number */ > > +/* logging macros */ > +#define ir_err(ir, fmt, ...) \ > + dev_err((ir)->l.dev, fmt, ##__VA_ARGS__) > +#define ir_warn(ir, fmt, ...)\ > + dev_warn((ir)->l.dev, fmt, ##__VA_ARGS__) > +#define ir_notice(ir, fmt, ...) \ > + dev_notice((ir)->l.dev, fmt, ##__VA_ARGS__) > +#define ir_info(ir, fmt, ...)\ > + dev_info((ir)->l.dev, fmt, ##__VA_ARGS__) > +#define ir_dbg(ir, fmt, ...) \ > + dev_dbg((ir)->l.dev, fmt, ##__VA_ARGS__) > > /* struct IR reference counting */ > static struct IR *get_ir_device(struct IR *ir, bool ir_devices_lock_held) > @@ -322,7 +333,7 @@ static int add_to_buf(struct IR *ir) > struct IR_tx *tx; > > if (lirc_buffer_full(rbuf)) { > - dev_dbg(ir->l.dev, "buffer overflow\n"); > + ir_dbg(ir, "buffer overflow\n"); > return -EOVERFLOW; > } > > @@ -368,18 +379,15 @@ static int add_to_buf(struct IR *ir) >*/ > ret = i2c_master_send(rx->c, sendbuf, 1); > if (ret != 1) { > - dev_err(ir->l.dev, "i2c_master_send failed with %d\n", > -ret); > + ir_err(ir, "i2c_master_send failed with %d\n", ret); > if (failures >= 3) { > mutex_unlock(&ir->ir_lock); > - dev_err(ir->l.dev, "unable to read from the IR > chip " > - "after 3 resets, giving up\n"); > + ir_err(ir, "unable to read from the IR chip > after 3 resets, giving up\n"); > break; > } > > /* Looks like the chip crashed, reset it */ > - dev_err(ir->l.dev, "polling the IR receiver chip > failed, " > - "trying reset\n"); > + ir_err(ir, "polling
[PATCH v2] net: Hyper-V: Deletion of an unnecessary check before the function call "vfree"
From: Markus Elfring Date: Tue, 25 Nov 2014 22:33:45 +0100 The vfree() function performs also input parameter validation. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Haiyang Zhang --- drivers/net/hyperv/netvsc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index 6b46311..6fc834e 100644 --- a/drivers/net/hyperv/netvsc.c +++ b/drivers/net/hyperv/netvsc.c @@ -561,9 +561,7 @@ int netvsc_device_remove(struct hv_device *device) vmbus_close(device->channel); /* Release all resources */ - if (net_device->sub_cb_buf) - vfree(net_device->sub_cb_buf); - + vfree(net_device->sub_cb_buf); free_netvsc_device(net_device); return 0; } -- 2.1.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] net: Hyper-V: Deletion of an unnecessary check before the function call "vfree"
From: SF Markus Elfring Date: Tue, 25 Nov 2014 22:55:34 +0100 > From: Markus Elfring > Date: Tue, 25 Nov 2014 22:33:45 +0100 > > The vfree() function performs also input parameter validation. > Thus the test around the call is not needed. > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus Elfring > Signed-off-by: Haiyang Zhang Applied, thanks. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: media: lirc: lirc_zilog.c: fix quoted strings split across lines
On Tue, 2014-11-25 at 20:40 +, Luis de Bethencourt wrote: > On Tue, Nov 25, 2014 at 12:27:24PM -0800, Joe Perches wrote: > > On Tue, 2014-11-25 at 20:19 +, Luis de Bethencourt wrote: > > > checkpatch makes an exception to the 80-colum rule for quotes strings, and > > > Documentation/CodingStyle recommends not splitting quotes strings across > > > lines > > > because it breaks the ability to grep for the string. Fixing these. > > [] > > > diff --git a/drivers/staging/media/lirc/lirc_zilog.c > > > b/drivers/staging/media/lirc/lirc_zilog.c > > [] > > > @@ -794,8 +792,7 @@ static int fw_load(struct IR_tx *tx) > > > if (!read_uint8(&data, tx_data->endp, &version)) > > > goto corrupt; > > > if (version != 1) { > > > - dev_err(tx->ir->l.dev, "unsupported code set file version (%u, > > > expected" > > > - "1) -- please upgrade to a newer driver", > > > + dev_err(tx->ir->l.dev, "unsupported code set file version (%u, > > > expected1) -- please upgrade to a newer driver", > > > version); > > > > Hello Luis. > > > > Please look at the strings being coalesced before > > submitting patches. > > > > It's a fairly common defect to have either a missing > > space between the coalesced fragments or too mano > > spaces. > > > > It's almost certain that there should be a space > > between the "expected" and "1" here. > > > > > > Hello Joe, > > Thanks for taking the time to review this. I sent a new > version fixing the missing space. Thanks. In the future, you might consider being more comprehensive with your patches. This code could be neatened a bit by: o using another set of logging macros o removing the unnecessary ftrace like logging o realigning arguments Something like: --- drivers/staging/media/lirc/lirc_zilog.c | 151 +++- 1 file changed, 73 insertions(+), 78 deletions(-) diff --git a/drivers/staging/media/lirc/lirc_zilog.c b/drivers/staging/media/lirc/lirc_zilog.c index bebb9f1..523af12 100644 --- a/drivers/staging/media/lirc/lirc_zilog.c +++ b/drivers/staging/media/lirc/lirc_zilog.c @@ -158,6 +158,17 @@ static bool debug; /* debug output */ static bool tx_only; /* only handle the IR Tx function */ static int minor = -1; /* minor number */ +/* logging macros */ +#define ir_err(ir, fmt, ...) \ + dev_err((ir)->l.dev, fmt, ##__VA_ARGS__) +#define ir_warn(ir, fmt, ...) \ + dev_warn((ir)->l.dev, fmt, ##__VA_ARGS__) +#define ir_notice(ir, fmt, ...)\ + dev_notice((ir)->l.dev, fmt, ##__VA_ARGS__) +#define ir_info(ir, fmt, ...) \ + dev_info((ir)->l.dev, fmt, ##__VA_ARGS__) +#define ir_dbg(ir, fmt, ...) \ + dev_dbg((ir)->l.dev, fmt, ##__VA_ARGS__) /* struct IR reference counting */ static struct IR *get_ir_device(struct IR *ir, bool ir_devices_lock_held) @@ -322,7 +333,7 @@ static int add_to_buf(struct IR *ir) struct IR_tx *tx; if (lirc_buffer_full(rbuf)) { - dev_dbg(ir->l.dev, "buffer overflow\n"); + ir_dbg(ir, "buffer overflow\n"); return -EOVERFLOW; } @@ -368,18 +379,15 @@ static int add_to_buf(struct IR *ir) */ ret = i2c_master_send(rx->c, sendbuf, 1); if (ret != 1) { - dev_err(ir->l.dev, "i2c_master_send failed with %d\n", - ret); + ir_err(ir, "i2c_master_send failed with %d\n", ret); if (failures >= 3) { mutex_unlock(&ir->ir_lock); - dev_err(ir->l.dev, "unable to read from the IR chip " - "after 3 resets, giving up\n"); + ir_err(ir, "unable to read from the IR chip after 3 resets, giving up\n"); break; } /* Looks like the chip crashed, reset it */ - dev_err(ir->l.dev, "polling the IR receiver chip failed, " - "trying reset\n"); + ir_err(ir, "polling the IR receiver chip failed, trying reset\n"); set_current_state(TASK_UNINTERRUPTIBLE); if (kthread_should_stop()) { @@ -405,14 +413,13 @@ static int add_to_buf(struct IR *ir) ret = i2c_master_recv(rx->c, keybuf, sizeof(keybuf)); mutex_unlock(&ir->ir_lock); if (ret != sizeof(keybuf)) { - dev_err(ir->l.dev, "i2c_master_recv failed with %d -- " - "keeping last read buffer\n", ret); + ir_err(ir, "i2c_master_recv failed with %d -- keeping last read buffer\n", +
Re: [PATCH v2 1/2] drm: imx: Move imx-drm driver out of staging
On 25 November 2014 at 01:33, Philipp Zabel wrote: > The imx-drm driver was put into staging mostly for the following reasons, > all of which have been addressed or superseded: > - convert the irq driver to use linear irq domains > - work out the device tree bindings, this lead to the common of_graph >bindings being used > - factor out common helper functions, this mostly resulted in the >component framework and drm of_graph helpers. > > Before adding new fixes, and certainly before adding new features, > move it into its proper place below drivers/gpu/drm. > > Signed-off-by: Philipp Zabel > --- FYI I've merged this into drm-next, which I think is probably the best place. Dave. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v12 0/11] dw-hdmi: convert imx hdmi to bridge/dw_hdmi
Hi Andy, On Mon, Nov 17, 2014 at 8:53 AM, Andy Yan wrote: > Andy Yan (11): > staging: imx-drm: imx-hdmi: make checkpatch happy > staging: imx-drm: imx-hdmi: return defer if can't get ddc i2c adapter > staging: imx-drm: imx-hdmi: convert imx-hdmi to drm_bridge mode > staging: imx-drm: imx-hdmi: move imx-hdmi to bridge/dw_hdmi imx-drm has moved out of staging. Please see Phillip's patch: http://cgit.freedesktop.org/~airlied/linux/commit/?h=drm-next&id=6556f7f82b9c401950d703072c0d8137b6f9f516 So you need to re-submit your series against drm-next. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: lustre: fix pointer declarations
On Tue, 2014-11-25 at 21:44 +0100, Zahari Doychev wrote: > This patch fixes pointer declarations from void * to void __user * in order > to remove some sparse warnings. This patch does more than that. Please make sure to describe all of the changes in a patch in the commit message. > diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h > b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h [] > @@ -780,22 +780,22 @@ void lnet_copy_kiov2kiov(unsigned int ndkiov, > lnet_kiov_t *dkiov, > unsigned int soffset, unsigned int nob); > > static inline void > -lnet_copy_iov2flat(int dlen, void *dest, unsigned int doffset, > +lnet_copy_iov2flat(int dlen, void __user *dest, unsigned int doffset, > unsigned int nsiov, struct iovec *siov, unsigned int soffset, > unsigned int nob) > { > - struct iovec diov = {/*.iov_base = */ dest, /*.iov_len = */ dlen}; > + struct iovec diov = {.iov_base = dest, .iov_len = dlen}; Now using named initializers too. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v12 0/11] dw-hdmi: convert imx hdmi to bridge/dw_hdmi
Hi Fabio: On 2014年11月26日 10:14, Fabio Estevam wrote: Hi Andy, On Mon, Nov 17, 2014 at 8:53 AM, Andy Yan wrote: Andy Yan (11): staging: imx-drm: imx-hdmi: make checkpatch happy staging: imx-drm: imx-hdmi: return defer if can't get ddc i2c adapter staging: imx-drm: imx-hdmi: convert imx-hdmi to drm_bridge mode staging: imx-drm: imx-hdmi: move imx-hdmi to bridge/dw_hdmi imx-drm has moved out of staging. Please see Phillip's patch: http://cgit.freedesktop.org/~airlied/linux/commit/?h=drm-next&id=6556f7f82b9c401950d703072c0d8137b6f9f516 So you need to re-submit your series against drm-next. Thanks very much for you pointing out this, I will re-submit my patch set against drm-next soon. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] staging: lustre: fix pointer declarations
This patch fixes pointer declarations from void * to void __user * in order to remove some sparse warnings. The patch also enables again commented named initializers for the iovec structures. The corrected pointers are used in these structures as field member values. lib-lnet.h:798:48: warning: incorrect type in initializer (different address spaces) lib-lnet.h:798:48:expected void [noderef] *iov_base lib-lnet.h:798:48:got void *dest lib-lnet.h:787:47: warning: incorrect type in initializer (different address spaces) lib-lnet.h:787:47:expected void [noderef] *iov_base lib-lnet.h:787:47:got void *dest lib-lnet.h:819:48: warning: incorrect type in initializer (different address spaces) lib-lnet.h:819:48:expected void [noderef] *iov_base lib-lnet.h:819:48:got void *src lib-lnet.h:808:47: warning: incorrect type in initializer (different address spaces) lib-lnet.h:808:47:expected void [noderef] *iov_base lib-lnet.h:808:47:got void *src Signed-off-by: Zahari Doychev --- drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h index 7e89b3b..c07fb04 100644 --- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h +++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h @@ -780,22 +780,22 @@ void lnet_copy_kiov2kiov(unsigned int ndkiov, lnet_kiov_t *dkiov, unsigned int soffset, unsigned int nob); static inline void -lnet_copy_iov2flat(int dlen, void *dest, unsigned int doffset, +lnet_copy_iov2flat(int dlen, void __user *dest, unsigned int doffset, unsigned int nsiov, struct iovec *siov, unsigned int soffset, unsigned int nob) { - struct iovec diov = {/*.iov_base = */ dest, /*.iov_len = */ dlen}; + struct iovec diov = {.iov_base = dest, .iov_len = dlen}; lnet_copy_iov2iov(1, &diov, doffset, nsiov, siov, soffset, nob); } static inline void -lnet_copy_kiov2flat(int dlen, void *dest, unsigned int doffset, +lnet_copy_kiov2flat(int dlen, void __user *dest, unsigned int doffset, unsigned int nsiov, lnet_kiov_t *skiov, unsigned int soffset, unsigned int nob) { - struct iovec diov = {/* .iov_base = */ dest, /* .iov_len = */ dlen}; + struct iovec diov = {.iov_base = dest, .iov_len = dlen}; lnet_copy_kiov2iov(1, &diov, doffset, nsiov, skiov, soffset, nob); @@ -803,9 +803,10 @@ lnet_copy_kiov2flat(int dlen, void *dest, unsigned int doffset, static inline void lnet_copy_flat2iov(unsigned int ndiov, struct iovec *diov, unsigned int doffset, - int slen, void *src, unsigned int soffset, unsigned int nob) + int slen, void __user *src, unsigned int soffset, + unsigned int nob) { - struct iovec siov = {/*.iov_base = */ src, /*.iov_len = */slen}; + struct iovec siov = {.iov_base = src, .iov_len = slen}; lnet_copy_iov2iov(ndiov, diov, doffset, 1, &siov, soffset, nob); @@ -813,10 +814,10 @@ lnet_copy_flat2iov(unsigned int ndiov, struct iovec *diov, unsigned int doffset, static inline void lnet_copy_flat2kiov(unsigned int ndiov, lnet_kiov_t *dkiov, - unsigned int doffset, int slen, void *src, + unsigned int doffset, int slen, void __user *src, unsigned int soffset, unsigned int nob) { - struct iovec siov = {/* .iov_base = */ src, /* .iov_len = */ slen}; + struct iovec siov = {.iov_base = src, .iov_len = slen}; lnet_copy_iov2kiov(ndiov, dkiov, doffset, 1, &siov, soffset, nob); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel