From: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
To: Joe Perches <joe@perches.com>
Cc: Linux Media <linux-media@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kernel-mentors@selenic.com" <kernel-mentors@selenic.com>,
devel@driverdev.osuosl.org,
kernel-janitors <kernel-janitors@vger.kernel.org>,
Hans Verkuil <hverkuil@xs4all.nl>,
Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Andrey Utkin <andrey.od.utkin@gmail.com>
Subject: Re: [RFC PATCH v0] Add tw5864 driver
Date: Sun, 3 Jan 2016 15:34:33 +0200 [thread overview]
Message-ID: <CAM_ZknXVt=2VQtdMi6u=EgjEPSdru7Eupq9=Dc3WMNvrVMSXOQ@mail.gmail.com> (raw)
In-Reply-To: <1451792869.4334.33.camel@perches.com>
On Sun, Jan 3, 2016 at 5:47 AM, Joe Perches <joe@perches.com> wrote:
> several of these have unnecessary parentheses
Thanks, fixed.
> Maybe use bool a bit more
Thanks, fixed.
> or maybe just use fls
Thanks, fls() fit greatly, rewritten the function with compatibility testing.
>> +static inline int bs_size_ue(unsigned int val)
>> +{
>> + int i_size = 0;
>> + static const int i_size0_254[255] = {
>
> Same sort of thing
Dropped this procedure because it is not used.
Thanks.
>> diff --git a/drivers/staging/media/tw5864/tw5864-config.c b/drivers/staging/media/tw5864/tw5864-config.c
> []
>> +u8 tw_indir_readb(struct tw5864_dev *dev, u16 addr)
>> +{
>> + int timeout = 30000;
>
> misleading name, retries would be more proper,
> or maybe use real timed loops.
Thanks, renamed to "retries".
> This seems a little repetitive.
Thanks, reworked.
> u16?
Thanks, fixed.
> odd indentation
Indeed. For some mysterious reason, vim + syntastic insists on this way. Fixed.
>> +#ifdef DEBUG
>> + dev_dbg(&input->root->pci->dev,
>> + "input %d, frame md stats: min %u, max %u, avg %u, cells above threshold: %u\n",
>> + input->input_number, min, max, sum / md_cells,
>> + cnt_above_thresh);
>> +#endif
>
> unnecessary #ifdef
Not quite. This debug printout works with variables which are declared
in another "#ifdef DEBUG" clause. And it turns out that dev_dbg is
compiled not only if DEBUG is declared, so when I remove this ifdef, I
get "undefined variable" errors. It seems it is compiled if this
condition is met:
#if (defined DEBUG) || (defined CONFIG_DYNAMIC_DEBUG)
so I can wrap my stats variables into this statement instead. But such
change is not equivalent - I guess CONFIG_DYNAMIC_DEBUG is common to
be enabled, so debug stats will be always calculated, even when module
is not under debug. Except if I use DEFINE_DYNAMIC_DEBUG_METADATA etc.
in my code. Please let me know if this can be sorted out in cleaner
way.
On Sun, Jan 3, 2016 at 7:38 AM, Leon Romanovsky <leon@leon.nu> wrote:
> On Sun, Jan 03, 2016 at 03:41:42AM +0200, Andrey Utkin wrote:
> ....
>> +/*
>> + * TW5864 driver - Exp-Golomb code functions
>> + *
>> + * Copyright (C) 2015 Bluecherry, LLC <maintainers@bluecherrydvr.com>
>> + * Copyright (C) 2015 Andrey Utkin <andrey.utkin@corp.bluecherry.net>
>
> I doubt that you have contract with your employer which permits you to
> claim copyright on the work/product.
Thank you for commenting.
I have previously asked my employer to review copyright statment, and
he told this is fine.
Now I have requrested him again with reference to your comment.
--
Bluecherry developer.
next prev parent reply other threads:[~2016-01-03 13:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-03 1:41 [RFC PATCH v0] Add tw5864 driver Andrey Utkin
2016-01-03 3:47 ` Joe Perches
2016-01-03 13:34 ` Andrey Utkin [this message]
2016-01-03 5:38 ` Leon Romanovsky
2016-01-11 10:52 ` Hans Verkuil
2016-01-15 2:13 ` Andrey Utkin
2016-02-08 9:58 ` Hans Verkuil
2016-02-08 10:23 ` Andrey Utkin
2016-02-08 10:29 ` Hans Verkuil
2016-03-09 14:29 ` Andrey Utkin
2016-03-11 8:00 ` Hans Verkuil
2016-03-11 8:40 ` Andrey Utkin
2016-03-11 9:59 ` Hans Verkuil
2016-03-11 13:23 ` Andrey Utkin
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='CAM_ZknXVt=2VQtdMi6u=EgjEPSdru7Eupq9=Dc3WMNvrVMSXOQ@mail.gmail.com' \
--to=andrey.utkin@corp.bluecherry.net \
--cc=andrey.od.utkin@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=gregkh@linuxfoundation.org \
--cc=hverkuil@xs4all.nl \
--cc=joe@perches.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kernel-mentors@selenic.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.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).