Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1591944 > unrolled thread

[PATCH v3 0/5] Fixed compilation error

Started bysimran singhal <singhalsimran0@gmail.com>
First post2017-03-03 14:30 +0100
Last post2017-03-03 17:00 +0100
Articles 8 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v3 0/5] Fixed compilation error simran singhal <singhalsimran0@gmail.com> - 2017-03-03 14:30 +0100
    [PATCH v3 4/5] staging: rts5208: Remove unnecessary cast on void pointer simran singhal <singhalsimran0@gmail.com> - 2017-03-03 15:30 +0100
    Re: [PATCH v3 0/5] Fixed compilation error Joe Perches <joe@perches.com> - 2017-03-03 17:00 +0100
      Re: [Outreachy kernel] Re: [PATCH v3 0/5] Fixed compilation error Julia Lawall <julia.lawall@lip6.fr> - 2017-03-03 17:30 +0100
        Re: [Outreachy kernel] Re: [PATCH v3 0/5] Fixed compilation error SIMRAN SINGHAL <singhalsimran0@gmail.com> - 2017-03-03 17:40 +0100
      Re: [PATCH v3 0/5] Fixed compilation error SIMRAN SINGHAL <singhalsimran0@gmail.com> - 2017-03-03 17:40 +0100
        Re: [PATCH v3 0/5] Fixed compilation error Joe Perches <joe@perches.com> - 2017-03-03 21:20 +0100
    [PATCH v3 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer simran singhal <singhalsimran0@gmail.com> - 2017-03-03 17:00 +0100

#1591944 — [PATCH v3 0/5] Fixed compilation error

Fromsimran singhal <singhalsimran0@gmail.com>
Date2017-03-03 14:30 +0100
Subject[PATCH v3 0/5] Fixed compilation error
Message-ID<tgTSG-Aj-27@gated-at.bofh.it>
Fixed compilation warning in lustre/lustre/llite/range_lock.c

simran singhal (5):
  staging: nvec: Remove unnecessary cast on void pointer
  staging: lustre: Remove unnecessary cast on void pointer
  staging: lustre: lustre: Remove unnecessary cast on void pointer
  staging: rts5208: Remove unnecessary cast on void pointer
  staging: rtl8712: Remove unnecessary cast on void pointer

 drivers/staging/lustre/lustre/llite/range_lock.c |  2 +-
 drivers/staging/lustre/lustre/lmv/lmv_obd.c      |  4 ++--
 drivers/staging/lustre/lustre/mgc/mgc_request.c  |  2 +-
 drivers/staging/nvec/nvec_kbd.c                  |  2 +-
 drivers/staging/rtl8712/rtl8712_recv.c           | 11 +++++------
 drivers/staging/rts5208/rtsx_transport.c         |  3 +--
 6 files changed, 11 insertions(+), 13 deletions(-)

-- 
2.7.4

[toc] | [next] | [standalone]


#1591988 — [PATCH v3 4/5] staging: rts5208: Remove unnecessary cast on void pointer

Fromsimran singhal <singhalsimran0@gmail.com>
Date2017-03-03 15:30 +0100
Subject[PATCH v3 4/5] staging: rts5208: Remove unnecessary cast on void pointer
Message-ID<tgWnw-2po-27@gated-at.bofh.it>
In reply to#1591944
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 | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rts5208/rtsx_transport.c b/drivers/staging/rts5208/rtsx_transport.c
index 2379901..8b57e17 100644
--- a/drivers/staging/rts5208/rtsx_transport.c
+++ b/drivers/staging/rts5208/rtsx_transport.c
@@ -766,8 +766,7 @@ int rtsx_transfer_data(struct rtsx_chip *chip, u8 card, void *buf, size_t len,
 		return -EIO;
 
 	if (use_sg) {
-		err = rtsx_transfer_sglist_adma(chip, card,
-						(struct scatterlist *)buf,
+		err = rtsx_transfer_sglist_adma(chip, card, buf,
 						use_sg, dma_dir, timeout);
 	} else {
 		err = rtsx_transfer_buf(chip, card, buf, len, dma_dir, timeout);
-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1592087

FromJoe Perches <joe@perches.com>
Date2017-03-03 17:00 +0100
Message-ID<tgXMC-3jh-21@gated-at.bofh.it>
In reply to#1591944
On Fri, 2017-03-03 at 17:05 +0530, simran singhal wrote:
> Fixed compilation warning in lustre/lustre/llite/range_lock.c

Really?  What compilation warning was removed?

> simran singhal (5):
>   staging: nvec: Remove unnecessary cast on void pointer
>   staging: lustre: Remove unnecessary cast on void pointer
>   staging: lustre: lustre: Remove unnecessary cast on void pointer
>   staging: rts5208: Remove unnecessary cast on void pointer
>   staging: rtl8712: Remove unnecessary cast on void pointer

What compiler warns about unnecessary casts?

>  drivers/staging/lustre/lustre/llite/range_lock.c |  2 +-
>  drivers/staging/lustre/lustre/lmv/lmv_obd.c      |  4 ++--
>  drivers/staging/lustre/lustre/mgc/mgc_request.c  |  2 +-
>  drivers/staging/nvec/nvec_kbd.c                  |  2 +-
>  drivers/staging/rtl8712/rtl8712_recv.c           | 11 +++++------
>  drivers/staging/rts5208/rtsx_transport.c         |  3 +--
>  6 files changed, 11 insertions(+), 13 deletions(-)
> 

[toc] | [prev] | [next] | [standalone]


#1592118 — Re: [Outreachy kernel] Re: [PATCH v3 0/5] Fixed compilation error

FromJulia Lawall <julia.lawall@lip6.fr>
Date2017-03-03 17:30 +0100
SubjectRe: [Outreachy kernel] Re: [PATCH v3 0/5] Fixed compilation error
Message-ID<tgYfE-3Kq-27@gated-at.bofh.it>
In reply to#1592087

[Multipart message — attachments visible in raw view] — view raw

On Fri, 3 Mar 2017, SIMRAN SINGHAL wrote:

> On Fri, Mar 3, 2017 at 9:20 PM, Joe Perches <joe@perches.com> wrote:
> > On Fri, 2017-03-03 at 17:05 +0530, simran singhal wrote:
> >> Fixed compilation warning in lustre/lustre/llite/range_lock.c
> >
> > Really?  What compilation warning was removed?
>
> 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=]
>
> I was getting this warning because of changing (char *)val to val
> where val is a pointer to void.
> So I fixed this by reverting this change.

Someone pointed out recently that when you make the cover letter for vn+1,
the subject should not change.  It doesn't describe what is new in the
version.  You put that in the message.

julia

>
> Simran
>
> >
> >> simran singhal (5):
> >>   staging: nvec: Remove unnecessary cast on void pointer
> >>   staging: lustre: Remove unnecessary cast on void pointer
> >>   staging: lustre: lustre: Remove unnecessary cast on void pointer
> >>   staging: rts5208: Remove unnecessary cast on void pointer
> >>   staging: rtl8712: Remove unnecessary cast on void pointer
> >
> > What compiler warns about unnecessary casts?
> >
> >>  drivers/staging/lustre/lustre/llite/range_lock.c |  2 +-
> >>  drivers/staging/lustre/lustre/lmv/lmv_obd.c      |  4 ++--
> >>  drivers/staging/lustre/lustre/mgc/mgc_request.c  |  2 +-
> >>  drivers/staging/nvec/nvec_kbd.c                  |  2 +-
> >>  drivers/staging/rtl8712/rtl8712_recv.c           | 11 +++++------
> >>  drivers/staging/rts5208/rtsx_transport.c         |  3 +--
> >>  6 files changed, 11 insertions(+), 13 deletions(-)
> >>
>
> --
> 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/CALrZqyMKJvhQMAdjtLWWKTtxOP%2BicRZ6bctB0bTtzA8gJi%2BwNA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>

[toc] | [prev] | [next] | [standalone]


#1592122 — Re: [Outreachy kernel] Re: [PATCH v3 0/5] Fixed compilation error

FromSIMRAN SINGHAL <singhalsimran0@gmail.com>
Date2017-03-03 17:40 +0100
SubjectRe: [Outreachy kernel] Re: [PATCH v3 0/5] Fixed compilation error
Message-ID<tgYpk-3NK-9@gated-at.bofh.it>
In reply to#1592118
On Fri, Mar 3, 2017 at 9:45 PM, Julia Lawall <julia.lawall@lip6.fr> wrote:
>
>
> On Fri, 3 Mar 2017, SIMRAN SINGHAL wrote:
>
>> On Fri, Mar 3, 2017 at 9:20 PM, Joe Perches <joe@perches.com> wrote:
>> > On Fri, 2017-03-03 at 17:05 +0530, simran singhal wrote:
>> >> Fixed compilation warning in lustre/lustre/llite/range_lock.c
>> >
>> > Really?  What compilation warning was removed?
>>
>> 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=]
>>
>> I was getting this warning because of changing (char *)val to val
>> where val is a pointer to void.
>> So I fixed this by reverting this change.
>
> Someone pointed out recently that when you make the cover letter for vn+1,
> the subject should not change.  It doesn't describe what is new in the
> version.  You put that in the message.
>
I will resend the complete patch series with changed subject of cover-patch.

> julia
>
>>
>> Simran
>>
>> >
>> >> simran singhal (5):
>> >>   staging: nvec: Remove unnecessary cast on void pointer
>> >>   staging: lustre: Remove unnecessary cast on void pointer
>> >>   staging: lustre: lustre: Remove unnecessary cast on void pointer
>> >>   staging: rts5208: Remove unnecessary cast on void pointer
>> >>   staging: rtl8712: Remove unnecessary cast on void pointer
>> >
>> > What compiler warns about unnecessary casts?
>> >
>> >>  drivers/staging/lustre/lustre/llite/range_lock.c |  2 +-
>> >>  drivers/staging/lustre/lustre/lmv/lmv_obd.c      |  4 ++--
>> >>  drivers/staging/lustre/lustre/mgc/mgc_request.c  |  2 +-
>> >>  drivers/staging/nvec/nvec_kbd.c                  |  2 +-
>> >>  drivers/staging/rtl8712/rtl8712_recv.c           | 11 +++++------
>> >>  drivers/staging/rts5208/rtsx_transport.c         |  3 +--
>> >>  6 files changed, 11 insertions(+), 13 deletions(-)
>> >>
>>
>> --
>> 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/CALrZqyMKJvhQMAdjtLWWKTtxOP%2BicRZ6bctB0bTtzA8gJi%2BwNA%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>>

[toc] | [prev] | [next] | [standalone]


#1592123

FromSIMRAN SINGHAL <singhalsimran0@gmail.com>
Date2017-03-03 17:40 +0100
Message-ID<tgYfE-3Kq-29@gated-at.bofh.it>
In reply to#1592087
On Fri, Mar 3, 2017 at 9:20 PM, Joe Perches <joe@perches.com> wrote:
> On Fri, 2017-03-03 at 17:05 +0530, simran singhal wrote:
>> Fixed compilation warning in lustre/lustre/llite/range_lock.c
>
> Really?  What compilation warning was removed?

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=]

I was getting this warning because of changing (char *)val to val
where val is a pointer to void.
So I fixed this by reverting this change.

Simran

>
>> simran singhal (5):
>>   staging: nvec: Remove unnecessary cast on void pointer
>>   staging: lustre: Remove unnecessary cast on void pointer
>>   staging: lustre: lustre: Remove unnecessary cast on void pointer
>>   staging: rts5208: Remove unnecessary cast on void pointer
>>   staging: rtl8712: Remove unnecessary cast on void pointer
>
> What compiler warns about unnecessary casts?
>
>>  drivers/staging/lustre/lustre/llite/range_lock.c |  2 +-
>>  drivers/staging/lustre/lustre/lmv/lmv_obd.c      |  4 ++--
>>  drivers/staging/lustre/lustre/mgc/mgc_request.c  |  2 +-
>>  drivers/staging/nvec/nvec_kbd.c                  |  2 +-
>>  drivers/staging/rtl8712/rtl8712_recv.c           | 11 +++++------
>>  drivers/staging/rts5208/rtsx_transport.c         |  3 +--
>>  6 files changed, 11 insertions(+), 13 deletions(-)
>>

[toc] | [prev] | [next] | [standalone]


#1592265

FromJoe Perches <joe@perches.com>
Date2017-03-03 21:20 +0100
Message-ID<th1Qe-6jM-13@gated-at.bofh.it>
In reply to#1592123
On Fri, 2017-03-03 at 21:35 +0530, SIMRAN SINGHAL wrote:
> On Fri, Mar 3, 2017 at 9:20 PM, Joe Perches <joe@perches.com> wrote:
> > On Fri, 2017-03-03 at 17:05 +0530, simran singhal wrote:
> > > Fixed compilation warning in lustre/lustre/llite/range_lock.c
> > 
> > Really?  What compilation warning was removed?
> 
> 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=]
> 
> I was getting this warning because of changing (char *)val to val
> where val is a pointer to void.
> So I fixed this by reverting this change.

Wrong thought.

Your original defective patches were not applied and
this is a simple revision to those defective patches
that do not include defects.

As Julia has said, you should use the imperative and
describe the change that this patch series implements.

i.e:

Subject: [PATCH V3 0/5] staging: Remove unnecessary casts

Casting void pointers to another undereferenced type is
generally unnecessary so remove the unnecessary casts.

[toc] | [prev] | [next] | [standalone]


#1592091 — [PATCH v3 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer

Fromsimran singhal <singhalsimran0@gmail.com>
Date2017-03-03 17:00 +0100
Subject[PATCH v3 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer
Message-ID<tgXMC-3jh-17@gated-at.bofh.it>
In reply to#1591944
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  | 2 +-
 2 files changed, 2 insertions(+), 2 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..8ca0a04 100644
--- a/drivers/staging/lustre/lustre/mgc/mgc_request.c
+++ b/drivers/staging/lustre/lustre/mgc/mgc_request.c
@@ -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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web