linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: poma <pomidorabelisima@gmail.com>
To: Antti Palosaari <crope@iki.fi>,
	Thomas Mair <thomas.mair86@googlemail.com>,
	linux-media@vger.kernel.org
Subject: Re: [PATCH v4 1/5] rtl2832 ver. 0.4: removed signal statistics
Date: Thu, 17 May 2012 23:03:11 +0200	[thread overview]
Message-ID: <4FB5678F.2010000@gmail.com> (raw)
In-Reply-To: <4FB5646B.1090502@iki.fi>

On 05/17/2012 10:49 PM, Antti Palosaari wrote:
> On 17.05.2012 23:45, Thomas Mair wrote:
>> On 17.05.2012 22:41, Antti Palosaari wrote:
>>> On 17.05.2012 23:27, poma wrote:
>>>> On 05/17/2012 04:19 PM, Antti Palosaari wrote:
>>>>> Moikka Thomas,
>>>>>
>>>>> Here is the review. See comments below.
>>>>>
>>>>> And conclusion is that it is ready for the Kernel merge. I did not see
>>>>> any big functiuonality problems - only some small issues that are
>>>>> likely
>>>>> considered as a coding style etc. Feel free to fix those and sent new
>>>>> patc serie or just new patch top of that.
>>>>>
>>>>> Reviewed-by: Antti Palosaari<crope@iki.fi>
>>>
>>> [...]
>>>
>>>> rtl2832.c.diff:
>>>> - static int ->   static const
>>>> - struct ->   static const struct
>>>> - newline between function call and error check ->   […]
>>>> - 5 indications apropos 'spaces' regarding 'CodingStyle'- line 206
>>>> (/usr/share/doc/kernel-doc-3.3.5/Documentation/CodingStyle)
>>>> […]
>>>> Use one space around (on each side of) most binary and ternary
>>>> operators,
>>>> such as any of these:
>>>>
>>>>           =  +  -<    >    *  /  %  |&    ^<=>=  ==  !=  ?  :
>>>>
>>>> […]
>>>>
>>>> grep '>>\|<<'
>>>> v4-1-5-rtl2832-ver.-0.4-removed-signal-statistics.patch.orig
>>>> +    len = (msb>>   3) + 1;
>>>> +        reading_tmp |= reading[i]<<   ((len-1-i)*8);
>>>> +    *val = (reading_tmp>>   lsb)&   mask;
>>>> +    len = (msb>>   3) + 1;
>>>> +        reading_tmp |= reading[i]<<   ((len-1-i)*8);
>>>> +    writing_tmp = reading_tmp&   ~(mask<<   lsb);
>>>> +    writing_tmp |= ((val&   mask)<<   lsb);
>>>> +        writing[i] = (writing_tmp>>   ((len-1-i)*8))&   0xff;
>>>> +    num = bw_mode<<   20;
>>>>
>>>> Bitshift operators seems to be OK.
>>>> Something else?
>>>
>>> (len-1-i)*8
>> I almost have a new corrected version of the patch series ready,
>> fixing this issues and the
>> other ones you mentioned.
>>>
>>>> - 1 indication apropos 'media/dvb/frontends/rtl2832_priv.h:30'
>>>> Compared to 'rtl2830_priv.h' seems to be OK.
>>>>
>>>> ./checkpatch.pl --no-tree
>>>> v4-1-5-rtl2832-ver.-0.4-removed-signal-statistics.patch.orig
>>>> ERROR: Missing Signed-off-by: line(s)
>>>>
>>>> total: 1 errors, 0 warnings, 1177 lines checked
>>>>
>>>> v4-1-5-rtl2832-ver.-0.4-removed-signal-statistics.patch.orig has style
>>>> problems, please review.  If any of these errors
>>>> are false positives report them to the maintainer, see
>>>> CHECKPATCH in MAINTAINERS.
>>>>
>>>> How do you produce this error:
>>>> "ERROR: Macros with complex values should be enclosed in parenthesis…"?
>>>
>>> Just running checkpatch.pl --file foo
>>>
>>
>> For me checkpath.pl also does not report the error you reported. It
>> does seem
>> strange to me, as the makros are the same as in rtl2830_priv.h
> 
> Are you using some old version of checkpatch.pl ?
> Mine is:
> commit c06a9ebdb7a4f4823d4225fe789d8c20a1d534eb
> Author: Joe Perches <joe@perches.com>
> Date:   Mon Apr 16 13:35:11 2012 -0600
> 
> If you are using older version then upgrade. checkpatch.pl is developed
> very rapidly and there is all the time new checks.
> 
> regards
> Antti

