[PATCH] staging: init: main: fix sparse warning Fix sparse warning "should it be static"
Signed-off-by: Matei Oprea Cc: ROSEdu Kernel Community --- init/main.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init/main.c b/init/main.c index e8ae1fe..25cc270 100644 --- a/init/main.c +++ b/init/main.c @@ -160,7 +160,8 @@ static int __init set_reset_devices(char *str) __setup("reset_devices", set_reset_devices); static const char * argv_init[MAX_INIT_ARGS+2] = { "init", NULL, }; -const char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, }; +static const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/", + "TERM=linux", NULL, }; static const char *panic_later, *panic_param; extern const struct obs_kernel_param __setup_start[], __setup_end[]; -- 1.7.10.4 -- 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: init: main: fix sparse warning Fix sparse warning should it be static
Signed-off-by: Matei Oprea e...@opreamatei.ro Cc: ROSEdu Kernel Community fire...@lists.rosedu.org --- init/main.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init/main.c b/init/main.c index e8ae1fe..25cc270 100644 --- a/init/main.c +++ b/init/main.c @@ -160,7 +160,8 @@ static int __init set_reset_devices(char *str) __setup(reset_devices, set_reset_devices); static const char * argv_init[MAX_INIT_ARGS+2] = { init, NULL, }; -const char * envp_init[MAX_INIT_ENVS+2] = { HOME=/, TERM=linux, NULL, }; +static const char *envp_init[MAX_INIT_ENVS+2] = { HOME=/, + TERM=linux, NULL, }; static const char *panic_later, *panic_param; extern const struct obs_kernel_param __setup_start[], __setup_end[]; -- 1.7.10.4 -- 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] scsi: lpfc: lpfc_init: use kcalloc for allocating memory
It's easier to use kcalloc for allocating arrays. While at it also remove useless casting value. Signed-off-by: Matei Oprea Cc: ROSEdu Kernel Community --- drivers/scsi/lpfc/lpfc_init.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 635eeb3..7e58c22 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -4742,12 +4742,13 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba) phba->cfg_sg_seg_cnt = LPFC_DEFAULT_MENLO_SG_SEG_CNT; } - if (!phba->sli.ring) - phba->sli.ring = (struct lpfc_sli_ring *) - kzalloc(LPFC_SLI3_MAX_RING * - sizeof(struct lpfc_sli_ring), GFP_KERNEL); - if (!phba->sli.ring) - return -ENOMEM; + if (!phba->sli.ring) { + phba->sli.ring = kcalloc(LPFC_SLI3_MAX_RING, +sizeof(struct lpfc_sli_ring), +GFP_KERNEL); + if (!phba->sli.ring) + return -ENOMEM; + } /* * Since lpfc_sg_seg_cnt is module parameter, the sg_dma_buf_size -- 1.9.1 -- 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] scsi: lpfc: lpfc_init: use kcalloc for allocating memory
It's easier to use kcalloc for allocating arrays. While at it also remove useless casting value. Signed-off-by: Matei Oprea e...@opreamatei.ro Cc: ROSEdu Kernel Community fire...@lists.rosedu.org --- drivers/scsi/lpfc/lpfc_init.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 635eeb3..7e58c22 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -4742,12 +4742,13 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba) phba-cfg_sg_seg_cnt = LPFC_DEFAULT_MENLO_SG_SEG_CNT; } - if (!phba-sli.ring) - phba-sli.ring = (struct lpfc_sli_ring *) - kzalloc(LPFC_SLI3_MAX_RING * - sizeof(struct lpfc_sli_ring), GFP_KERNEL); - if (!phba-sli.ring) - return -ENOMEM; + if (!phba-sli.ring) { + phba-sli.ring = kcalloc(LPFC_SLI3_MAX_RING, +sizeof(struct lpfc_sli_ring), +GFP_KERNEL); + if (!phba-sli.ring) + return -ENOMEM; + } /* * Since lpfc_sg_seg_cnt is module parameter, the sg_dma_buf_size -- 1.9.1 -- 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] scsi: lpfc: lpfc_init: use kcalloc for allocating memory
It's easier to use kcalloc for allocating arrays. While at it also remove useless casting value. Signed-off-by: Matei Oprea Cc: ROSEdu Kernel Community --- drivers/scsi/lpfc/lpfc_init.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 635eeb3..1528f34 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -4742,12 +4742,14 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba) phba->cfg_sg_seg_cnt = LPFC_DEFAULT_MENLO_SG_SEG_CNT; } - if (!phba->sli.ring) - phba->sli.ring = (struct lpfc_sli_ring *) - kzalloc(LPFC_SLI3_MAX_RING * - sizeof(struct lpfc_sli_ring), GFP_KERNEL); - if (!phba->sli.ring) - return -ENOMEM; + if (unlikely(!phba->sli.ring)) { + phba->sli.ring = kcalloc(LPFC_SLI3_MAX_RING, + sizeof(struct lpfc_sli_ring), + GFP_KERNEL); + + if (!phba->sli.ring) + return -ENOMEM; + } /* * Since lpfc_sg_seg_cnt is module parameter, the sg_dma_buf_size -- 1.9.1 -- 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] scsi: lpfc: lpfc_init: use kcalloc for allocating memory
Ok. Sorry. ᐧ On Tue, Apr 8, 2014 at 11:20 PM, Joe Perches wrote: > On Tue, 2014-04-08 at 23:18 +0300, Matei Oprea wrote: >> It's easier to use kcalloc for allocating arrays. While at it >> also remove useless casting value. > > Don't send a patch against your bad patch. > Send a new patch with just the appropriate > changes. > > -- Oprea Matei -- 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] scsi: lpfc: lpfc_init: use kcalloc for allocating memory
It's easier to use kcalloc for allocating arrays. While at it also remove useless casting value. Signed-off-by: Matei Oprea Cc: ROSEdu Kernel Community --- drivers/scsi/lpfc/lpfc_init.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index e286909..2b1a786 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -4742,12 +4742,14 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba) phba->cfg_sg_seg_cnt = LPFC_DEFAULT_MENLO_SG_SEG_CNT; } - if (!phba->sli.ring) { + if (unlikely(!phba->sli.ring)) { phba->sli.ring = kcalloc(LPFC_SLI3_MAX_RING, sizeof(struct lpfc_sli_ring), GFP_KERNEL); - return -ENOMEM; } + + if (!phba->sli.ring) + return -ENOMEM; /* * Since lpfc_sg_seg_cnt is module parameter, the sg_dma_buf_size -- 1.9.1 -- 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] scsi: lpfc: lpfc_init: use kcalloc for allocating memory
It's easier to use kcalloc for allocating arrays. While at it also remove useless casting value. Signed-off-by: Matei Oprea Cc: ROSEdu Kernel Community --- drivers/scsi/lpfc/lpfc_init.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 635eeb3..e286909 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -4742,12 +4742,12 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba) phba->cfg_sg_seg_cnt = LPFC_DEFAULT_MENLO_SG_SEG_CNT; } - if (!phba->sli.ring) - phba->sli.ring = (struct lpfc_sli_ring *) - kzalloc(LPFC_SLI3_MAX_RING * - sizeof(struct lpfc_sli_ring), GFP_KERNEL); - if (!phba->sli.ring) + if (!phba->sli.ring) { + phba->sli.ring = kcalloc(LPFC_SLI3_MAX_RING, + sizeof(struct lpfc_sli_ring), + GFP_KERNEL); return -ENOMEM; + } /* * Since lpfc_sg_seg_cnt is module parameter, the sg_dma_buf_size -- 1.9.1 -- 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] scsi: lpfc: lpfc_init: use kcalloc for allocating memory
It's easier to use kcalloc for allocating arrays. While at it also remove useless casting value. Signed-off-by: Matei Oprea e...@opreamatei.ro Cc: ROSEdu Kernel Community fire...@lists.rosedu.org --- drivers/scsi/lpfc/lpfc_init.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 635eeb3..e286909 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -4742,12 +4742,12 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba) phba-cfg_sg_seg_cnt = LPFC_DEFAULT_MENLO_SG_SEG_CNT; } - if (!phba-sli.ring) - phba-sli.ring = (struct lpfc_sli_ring *) - kzalloc(LPFC_SLI3_MAX_RING * - sizeof(struct lpfc_sli_ring), GFP_KERNEL); - if (!phba-sli.ring) + if (!phba-sli.ring) { + phba-sli.ring = kcalloc(LPFC_SLI3_MAX_RING, + sizeof(struct lpfc_sli_ring), + GFP_KERNEL); return -ENOMEM; + } /* * Since lpfc_sg_seg_cnt is module parameter, the sg_dma_buf_size -- 1.9.1 -- 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] scsi: lpfc: lpfc_init: use kcalloc for allocating memory
It's easier to use kcalloc for allocating arrays. While at it also remove useless casting value. Signed-off-by: Matei Oprea e...@opreamatei.ro Cc: ROSEdu Kernel Community fire...@lists.rosedu.org --- drivers/scsi/lpfc/lpfc_init.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index e286909..2b1a786 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -4742,12 +4742,14 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba) phba-cfg_sg_seg_cnt = LPFC_DEFAULT_MENLO_SG_SEG_CNT; } - if (!phba-sli.ring) { + if (unlikely(!phba-sli.ring)) { phba-sli.ring = kcalloc(LPFC_SLI3_MAX_RING, sizeof(struct lpfc_sli_ring), GFP_KERNEL); - return -ENOMEM; } + + if (!phba-sli.ring) + return -ENOMEM; /* * Since lpfc_sg_seg_cnt is module parameter, the sg_dma_buf_size -- 1.9.1 -- 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] scsi: lpfc: lpfc_init: use kcalloc for allocating memory
Ok. Sorry. ᐧ On Tue, Apr 8, 2014 at 11:20 PM, Joe Perches j...@perches.com wrote: On Tue, 2014-04-08 at 23:18 +0300, Matei Oprea wrote: It's easier to use kcalloc for allocating arrays. While at it also remove useless casting value. Don't send a patch against your bad patch. Send a new patch with just the appropriate changes. -- Oprea Matei -- 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] scsi: lpfc: lpfc_init: use kcalloc for allocating memory
It's easier to use kcalloc for allocating arrays. While at it also remove useless casting value. Signed-off-by: Matei Oprea e...@opreamatei.ro Cc: ROSEdu Kernel Community fire...@lists.rosedu.org --- drivers/scsi/lpfc/lpfc_init.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 635eeb3..1528f34 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -4742,12 +4742,14 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba) phba-cfg_sg_seg_cnt = LPFC_DEFAULT_MENLO_SG_SEG_CNT; } - if (!phba-sli.ring) - phba-sli.ring = (struct lpfc_sli_ring *) - kzalloc(LPFC_SLI3_MAX_RING * - sizeof(struct lpfc_sli_ring), GFP_KERNEL); - if (!phba-sli.ring) - return -ENOMEM; + if (unlikely(!phba-sli.ring)) { + phba-sli.ring = kcalloc(LPFC_SLI3_MAX_RING, + sizeof(struct lpfc_sli_ring), + GFP_KERNEL); + + if (!phba-sli.ring) + return -ENOMEM; + } /* * Since lpfc_sg_seg_cnt is module parameter, the sg_dma_buf_size -- 1.9.1 -- 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: cxt1e1: hwprobe: fix incorrect type in assignment
Sorry, I thought that it's out. ᐧ On Mon, Apr 7, 2014 at 5:14 PM, Greg KH wrote: > On Mon, Apr 07, 2014 at 03:38:27PM +0300, Matei Oprea wrote: >> Any comments on this ? > > You got an email from me about this, on the 23rd, saying that I can't do > anything with it until 3.15-rc1 is out. > > thanks, > > greg k-h -- Oprea Matei -- 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: cxt1e1: hwprobe: fix incorrect type in assignment
Any comments on this ? ᐧ On Sun, Mar 23, 2014 at 2:13 PM, Matei Oprea wrote: > This patch fixes "incorrect type in argument 1" warning from sparse. > > Signed-off-by: Matei Oprea > Cc: ROSEdu Kernel Community > --- > drivers/staging/cxt1e1/hwprobe.c |6 +++--- > drivers/staging/cxt1e1/pmcc4_private.h |2 +- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/staging/cxt1e1/hwprobe.c > b/drivers/staging/cxt1e1/hwprobe.c > index 9b4198b..1a145ea 100644 > --- a/drivers/staging/cxt1e1/hwprobe.c > +++ b/drivers/staging/cxt1e1/hwprobe.c > @@ -174,12 +174,12 @@ cleanup_ioremap(void) > if (hi->pci_slot == 0xff) > break; > if (hi->addr_mapped[0]) { > - iounmap((void *)(hi->addr_mapped[0])); > + iounmap(hi->addr_mapped[0]); > release_mem_region((long) hi->addr[0], hi->len[0]); > hi->addr_mapped[0] = 0; > } > if (hi->addr_mapped[1]) { > - iounmap((void *)(hi->addr_mapped[1])); > + iounmap(hi->addr_mapped[1]); > release_mem_region((long) hi->addr[1], hi->len[1]); > hi->addr_mapped[1] = 0; > } > @@ -329,7 +329,7 @@ c4hw_attach_all(void) > return -ENOMEM; > } > > - hi->addr_mapped[j] = (unsigned > long)ioremap(hi->addr[j], hi->len[j]); > + hi->addr_mapped[j] = ioremap(hi->addr[j], hi->len[j]); > if (!hi->addr_mapped[j]) { > pr_warning("%s: ioremap fails, addr=0x%lx, > len=0x%lx ?\n", >hi->devname, hi->addr[j], > hi->len[j]); > diff --git a/drivers/staging/cxt1e1/pmcc4_private.h > b/drivers/staging/cxt1e1/pmcc4_private.h > index eb28f09..451f12f 100644 > --- a/drivers/staging/cxt1e1/pmcc4_private.h > +++ b/drivers/staging/cxt1e1/pmcc4_private.h > @@ -262,7 +262,7 @@ struct s_hdw_info > struct pci_dev *pdev[2]; > > unsigned long addr[2]; > -unsigned long addr_mapped[2]; > +void __iomem *addr_mapped[2]; > unsigned long len[2]; > > union > -- > 1.7.9.5 > -- Oprea Matei -- 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] scsi: lpfc: lpfc_init: use kcalloc for allocating memory
Any comments on this ? ᐧ On Tue, Mar 18, 2014 at 10:51 PM, Matei Oprea wrote: > It's easier to use kcalloc for allocating arrays. While at it > also remove useless casting value. > > Signed-off-by: Matei Oprea > Cc: ROSEdu Kernel Community > --- > drivers/scsi/lpfc/lpfc_init.c |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c > index 68c94cc..0a51ca5 100644 > --- a/drivers/scsi/lpfc/lpfc_init.c > +++ b/drivers/scsi/lpfc/lpfc_init.c > @@ -4731,9 +4731,9 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba) > } > > if (!phba->sli.ring) > - phba->sli.ring = (struct lpfc_sli_ring *) > - kzalloc(LPFC_SLI3_MAX_RING * > + phba->sli.ring = kcalloc(LPFC_SLI3_MAX_RING, > sizeof(struct lpfc_sli_ring), GFP_KERNEL); > + > if (!phba->sli.ring) > return -ENOMEM; > > -- > 1.7.9.5 > -- Oprea Matei -- 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] scsi: lpfc: lpfc_init: use kcalloc for allocating memory
Any comments on this ? ᐧ On Tue, Mar 18, 2014 at 10:51 PM, Matei Oprea e...@opreamatei.ro wrote: It's easier to use kcalloc for allocating arrays. While at it also remove useless casting value. Signed-off-by: Matei Oprea e...@opreamatei.ro Cc: ROSEdu Kernel Community fire...@lists.rosedu.org --- drivers/scsi/lpfc/lpfc_init.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 68c94cc..0a51ca5 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -4731,9 +4731,9 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba) } if (!phba-sli.ring) - phba-sli.ring = (struct lpfc_sli_ring *) - kzalloc(LPFC_SLI3_MAX_RING * + phba-sli.ring = kcalloc(LPFC_SLI3_MAX_RING, sizeof(struct lpfc_sli_ring), GFP_KERNEL); + if (!phba-sli.ring) return -ENOMEM; -- 1.7.9.5 -- Oprea Matei -- 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: cxt1e1: hwprobe: fix incorrect type in assignment
Any comments on this ? ᐧ On Sun, Mar 23, 2014 at 2:13 PM, Matei Oprea e...@opreamatei.ro wrote: This patch fixes incorrect type in argument 1 warning from sparse. Signed-off-by: Matei Oprea e...@opreamatei.ro Cc: ROSEdu Kernel Community fire...@lists.rosedu.org --- drivers/staging/cxt1e1/hwprobe.c |6 +++--- drivers/staging/cxt1e1/pmcc4_private.h |2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/cxt1e1/hwprobe.c b/drivers/staging/cxt1e1/hwprobe.c index 9b4198b..1a145ea 100644 --- a/drivers/staging/cxt1e1/hwprobe.c +++ b/drivers/staging/cxt1e1/hwprobe.c @@ -174,12 +174,12 @@ cleanup_ioremap(void) if (hi-pci_slot == 0xff) break; if (hi-addr_mapped[0]) { - iounmap((void *)(hi-addr_mapped[0])); + iounmap(hi-addr_mapped[0]); release_mem_region((long) hi-addr[0], hi-len[0]); hi-addr_mapped[0] = 0; } if (hi-addr_mapped[1]) { - iounmap((void *)(hi-addr_mapped[1])); + iounmap(hi-addr_mapped[1]); release_mem_region((long) hi-addr[1], hi-len[1]); hi-addr_mapped[1] = 0; } @@ -329,7 +329,7 @@ c4hw_attach_all(void) return -ENOMEM; } - hi-addr_mapped[j] = (unsigned long)ioremap(hi-addr[j], hi-len[j]); + hi-addr_mapped[j] = ioremap(hi-addr[j], hi-len[j]); if (!hi-addr_mapped[j]) { pr_warning(%s: ioremap fails, addr=0x%lx, len=0x%lx ?\n, hi-devname, hi-addr[j], hi-len[j]); diff --git a/drivers/staging/cxt1e1/pmcc4_private.h b/drivers/staging/cxt1e1/pmcc4_private.h index eb28f09..451f12f 100644 --- a/drivers/staging/cxt1e1/pmcc4_private.h +++ b/drivers/staging/cxt1e1/pmcc4_private.h @@ -262,7 +262,7 @@ struct s_hdw_info struct pci_dev *pdev[2]; unsigned long addr[2]; -unsigned long addr_mapped[2]; +void __iomem *addr_mapped[2]; unsigned long len[2]; union -- 1.7.9.5 -- Oprea Matei -- 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: cxt1e1: hwprobe: fix incorrect type in assignment
Sorry, I thought that it's out. ᐧ On Mon, Apr 7, 2014 at 5:14 PM, Greg KH gre...@linuxfoundation.org wrote: On Mon, Apr 07, 2014 at 03:38:27PM +0300, Matei Oprea wrote: Any comments on this ? You got an email from me about this, on the 23rd, saying that I can't do anything with it until 3.15-rc1 is out. thanks, greg k-h -- Oprea Matei -- 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: cxt1e1: hwprobe: fix incorrect type in assignment
This patch fixes "incorrect type in argument 1" warning from sparse. Signed-off-by: Matei Oprea Cc: ROSEdu Kernel Community --- drivers/staging/cxt1e1/hwprobe.c |6 +++--- drivers/staging/cxt1e1/pmcc4_private.h |2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/cxt1e1/hwprobe.c b/drivers/staging/cxt1e1/hwprobe.c index 9b4198b..1a145ea 100644 --- a/drivers/staging/cxt1e1/hwprobe.c +++ b/drivers/staging/cxt1e1/hwprobe.c @@ -174,12 +174,12 @@ cleanup_ioremap(void) if (hi->pci_slot == 0xff) break; if (hi->addr_mapped[0]) { - iounmap((void *)(hi->addr_mapped[0])); + iounmap(hi->addr_mapped[0]); release_mem_region((long) hi->addr[0], hi->len[0]); hi->addr_mapped[0] = 0; } if (hi->addr_mapped[1]) { - iounmap((void *)(hi->addr_mapped[1])); + iounmap(hi->addr_mapped[1]); release_mem_region((long) hi->addr[1], hi->len[1]); hi->addr_mapped[1] = 0; } @@ -329,7 +329,7 @@ c4hw_attach_all(void) return -ENOMEM; } - hi->addr_mapped[j] = (unsigned long)ioremap(hi->addr[j], hi->len[j]); + hi->addr_mapped[j] = ioremap(hi->addr[j], hi->len[j]); if (!hi->addr_mapped[j]) { pr_warning("%s: ioremap fails, addr=0x%lx, len=0x%lx ?\n", hi->devname, hi->addr[j], hi->len[j]); diff --git a/drivers/staging/cxt1e1/pmcc4_private.h b/drivers/staging/cxt1e1/pmcc4_private.h index eb28f09..451f12f 100644 --- a/drivers/staging/cxt1e1/pmcc4_private.h +++ b/drivers/staging/cxt1e1/pmcc4_private.h @@ -262,7 +262,7 @@ struct s_hdw_info struct pci_dev *pdev[2]; unsigned long addr[2]; -unsigned long addr_mapped[2]; +void __iomem *addr_mapped[2]; unsigned long len[2]; union -- 1.7.9.5 -- 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: cxt1e1: hwprobe: fix incorrect type in assignment
This patch fixes incorrect type in argument 1 warning from sparse. Signed-off-by: Matei Oprea e...@opreamatei.ro Cc: ROSEdu Kernel Community fire...@lists.rosedu.org --- drivers/staging/cxt1e1/hwprobe.c |6 +++--- drivers/staging/cxt1e1/pmcc4_private.h |2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/cxt1e1/hwprobe.c b/drivers/staging/cxt1e1/hwprobe.c index 9b4198b..1a145ea 100644 --- a/drivers/staging/cxt1e1/hwprobe.c +++ b/drivers/staging/cxt1e1/hwprobe.c @@ -174,12 +174,12 @@ cleanup_ioremap(void) if (hi-pci_slot == 0xff) break; if (hi-addr_mapped[0]) { - iounmap((void *)(hi-addr_mapped[0])); + iounmap(hi-addr_mapped[0]); release_mem_region((long) hi-addr[0], hi-len[0]); hi-addr_mapped[0] = 0; } if (hi-addr_mapped[1]) { - iounmap((void *)(hi-addr_mapped[1])); + iounmap(hi-addr_mapped[1]); release_mem_region((long) hi-addr[1], hi-len[1]); hi-addr_mapped[1] = 0; } @@ -329,7 +329,7 @@ c4hw_attach_all(void) return -ENOMEM; } - hi-addr_mapped[j] = (unsigned long)ioremap(hi-addr[j], hi-len[j]); + hi-addr_mapped[j] = ioremap(hi-addr[j], hi-len[j]); if (!hi-addr_mapped[j]) { pr_warning(%s: ioremap fails, addr=0x%lx, len=0x%lx ?\n, hi-devname, hi-addr[j], hi-len[j]); diff --git a/drivers/staging/cxt1e1/pmcc4_private.h b/drivers/staging/cxt1e1/pmcc4_private.h index eb28f09..451f12f 100644 --- a/drivers/staging/cxt1e1/pmcc4_private.h +++ b/drivers/staging/cxt1e1/pmcc4_private.h @@ -262,7 +262,7 @@ struct s_hdw_info struct pci_dev *pdev[2]; unsigned long addr[2]; -unsigned long addr_mapped[2]; +void __iomem *addr_mapped[2]; unsigned long len[2]; union -- 1.7.9.5 -- 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: rtl8192u: r8192U_wx: Fix sparse warnings
Fix sparse "should be static" warnings. Those structures are only referenced in file scope so they can be marked as static. Signed-off-by: Matei Oprea Cc: ROSEdu Kernel Community --- drivers/staging/rtl8192u/r8192U_wx.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_wx.c b/drivers/staging/rtl8192u/r8192U_wx.c index c70af01..1a3e80d 100644 --- a/drivers/staging/rtl8192u/r8192U_wx.c +++ b/drivers/staging/rtl8192u/r8192U_wx.c @@ -24,7 +24,7 @@ #include "dot11d.h" #define RATE_COUNT 12 -u32 rtl8180_rates[] = {100,200,550,1100, +static u32 rtl8180_rates[] = {100,200,550,1100, 600,900,1200,1800,2400,3600,4800,5400}; @@ -979,7 +979,7 @@ static iw_handler r8192_private_handler[] = { }; //#if WIRELESS_EXT >= 17 -struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev) +static struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev) { struct r8192_priv *priv = ieee80211_priv(dev); struct ieee80211_device *ieee = priv->ieee80211; @@ -1010,7 +1010,7 @@ struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev) //#endif -struct iw_handler_def r8192_wx_handlers_def={ +static struct iw_handler_def r8192_wx_handlers_def={ .standard = r8192_wx_handlers, .num_standard = ARRAY_SIZE(r8192_wx_handlers), .private = r8192_private_handler, -- 1.7.9.5 -- 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] drivers: staging: cxt1e1: hwprobe Fix different address spaces
Fix different address spaces when unmapping IO. hi->addr_mapped[0] and hi->addr_mapped[1] should be tagged __iomem. Signed-off-by: Matei Oprea Cc: ROSEdu Kernel Community --- drivers/staging/cxt1e1/hwprobe.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/cxt1e1/hwprobe.c b/drivers/staging/cxt1e1/hwprobe.c index 9b4198b..f55c27e 100644 --- a/drivers/staging/cxt1e1/hwprobe.c +++ b/drivers/staging/cxt1e1/hwprobe.c @@ -174,12 +174,12 @@ cleanup_ioremap(void) if (hi->pci_slot == 0xff) break; if (hi->addr_mapped[0]) { - iounmap((void *)(hi->addr_mapped[0])); + iounmap((void __iomem *)(hi->addr_mapped[0])); release_mem_region((long) hi->addr[0], hi->len[0]); hi->addr_mapped[0] = 0; } if (hi->addr_mapped[1]) { - iounmap((void *)(hi->addr_mapped[1])); + iounmap((void __iomem *)(hi->addr_mapped[1])); release_mem_region((long) hi->addr[1], hi->len[1]); hi->addr_mapped[1] = 0; } -- 1.7.9.5 -- 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: cxt1e1: hwprobe: Fix sparse warning
I did it against your master branch of staging.git. I guess that's why doesn't apply at all. I switched branches to staging-next after your e-mail. Thanks and sorry ! On Wed, Mar 19, 2014 at 1:14 AM, Greg KH wrote: > On Wed, Mar 19, 2014 at 12:33:19AM +0200, Matei Oprea wrote: >> This fixes the following sparse warning: >> * drivers/staging/cxt1e1/hwprobe.c:43:19: >> warning: symbol 'hdw_info' was not declared. Should it be static? >> * drivers/staging/cxt1e1/hwprobe.c:47:1: >> warning: symbol 'show_two' was not declared. Should it be static? >> * drivers/staging/cxt1e1/hwprobe.c:99:1: >> warning: symbol 'hdw_sn_get' was not declared. Should it be static? >> *drivers/staging/cxt1e1/hwprobe.c:149:1: >> warning: symbol 'prep_hdw_info' was not declared. Should it be static? >> * drivers/staging/cxt1e1/hwprobe.c:169:1: >> warning: symbol 'cleanup_ioremap' was not declared. Should it be static? >> * drivers/staging/cxt1e1/hwprobe.c:195:1: >> warning: symbol 'cleanup_devs' was not declared. Should it be static? >> drivers/staging/cxt1e1/hwprobe.c:293:1: >> * warning: symbol 'c4hw_attach_all' was not declared. Should it be static? >> >> Signed-off-by: Matei Oprea >> Cc: ROSEdu Kernel Community >> --- >> drivers/staging/cxt1e1/hwprobe.c | 14 +++--- >> 1 file changed, 7 insertions(+), 7 deletions(-) >> >> diff --git a/drivers/staging/cxt1e1/hwprobe.c >> b/drivers/staging/cxt1e1/hwprobe.c >> index 02b4f8f..694047a 100644 >> --- a/drivers/staging/cxt1e1/hwprobe.c >> +++ b/drivers/staging/cxt1e1/hwprobe.c >> @@ -40,10 +40,10 @@ voidc4_stopwd (ci_t *); >> struct net_device * __init c4_add_dev (hdw_info_t *, int, unsigned long, >> unsigned long, int, int); >> >> >> -struct s_hdw_info hdw_info[MAX_BOARDS]; >> +static struct s_hdw_info hdw_info[MAX_BOARDS]; >> >> >> -void__init >> +static void__init >> show_two (hdw_info_t *hi, int brdno) >> { >> ci_t *ci; >> @@ -95,7 +95,7 @@ show_two (hdw_info_t *hi, int brdno) > > > This patch doesn't apply at all, did you do it against my staging-next > branch of staging.git or linux-next? Or did you do it against Linus's > tree? If Linus's tree, that's quite "old" for development stuff, always > work against linux-next to avoid making the same changes others already > have in the past. > > greg k-h -- Oprea Matei ᐧ -- 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: cxt1e1: hwprobe: Fix sparse warning
I did it against your master branch of staging.git. I guess that's why doesn't apply at all. I switched branches to staging-next after your e-mail. Thanks and sorry ! On Wed, Mar 19, 2014 at 1:14 AM, Greg KH gre...@linuxfoundation.org wrote: On Wed, Mar 19, 2014 at 12:33:19AM +0200, Matei Oprea wrote: This fixes the following sparse warning: * drivers/staging/cxt1e1/hwprobe.c:43:19: warning: symbol 'hdw_info' was not declared. Should it be static? * drivers/staging/cxt1e1/hwprobe.c:47:1: warning: symbol 'show_two' was not declared. Should it be static? * drivers/staging/cxt1e1/hwprobe.c:99:1: warning: symbol 'hdw_sn_get' was not declared. Should it be static? *drivers/staging/cxt1e1/hwprobe.c:149:1: warning: symbol 'prep_hdw_info' was not declared. Should it be static? * drivers/staging/cxt1e1/hwprobe.c:169:1: warning: symbol 'cleanup_ioremap' was not declared. Should it be static? * drivers/staging/cxt1e1/hwprobe.c:195:1: warning: symbol 'cleanup_devs' was not declared. Should it be static? drivers/staging/cxt1e1/hwprobe.c:293:1: * warning: symbol 'c4hw_attach_all' was not declared. Should it be static? Signed-off-by: Matei Oprea e...@opreamatei.ro Cc: ROSEdu Kernel Community fire...@lists.rosedu.org --- drivers/staging/cxt1e1/hwprobe.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/cxt1e1/hwprobe.c b/drivers/staging/cxt1e1/hwprobe.c index 02b4f8f..694047a 100644 --- a/drivers/staging/cxt1e1/hwprobe.c +++ b/drivers/staging/cxt1e1/hwprobe.c @@ -40,10 +40,10 @@ voidc4_stopwd (ci_t *); struct net_device * __init c4_add_dev (hdw_info_t *, int, unsigned long, unsigned long, int, int); -struct s_hdw_info hdw_info[MAX_BOARDS]; +static struct s_hdw_info hdw_info[MAX_BOARDS]; -void__init +static void__init show_two (hdw_info_t *hi, int brdno) { ci_t *ci; @@ -95,7 +95,7 @@ show_two (hdw_info_t *hi, int brdno) This patch doesn't apply at all, did you do it against my staging-next branch of staging.git or linux-next? Or did you do it against Linus's tree? If Linus's tree, that's quite old for development stuff, always work against linux-next to avoid making the same changes others already have in the past. greg k-h -- Oprea Matei ᐧ -- 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] drivers: staging: cxt1e1: hwprobe Fix different address spaces
Fix different address spaces when unmapping IO. hi-addr_mapped[0] and hi-addr_mapped[1] should be tagged __iomem. Signed-off-by: Matei Oprea e...@opreamatei.ro Cc: ROSEdu Kernel Community fire...@lists.rosedu.org --- drivers/staging/cxt1e1/hwprobe.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/cxt1e1/hwprobe.c b/drivers/staging/cxt1e1/hwprobe.c index 9b4198b..f55c27e 100644 --- a/drivers/staging/cxt1e1/hwprobe.c +++ b/drivers/staging/cxt1e1/hwprobe.c @@ -174,12 +174,12 @@ cleanup_ioremap(void) if (hi-pci_slot == 0xff) break; if (hi-addr_mapped[0]) { - iounmap((void *)(hi-addr_mapped[0])); + iounmap((void __iomem *)(hi-addr_mapped[0])); release_mem_region((long) hi-addr[0], hi-len[0]); hi-addr_mapped[0] = 0; } if (hi-addr_mapped[1]) { - iounmap((void *)(hi-addr_mapped[1])); + iounmap((void __iomem *)(hi-addr_mapped[1])); release_mem_region((long) hi-addr[1], hi-len[1]); hi-addr_mapped[1] = 0; } -- 1.7.9.5 -- 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: rtl8192u: r8192U_wx: Fix sparse warnings
Fix sparse should be static warnings. Those structures are only referenced in file scope so they can be marked as static. Signed-off-by: Matei Oprea e...@opreamatei.ro Cc: ROSEdu Kernel Community fire...@lists.rosedu.org --- drivers/staging/rtl8192u/r8192U_wx.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_wx.c b/drivers/staging/rtl8192u/r8192U_wx.c index c70af01..1a3e80d 100644 --- a/drivers/staging/rtl8192u/r8192U_wx.c +++ b/drivers/staging/rtl8192u/r8192U_wx.c @@ -24,7 +24,7 @@ #include dot11d.h #define RATE_COUNT 12 -u32 rtl8180_rates[] = {100,200,550,1100, +static u32 rtl8180_rates[] = {100,200,550,1100, 600,900,1200,1800,2400,3600,4800,5400}; @@ -979,7 +979,7 @@ static iw_handler r8192_private_handler[] = { }; //#if WIRELESS_EXT = 17 -struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev) +static struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev) { struct r8192_priv *priv = ieee80211_priv(dev); struct ieee80211_device *ieee = priv-ieee80211; @@ -1010,7 +1010,7 @@ struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev) //#endif -struct iw_handler_def r8192_wx_handlers_def={ +static struct iw_handler_def r8192_wx_handlers_def={ .standard = r8192_wx_handlers, .num_standard = ARRAY_SIZE(r8192_wx_handlers), .private = r8192_private_handler, -- 1.7.9.5 -- 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: cxt1e1: hwprobe: Fix sparse warning
This fixes the following sparse warning: * drivers/staging/cxt1e1/hwprobe.c:43:19: warning: symbol 'hdw_info' was not declared. Should it be static? * drivers/staging/cxt1e1/hwprobe.c:47:1: warning: symbol 'show_two' was not declared. Should it be static? * drivers/staging/cxt1e1/hwprobe.c:99:1: warning: symbol 'hdw_sn_get' was not declared. Should it be static? *drivers/staging/cxt1e1/hwprobe.c:149:1: warning: symbol 'prep_hdw_info' was not declared. Should it be static? * drivers/staging/cxt1e1/hwprobe.c:169:1: warning: symbol 'cleanup_ioremap' was not declared. Should it be static? * drivers/staging/cxt1e1/hwprobe.c:195:1: warning: symbol 'cleanup_devs' was not declared. Should it be static? drivers/staging/cxt1e1/hwprobe.c:293:1: * warning: symbol 'c4hw_attach_all' was not declared. Should it be static? Signed-off-by: Matei Oprea Cc: ROSEdu Kernel Community --- drivers/staging/cxt1e1/hwprobe.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/cxt1e1/hwprobe.c b/drivers/staging/cxt1e1/hwprobe.c index 02b4f8f..694047a 100644 --- a/drivers/staging/cxt1e1/hwprobe.c +++ b/drivers/staging/cxt1e1/hwprobe.c @@ -40,10 +40,10 @@ voidc4_stopwd (ci_t *); struct net_device * __init c4_add_dev (hdw_info_t *, int, unsigned long, unsigned long, int, int); -struct s_hdw_info hdw_info[MAX_BOARDS]; +static struct s_hdw_info hdw_info[MAX_BOARDS]; -void__init +static void__init show_two (hdw_info_t *hi, int brdno) { ci_t *ci; @@ -95,7 +95,7 @@ show_two (hdw_info_t *hi, int brdno) } -void__init +static void__init hdw_sn_get (hdw_info_t *hi, int brdno) { /* obtain hardware EEPROM information */ @@ -145,7 +145,7 @@ hdw_sn_get (hdw_info_t *hi, int brdno) } -void__init +static void__init prep_hdw_info (void) { hdw_info_t *hi; @@ -165,7 +165,7 @@ prep_hdw_info (void) } } -void +static void cleanup_ioremap (void) { hdw_info_t *hi; @@ -191,7 +191,7 @@ cleanup_ioremap (void) } -void +static void cleanup_devs (void) { hdw_info_t *hi; @@ -289,7 +289,7 @@ c4_hdw_init (struct pci_dev *pdev, int found) } -status_t__init +static status_t__init c4hw_attach_all (void) { hdw_info_t *hi; -- 1.7.9.5 -- 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] scsi: lpfc: lpfc_init: use kcalloc for allocating memory
It's easier to use kcalloc for allocating arrays. While at it also remove useless casting value. Signed-off-by: Matei Oprea Cc: ROSEdu Kernel Community --- drivers/scsi/lpfc/lpfc_init.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 68c94cc..0a51ca5 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -4731,9 +4731,9 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba) } if (!phba->sli.ring) - phba->sli.ring = (struct lpfc_sli_ring *) - kzalloc(LPFC_SLI3_MAX_RING * + phba->sli.ring = kcalloc(LPFC_SLI3_MAX_RING, sizeof(struct lpfc_sli_ring), GFP_KERNEL); + if (!phba->sli.ring) return -ENOMEM; -- 1.7.9.5 -- 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] scsi: lpfc: lpfc_init: use kcalloc for allocating memory
It's easier to use kcalloc for allocating arrays. While at it also remove useless casting value. Signed-off-by: Matei Oprea e...@opreamatei.ro Cc: ROSEdu Kernel Community fire...@lists.rosedu.org --- drivers/scsi/lpfc/lpfc_init.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 68c94cc..0a51ca5 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -4731,9 +4731,9 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba) } if (!phba-sli.ring) - phba-sli.ring = (struct lpfc_sli_ring *) - kzalloc(LPFC_SLI3_MAX_RING * + phba-sli.ring = kcalloc(LPFC_SLI3_MAX_RING, sizeof(struct lpfc_sli_ring), GFP_KERNEL); + if (!phba-sli.ring) return -ENOMEM; -- 1.7.9.5 -- 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: cxt1e1: hwprobe: Fix sparse warning
This fixes the following sparse warning: * drivers/staging/cxt1e1/hwprobe.c:43:19: warning: symbol 'hdw_info' was not declared. Should it be static? * drivers/staging/cxt1e1/hwprobe.c:47:1: warning: symbol 'show_two' was not declared. Should it be static? * drivers/staging/cxt1e1/hwprobe.c:99:1: warning: symbol 'hdw_sn_get' was not declared. Should it be static? *drivers/staging/cxt1e1/hwprobe.c:149:1: warning: symbol 'prep_hdw_info' was not declared. Should it be static? * drivers/staging/cxt1e1/hwprobe.c:169:1: warning: symbol 'cleanup_ioremap' was not declared. Should it be static? * drivers/staging/cxt1e1/hwprobe.c:195:1: warning: symbol 'cleanup_devs' was not declared. Should it be static? drivers/staging/cxt1e1/hwprobe.c:293:1: * warning: symbol 'c4hw_attach_all' was not declared. Should it be static? Signed-off-by: Matei Oprea e...@opreamatei.ro Cc: ROSEdu Kernel Community fire...@lists.rosedu.org --- drivers/staging/cxt1e1/hwprobe.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/cxt1e1/hwprobe.c b/drivers/staging/cxt1e1/hwprobe.c index 02b4f8f..694047a 100644 --- a/drivers/staging/cxt1e1/hwprobe.c +++ b/drivers/staging/cxt1e1/hwprobe.c @@ -40,10 +40,10 @@ voidc4_stopwd (ci_t *); struct net_device * __init c4_add_dev (hdw_info_t *, int, unsigned long, unsigned long, int, int); -struct s_hdw_info hdw_info[MAX_BOARDS]; +static struct s_hdw_info hdw_info[MAX_BOARDS]; -void__init +static void__init show_two (hdw_info_t *hi, int brdno) { ci_t *ci; @@ -95,7 +95,7 @@ show_two (hdw_info_t *hi, int brdno) } -void__init +static void__init hdw_sn_get (hdw_info_t *hi, int brdno) { /* obtain hardware EEPROM information */ @@ -145,7 +145,7 @@ hdw_sn_get (hdw_info_t *hi, int brdno) } -void__init +static void__init prep_hdw_info (void) { hdw_info_t *hi; @@ -165,7 +165,7 @@ prep_hdw_info (void) } } -void +static void cleanup_ioremap (void) { hdw_info_t *hi; @@ -191,7 +191,7 @@ cleanup_ioremap (void) } -void +static void cleanup_devs (void) { hdw_info_t *hi; @@ -289,7 +289,7 @@ c4_hdw_init (struct pci_dev *pdev, int found) } -status_t__init +static status_t__init c4hw_attach_all (void) { hdw_info_t *hi; -- 1.7.9.5 -- 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] Scsi: lpfc: lpfc_init: Remove useless casting value
Remove useless casting value returned by k[cmz]alloc to (struct lpfc_sli_ring *). Found using coccinelle Signed-off-by: Matei Oprea Cc: ROSEdu Kernel Community --- drivers/scsi/lpfc/lpfc_init.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 68c94cc..47d2c20 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -4731,8 +4731,7 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba) } if (!phba->sli.ring) - phba->sli.ring = (struct lpfc_sli_ring *) - kzalloc(LPFC_SLI3_MAX_RING * + phba->sli.ring = kzalloc(LPFC_SLI3_MAX_RING * sizeof(struct lpfc_sli_ring), GFP_KERNEL); if (!phba->sli.ring) return -ENOMEM; -- 1.7.9.5 -- 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] Scsi: lpfc: lpfc_init: Remove useless casting value
Remove useless casting value returned by k[cmz]alloc to (struct lpfc_sli_ring *). Found using coccinelle Signed-off-by: Matei Oprea e...@opreamatei.ro Cc: ROSEdu Kernel Community fire...@lists.rosedu.org --- drivers/scsi/lpfc/lpfc_init.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 68c94cc..47d2c20 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -4731,8 +4731,7 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba) } if (!phba-sli.ring) - phba-sli.ring = (struct lpfc_sli_ring *) - kzalloc(LPFC_SLI3_MAX_RING * + phba-sli.ring = kzalloc(LPFC_SLI3_MAX_RING * sizeof(struct lpfc_sli_ring), GFP_KERNEL); if (!phba-sli.ring) return -ENOMEM; -- 1.7.9.5 -- 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: comedi: ni_daq_dio24: fix a line over 80 characters
Fix a coding style issue. Signed-off-by: Matei Oprea Cc: ROSEdu Kernel Commmunity --- drivers/staging/comedi/drivers/ni_daq_dio24.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c b/drivers/staging/comedi/drivers/ni_daq_dio24.c index 335ea34..925e82c 100644 --- a/drivers/staging/comedi/drivers/ni_daq_dio24.c +++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c @@ -3,8 +3,8 @@ Driver for National Instruments PCMCIA DAQ-Card DIO-24 Copyright (C) 2002 Daniel Vecino Castel -PCMCIA crap at end of file is adapted from dummy_cs.c 1.31 2001/08/24 12:13:13 -from the pcmcia package. +PCMCIA crap at end of file is adapted from dummy_cs.c 1.31 +2001/08/24 12:13:13 from the pcmcia package. The initial developer of the pcmcia dummy_cs.c code is David A. Hinds . Portions created by David A. Hinds are Copyright (C) 1999 David A. Hinds. All Rights Reserved. -- 1.7.9.5 -- 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: comedi: ni_daq_dio24: fix a line over 80 characters
Fix a coding style issue. Signed-off-by: Matei Oprea e...@opreamatei.ro Cc: ROSEdu Kernel Commmunity fire...@lists.rosedu.org --- drivers/staging/comedi/drivers/ni_daq_dio24.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c b/drivers/staging/comedi/drivers/ni_daq_dio24.c index 335ea34..925e82c 100644 --- a/drivers/staging/comedi/drivers/ni_daq_dio24.c +++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c @@ -3,8 +3,8 @@ Driver for National Instruments PCMCIA DAQ-Card DIO-24 Copyright (C) 2002 Daniel Vecino Castel dvec...@able.es -PCMCIA crap at end of file is adapted from dummy_cs.c 1.31 2001/08/24 12:13:13 -from the pcmcia package. +PCMCIA crap at end of file is adapted from dummy_cs.c 1.31 +2001/08/24 12:13:13 from the pcmcia package. The initial developer of the pcmcia dummy_cs.c code is David A. Hinds dahi...@users.sourceforge.net. Portions created by David A. Hinds are Copyright (C) 1999 David A. Hinds. All Rights Reserved. -- 1.7.9.5 -- 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/