Re: [PATCH 1/2] comedi: remove camelcase

2019-08-21 Thread Tobin C. Harding
On Wed, Aug 21, 2019 at 02:26:18AM -0700, Greg KH wrote: > On Tue, Aug 20, 2019 at 09:12:51PM -0700, Edmund Huber wrote: > > My apologies. Is it possible that you are replying to a different thread > > than intended? I don't think I have an email addressed to me from the > > patchbot. > > I got a

Re: [PATCH 2/2] staging/erofs: Balanced braces around a few conditional statements.

2019-08-21 Thread Tobin C. Harding
On Wed, Aug 21, 2019 at 10:31:22AM +0800, Gao Xiang wrote: > On Tue, Aug 20, 2019 at 07:26:46PM -0700, Joe Perches wrote: > > On Tue, 2019-08-20 at 20:18 -0400, Caitlyn wrote: > > > Balanced braces to fix some checkpath warnings in inode.c and > > > unzip_vle.c > > [] > > > diff --git a/drivers/sta

Re: [OSSNA] Intro to kernel hacking tutorial

2019-09-01 Thread Tobin C. Harding
On Sun, Sep 01, 2019 at 05:30:23AM +0530, Amit Kumar wrote: > Hi, > I think now your tutorial should be ready. I do not understand what this means sorry. Is it a request for action? The tutorial was a couple of weeks ago now, here is a link to the material if that is what you were asking https:

Re: [OSSNA] Intro to kernel hacking tutorial

2019-09-02 Thread Tobin C. Harding
On Mon, Sep 02, 2019 at 10:08:54AM -0400, Valdis Klētnieks wrote: > On Mon, 02 Sep 2019 15:42:19 +0300, Anatoly Pugachev said: > > > is it intentionally that you use > > > > yes "" | make oldconfig > > > > instead of > > > > make olddefconfig > > They do something different. 'olddefconfig' just

[OSSNA] Intro to kernel hacking tutorial

2019-07-04 Thread Tobin C. Harding
Hi, I am doing a tutorial at OSSNA in San Diego on getting into kernel hacking. I'm only a couple of years deep into kernel hacking so I wanted to reach out to those more experienced than myself (and those less experienced). Is there any thing that you would really like to see covered in this tu

Re: [OSSNA] Intro to kernel hacking tutorial

2019-07-08 Thread Tobin C. Harding
On Fri, Jul 05, 2019 at 10:40:43AM +0530, Amit Kumar wrote: > On Fri, Jul 5, 2019 at 9:02 AM Amit Kumar wrote: > > > > On Fri, Jul 5, 2019 at 8:21 AM Tobin C. Harding wrote: > > > > > > Hi, > > > > > > I am doing a tutorial at OSSNA in San Dieg

Re: [OSSNA] Intro to kernel hacking tutorial