https://github.com/torvalds/linux/blob/master/scripts/checkpatch.pl

./checkpatch.pl --version
Usage: checkpatch.pl [OPTION]... [FILE]...
Version: 0.32

Options:
  -q, --quiet                quiet
  --no-tree                  run without a kernel tree
  --no-signoff               do not check for 'Signed-off-by' line
  --patch                    treat FILE as patchfile (default)
  --emacs                    emacs compile window format
  --terse                    one line per report
  -f, --file                 treat FILE as regular source file
  --subjective, --strict     enable more subjective tests
  --ignore TYPE(,TYPE2...)   ignore various comma separated message types
  --show-types               show the message "types" in the output
  --root=PATH                PATH to the kernel tree root
  --no-summary               suppress the per-file summary
  --mailback                 only produce a report in case of
warnings/errors
  --summary-file             include the filename in summary
  --debug KEY=[0|1]          turn on/off debugging of KEY, where KEY is
one of
                             'values', 'possible', 'type', and 'attr'
(default
                             is all off)
  --test-only=WORD           report only warnings/errors containing WORD
                             literally
  -h, --help, --version      display this help and exit

When FILE is - read standard input.

./checkpatch.pl --no-tree
v4-1-5-rtl2832-ver.-0.4-removed-signal-statistics.patch.orig
ERROR: Macros with complex values should be enclosed in parenthesis
#977: FILE: drivers/media/dvb/frontends/rtl2832_priv.h:30:
+#define dbg(f, arg...) \
+	if (rtl2832_debug) \
+		printk(KERN_INFO LOG_PREFIX": " f "\n" , ## arg)

ERROR: Missing Signed-off-by: line(s)

total: 2 errors, 0 warnings, 1177 lines checked

v4-1-5-rtl2832-ver.-0.4-removed-signal-statistics.patch.orig has style
problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Bingo!

./checkpatch.pl --no-tree --file
v4-1-5-rtl2832-ver.-0.4-removed-signal-statistics.patch.orig
ERROR: trailing whitespace
#8: FILE: v4-1-5-rtl2832-ver.-0.4-removed-signal-statistics.patch.orig:8:
+ $

ERROR: trailing whitespace
#18: FILE: v4-1-5-rtl2832-ver.-0.4-removed-signal-statistics.patch.orig:18:
+ $

ERROR: trailing whitespace
#30: FILE: v4-1-5-rtl2832-ver.-0.4-removed-signal-statistics.patch.orig:30:
+ $

total: 3 errors, 0 warnings, 1205 lines checked

NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or
      scripts/cleanfile

v4-1-5-rtl2832-ver.-0.4-removed-signal-statistics.patch.orig has style
problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

regards,
poma

  reply	other threads:[~2012-05-17 21:03 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1>
2012-05-16 22:13 ` [PATCH v4 0/5] support for rtl2832 Thomas Mair
2012-05-16 22:13   ` [PATCH v4 1/5] rtl2832 ver. 0.4: removed signal statistics Thomas Mair
2012-05-17  3:36     ` poma
2012-05-17  3:40       ` poma
2012-05-17  8:04         ` Thomas Mair
2012-05-17 14:19     ` Antti Palosaari
2012-05-17 20:27       ` poma
2012-05-17 20:41         ` Antti Palosaari
2012-05-17 20:45           ` Thomas Mair
2012-05-17 20:49             ` Antti Palosaari
2012-05-17 21:03               ` poma [this message]
2012-05-17 21:08             ` poma
2012-05-17 21:19               ` Thomas Mair
2012-05-17 21:30                 ` poma
2012-05-18  0:55       ` poma
     [not found]         ` <CAKZ=SG_mvvFae9ZE2H3ci_3HosLmQ1kihyGx6QCdyQGgQro52Q@mail.gmail.com>
2012-05-18  9:15           ` poma
2012-05-18 10:38             ` poma
2012-05-18 12:38               ` Antti Palosaari
2012-05-18 13:26                 ` poma
2012-05-18 17:46                   ` Thomas Mair
2012-05-18 17:51                     ` Antti Palosaari
2012-05-16 22:13   ` [PATCH v4 2/5] rtl28xxu: support for the rtl2832 demod driver Thomas Mair
2012-05-17 14:41     ` Antti Palosaari
2012-05-16 22:13   ` [PATCH v4 3/5] rtl28xxu: renamed rtl2831_rd/rtl2831_wr to rtl28xx_rd/rtl28xx_wr Thomas Mair
2012-05-17 14:43     ` Antti Palosaari
2012-05-16 22:13   ` [PATCH v4 4/5] rtl28xxu: support G-Tek Electronics Group Lifeview LV5TDLX DVB-T Thomas Mair
2012-05-17 14:47     ` Antti Palosaari
2012-05-17 20:43       ` poma
2012-05-16 22:13   ` [PATCH v4 5/5] rtl28xxu: support Terratec Noxon DAB/DAB+ stick Thomas Mair
2012-05-17 14:50     ` Antti Palosaari
2012-05-17 14:53   ` [PATCH v4 0/5] support for rtl2832 Antti Palosaari
2012-05-18 18:47 ` [PATCH v5 " Thomas Mair
2012-05-18 18:47   ` [PATCH v5 1/5] rtl2832 ver. 0.5: support for RTL2832 demod Thomas Mair
2012-05-18 20:21     ` Antti Palosaari
2012-07-05 14:32     ` Mauro Carvalho Chehab
2012-07-05 14:35       ` Antti Palosaari
2012-07-05 15:54         ` Mauro Carvalho Chehab
2012-07-07 15:45           ` poma
2012-07-05 14:41       ` Antti Palosaari
2012-07-05 15:53         ` Mauro Carvalho Chehab
2012-05-18 18:47   ` [PATCH v5 2/5] rtl28xxu: support for the rtl2832 demod driver Thomas Mair
2012-05-18 20:28     ` Antti Palosaari
2012-05-18 18:47   ` [PATCH v5 3/5] rtl28xxu: renamed rtl2831_rd/rtl2831_wr to rtl28xx_rd/rtl28xx_wr Thomas Mair
2012-05-18 20:30     ` Antti Palosaari
2012-05-18 18:47   ` [PATCH v5 4/5] rtl28xxu: support Delock USB 2.0 DVB-T Thomas Mair
2012-05-18 20:31     ` Antti Palosaari
2012-05-18 18:47   ` [PATCH v5 5/5] rtl28xxu: support Terratec Noxon DAB/DAB+ stick Thomas Mair
2012-05-18 20:32     ` Antti Palosaari
2012-05-18 20:47   ` [PATCH v5 0/5] support for rtl2832 Antti Palosaari
2012-05-18 23:35     ` poma
2012-05-20  9:56     ` Thomas Mair
2012-05-20 10:14       ` Antti Palosaari
2012-05-18 23:39   ` poma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FB5678F.2010000@gmail.com \
    --to=pomidorabelisima@gmail.com \
    --cc=crope@iki.fi \
    --cc=linux-media@vger.kernel.org \
    --cc=thomas.mair86@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).