* [PATCH] staging: rtl8188eu: Type cast function argument
@ 2018-08-18 14:24 Bhaskar Singh
2018-08-18 14:33 ` zhong jiang
2018-08-20 9:37 ` Dan Carpenter
0 siblings, 2 replies; 5+ messages in thread
From: Bhaskar Singh @ 2018-08-18 14:24 UTC (permalink / raw)
To: devel; +Cc: linux-kernel, gregkh, bhaskar.kernel
This patch might suppress some warrning.
The function prototype of rtw_malloc2d is
void *rtw_malloc2d(int h, int w, int size)
This patch also resolves the checkpatch.pl warning
WARNING: line over 80 characters
Signed-off-by: Bhaskar Singh <bhaskar.kernel@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_efuse.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c
index 0fd306a808c4..735d654b2844 100644
--- a/drivers/staging/rtl8188eu/core/rtw_efuse.c
+++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c
@@ -91,7 +91,8 @@ efuse_phymap_to_logical(u8 *phymap, u16 _offset, u16 _size_byte, u8 *pbuf)
if (!efuseTbl)
return;
- eFuseWord = (u16 **)rtw_malloc2d(EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, sizeof(u16));
+ eFuseWord = (u16 **)rtw_malloc2d(EFUSE_MAX_SECTION_88E,
+ EFUSE_MAX_WORD_UNIT, (int)sizeof(u16));
if (!eFuseWord) {
DBG_88E("%s: alloc eFuseWord fail!\n", __func__);
goto eFuseWord_failed;
--
2.16.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: rtl8188eu: Type cast function argument
2018-08-18 14:24 [PATCH] staging: rtl8188eu: Type cast function argument Bhaskar Singh
@ 2018-08-18 14:33 ` zhong jiang
2018-08-18 14:58 ` Bhaskar Singh
2018-08-20 9:37 ` Dan Carpenter
1 sibling, 1 reply; 5+ messages in thread
From: zhong jiang @ 2018-08-18 14:33 UTC (permalink / raw)
To: Bhaskar Singh; +Cc: devel, linux-kernel, gregkh
On 2018/8/18 22:24, Bhaskar Singh wrote:
> This patch might suppress some warrning.
>
> The function prototype of rtw_malloc2d is
>
> void *rtw_malloc2d(int h, int w, int size)
>
> This patch also resolves the checkpatch.pl warning
>
> WARNING: line over 80 characters
>
> Signed-off-by: Bhaskar Singh <bhaskar.kernel@gmail.com>
> ---
> drivers/staging/rtl8188eu/core/rtw_efuse.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c
> index 0fd306a808c4..735d654b2844 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c
> @@ -91,7 +91,8 @@ efuse_phymap_to_logical(u8 *phymap, u16 _offset, u16 _size_byte, u8 *pbuf)
> if (!efuseTbl)
> return;
>
> - eFuseWord = (u16 **)rtw_malloc2d(EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, sizeof(u16));
> + eFuseWord = (u16 **)rtw_malloc2d(EFUSE_MAX_SECTION_88E,
> + EFUSE_MAX_WORD_UNIT, (int)sizeof(u16));
>
You should be align with left parenthesis.
Thanks,
zhong jiang
> if (!eFuseWord) {
> DBG_88E("%s: alloc eFuseWord fail!\n", __func__);
> goto eFuseWord_failed;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: rtl8188eu: Type cast function argument
2018-08-18 14:33 ` zhong jiang
@ 2018-08-18 14:58 ` Bhaskar Singh
2018-08-18 15:07 ` Joe Perches
0 siblings, 1 reply; 5+ messages in thread
From: Bhaskar Singh @ 2018-08-18 14:58 UTC (permalink / raw)
To: zhong jiang; +Cc: devel, linux-kernel, gregkh
On Sat, Aug 18, 2018 at 10:33:31PM +0800, zhong jiang wrote:
> On 2018/8/18 22:24, Bhaskar Singh wrote:
> > This patch might suppress some warrning.
> >
> > The function prototype of rtw_malloc2d is
> >
> > void *rtw_malloc2d(int h, int w, int size)
> >
> > This patch also resolves the checkpatch.pl warning
> >
> > WARNING: line over 80 characters
> >
> > Signed-off-by: Bhaskar Singh <bhaskar.kernel@gmail.com>
> > ---
> > drivers/staging/rtl8188eu/core/rtw_efuse.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c
> > index 0fd306a808c4..735d654b2844 100644
> > --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c
> > +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c
> > @@ -91,7 +91,8 @@ efuse_phymap_to_logical(u8 *phymap, u16 _offset, u16 _size_byte, u8 *pbuf)
> > if (!efuseTbl)
> > return;
> >
> > - eFuseWord = (u16 **)rtw_malloc2d(EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, sizeof(u16));
> > + eFuseWord = (u16 **)rtw_malloc2d(EFUSE_MAX_SECTION_88E,
> > + EFUSE_MAX_WORD_UNIT, (int)sizeof(u16));
> >
> You should be align with left parenthesis.
>
> Thanks,
> zhong jiang
> > if (!eFuseWord) {
> > DBG_88E("%s: alloc eFuseWord fail!\n", __func__);
> > goto eFuseWord_failed;
>
>
why post-commit doesn't give some warrning about that (because commits are checked by
post-commit script)?
Do I need to resend the patch?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: rtl8188eu: Type cast function argument
2018-08-18 14:58 ` Bhaskar Singh
@ 2018-08-18 15:07 ` Joe Perches
0 siblings, 0 replies; 5+ messages in thread
From: Joe Perches @ 2018-08-18 15:07 UTC (permalink / raw)
To: Bhaskar Singh, zhong jiang; +Cc: devel, linux-kernel, gregkh
On Sat, 2018-08-18 at 20:28 +0530, Bhaskar Singh wrote:
> On Sat, Aug 18, 2018 at 10:33:31PM +0800, zhong jiang wrote:
> > On 2018/8/18 22:24, Bhaskar Singh wrote:
> > > This patch might suppress some warrning.
> > >
> > > The function prototype of rtw_malloc2d is
> > >
> > > void *rtw_malloc2d(int h, int w, int size)
> > >
> > > This patch also resolves the checkpatch.pl warning
> > >
> > > WARNING: line over 80 characters
Please look deeper at the code than checkpatch.
This function is used exactly once and could
likely be removed and coded inline instead to
improve readability.
> > > Signed-off-by: Bhaskar Singh <bhaskar.kernel@gmail.com>
> > > ---
> > > drivers/staging/rtl8188eu/core/rtw_efuse.c | 3 ++-
> > > 1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c
> > > index 0fd306a808c4..735d654b2844 100644
> > > --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c
> > > +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c
> > > @@ -91,7 +91,8 @@ efuse_phymap_to_logical(u8 *phymap, u16 _offset, u16 _size_byte, u8 *pbuf)
> > > if (!efuseTbl)
> > > return;
> > >
> > > - eFuseWord = (u16 **)rtw_malloc2d(EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, sizeof(u16));
> > > + eFuseWord = (u16 **)rtw_malloc2d(EFUSE_MAX_SECTION_88E,
> > > + EFUSE_MAX_WORD_UNIT, (int)sizeof(u16));
> > >
> >
> > You should be align with left parenthesis.
> >
> > Thanks,
> > zhong jiang
> > > if (!eFuseWord) {
> > > DBG_88E("%s: alloc eFuseWord fail!\n", __func__);
> > > goto eFuseWord_failed;
> >
> >
>
> why post-commit doesn't give some warrning about that (because commits are checked by
> post-commit script)?
> Do I need to resend the patch?
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: rtl8188eu: Type cast function argument
2018-08-18 14:24 [PATCH] staging: rtl8188eu: Type cast function argument Bhaskar Singh
2018-08-18 14:33 ` zhong jiang
@ 2018-08-20 9:37 ` Dan Carpenter
1 sibling, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2018-08-20 9:37 UTC (permalink / raw)
To: Bhaskar Singh; +Cc: devel, gregkh, linux-kernel
On Sat, Aug 18, 2018 at 07:54:09PM +0530, Bhaskar Singh wrote:
> This patch might suppress some warrning.
>
Which warning? You should find out which program is generating the
warning and delete it from your computer because that is a nonsense
warning.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-08-20 9:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-18 14:24 [PATCH] staging: rtl8188eu: Type cast function argument Bhaskar Singh
2018-08-18 14:33 ` zhong jiang
2018-08-18 14:58 ` Bhaskar Singh
2018-08-18 15:07 ` Joe Perches
2018-08-20 9:37 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).