* [PATCH 1/5] staging: nvec: Remove unnecessary cast on void pointer
@ 2017-03-02 21:19 simran singhal
2017-03-02 21:19 ` [PATCH 2/5] staging: lustre: " simran singhal
` (3 more replies)
0 siblings, 4 replies; 17+ messages in thread
From: simran singhal @ 2017-03-02 21:19 UTC (permalink / raw)
To: Larry.Finger
Cc: florian.c.schilhabel, gregkh, devel, linux-kernel, oleg.drokin,
marvin24, outreachy-kernel
The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T*)x)->f
|
- (T*)
e
)
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
---
drivers/staging/nvec/nvec_kbd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/nvec/nvec_kbd.c b/drivers/staging/nvec/nvec_kbd.c
index e881e6b..a01f486 100644
--- a/drivers/staging/nvec/nvec_kbd.c
+++ b/drivers/staging/nvec/nvec_kbd.c
@@ -58,7 +58,7 @@ static int nvec_keys_notifier(struct notifier_block *nb,
unsigned long event_type, void *data)
{
int code, state;
- unsigned char *msg = (unsigned char *)data;
+ unsigned char *msg = data;
if (event_type == NVEC_KB_EVT) {
int _size = (msg[0] & (3 << 5)) >> 5;
--
2.7.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 2/5] staging: lustre: Remove unnecessary cast on void pointer
2017-03-02 21:19 [PATCH 1/5] staging: nvec: Remove unnecessary cast on void pointer simran singhal
@ 2017-03-02 21:19 ` simran singhal
2017-03-02 21:19 ` [PATCH 3/5] staging: lustre: " simran singhal
` (2 subsequent siblings)
3 siblings, 0 replies; 17+ messages in thread
From: simran singhal @ 2017-03-02 21:19 UTC (permalink / raw)
To: Larry.Finger
Cc: florian.c.schilhabel, gregkh, devel, linux-kernel, oleg.drokin,
marvin24, outreachy-kernel
The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T*)x)->f
|
- (T*)
e
)
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
---
drivers/staging/lustre/lustre/lmv/lmv_obd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c
index 271e189..09b46924 100644
--- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c
+++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c
@@ -640,7 +640,7 @@ static int lmv_fid2path(struct obd_export *exp, int len, void *karg,
int remote_gf_size = 0;
int rc;
- gf = (struct getinfo_fid2path *)karg;
+ gf = karg;
tgt = lmv_find_target(lmv, &gf->gf_fid);
if (IS_ERR(tgt))
return PTR_ERR(tgt);
@@ -657,7 +657,7 @@ static int lmv_fid2path(struct obd_export *exp, int len, void *karg,
struct getinfo_fid2path *ori_gf;
char *ptr;
- ori_gf = (struct getinfo_fid2path *)karg;
+ ori_gf = karg;
if (strlen(ori_gf->gf_path) +
strlen(gf->gf_path) > ori_gf->gf_pathlen) {
rc = -EOVERFLOW;
--
2.7.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer
2017-03-02 21:19 [PATCH 1/5] staging: nvec: Remove unnecessary cast on void pointer simran singhal
2017-03-02 21:19 ` [PATCH 2/5] staging: lustre: " simran singhal
@ 2017-03-02 21:19 ` simran singhal
2017-03-02 21:43 ` Joe Perches
` (2 more replies)
2017-03-02 21:19 ` [PATCH 4/5] staging: rts5208: " simran singhal
2017-03-02 21:19 ` [PATCH 5/5] staging: rtl8712: " simran singhal
3 siblings, 3 replies; 17+ messages in thread
From: simran singhal @ 2017-03-02 21:19 UTC (permalink / raw)
To: Larry.Finger
Cc: florian.c.schilhabel, gregkh, devel, linux-kernel, oleg.drokin,
marvin24, outreachy-kernel
The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T*)x)->f
|
- (T*)
e
)
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
---
drivers/staging/lustre/lustre/llite/range_lock.c | 2 +-
drivers/staging/lustre/lustre/mgc/mgc_request.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/lustre/lustre/llite/range_lock.c b/drivers/staging/lustre/lustre/llite/range_lock.c
index 14148a0..161391b 100644
--- a/drivers/staging/lustre/lustre/llite/range_lock.c
+++ b/drivers/staging/lustre/lustre/llite/range_lock.c
@@ -174,7 +174,7 @@ void range_unlock(struct range_lock_tree *tree, struct range_lock *lock)
*/
static enum interval_iter range_lock_cb(struct interval_node *node, void *arg)
{
- struct range_lock *lock = (struct range_lock *)arg;
+ struct range_lock *lock = arg;
struct range_lock *overlap = node2rangelock(node);
lock->rl_blocking_ranges += overlap->rl_lock_count + 1;
diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c b/drivers/staging/lustre/lustre/mgc/mgc_request.c
index 6a76605..b13961a 100644
--- a/drivers/staging/lustre/lustre/mgc/mgc_request.c
+++ b/drivers/staging/lustre/lustre/mgc/mgc_request.c
@@ -1034,7 +1034,7 @@ static int mgc_set_info_async(const struct lu_env *env, struct obd_export *exp,
rc = sptlrpc_parse_flavor(val, &flvr);
if (rc) {
CERROR("invalid sptlrpc flavor %s to MGS\n",
- (char *)val);
+ val);
return rc;
}
@@ -1050,7 +1050,7 @@ static int mgc_set_info_async(const struct lu_env *env, struct obd_export *exp,
sptlrpc_flavor2name(&cli->cl_flvr_mgc,
str, sizeof(str));
LCONSOLE_ERROR("asking sptlrpc flavor %s to MGS but currently %s is in use\n",
- (char *)val, str);
+ val, str);
rc = -EPERM;
}
return rc;
--
2.7.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 4/5] staging: rts5208: Remove unnecessary cast on void pointer
2017-03-02 21:19 [PATCH 1/5] staging: nvec: Remove unnecessary cast on void pointer simran singhal
2017-03-02 21:19 ` [PATCH 2/5] staging: lustre: " simran singhal
2017-03-02 21:19 ` [PATCH 3/5] staging: lustre: " simran singhal
@ 2017-03-02 21:19 ` simran singhal
2017-03-02 21:56 ` [Outreachy kernel] " Julia Lawall
2017-03-02 21:19 ` [PATCH 5/5] staging: rtl8712: " simran singhal
3 siblings, 1 reply; 17+ messages in thread
From: simran singhal @ 2017-03-02 21:19 UTC (permalink / raw)
To: Larry.Finger
Cc: florian.c.schilhabel, gregkh, devel, linux-kernel, oleg.drokin,
marvin24, outreachy-kernel
The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T*)x)->f
|
- (T*)
e
)
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
---
drivers/staging/rts5208/rtsx_transport.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rts5208/rtsx_transport.c b/drivers/staging/rts5208/rtsx_transport.c
index 2379901..d745b93 100644
--- a/drivers/staging/rts5208/rtsx_transport.c
+++ b/drivers/staging/rts5208/rtsx_transport.c
@@ -767,7 +767,7 @@ int rtsx_transfer_data(struct rtsx_chip *chip, u8 card, void *buf, size_t len,
if (use_sg) {
err = rtsx_transfer_sglist_adma(chip, card,
- (struct scatterlist *)buf,
+ buf,
use_sg, dma_dir, timeout);
} else {
err = rtsx_transfer_buf(chip, card, buf, len, dma_dir, timeout);
--
2.7.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 5/5] staging: rtl8712: Remove unnecessary cast on void pointer
2017-03-02 21:19 [PATCH 1/5] staging: nvec: Remove unnecessary cast on void pointer simran singhal
` (2 preceding siblings ...)
2017-03-02 21:19 ` [PATCH 4/5] staging: rts5208: " simran singhal
@ 2017-03-02 21:19 ` simran singhal
2017-03-02 21:56 ` [Outreachy kernel] " Julia Lawall
3 siblings, 1 reply; 17+ messages in thread
From: simran singhal @ 2017-03-02 21:19 UTC (permalink / raw)
To: Larry.Finger
Cc: florian.c.schilhabel, gregkh, devel, linux-kernel, oleg.drokin,
marvin24, outreachy-kernel
The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T*)x)->f
|
- (T*)
e
)
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
---
drivers/staging/rtl8712/rtl8712_recv.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8712/rtl8712_recv.c b/drivers/staging/rtl8712/rtl8712_recv.c
index 20fe45a..4367c68 100644
--- a/drivers/staging/rtl8712/rtl8712_recv.c
+++ b/drivers/staging/rtl8712/rtl8712_recv.c
@@ -444,9 +444,9 @@ void r8712_rxcmd_event_hdl(struct _adapter *padapter, void *prxcmdbuf)
u16 cmd_len, drvinfo_sz;
struct recv_stat *prxstat;
- poffset = (u8 *)prxcmdbuf;
+ poffset = prxcmdbuf;
voffset = *(__le32 *)poffset;
- prxstat = (struct recv_stat *)prxcmdbuf;
+ prxstat = prxcmdbuf;
drvinfo_sz = (le32_to_cpu(prxstat->rxdw0) & 0x000f0000) >> 16;
drvinfo_sz <<= 3;
poffset += RXDESC_SIZE + drvinfo_sz;
@@ -635,7 +635,7 @@ void r8712_reordering_ctrl_timeout_handler(void *pcontext)
{
unsigned long irql;
struct recv_reorder_ctrl *preorder_ctrl =
- (struct recv_reorder_ctrl *)pcontext;
+ pcontext;
struct _adapter *padapter = preorder_ctrl->padapter;
struct __queue *ppending_recvframe_queue =
&preorder_ctrl->pending_recvframe_queue;
@@ -976,7 +976,7 @@ int recv_func(struct _adapter *padapter, void *pcontext)
struct __queue *pfree_recv_queue = &padapter->recvpriv.free_recv_queue;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
- prframe = (union recv_frame *)pcontext;
+ prframe = pcontext;
orig_prframe = prframe;
pattrib = &prframe->u.hdr.attrib;
if (check_fwstate(pmlmepriv, WIFI_MP_STATE)) {
@@ -1124,7 +1124,7 @@ static int recvbuf2recvframe(struct _adapter *padapter, struct sk_buff *pskb)
static void recv_tasklet(void *priv)
{
struct sk_buff *pskb;
- struct _adapter *padapter = (struct _adapter *)priv;
+ struct _adapter *padapter = priv;
struct recv_priv *precvpriv = &padapter->recvpriv;
while (NULL != (pskb = skb_dequeue(&precvpriv->rx_skb_queue))) {
--
2.7.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer
2017-03-02 21:19 ` [PATCH 3/5] staging: lustre: " simran singhal
@ 2017-03-02 21:43 ` Joe Perches
2017-03-02 21:55 ` SIMRAN SINGHAL
2017-03-03 22:41 ` kbuild test robot
2017-03-04 0:16 ` kbuild test robot
2 siblings, 1 reply; 17+ messages in thread
From: Joe Perches @ 2017-03-02 21:43 UTC (permalink / raw)
To: simran singhal, Larry.Finger
Cc: florian.c.schilhabel, gregkh, devel, linux-kernel, oleg.drokin,
marvin24, outreachy-kernel
On Fri, 2017-03-03 at 02:49 +0530, simran singhal wrote:
> The following Coccinelle script was used to detect this:
> @r@
> expression x;
> void* e;
> type T;
> identifier f;
> @@
> (
> *((T *)e)
> >
>
> ((T *)x)[...]
> >
>
> ((T*)x)->f
> >
>
> - (T*)
> e
> )
NAK.
Nice, but you still have to verify correctness
before submitting these patches.
> diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c b/drivers/staging/lustre/lustre/mgc/mgc_request.c
[]
> @@ -1034,7 +1034,7 @@ static int mgc_set_info_async(const struct lu_env *env, struct obd_export *exp,
> rc = sptlrpc_parse_flavor(val, &flvr);
> if (rc) {
> CERROR("invalid sptlrpc flavor %s to MGS\n",
> - (char *)val);
> + val);
Try compiling this.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer
2017-03-02 21:43 ` Joe Perches
@ 2017-03-02 21:55 ` SIMRAN SINGHAL
2017-03-02 21:59 ` Joe Perches
0 siblings, 1 reply; 17+ messages in thread
From: SIMRAN SINGHAL @ 2017-03-02 21:55 UTC (permalink / raw)
To: Joe Perches
Cc: Larry.Finger, Florian Schilhabel, Greg KH, devel, linux-kernel,
oleg.drokin, marvin24, outreachy-kernel
On Fri, Mar 3, 2017 at 3:13 AM, Joe Perches <joe@perches.com> wrote:
> On Fri, 2017-03-03 at 02:49 +0530, simran singhal wrote:
>> The following Coccinelle script was used to detect this:
>> @r@
>> expression x;
>> void* e;
>> type T;
>> identifier f;
>> @@
>> (
>> *((T *)e)
>> >
>>
>> ((T *)x)[...]
>> >
>>
>> ((T*)x)->f
>> >
>>
>> - (T*)
>> e
>> )
>
> NAK.
>
> Nice, but you still have to verify correctness
> before submitting these patches.
>
>> diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c b/drivers/staging/lustre/lustre/mgc/mgc_request.c
> []
>> @@ -1034,7 +1034,7 @@ static int mgc_set_info_async(const struct lu_env *env, struct obd_export *exp,
>> rc = sptlrpc_parse_flavor(val, &flvr);
>> if (rc) {
>> CERROR("invalid sptlrpc flavor %s to MGS\n",
>> - (char *)val);
>> + val);
>
> Try compiling this.
>
I compiled it before sending.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Outreachy kernel] [PATCH 5/5] staging: rtl8712: Remove unnecessary cast on void pointer
2017-03-02 21:19 ` [PATCH 5/5] staging: rtl8712: " simran singhal
@ 2017-03-02 21:56 ` Julia Lawall
2017-03-02 21:57 ` SIMRAN SINGHAL
0 siblings, 1 reply; 17+ messages in thread
From: Julia Lawall @ 2017-03-02 21:56 UTC (permalink / raw)
To: simran singhal
Cc: Larry.Finger, florian.c.schilhabel, gregkh, devel, linux-kernel,
oleg.drokin, marvin24, outreachy-kernel
> @@ -635,7 +635,7 @@ void r8712_reordering_ctrl_timeout_handler(void *pcontext)
> {
> unsigned long irql;
> struct recv_reorder_ctrl *preorder_ctrl =
> - (struct recv_reorder_ctrl *)pcontext;
> + pcontext;
Coccinelle doesn't always generate code in the best way. pcontext can be
moved up to the previous line in this case.
julia
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Outreachy kernel] [PATCH 4/5] staging: rts5208: Remove unnecessary cast on void pointer
2017-03-02 21:19 ` [PATCH 4/5] staging: rts5208: " simran singhal
@ 2017-03-02 21:56 ` Julia Lawall
2017-03-02 21:58 ` SIMRAN SINGHAL
0 siblings, 1 reply; 17+ messages in thread
From: Julia Lawall @ 2017-03-02 21:56 UTC (permalink / raw)
To: simran singhal
Cc: Larry.Finger, florian.c.schilhabel, gregkh, devel, linux-kernel,
oleg.drokin, marvin24, outreachy-kernel
> diff --git a/drivers/staging/rts5208/rtsx_transport.c b/drivers/staging/rts5208/rtsx_transport.c
> index 2379901..d745b93 100644
> --- a/drivers/staging/rts5208/rtsx_transport.c
> +++ b/drivers/staging/rts5208/rtsx_transport.c
> @@ -767,7 +767,7 @@ int rtsx_transfer_data(struct rtsx_chip *chip, u8 card, void *buf, size_t len,
>
> if (use_sg) {
> err = rtsx_transfer_sglist_adma(chip, card,
> - (struct scatterlist *)buf,
> + buf,
Here too, buf doesn't need its own line.
julia
> use_sg, dma_dir, timeout);
> } else {
> err = rtsx_transfer_buf(chip, card, buf, len, dma_dir, timeout);
> --
> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1488489544-25941-4-git-send-email-singhalsimran0%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Outreachy kernel] [PATCH 5/5] staging: rtl8712: Remove unnecessary cast on void pointer
2017-03-02 21:56 ` [Outreachy kernel] " Julia Lawall
@ 2017-03-02 21:57 ` SIMRAN SINGHAL
0 siblings, 0 replies; 17+ messages in thread
From: SIMRAN SINGHAL @ 2017-03-02 21:57 UTC (permalink / raw)
To: Julia Lawall
Cc: Larry.Finger, Florian Schilhabel, Greg KH, devel, linux-kernel,
oleg.drokin, marvin24, outreachy-kernel
On Fri, Mar 3, 2017 at 3:26 AM, Julia Lawall <julia.lawall@lip6.fr> wrote:
>> @@ -635,7 +635,7 @@ void r8712_reordering_ctrl_timeout_handler(void *pcontext)
>> {
>> unsigned long irql;
>> struct recv_reorder_ctrl *preorder_ctrl =
>> - (struct recv_reorder_ctrl *)pcontext;
>> + pcontext;
>
> Coccinelle doesn't always generate code in the best way. pcontext can be
> moved up to the previous line in this case.
>
Thanks,
I will send v2.
> julia
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Outreachy kernel] [PATCH 4/5] staging: rts5208: Remove unnecessary cast on void pointer
2017-03-02 21:56 ` [Outreachy kernel] " Julia Lawall
@ 2017-03-02 21:58 ` SIMRAN SINGHAL
0 siblings, 0 replies; 17+ messages in thread
From: SIMRAN SINGHAL @ 2017-03-02 21:58 UTC (permalink / raw)
To: Julia Lawall
Cc: Larry.Finger, Florian Schilhabel, Greg KH, devel, linux-kernel,
oleg.drokin, marvin24, outreachy-kernel
On Fri, Mar 3, 2017 at 3:26 AM, Julia Lawall <julia.lawall@lip6.fr> wrote:
>> diff --git a/drivers/staging/rts5208/rtsx_transport.c b/drivers/staging/rts5208/rtsx_transport.c
>> index 2379901..d745b93 100644
>> --- a/drivers/staging/rts5208/rtsx_transport.c
>> +++ b/drivers/staging/rts5208/rtsx_transport.c
>> @@ -767,7 +767,7 @@ int rtsx_transfer_data(struct rtsx_chip *chip, u8 card, void *buf, size_t len,
>>
>> if (use_sg) {
>> err = rtsx_transfer_sglist_adma(chip, card,
>> - (struct scatterlist *)buf,
>> + buf,
>
> Here too, buf doesn't need its own line.
>
I will send v2.
> julia
>
>> use_sg, dma_dir, timeout);
>> } else {
>> err = rtsx_transfer_buf(chip, card, buf, len, dma_dir, timeout);
>> --
>> 2.7.4
>>
>> --
>> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
>> To post to this group, send email to outreachy-kernel@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1488489544-25941-4-git-send-email-singhalsimran0%40gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer
2017-03-02 21:55 ` SIMRAN SINGHAL
@ 2017-03-02 21:59 ` Joe Perches
2017-03-02 22:05 ` SIMRAN SINGHAL
0 siblings, 1 reply; 17+ messages in thread
From: Joe Perches @ 2017-03-02 21:59 UTC (permalink / raw)
To: SIMRAN SINGHAL
Cc: Larry.Finger, Florian Schilhabel, Greg KH, devel, linux-kernel,
oleg.drokin, marvin24, outreachy-kernel
On Fri, 2017-03-03 at 03:25 +0530, SIMRAN SINGHAL wrote:
> On Fri, Mar 3, 2017 at 3:13 AM, Joe Perches <joe@perches.com> wrote:
> > On Fri, 2017-03-03 at 02:49 +0530, simran singhal wrote:
> > > The following Coccinelle script was used to detect this:
> > > @r@
> > > expression x;
> > > void* e;
> > > type T;
> > > identifier f;
> > > @@
> > > (
> > > *((T *)e)
> > > >
> > >
> > > ((T *)x)[...]
> > > >
> > >
> > > ((T*)x)->f
> > > >
> > >
> > > - (T*)
> > > e
> > > )
> >
> > NAK.
> >
> > Nice, but you still have to verify correctness
> > before submitting these patches.
> >
> > > diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c b/drivers/staging/lustre/lustre/mgc/mgc_request.c
> >
> > []
> > > @@ -1034,7 +1034,7 @@ static int mgc_set_info_async(const struct lu_env *env, struct obd_export *exp,
> > > rc = sptlrpc_parse_flavor(val, &flvr);
> > > if (rc) {
> > > CERROR("invalid sptlrpc flavor %s to MGS\n",
> > > - (char *)val);
> > > + val);
> >
> > Try compiling this.
> >
>
> I compiled it before sending.
Did you look at the warnings?
CC [M] drivers/staging/lustre/lustre/mgc/mgc_request.o
drivers/staging/lustre/lustre/mgc/mgc_request.c: In function ‘mgc_set_info_async’:
drivers/staging/lustre/lustre/mgc/mgc_request.c:1036:115: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘void *’ [-Wformat=]
CERROR("invalid sptlrpc flavor %s to MGS\n",
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer
2017-03-02 21:59 ` Joe Perches
@ 2017-03-02 22:05 ` SIMRAN SINGHAL
2017-03-02 22:07 ` [Outreachy kernel] " Julia Lawall
2017-03-02 22:09 ` Joe Perches
0 siblings, 2 replies; 17+ messages in thread
From: SIMRAN SINGHAL @ 2017-03-02 22:05 UTC (permalink / raw)
To: Joe Perches
Cc: Larry.Finger, Florian Schilhabel, Greg KH, devel, linux-kernel,
oleg.drokin, marvin24, outreachy-kernel
On Fri, Mar 3, 2017 at 3:29 AM, Joe Perches <joe@perches.com> wrote:
> On Fri, 2017-03-03 at 03:25 +0530, SIMRAN SINGHAL wrote:
>> On Fri, Mar 3, 2017 at 3:13 AM, Joe Perches <joe@perches.com> wrote:
>> > On Fri, 2017-03-03 at 02:49 +0530, simran singhal wrote:
>> > > The following Coccinelle script was used to detect this:
>> > > @r@
>> > > expression x;
>> > > void* e;
>> > > type T;
>> > > identifier f;
>> > > @@
>> > > (
>> > > *((T *)e)
>> > > >
>> > >
>> > > ((T *)x)[...]
>> > > >
>> > >
>> > > ((T*)x)->f
>> > > >
>> > >
>> > > - (T*)
>> > > e
>> > > )
>> >
>> > NAK.
>> >
>> > Nice, but you still have to verify correctness
>> > before submitting these patches.
>> >
>> > > diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c b/drivers/staging/lustre/lustre/mgc/mgc_request.c
>> >
>> > []
>> > > @@ -1034,7 +1034,7 @@ static int mgc_set_info_async(const struct lu_env *env, struct obd_export *exp,
>> > > rc = sptlrpc_parse_flavor(val, &flvr);
>> > > if (rc) {
>> > > CERROR("invalid sptlrpc flavor %s to MGS\n",
>> > > - (char *)val);
>> > > + val);
>> >
>> > Try compiling this.
>> >
>>
>> I compiled it before sending.
>
> Did you look at the warnings?
>
> CC [M] drivers/staging/lustre/lustre/mgc/mgc_request.o
> drivers/staging/lustre/lustre/mgc/mgc_request.c: In function ‘mgc_set_info_async’:
> drivers/staging/lustre/lustre/mgc/mgc_request.c:1036:115: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘void *’ [-Wformat=]
> CERROR("invalid sptlrpc flavor %s to MGS\n",
>
I again compiled it and this is what I got :-
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK include/generated/timeconst.h
CHK include/generated/bounds.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
LD arch/x86/boot/compressed/vmlinux
ZOFFSET arch/x86/boot/zoffset.h
AS arch/x86/boot/header.o
LD arch/x86/boot/setup.elf
OBJCOPY arch/x86/boot/setup.bin
OBJCOPY arch/x86/boot/vmlinux.bin
BUILD arch/x86/boot/bzImage
Setup is 17500 bytes (padded to 17920 bytes).
System is 7128 kB
CRC 37713343
Kernel: arch/x86/boot/bzImage is ready (#4)
Building modules, stage 2.
MODPOST 4541 modules
I am not getting any warning.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Outreachy kernel] Re: [PATCH 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer
2017-03-02 22:05 ` SIMRAN SINGHAL
@ 2017-03-02 22:07 ` Julia Lawall
2017-03-02 22:09 ` Joe Perches
1 sibling, 0 replies; 17+ messages in thread
From: Julia Lawall @ 2017-03-02 22:07 UTC (permalink / raw)
To: SIMRAN SINGHAL
Cc: Joe Perches, Larry.Finger, Florian Schilhabel, Greg KH, devel,
linux-kernel, oleg.drokin, marvin24, outreachy-kernel
[-- Attachment #1: Type: text/plain, Size: 3479 bytes --]
On Fri, 3 Mar 2017, SIMRAN SINGHAL wrote:
> On Fri, Mar 3, 2017 at 3:29 AM, Joe Perches <joe@perches.com> wrote:
> > On Fri, 2017-03-03 at 03:25 +0530, SIMRAN SINGHAL wrote:
> >> On Fri, Mar 3, 2017 at 3:13 AM, Joe Perches <joe@perches.com> wrote:
> >> > On Fri, 2017-03-03 at 02:49 +0530, simran singhal wrote:
> >> > > The following Coccinelle script was used to detect this:
> >> > > @r@
> >> > > expression x;
> >> > > void* e;
> >> > > type T;
> >> > > identifier f;
> >> > > @@
> >> > > (
> >> > > *((T *)e)
> >> > > >
> >> > >
> >> > > ((T *)x)[...]
> >> > > >
> >> > >
> >> > > ((T*)x)->f
> >> > > >
> >> > >
> >> > > - (T*)
> >> > > e
> >> > > )
> >> >
> >> > NAK.
> >> >
> >> > Nice, but you still have to verify correctness
> >> > before submitting these patches.
> >> >
> >> > > diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c b/drivers/staging/lustre/lustre/mgc/mgc_request.c
> >> >
> >> > []
> >> > > @@ -1034,7 +1034,7 @@ static int mgc_set_info_async(const struct lu_env *env, struct obd_export *exp,
> >> > > rc = sptlrpc_parse_flavor(val, &flvr);
> >> > > if (rc) {
> >> > > CERROR("invalid sptlrpc flavor %s to MGS\n",
> >> > > - (char *)val);
> >> > > + val);
> >> >
> >> > Try compiling this.
> >> >
> >>
> >> I compiled it before sending.
> >
> > Did you look at the warnings?
> >
> > CC [M] drivers/staging/lustre/lustre/mgc/mgc_request.o
> > drivers/staging/lustre/lustre/mgc/mgc_request.c: In function ‘mgc_set_info_async’:
> > drivers/staging/lustre/lustre/mgc/mgc_request.c:1036:115: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘void *’ [-Wformat=]
> > CERROR("invalid sptlrpc flavor %s to MGS\n",
> >
>
> I again compiled it and this is what I got :-
>
> CHK include/config/kernel.release
> CHK include/generated/uapi/linux/version.h
> CHK include/generated/utsrelease.h
> CHK include/generated/timeconst.h
> CHK include/generated/bounds.h
> CHK include/generated/asm-offsets.h
> CALL scripts/checksyscalls.sh
> CHK include/generated/compile.h
> LD arch/x86/boot/compressed/vmlinux
> ZOFFSET arch/x86/boot/zoffset.h
> AS arch/x86/boot/header.o
> LD arch/x86/boot/setup.elf
> OBJCOPY arch/x86/boot/setup.bin
> OBJCOPY arch/x86/boot/vmlinux.bin
> BUILD arch/x86/boot/bzImage
> Setup is 17500 bytes (padded to 17920 bytes).
> System is 7128 kB
> CRC 37713343
> Kernel: arch/x86/boot/bzImage is ready (#4)
> Building modules, stage 2.
> MODPOST 4541 modules
>
> I am not getting any warning.
Did you touch the .c file before compiling it? Warnings still allow the
creation of a .o, and once there is a .o that s more recent than the .c,
make won't compile it again.
I got a whole of host of warnings, including the ones Joe showed.
julia
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CALrZqyP6S2mwYUBERerLnG99qVSFm5jHppjy695JARHMfZ-5Pw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer
2017-03-02 22:05 ` SIMRAN SINGHAL
2017-03-02 22:07 ` [Outreachy kernel] " Julia Lawall
@ 2017-03-02 22:09 ` Joe Perches
1 sibling, 0 replies; 17+ messages in thread
From: Joe Perches @ 2017-03-02 22:09 UTC (permalink / raw)
To: SIMRAN SINGHAL
Cc: Larry.Finger, Florian Schilhabel, Greg KH, devel, linux-kernel,
oleg.drokin, marvin24, outreachy-kernel
On Fri, 2017-03-03 at 03:35 +0530, SIMRAN SINGHAL wrote:
> On Fri, Mar 3, 2017 at 3:29 AM, Joe Perches <joe@perches.com> wrote:
> > On Fri, 2017-03-03 at 03:25 +0530, SIMRAN SINGHAL wrote:
> > > On Fri, Mar 3, 2017 at 3:13 AM, Joe Perches <joe@perches.com> wrote:
> > > > On Fri, 2017-03-03 at 02:49 +0530, simran singhal wrote:
> > > > > The following Coccinelle script was used to detect this:
> > > > > @r@
> > > > > expression x;
> > > > > void* e;
> > > > > type T;
> > > > > identifier f;
> > > > > @@
> > > > > (
> > > > > *((T *)e)
> > > > > >
> > > > >
> > > > > ((T *)x)[...]
> > > > > >
> > > > >
> > > > > ((T*)x)->f
> > > > > >
> > > > >
> > > > > - (T*)
> > > > > e
> > > > > )
> > > >
> > > > NAK.
> > > >
> > > > Nice, but you still have to verify correctness
> > > > before submitting these patches.
> > > >
> > > > > diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c b/drivers/staging/lustre/lustre/mgc/mgc_request.c
> > > >
> > > > []
> > > > > @@ -1034,7 +1034,7 @@ static int mgc_set_info_async(const struct lu_env *env, struct obd_export *exp,
> > > > > rc = sptlrpc_parse_flavor(val, &flvr);
> > > > > if (rc) {
> > > > > CERROR("invalid sptlrpc flavor %s to MGS\n",
> > > > > - (char *)val);
> > > > > + val);
> > > >
> > > > Try compiling this.
> > > >
> > >
> > > I compiled it before sending.
> >
> > Did you look at the warnings?
> >
> > CC [M] drivers/staging/lustre/lustre/mgc/mgc_request.o
> > drivers/staging/lustre/lustre/mgc/mgc_request.c: In function ‘mgc_set_info_async’:
> > drivers/staging/lustre/lustre/mgc/mgc_request.c:1036:115: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘void *’ [-Wformat=]
> > CERROR("invalid sptlrpc flavor %s to MGS\n",
> >
>
> I again compiled it and this is what I got :-
>
> CHK include/config/kernel.release
> CHK include/generated/uapi/linux/version.h
> CHK include/generated/utsrelease.h
> CHK include/generated/timeconst.h
> CHK include/generated/bounds.h
> CHK include/generated/asm-offsets.h
> CALL scripts/checksyscalls.sh
> CHK include/generated/compile.h
> LD arch/x86/boot/compressed/vmlinux
> ZOFFSET arch/x86/boot/zoffset.h
> AS arch/x86/boot/header.o
> LD arch/x86/boot/setup.elf
> OBJCOPY arch/x86/boot/setup.bin
> OBJCOPY arch/x86/boot/vmlinux.bin
> BUILD arch/x86/boot/bzImage
> Setup is 17500 bytes (padded to 17920 bytes).
> System is 7128 kB
> CRC 37713343
> Kernel: arch/x86/boot/bzImage is ready (#4)
> Building modules, stage 2.
> MODPOST 4541 modules
>
> I am not getting any warning.
Then you are likely not compiling the modified file.
try:
$ <git checkout latest-next>
$ make clean
$ make allyesconfig
<apply your patch>
$ make drivers/staging/lustre/lustre/mgc/mgc_request.o
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer
2017-03-02 21:19 ` [PATCH 3/5] staging: lustre: " simran singhal
2017-03-02 21:43 ` Joe Perches
@ 2017-03-03 22:41 ` kbuild test robot
2017-03-04 0:16 ` kbuild test robot
2 siblings, 0 replies; 17+ messages in thread
From: kbuild test robot @ 2017-03-03 22:41 UTC (permalink / raw)
To: simran singhal
Cc: kbuild-all, Larry.Finger, devel, florian.c.schilhabel, gregkh,
linux-kernel, oleg.drokin, outreachy-kernel
[-- Attachment #1: Type: text/plain, Size: 5461 bytes --]
Hi simran,
[auto build test WARNING on staging/staging-testing]
[also build test WARNING on v4.10 next-20170303]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/simran-singhal/staging-nvec-Remove-unnecessary-cast-on-void-pointer/20170304-061120
config: x86_64-randconfig-x018-201709 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
In file included from drivers/staging/lustre/lustre/mgc/../include/../../include/linux/libcfs/libcfs.h:77:0,
from drivers/staging/lustre/lustre/mgc/../include/lprocfs_status.h:46,
from drivers/staging/lustre/lustre/mgc/mgc_request.c:42:
drivers/staging/lustre/lustre/mgc/mgc_request.c: In function 'mgc_set_info_async':
>> drivers/staging/lustre/lustre/mgc/mgc_request.c:1036:11: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'void *' [-Wformat=]
CERROR("invalid sptlrpc flavor %s to MGS\n",
^
drivers/staging/lustre/lustre/mgc/../include/../../include/linux/libcfs/libcfs_debug.h:222:30: note: in definition of macro '__CDEBUG'
libcfs_debug_msg(&msgdata, format, ## __VA_ARGS__); \
^~~~~~
>> drivers/staging/lustre/lustre/mgc/../include/../../include/linux/libcfs/libcfs_debug.h:236:29: note: in expansion of macro 'CDEBUG_LIMIT'
#define CERROR(format, ...) CDEBUG_LIMIT(D_ERROR, format, ## __VA_ARGS__)
^~~~~~~~~~~~
>> drivers/staging/lustre/lustre/mgc/mgc_request.c:1036:4: note: in expansion of macro 'CERROR'
CERROR("invalid sptlrpc flavor %s to MGS\n",
^~~~~~
>> drivers/staging/lustre/lustre/mgc/../include/../../include/linux/libcfs/libcfs_debug.h:244:7: warning: format '%s' expects argument of type 'char *', but argument 5 has type 'void *' [-Wformat=]
"%x-%x: " format, errnum, LERRCHKSUM(errnum), ## __VA_ARGS__)
^
drivers/staging/lustre/lustre/mgc/../include/../../include/linux/libcfs/libcfs_debug.h:222:30: note: in definition of macro '__CDEBUG'
libcfs_debug_msg(&msgdata, format, ## __VA_ARGS__); \
^~~~~~
drivers/staging/lustre/lustre/mgc/../include/../../include/linux/libcfs/libcfs_debug.h:243:49: note: in expansion of macro 'CDEBUG_LIMIT'
#define LCONSOLE_ERROR_MSG(errnum, format, ...) CDEBUG_LIMIT(D_CONSOLE | D_ERROR, \
^~~~~~~~~~~~
>> drivers/staging/lustre/lustre/mgc/../include/../../include/linux/libcfs/libcfs_debug.h:245:37: note: in expansion of macro 'LCONSOLE_ERROR_MSG'
#define LCONSOLE_ERROR(format, ...) LCONSOLE_ERROR_MSG(0x00, format, ## __VA_ARGS__)
^~~~~~~~~~~~~~~~~~
>> drivers/staging/lustre/lustre/mgc/mgc_request.c:1052:4: note: in expansion of macro 'LCONSOLE_ERROR'
LCONSOLE_ERROR("asking sptlrpc flavor %s to MGS but currently %s is in use\n",
^~~~~~~~~~~~~~
vim +1036 drivers/staging/lustre/lustre/mgc/mgc_request.c
d7e09d039 Peng Tao 2013-05-02 1030 val = "null";
d7e09d039 Peng Tao 2013-05-02 1031 vallen = 4;
d7e09d039 Peng Tao 2013-05-02 1032 }
d7e09d039 Peng Tao 2013-05-02 1033
d7e09d039 Peng Tao 2013-05-02 1034 rc = sptlrpc_parse_flavor(val, &flvr);
d7e09d039 Peng Tao 2013-05-02 1035 if (rc) {
d7e09d039 Peng Tao 2013-05-02 @1036 CERROR("invalid sptlrpc flavor %s to MGS\n",
49b8751ff simran singhal 2017-03-03 1037 val);
0a3bdb007 Greg Kroah-Hartman 2013-08-03 1038 return rc;
d7e09d039 Peng Tao 2013-05-02 1039 }
d7e09d039 Peng Tao 2013-05-02 1040
d7e09d039 Peng Tao 2013-05-02 1041 /*
d7e09d039 Peng Tao 2013-05-02 1042 * caller already hold a mutex
d7e09d039 Peng Tao 2013-05-02 1043 */
d7e09d039 Peng Tao 2013-05-02 1044 if (cli->cl_flvr_mgc.sf_rpc == SPTLRPC_FLVR_INVALID) {
d7e09d039 Peng Tao 2013-05-02 1045 cli->cl_flvr_mgc = flvr;
d7e09d039 Peng Tao 2013-05-02 1046 } else if (memcmp(&cli->cl_flvr_mgc, &flvr,
d7e09d039 Peng Tao 2013-05-02 1047 sizeof(flvr)) != 0) {
d7e09d039 Peng Tao 2013-05-02 1048 char str[20];
d7e09d039 Peng Tao 2013-05-02 1049
d7e09d039 Peng Tao 2013-05-02 1050 sptlrpc_flavor2name(&cli->cl_flvr_mgc,
d7e09d039 Peng Tao 2013-05-02 1051 str, sizeof(str));
2d00bd17a Joe Perches 2014-11-23 @1052 LCONSOLE_ERROR("asking sptlrpc flavor %s to MGS but currently %s is in use\n",
49b8751ff simran singhal 2017-03-03 1053 val, str);
d7e09d039 Peng Tao 2013-05-02 1054 rc = -EPERM;
d7e09d039 Peng Tao 2013-05-02 1055 }
:::::: The code at line 1036 was first introduced by commit
:::::: d7e09d0397e84eefbabfd9cb353221f3c6448d83 staging: add Lustre file system client support
:::::: TO: Peng Tao <bergwolf@gmail.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31546 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer
2017-03-02 21:19 ` [PATCH 3/5] staging: lustre: " simran singhal
2017-03-02 21:43 ` Joe Perches
2017-03-03 22:41 ` kbuild test robot
@ 2017-03-04 0:16 ` kbuild test robot
2 siblings, 0 replies; 17+ messages in thread
From: kbuild test robot @ 2017-03-04 0:16 UTC (permalink / raw)
To: simran singhal
Cc: kbuild-all, Larry.Finger, devel, florian.c.schilhabel, gregkh,
linux-kernel, oleg.drokin, outreachy-kernel
[-- Attachment #1: Type: text/plain, Size: 5536 bytes --]
Hi simran,
[auto build test WARNING on staging/staging-testing]
[also build test WARNING on v4.10 next-20170303]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/simran-singhal/staging-nvec-Remove-unnecessary-cast-on-void-pointer/20170304-061120
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 4.9.0
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=m68k
All warnings (new ones prefixed by >>):
In file included from drivers/staging/lustre/lustre/mgc/../include/../../include/linux/libcfs/libcfs.h:77:0,
from drivers/staging/lustre/lustre/mgc/../include/lprocfs_status.h:46,
from drivers/staging/lustre/lustre/mgc/mgc_request.c:42:
drivers/staging/lustre/lustre/mgc/mgc_request.c: In function 'mgc_set_info_async':
drivers/staging/lustre/lustre/mgc/../include/../../include/linux/libcfs/libcfs_debug.h:216:16: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'void *' [-Wformat=]
static struct libcfs_debug_msg_data msgdata; \
^
>> drivers/staging/lustre/lustre/mgc/../include/../../include/linux/libcfs/libcfs_debug.h:232:2: note: in expansion of macro '__CDEBUG'
__CDEBUG(&cdls, mask, format, ## __VA_ARGS__); \
^
drivers/staging/lustre/lustre/mgc/../include/../../include/linux/libcfs/libcfs_debug.h:236:29: note: in expansion of macro 'CDEBUG_LIMIT'
#define CERROR(format, ...) CDEBUG_LIMIT(D_ERROR, format, ## __VA_ARGS__)
^
drivers/staging/lustre/lustre/mgc/mgc_request.c:1036:4: note: in expansion of macro 'CERROR'
CERROR("invalid sptlrpc flavor %s to MGS\n",
^
drivers/staging/lustre/lustre/mgc/../include/../../include/linux/libcfs/libcfs_debug.h:216:16: warning: format '%s' expects argument of type 'char *', but argument 5 has type 'void *' [-Wformat=]
static struct libcfs_debug_msg_data msgdata; \
^
>> drivers/staging/lustre/lustre/mgc/../include/../../include/linux/libcfs/libcfs_debug.h:232:2: note: in expansion of macro '__CDEBUG'
__CDEBUG(&cdls, mask, format, ## __VA_ARGS__); \
^
drivers/staging/lustre/lustre/mgc/../include/../../include/linux/libcfs/libcfs_debug.h:243:49: note: in expansion of macro 'CDEBUG_LIMIT'
#define LCONSOLE_ERROR_MSG(errnum, format, ...) CDEBUG_LIMIT(D_CONSOLE | D_ERROR, \
^
drivers/staging/lustre/lustre/mgc/../include/../../include/linux/libcfs/libcfs_debug.h:245:37: note: in expansion of macro 'LCONSOLE_ERROR_MSG'
#define LCONSOLE_ERROR(format, ...) LCONSOLE_ERROR_MSG(0x00, format, ## __VA_ARGS__)
^
drivers/staging/lustre/lustre/mgc/mgc_request.c:1052:4: note: in expansion of macro 'LCONSOLE_ERROR'
LCONSOLE_ERROR("asking sptlrpc flavor %s to MGS but currently %s is in use\n",
^
vim +/__CDEBUG +232 drivers/staging/lustre/lustre/mgc/../include/../../include/linux/libcfs/libcfs_debug.h
d7e09d039 Peng Tao 2013-05-02 210 return mask & D_CANTMASK ||
d7e09d039 Peng Tao 2013-05-02 211 ((libcfs_debug & mask) && (libcfs_subsystem_debug & subsystem));
d7e09d039 Peng Tao 2013-05-02 212 }
d7e09d039 Peng Tao 2013-05-02 213
d7e09d039 Peng Tao 2013-05-02 214 #define __CDEBUG(cdls, mask, format, ...) \
d7e09d039 Peng Tao 2013-05-02 215 do { \
d7e09d039 Peng Tao 2013-05-02 @216 static struct libcfs_debug_msg_data msgdata; \
d7e09d039 Peng Tao 2013-05-02 217 \
d7e09d039 Peng Tao 2013-05-02 218 CFS_CHECK_STACK(&msgdata, mask, cdls); \
d7e09d039 Peng Tao 2013-05-02 219 \
d7e09d039 Peng Tao 2013-05-02 220 if (cfs_cdebug_show(mask, DEBUG_SUBSYSTEM)) { \
d7e09d039 Peng Tao 2013-05-02 221 LIBCFS_DEBUG_MSG_DATA_INIT(&msgdata, mask, cdls); \
d7e09d039 Peng Tao 2013-05-02 222 libcfs_debug_msg(&msgdata, format, ## __VA_ARGS__); \
d7e09d039 Peng Tao 2013-05-02 223 } \
d7e09d039 Peng Tao 2013-05-02 224 } while (0)
d7e09d039 Peng Tao 2013-05-02 225
d7e09d039 Peng Tao 2013-05-02 226 #define CDEBUG(mask, format, ...) __CDEBUG(NULL, mask, format, ## __VA_ARGS__)
d7e09d039 Peng Tao 2013-05-02 227
d7e09d039 Peng Tao 2013-05-02 228 #define CDEBUG_LIMIT(mask, format, ...) \
d7e09d039 Peng Tao 2013-05-02 229 do { \
a3ea59e0e Lisa Nguyen 2013-10-21 230 static struct cfs_debug_limit_state cdls; \
d7e09d039 Peng Tao 2013-05-02 231 \
d7e09d039 Peng Tao 2013-05-02 @232 __CDEBUG(&cdls, mask, format, ## __VA_ARGS__); \
d7e09d039 Peng Tao 2013-05-02 233 } while (0)
d7e09d039 Peng Tao 2013-05-02 234
d7e09d039 Peng Tao 2013-05-02 235 #define CWARN(format, ...) CDEBUG_LIMIT(D_WARNING, format, ## __VA_ARGS__)
:::::: The code at line 232 was first introduced by commit
:::::: d7e09d0397e84eefbabfd9cb353221f3c6448d83 staging: add Lustre file system client support
:::::: TO: Peng Tao <bergwolf@gmail.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 39600 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2017-03-04 0:17 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-02 21:19 [PATCH 1/5] staging: nvec: Remove unnecessary cast on void pointer simran singhal
2017-03-02 21:19 ` [PATCH 2/5] staging: lustre: " simran singhal
2017-03-02 21:19 ` [PATCH 3/5] staging: lustre: " simran singhal
2017-03-02 21:43 ` Joe Perches
2017-03-02 21:55 ` SIMRAN SINGHAL
2017-03-02 21:59 ` Joe Perches
2017-03-02 22:05 ` SIMRAN SINGHAL
2017-03-02 22:07 ` [Outreachy kernel] " Julia Lawall
2017-03-02 22:09 ` Joe Perches
2017-03-03 22:41 ` kbuild test robot
2017-03-04 0:16 ` kbuild test robot
2017-03-02 21:19 ` [PATCH 4/5] staging: rts5208: " simran singhal
2017-03-02 21:56 ` [Outreachy kernel] " Julia Lawall
2017-03-02 21:58 ` SIMRAN SINGHAL
2017-03-02 21:19 ` [PATCH 5/5] staging: rtl8712: " simran singhal
2017-03-02 21:56 ` [Outreachy kernel] " Julia Lawall
2017-03-02 21:57 ` SIMRAN SINGHAL
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).