linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4/4] Staging: iio: accel : sca3000_ring: Fixing code styling issues
@ 2011-04-06 19:14 nijs.michael
  2011-04-06 19:24 ` Belisko Marek
  0 siblings, 1 reply; 3+ messages in thread
From: nijs.michael @ 2011-04-06 19:14 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel, Michael Nijs

From: Michael Nijs <nijs.michael@gmail.com>

Fixed code styling issue.

Signed-off-by: Michael Nijs <nijs.michael@gmail.com>
---
 drivers/staging/iio/accel/sca3000_ring.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/iio/accel/sca3000_ring.c b/drivers/staging/iio/accel/sca3000_ring.c
index fd1c844..c872fdd 100644
--- a/drivers/staging/iio/accel/sca3000_ring.c
+++ b/drivers/staging/iio/accel/sca3000_ring.c
@@ -91,7 +91,7 @@ static int sca3000_rip_hw_rb(struct iio_ring_buffer *r,
 
 	/* Convert byte order and shift to default resolution */
 	if (st->bpse == 11) {
-		samples = (s16 *)(*data+1);
+		samples = (s16*)(*data+1);
 		for (i = 0; i < (num_read/2); i++) {
 			samples[i] = be16_to_cpup(
 					(__be16 *)&(samples[i]));
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 4/4] Staging: iio: accel : sca3000_ring: Fixing code styling issues
  2011-04-06 19:14 [PATCH 4/4] Staging: iio: accel : sca3000_ring: Fixing code styling issues nijs.michael
@ 2011-04-06 19:24 ` Belisko Marek
  2011-04-07  9:58   ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Belisko Marek @ 2011-04-06 19:24 UTC (permalink / raw)
  To: nijs.michael; +Cc: gregkh, devel, linux-kernel

On Wed, Apr 6, 2011 at 9:14 PM,  <nijs.michael@gmail.com> wrote:
> From: Michael Nijs <nijs.michael@gmail.com>
>
> Fixed code styling issue.
>
> Signed-off-by: Michael Nijs <nijs.michael@gmail.com>
> ---
>  drivers/staging/iio/accel/sca3000_ring.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/staging/iio/accel/sca3000_ring.c b/drivers/staging/iio/accel/sca3000_ring.c
> index fd1c844..c872fdd 100644
> --- a/drivers/staging/iio/accel/sca3000_ring.c
> +++ b/drivers/staging/iio/accel/sca3000_ring.c
> @@ -91,7 +91,7 @@ static int sca3000_rip_hw_rb(struct iio_ring_buffer *r,
>
>        /* Convert byte order and shift to default resolution */
>        if (st->bpse == 11) {
> -               samples = (s16 *)(*data+1);
> +               samples = (s16*)(*data+1);
Strange. My output(latest 2.6.39-rc2):
./scripts/checkpatch.pl -f drivers/staging/iio/accel/sca3000_ring.c
ERROR: "(foo*)" should be "(foo *)"
#94: FILE: staging/iio/accel/sca3000_ring.c:94:
+		samples = (s16*)(*data+1);

So for me it seems it was correct and you post patch with change where
checkpatch will bark. Or am I missing something?
>                for (i = 0; i < (num_read/2); i++) {
>                        samples[i] = be16_to_cpup(
>                                        (__be16 *)&(samples[i]));
> --
> 1.7.2.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

thanks,

marek

-- 
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
icq: 290551086
web: http://open-nandra.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 4/4] Staging: iio: accel : sca3000_ring: Fixing code styling issues
  2011-04-06 19:24 ` Belisko Marek
@ 2011-04-07  9:58   ` Jonathan Cameron
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2011-04-07  9:58 UTC (permalink / raw)
  To: Belisko Marek; +Cc: nijs.michael, gregkh, devel, linux-kernel

On 04/06/11 20:24, Belisko Marek wrote:
> On Wed, Apr 6, 2011 at 9:14 PM,  <nijs.michael@gmail.com> wrote:
>> From: Michael Nijs <nijs.michael@gmail.com>
>>
>> Fixed code styling issue.
>>
>> Signed-off-by: Michael Nijs <nijs.michael@gmail.com>
>> ---
>>  drivers/staging/iio/accel/sca3000_ring.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/staging/iio/accel/sca3000_ring.c b/drivers/staging/iio/accel/sca3000_ring.c
>> index fd1c844..c872fdd 100644
>> --- a/drivers/staging/iio/accel/sca3000_ring.c
>> +++ b/drivers/staging/iio/accel/sca3000_ring.c
>> @@ -91,7 +91,7 @@ static int sca3000_rip_hw_rb(struct iio_ring_buffer *r,
>>
>>        /* Convert byte order and shift to default resolution */
>>        if (st->bpse == 11) {
>> -               samples = (s16 *)(*data+1);
>> +               samples = (s16*)(*data+1);
> Strange. My output(latest 2.6.39-rc2):
> ./scripts/checkpatch.pl -f drivers/staging/iio/accel/sca3000_ring.c
> ERROR: "(foo*)" should be "(foo *)"
> #94: FILE: staging/iio/accel/sca3000_ring.c:94:
> +		samples = (s16*)(*data+1);
> 
> So for me it seems it was correct and you post patch with change where
> checkpatch will bark. Or am I missing something?
>>                for (i = 0; i < (num_read/2); i++) {
>>                        samples[i] = be16_to_cpup(
>>                                        (__be16 *)&(samples[i]));
There are some much nastier issues with that section of code. If nothing else
I dread to think what be16_to_cpup does with unaligned pointers.  There's a
rewrite of this code in my local tree anyway so either way the issue will probably
go away shortly!

Thanks anyway.

Jonathan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-04-07  9:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-06 19:14 [PATCH 4/4] Staging: iio: accel : sca3000_ring: Fixing code styling issues nijs.michael
2011-04-06 19:24 ` Belisko Marek
2011-04-07  9:58   ` Jonathan Cameron

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).