2019-07-22 Thread Tobin C. Harding
On Fri, Jul 19, 2019 at 12:36:58PM +0300, Dan Carpenter wrote: > On Fri, Jul 05, 2019 at 12:50:55PM +1000, Tobin C. Harding wrote: > > Outcome will (hopefully) be a small patch set into drivers/staging/. > > (Don't worry Greg only one group got to this stage last time, you &

Re: [PATCH] staging: rtl8712: Fix unbalanced braces around else statement

2017-09-13 Thread Tobin C. Harding
On Wed, Sep 13, 2017 at 04:14:29PM +0100, Liam Ryan wrote: > On Wed, Sep 13, 2017 at 08:47:39AM +0200, Frans Klaver wrote: > > On Tue, Sep 12, 2017 at 2:40 AM, Liam Ryan wrote: > > > Fix checkpath-reported unbalanced braces in the following areas > > > > > > 221: FILE: drivers/staging/rtl8712/hal_

Re: [PATCH 1/3] staging: rtl8188eu: Fix a typo ("deflaut")

2017-09-14 Thread Tobin C. Harding
Good work getting this set submitted. On Thu, Sep 14, 2017 at 12:05:18PM -0700, Valentine Sinitsyn wrote: > This improves spelling in the comment line to make things easier to get > for future rtl8188eu developers. > > Fixes: ee5f8a431ea (staging: rtl8188eu: Move all efuse related code to > rtw_e

Re: [PATCH 0/3] Spelling fixes for rtl8188eu

2017-09-14 Thread Tobin C. Harding
On Thu, Sep 14, 2017 at 12:05:17PM -0700, Valentine Sinitsyn wrote: > There are some fixes for typos we discovered in rtl8188eu staging driver > as a part of our Open Source Summit North America 2017 tutorial session. > > Valentine Sinitsyn (3): > staging: rtl8188eu: Fix a typo ("deflaut") > s

Re: [PATCH v1] staging: rtl8188eu: Fix spelling

2017-09-22 Thread Tobin C. Harding
> Improve this by fixing typos so they won't catch eyes of future driver > developers anymore. This would be better in imperative mood i.e "Fix typos so they won't catch the eyes of future developers." > Signed-off-by: Wolfgang Hartmann > Signed-off-by: Manis

Re: [PATCH v2] Staging: rtl8723bs: Remove unnecessary comments.

2017-09-30 Thread Tobin C. Harding
Hi Shreeya, We don't usually add a period to the subject line for kernel patches. (reason: we only have about 52 characters for the commit brief description so best not to waste any). On Sat, Sep 30, 2017 at 01:30:34PM +0530, Shreeya Patel wrote: > This patch removes unnecessary comments which a

Re: [PATCH 0/6] Replace container_of with list_entry

2017-09-30 Thread Tobin C. Harding
On Sat, Sep 30, 2017 at 12:49:00PM +0530, Srishti Sharma wrote: > Replaces instances of container_of with list_entry to > access current list element. > > Srishti Sharma (6): > Staging: rtl8188eu: core: Use list_entry instead of container_of > Staging: rtl8188eu: core: Use list_entry instead

Re: [PATCH v3] Staging: rtl8723bs: Remove unnecessary comments.

2017-09-30 Thread Tobin C. Harding
On Sat, Sep 30, 2017 at 07:41:11PM +0530, Shreeya Patel wrote: > Remove unnecessary comments which are there > to explain why call to memset is in comments. Both of the > comments are not needed as they are not very useful. > > > Signed-off-by: Shreeya Patel > --- > Changes in v2: > -Remove so

Re: [PATCH 00/18] use ARRAY_SIZE macro

2017-10-01 Thread Tobin C. Harding
On Sun, Oct 01, 2017 at 03:30:38PM -0400, Jérémy Lefaure wrote: > Hi everyone, > Using ARRAY_SIZE improves the code readability. I used coccinelle (I > made a change to the array_size.cocci file [1]) to find several places > where ARRAY_SIZE could be used instead of other macros or sizeof > divisio

Re: [PATCH] Staging: rtlwifi: Remove NULL pointer dereference

2017-10-09 Thread Tobin C. Harding
On Tue, Oct 10, 2017 at 02:48:58AM +0530, Shreeya Patel wrote: > Remove NULL pointer dereference as it results in undefined > behaviour, and will usually lead to a runtime error. The diff does not show any pointer dereference so it is hard to understand what you are trying to do with this patch.

Re: [PATCH v2] Staging: bcm2048 fix bare use of 'unsigned' in radio-bcm2048.c

2017-10-10 Thread Tobin C. Harding
Hi Branislav, On Tue, Oct 10, 2017 at 03:29:19PM +0200, Branislav Radocaj wrote: > This is a patch to the radio-bcm2048.c file that fixes up > a warning found by the checkpatch.pl tool. > > Signed-off-by: Branislav Radocaj Nice work, a few git log nit picks for you to ensure your future kernel

Re: [PATCH] Staging: rtlwifi: Remove NULL pointer dereference

2017-10-11 Thread Tobin C. Harding
On Wed, Oct 11, 2017 at 06:02:47PM +0530, Shreeya Patel wrote: > On Tue, 2017-10-10 at 11:06 +1100, Tobin C. Harding wrote: > > On Tue, Oct 10, 2017 at 02:48:58AM +0530, Shreeya Patel wrote: > > > > > > Remove NULL pointer dereference as it results in undefined > &

Re: [PATCH] stagin: atomisp: Fix oops by unbalanced clk enable/disable call

2017-10-16 Thread Tobin C. Harding
On Mon, Oct 16, 2017 at 02:34:48PM +0200, Hans de Goede wrote: > The common-clk core expects clk consumers to always call enable/disable > in a balanced manner. The atomisp driver does not call gmin_flisclk_ctrl() > in a balanced manner, so add a clock_on bool and skip redundant calls. > > This fi

Re: [PATCH] staging: ccree: Fix bool comparison

2017-10-16 Thread Tobin C. Harding
On Mon, Oct 16, 2017 at 03:38:11PM +0530, suni...@techveda.org wrote: > From: Suniel Mahesh > > Bool tests don't need comparisons. This commit log could be a bit longer. You may like to read Documentation/process/submitting-patches.rst (section 2). > This fixes the following coccinelle warning:

Re: [PATCH] staging: ccree: fix boolreturn.cocci warning

2017-10-16 Thread Tobin C. Harding
On Mon, Oct 16, 2017 at 03:39:57PM +0530, suni...@techveda.org wrote: > From: Suniel Mahesh > > This fixes the following coccinelle warning: > WARNING: return of 0/1 in function 'ssi_is_hw_key' with return type bool. Perhaps Coccinelle emits WARNING: return of 0/1 in function 'ssi_is_hw_key' wi

Re: [PATCH v2] staging: ccree: Fix bool comparison

2017-10-17 Thread Tobin C. Harding
On Wed, Oct 18, 2017 at 07:40:14AM +0530, suni...@techveda.org wrote: > From: Suniel Mahesh > > Comparision operator "equal to" not required on a variable > "foo" of type "bool". Bool has only two values, can be used > directly or with logical not. > > This fixes the following coccinelle warning

Re: [PATCH v2] staging: ccree: fix boolreturn.cocci warning

2017-10-17 Thread Tobin C. Harding
On Wed, Oct 18, 2017 at 07:42:53AM +0530, suni...@techveda.org wrote: > From: Suniel Mahesh > > Return "false" instead of 0. > > This fixes the following coccinelle warning: > WARNING: return of 0/1 in function 'ssi_is_hw_key' with return type bool. So close! The order of problem description and

Re: [PATCH v3] staging: ccree: fix boolreturn.cocci warning

2017-10-18 Thread Tobin C. Harding
*tfm) > { > - return 0; > + return false; > } > > #endif /* CRYPTO_TFM_REQ_HW_KEY */ > -- > 1.9.1 > For what it's worth, Reviewed-by: Tobin C. Harding As stated I am being particularly 'nit picky', the commit log is _probably_ good enough to

Re: [PATCH v3] staging: wlan-ng: Remove unnecessary parentheses

2017-10-18 Thread Tobin C. Harding
On Wed, Oct 18, 2017 at 11:48:21AM -0400, Frank A. Cancio Bello wrote: > Remove unnecessary parentheses to comply with preferred coding style for > the linux kernel and avoid the following checkpatch's messages: > 'CHECK: Unnecessary parentheses around' > 'CHECK: Logical continuations should be on

Re: [PATCH v3] staging: wlan-ng: Remove unnecessary parentheses

2017-10-18 Thread Tobin C. Harding
On Wed, Oct 18, 2017 at 06:50:52PM -0400, Frank A. Cancio Bello wrote: > On Thu, Oct 19, 2017 at 08:40:08AM +1100, Tobin C. Harding wrote: > > On Wed, Oct 18, 2017 at 11:48:21AM -0400, Frank A. Cancio Bello wrote: > > > --- a/drivers/staging/wlan-ng/p80211req.c > > > ++

Re: [PATCH] staging: ccree: Fix lines longer than 80 characters

2017-10-23 Thread Tobin C. Harding
On Mon, Oct 23, 2017 at 07:53:18AM -0700, Stephen Brennan wrote: > Simply break down some long lines and tab-indent them. Hi Stephen, Welcome to the Linux kernel. Great that you have put in a patch, you are, however, unlikely to see success fixing 'line over 80' warnings. There are a bunch of ar

Re: [PATCH] staging: ccree: Fix lines longer than 80 characters

2017-10-24 Thread Tobin C. Harding
correct etiquette, I am still learning also. On Tue, Oct 24, 2017 at 11:49:41AM +0300, Gilad Ben-Yossef wrote: > Hi Tobin, > > On Tue, Oct 24, 2017 at 6:02 AM, Tobin C. Harding wrote: > > On Mon, Oct 23, 2017 at 07:53:18AM -0700, Stephen Brennan wrote: > >> Simply break

Re: [PATCH] staging: ccree: Fix lines longer than 80 characters

2017-10-25 Thread Tobin C. Harding
On Tue, Oct 24, 2017 at 11:52:58PM -0700, Stephen Brennan wrote: > Hi Gilad & Tobin, > > > > Perhaps, if Stephen is willing, re-write the code to be more readable > > > by, for example, using a temp > > > variable for the register address, and in doing so both making the > > > code more readable a

Re: [REVIEW REQUEST] staging: unisys: review request for visorbus

2017-11-05 Thread Tobin C. Harding
On Mon, Oct 02, 2017 at 05:49:52PM +0200, gre...@linuxfoundation.org wrote: > On Mon, Oct 02, 2017 at 03:41:42PM +, Kershner, David A wrote: > > Hey Greg, we think the code for visorbus is ready to be moved out > > of staging, can you review it to see if we have missed anything? > > I think yo

Re: [REVIEW REQUEST] staging: unisys: review request for visorbus

2017-11-06 Thread Tobin C. Harding
On Mon, Nov 06, 2017 at 09:02:21AM +0100, gre...@linuxfoundation.org wrote: > On Mon, Nov 06, 2017 at 03:30:48PM +1100, Tobin C. Harding wrote: > > On Mon, Oct 02, 2017 at 05:49:52PM +0200, gre...@linuxfoundation.org wrote: > > > On Mon, Oct 02, 2017 at 03:41:42PM +, Kersh

Re: [PATCH 3/3] staging: ccree: simplify ioread/iowrite

2017-11-06 Thread Tobin C. Harding
On Mon, Nov 06, 2017 at 06:55:52AM +, Gilad Ben-Yossef wrote: > Registers ioread/iowrite operations were done via macros, > sometime using a "magical" implicit parameter. > > Replace all register access with simple inline macros. > > Signed-off-by: Gilad Ben-Yossef Hi, Nice work. I had a l

Re: [PATCH 3/3] staging: ccree: simplify ioread/iowrite

2017-11-06 Thread Tobin C. Harding
On Mon, Nov 06, 2017 at 04:46:54PM +0100, Greg Kroah-Hartman wrote: > On Mon, Nov 06, 2017 at 10:59:47AM +0200, Gilad Ben-Yossef wrote: > > On Mon, Nov 6, 2017 at 10:37 AM, Tobin C. Harding wrote: > > > On Mon, Nov 06, 2017 at 06:55:52AM +, Gilad Ben-Yossef wrote: >

Re: [REVIEW REQUEST] staging: unisys: review request for visorbus

2017-11-06 Thread Tobin C. Harding
On Mon, Nov 06, 2017 at 04:56:40PM +0300, Dan Carpenter wrote: > On Mon, Nov 06, 2017 at 07:17:11PM +1100, Tobin C. Harding wrote: > > > > @@ -260,9 +261,10 @@ int visorchannel_signalremove(struct visorchannel > > > > *channel, u32 queue, > > > >

Re: [PATCH v2] staging: fsl-mc: fix mc-portal to use u32 type

2017-11-21 Thread Tobin C. Harding
On Tue, Nov 21, 2017 at 10:35:23AM +0530, Bharat Bhushan wrote: > According to MC APIs, size of mc-portal in 32bit. > Also fsl_create_mc_io() storing 32 bit mc-portal size. >" mc_io->portal_size = mc_portal_size;" >While "mc_io->portal_size" is u16 type and >"mc_portal_size" is u32 type

Re: [PATCH] Staging: comedi: adl_pci9118: fixed some parentheses coding style issue

2017-11-21 Thread Tobin C. Harding
You may like to limit the git log brief description to 50 characters (this is going to be hard with such a long pre-fix though :) Brief description should be in imperative mood i.e 'Fix foo' instead of 'fixed foo'. On Tue, Nov 21, 2017 at 05:17:53PM -0200, Guilherme Tadashi Maeoka wrote: > Fixed

Re: [PATCH] Fix style issues in olpc_dcon

2017-11-21 Thread Tobin C. Harding
Missing subsystem in subject line. Please use the same git brief description format that has been used previously for files you want to patch. You can view previous commits for a file using git log --pretty=oneline --abbrev --reverse On Mon, Nov 20, 2017 at 03:14:21PM -0600, zebmccor...@d

Re: [PATCH 0/4] staging: lustre: fixed some signedness warns from sparse

2017-11-22 Thread Tobin C. Harding
On Wed, Nov 22, 2017 at 08:38:27PM +0100, Stefano Manni wrote: > Fixed some signedness warnings from sparse on lustre. > > Stefano Manni (4): > staging: lustre: fixed signedness of some socklnd params > staging: lustre: fixed signedness of llite > staging: lustre: fixed signedness of lov >

Re: [PATCH 0/4] staging: lustre: fixed some signedness warns from sparse

2017-11-23 Thread Tobin C. Harding
On Thu, Nov 23, 2017 at 02:51:38PM +0300, Dan Carpenter wrote: > On Thu, Nov 23, 2017 at 03:59:26PM +1100, Tobin C. Harding wrote: > > On Wed, Nov 22, 2017 at 08:38:27PM +0100, Stefano Manni wrote: > > > Fixed some signedness warnings from sparse on lustre. > > &

Re: [PATCH 0/4] staging: lustre: fixed some signedness warns from sparse

2017-11-24 Thread Tobin C. Harding
On Fri, Nov 24, 2017 at 04:02:09PM +0300, Dan Carpenter wrote: > On Fri, Nov 24, 2017 at 09:20:20AM +1100, Tobin C. Harding wrote: > > My current favourite review of all time was done by you on a what was > > at the time a pretty hard patch for me. It was > > > > No

[PATCH] greybus: fw-management: Replace strncpy with strlcpy

2017-02-14 Thread Tobin C. Harding
ermination checks with checks for truncated string. Add log message if string is truncated but do not return an error code. Signed-off-by: Tobin C. Harding --- drivers/staging/greybus/fw-management.c | 59 +++-- 1 file changed, 19 insertions(+), 40 deletions(-) diff --git

[PATCH] staging: fbtft: Fix buffer overflow vulnerability

2017-02-14 Thread Tobin C. Harding
Module copies a user supplied string (module parameter) into a buffer using strncpy() and does not check that the buffer is null terminated. Replace call to strncpy() with call to strlcpy() ensuring that the buffer is null terminated. Signed-off-by: Tobin C. Harding --- drivers/staging/fbtft

[PATCH v2 0/3] staging: fbtft: Fix buffer overflow vulnerability

2017-02-14 Thread Tobin C. Harding
. Check return value of call to strlcpy() and throw warning if source string is truncated. v1 was a single patch. v2 adds 2 extra patches while retaining the original v1 patch as the first of the series. v2: - Replace magic number - Check return value of call to strlcpy() Tobin C. Harding (3

[PATCH v2 3/3] staging: fbtft: Add check on strlcpy() return value

2017-02-14 Thread Tobin C. Harding
return value from call to strlcpy(). If source string is truncated call pr_warn() to notify user. Signed-off-by: Tobin C. Harding --- drivers/staging/fbtft/fbtft_device.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/staging/fbtft/fbtft_device.c b/drivers

[PATCH v2 2/3] staging: fbtft: Replace magic number with constant

2017-02-14 Thread Tobin C. Harding
Current call to strncmp() uses a magic number. There is a compile time constant defined for this buffer, included and used already at other sites in the file. Remove magic number. Replace with pre-existing compile time constant. Signed-off-by: Tobin C. Harding --- drivers/staging/fbtft

[PATCH v2 1/3] staging: fbtft: Fix buffer overflow vulnerability

2017-02-14 Thread Tobin C. Harding
Module copies a user supplied string (module parameter) into a buffer using strncpy() and does not check that the buffer is null terminated. Replace call to strncpy() with call to strlcpy() ensuring that the buffer is null terminated. Signed-off-by: Tobin C. Harding --- drivers/staging/fbtft

[PATCH 0/9] staging: ks7010: Checkpatch fixes

2017-02-19 Thread Tobin C. Harding
manner, perhaps that should be done in this series also? 9 patches for the series seemed like it was enough. After application of this series 3 types of checkpatch message remain (line over 80, macro argument reuse, and code compiled out with ifdef). Tobin C. Harding (9): staging: ks7010: Fix

[PATCH 2/9] staging: ks7010: Remove dead code

2017-02-19 Thread Tobin C. Harding
There are blocks of code that are commented out. Remove commented out code. Fix two small spelling typo's. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging/ks7010/ks7010_s

[PATCH 1/9] staging: ks7010: Fix checkpatch warnings

2017-02-19 Thread Tobin C. Harding
There are multiple line dereferences. This leaves a '.' as the last character of the line and makes the code hard to read. Move variable dereference onto single line. Even if this causes line over 80 warning. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_s

[PATCH 5/9] staging: ks7010: refactor, change retval to ret

2017-02-19 Thread Tobin C. Harding
three characters to fit on each line. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c index 06d1037..29d332d 100644

[PATCH 4/9] staging: ks7010: Fix checkpatch warning

2017-02-19 Thread Tobin C. Harding
. Invert conditionals. Also change && to ||. Return immediately if new conditionals are true. Do not touch remaining code except to remove indentation. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 122 +-- 1 file changed, 61 in

[PATCH 3/9] staging: ks7010: Fix checkpatch warning

2017-02-19 Thread Tobin C. Harding
Checkpatch emits warning because string is split over two lines. Concatenate string onto single line. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers

[PATCH 6/9] staging: ks7010: Refactor code

2017-02-19 Thread Tobin C. Harding
Code may be refactored to take advantage of previous commit. Refactor code. Introduce four new line over 80 warnings. Make code more legible. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 31 +-- 1 file changed, 9 insertions(+), 22

[PATCH 7/9] staging: ks7010: Remove level of indentation

2017-02-19 Thread Tobin C. Harding
Checkpatch emits warning that code is too deeply nested. Remove one level of nesting by inverting if statement conditional and using goto to maintain program logic. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 151 ++- 1 file

[PATCH 8/9] staging: ks7010: Refactor code

2017-02-19 Thread Tobin C. Harding
Code is able to be refactored. Various assignments have the assigning value on a separate line. Refactor code bring it closer to kernel standards. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 29 + 1 file changed, 9 insertions(+), 20

[PATCH 9/9] staging: ks7010: Fix checkpatch whitespace checks

2017-02-19 Thread Tobin C. Harding
Checkpatch emits two CHECK messages; CHECK: Logical continuations should be on the previous line CHECK: Alignment should match open parenthesis Move logical continuations onto the previous line. Add whitespace to align code with parenthesis. Signed-off-by: Tobin C. Harding --- drivers/staging

staging: ks7010: Checkpatch fixes

2017-02-19 Thread Tobin C. Harding
ectly used or is defined and not needed. Fix whitespace errors/warnings/checks. Fix macro definition to clear checkpatch check and error. Kernelnewbie note: I am unsure how to broach issues like this when discovered. In a patch cover letter like this or some other way? Tobin C. Harding (2): st

[PATCH 1/2] staging: ks7010: Whitespace checkpatch fixes

2017-02-19 Thread Tobin C. Harding
. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks7010_sdio.h b/drivers/staging/ks7010/ks7010_sdio.h index 0f5fd84..9103522 100644 --- a/drivers/staging/ks7010/ks7010_sdio.h +++ b

[PATCH 2/2] staging: ks7010: Checkpatch macro fixes

2017-02-19 Thread Tobin C. Harding
Checkpatch emits messages relating to macro definition CHECK: spaces preferred around that '*' (ctx:VxV) ERROR: Macros with complex values should be enclosed in parentheses Add space around '*'. Add parentheses to macro definition. Signed-off-by: Tobin C. Harding --- dr

[PATCH 0/8] staging: ks7010: Refactor, fix checkpatch

2017-02-20 Thread Tobin C. Harding
functions to make code cleaner. This code has not been tested other than to be built. Needs hardware to test. Tobin C. Harding (8): staging: ks7010: Fix checkpatch errors staging: ks7010: Fix checkpatch warning staging: ks7010: Refactor hostif_data_indication whitespace refactor staging

[PATCH 2/8] staging: ks7010: Fix checkpatch warning

2017-02-20 Thread Tobin C. Harding
Checkpatch emits WARNING: Comparisons should place the constant on the right side of the test. Move constant to the rights side of the test. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers

[PATCH 3/8] staging: ks7010: Refactor hostif_data_indicationyes

2017-02-20 Thread Tobin C. Harding
code to call new functions. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 267 + 1 file changed, 149 insertions(+), 118 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index a9

[PATCH 5/8] staging: ks7010: Remove level of indentation

2017-02-20 Thread Tobin C. Harding
ned-off-by: Tobin C. Harding --- Correct error constant to return? drivers/staging/ks7010/ks_hostif.c | 143 +++-- 1 file changed, 72 insertions(+), 71 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 565f05

[PATCH 8/8] staging: ks7010: Rename refactored function

2017-02-20 Thread Tobin C. Harding
Function was not named during initial refactoring. Give function new meaningful name. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010

[PATCH 6/8] staging: ks7010: Remove level of indentation

2017-02-20 Thread Tobin C. Harding
omplicated conditional to separate variable. Invert conditional and remove level of indentation as per previous commit. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 121 ++--- 1 file changed, 59 insertions(+), 62 deletions(-) diff --git a/drive

[PATCH 7/8] staging: ks7010: Refactor after indentation removal

2017-02-20 Thread Tobin C. Harding
Code is able to be refactored after previous removal of levels of indentation. Refactor code to bring it more inline with kernel standards. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 53 ++ 1 file changed, 20 insertions(+), 33

[PATCH 1/8] staging: ks7010: Fix checkpatch errors

2017-02-20 Thread Tobin C. Harding
Checkpatch emits various whitespace errors and warnings. Add whitespace around binary operators and logical operators. Remove whitespace where checkpatch complains. Signed-off-by: Tobin C. Harding --- Perhaps I do not know how to parse a diff visually but these changes do not look like an

[PATCH 4/8] staging: ks7010: Refactor whitespace

2017-02-20 Thread Tobin C. Harding
hostif_data_indication is able to be refactored after previous commit. Refactor function in two separate patches to ease review. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git

[PATCH 0/3] Fix checkpatch warnings

2017-02-21 Thread Tobin C. Harding
ew line over 80 checkpatch warnings. Tobin C. Harding (3): staging: comedi: Fix checkpatch CONST_STRUCT staging: comedi: Remove level of indentation staging: comedi: Fix checkpatch MULTILINE_DEREFERENCE drivers/staging/comedi/drivers/addi_apci_3501.c | 2 +- drivers/staging/comedi/driver

[PATCH 1/3] staging: comedi: Fix checkpatch CONST_STRUCT

2017-02-21 Thread Tobin C. Harding
Checkpatch emits WARNING: struct comedi_lrange should normally be const. Add const keyword to definition of struct. Signed-off-by: Tobin C. Harding --- drivers/staging/comedi/drivers/addi_apci_3501.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi

[PATCH 3/3] staging: comedi: Fix checkpatch MULTILINE_DEREFERENCE

2017-02-21 Thread Tobin C. Harding
kpatch warnings. Signed-off-by: Tobin C. Harding --- drivers/staging/comedi/drivers/adl_pci9118.c | 3 +-- drivers/staging/comedi/drivers/cb_pcidas64.c | 19 ++- drivers/staging/comedi/drivers/dt3000.c | 3 +-- drivers/staging/comedi/drivers/jr3_pci.c |

[PATCH 2/3] staging: comedi: Remove level of indentation

2017-02-21 Thread Tobin C. Harding
evaluates to true. Remove one level of indentation from subsequent loop body. Signed-off-by: Tobin C. Harding --- drivers/staging/comedi/drivers/cb_pcidas64.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c

Re: [PATCH 2/3] staging: comedi: Remove level of indentation

2017-02-21 Thread Tobin C. Harding
Re-send and include cc's On Tue, Feb 21, 2017 at 03:55:18PM +, Ian Abbott wrote: > On 21/02/17 11:18, Tobin C. Harding wrote: > > For comedi patches affecting a single driver, we prefer the driver name to > be mentioned in the patch subject, like... > > staging: co

Re: [PATCH 3/3] staging: comedi: Fix checkpatch MULTILINE_DEREFERENCE

2017-02-21 Thread Tobin C. Harding
On Tue, Feb 21, 2017 at 04:00:40PM +, Ian Abbott wrote: > On 21/02/17 11:18, Tobin C. Harding wrote: > >Checkpatch emits multiple WARNING: Avoid multiple line dereference. > >Removing these warnings will result in line over 80 warnings being > >introduced. However, > &g

Comedi use of standard types

2017-02-21 Thread Tobin C. Harding
Comedi drivers make heavy use of standard types i.e unsigned short. According to Linux Device Drivers standard C data types are not the same size of all architectures. Should we be converting comedi/drivers to use kernel types u8, u16 etc Follow up question. Some comedi/drivers also use unsigned

Re: Comedi use of standard types

2017-02-21 Thread Tobin C. Harding
On Wed, Feb 22, 2017 at 08:27:37AM +1100, Tobin C. Harding wrote: > Comedi drivers make heavy use of standard types i.e unsigned > short. According to Linux Device Drivers standard C data types are not > the same size of all architectures. > > Should we be converting comedi/driver

[PATCH] staging: comedi: s626: Kernel doc format comments

2017-02-21 Thread Tobin C. Harding
driver. Remove comments on structure members. Add original comments to the head of the structure definition in kernel doc format. Signed-off-by: Tobin C. Harding --- drivers/staging/comedi/drivers/s626.c | 46 --- 1 file changed, 27 insertions(+), 19 deletions

Re: [PATCH 2/3] staging: comedi: Remove level of indentation

2017-02-22 Thread Tobin C. Harding
On Wed, Feb 22, 2017 at 11:52:49AM +, Ian Abbott wrote: > On 21/02/17 20:32, Tobin C. Harding wrote: > >On Tue, Feb 21, 2017 at 03:55:18PM +, Ian Abbott wrote: > >>On 21/02/17 11:18, Tobin C. Harding wrote: > >> > >>For comedi patches affecting a single

Re: Comedi use of standard types

2017-02-22 Thread Tobin C. Harding
On Wed, Feb 22, 2017 at 04:51:05PM +0300, Dan Carpenter wrote: > On Wed, Feb 22, 2017 at 11:46:07AM +, Ian Abbott wrote: > > On 21/02/17 21:27, Tobin C. Harding wrote: > > >Comedi drivers make heavy use of standard types i.e unsigned > > >short. According to Linu

Re: [PATCH v3] staging: xgifb: function prototype argument should also have an identifier name

2017-02-22 Thread Tobin C. Harding
Please use the imperative mood in the subject line i.e the short form of git commit log. A couple of example Subjects:: Subject: [PATCH 2/5] ext2: improve scalability of bitmap searching Subject: [PATCH v2 01/27] x86: fix eflags tracking Awesome work on you patches! thanks, Tobin. _

[PATCH 1/5] staging: ks7010: invert conditional, reduce indent

2017-02-26 Thread Tobin C. Harding
conditional evaluates to true. Repeat on subsequent conditional. Reduce indentation without changing the program logic. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 122 ++- 1 file changed, 62 insertions(+), 60 deletions(-) diff

[PATCH 3/5] staging: ks7010: move logic operator to end of line

2017-02-26 Thread Tobin C. Harding
Logic operator (&&) is place at the start of the line. Kernel standards suggest that logical operators should be placed at the end of the line. Move logical operator to the end of the previous line. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 6 +++---

[PATCH 0/5] staging: ks7010 refactor _ks_wlan_hw_power_save

2017-02-26 Thread Tobin C. Harding
various function call parameters split over many lines due to the deep nesting. Reduce level of indentation (by 3), fix checkpatch warnings and clean up function call parameter line placing. Tobin C. Harding (5): staging: ks7010: invert conditional, reduce indent staging: ks7010: fix checkpatch

[PATCH 2/5] staging: ks7010: fix checkpatch MULTILINE_DEREFERENCE

2017-02-26 Thread Tobin C. Harding
Checkpatch emits WARNING: Avoid multiple line dereference. Move dereference onto single line. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers

[PATCH 4/5] staging: ks7010: remove switch statement

2017-02-26 Thread Tobin C. Harding
conditional and return if conditional evaluates to true. Reduce level of indentation. Do not change the program logic. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 89 +--- 1 file changed, 43 insertions(+), 46 deletions(-) diff --git a

[PATCH 5/5] staging: ks7010: refactor function call parameters

2017-02-26 Thread Tobin C. Harding
statements onto single line. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 40 1 file changed, 13 insertions(+), 27 deletions(-) diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c index 04130f

Re: [PATCHv3 1/4] Encasing macros with complex values (ie: base value plus index) with parentheses.

2017-02-26 Thread Tobin C. Harding
On Sun, Feb 26, 2017 at 06:00:19PM -0800, Matthew Giassa wrote: > --- > drivers/staging/ks7010/ks_wlan_ioctl.h | 64 > +- > 1 file changed, 32 insertions(+), 32 deletions(-) > > diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h > b/drivers/staging/ks7010/ks_wla

[PATCH] staging: comedi: db_pcidas64: invert conditional

2017-02-26 Thread Tobin C. Harding
indentation level by 1. Move multi-line dereference onto single line. Signed-off-by: Tobin C. Harding --- drivers/staging/comedi/drivers/cb_pcidas64.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging

Re: [PATCH] staging: comedi: db_pcidas64: invert conditional

2017-02-27 Thread Tobin C. Harding
On Mon, Feb 27, 2017 at 10:46:34AM +, Ian Abbott wrote: > On 27/02/17 06:36, Tobin C. Harding wrote: > >Checkpatch emits WARNING: Avoid multiple line dereference. It is > >possible to reduce the level of indentation by inverting a conditional > >and continuing loop if new

Re: [Outreachy kernel] Re: [PATCH v2] staging: ks7010: remove code in comments.

2017-02-27 Thread Tobin C. Harding
On Mon, Feb 27, 2017 at 04:07:27PM +0100, Julia Lawall wrote: > > > On Mon, 27 Feb 2017, Arushi Singhal wrote: > > > > > > > On Mon, Feb 27, 2017 at 8:18 PM, Greg KH wrote: > > On Sun, Feb 26, 2017 at 09:38:20PM +0530, Arushi Singhal wrote: > > > Commenting Code Is a Bad Idea. > >

[PATCH 0/2] staging: comedi: cb_pcidas64: refactor function

2017-02-27 Thread Tobin C. Harding
, fix function parameter alignment. This is a re-work of patch (and based of review of); [PATCH] staging: comedi: db_pcidas64: invert conditional However the subject was incorrect, hence a *new* patch series. Tobin C. Harding (2): staging: comedi: cb_pcidas64: refactor out function staging

[PATCH 2/2] staging: comedi: cb_pcidas64: refactor relocated code

2017-02-27 Thread Tobin C. Harding
Code was moved to a separate function in a previous patch. Code structure wast maintained to ease review. Code may now be refactored to ease reading. Move multi-line dereference onto single line. Give function parameter more meaningful name. Fix minor alignment issue. Signed-off-by: Tobin C

[PATCH 1/2] staging: comedi: cb_pcidas64: refactor out function

2017-02-27 Thread Tobin C. Harding
variables to new function in identical manner to calling function. Signed-off-by: Tobin C. Harding --- drivers/staging/comedi/drivers/cb_pcidas64.c | 28 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b

Re: [PATCH 2/2] staging: comedi: cb_pcidas64: refactor relocated code

2017-02-28 Thread Tobin C. Harding
On Tue, Feb 28, 2017 at 02:36:25PM +, Ian Abbott wrote: > On 27/02/17 21:08, Tobin C. Harding wrote: > >Code was moved to a separate function in a previous patch. Code > >structure wast maintained to ease review. Code may now be refactored > >to ease reading. > > >

[PATCH 2/3] staging: ks7010: make whitespace changes

2017-03-06 Thread Tobin C. Harding
Function ks_sdio_interrupt may be refactored after previous patch reduced the level of indentation in the function. Refactor function inline with kernel coding style. Make only white space changes. Do not alter the program logic. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010

[PATCH 3/3] staging: ks7010: add additional goto target

2017-03-06 Thread Tobin C. Harding
labelled for use with goto. Add additional goto target and remove multiple return sites. As a bonus clear three checkpatch warnings (line over 80 and multi-line dereference). Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 21 ++--- 1 file changed, 10

[PATCH 0/3] clean up ks_sdio_interrupt()

2017-03-06 Thread Tobin C. Harding
three checkpatch warnings. Tobin C. Harding (3): staging: ks7010: remove one level of indentation staging: ks7010: make whitespace changes staging: ks7010: add additional goto target drivers/staging/ks7010/ks7010_sdio.c | 153 +-- 1 file changed, 72 inser

[PATCH 1/3] staging: ks7010: remove one level of indentation

2017-03-06 Thread Tobin C. Harding
completed, this will open the way for further refactoring. Invert conditional. Add goto statement to return from function if new conditional evaluates true. Reduce level of indentation by one. Do not alter program logic. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sd

[PATCH] staging: comedi: cb_pcidas64: move loop invariant

2017-03-06 Thread Tobin C. Harding
Loop invariant is inside the loop so code checks invariant on each iteration of the loop. Invariant can be moved outside of the loop so it is only checked once. Move loop invariant outside of for loop. Signed-off-by: Tobin C. Harding --- drivers/staging/comedi/drivers/cb_pcidas64.c | 4 ++-- 1

Re: [PATCH 2/2] staging: comedi: cb_pcidas64: refactor relocated code

2017-03-06 Thread Tobin C. Harding
On Tue, Feb 28, 2017 at 02:36:25PM +, Ian Abbott wrote: > On 27/02/17 21:08, Tobin C. Harding wrote: > >Code was moved to a separate function in a previous patch. Code > >structure wast maintained to ease review. Code may now be refactored > >to ease reading. > > >

  1   2   3   4   5   6   >