Staging: comedi: mite: added spaces around | and *
PATCH 1/1 Staging: comedi: mite: added spaces around | and *
Added spaces around | and *, fixing 2 checkpatch checks.
--- drivers/staging/comedi/drivers/mite.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/comedi/drivers/mite.c +2 -2
@@ -51,7 +51,7 @@#include "mite.h" -#define TOP_OF_PAGE (x) ((x)|(~(PAGE_MASK))) +#define TOP_OF_PAGE (x) ((x) | (~(PAGE_MASK)))struct mite_struct *mite_alloc (struct pci_dev *pcidev) {
@@ -216,7 +216,7 @@ EXPORT_SYMBOL_GPL(mite_free_ring);struct mite_channel *mite_request_channel_in_range (struct mite_struct *mite,struct mite_dma_descriptor_ring - *ring,unsigned min_channel, + * ring,unsigned min_channel,unsigned max_channel) {int i;
Signature · 1 line
2.7.1
Quoted 1 line · Philippe Loctaux
Added spaces around | and *, fixing 2 checkpatch checks.
[]
drivers/staging/comedi/drivers/mite.c
Quoted 1 line
drivers/staging/comedi/drivers/mite.c +0
-0
[]
drivers/staging/comedi/drivers/mite.c line 54
Quoted 6 lines
drivers/staging/comedi/drivers/mite.c +0
-0@@ -51,7 +51,7 @@
#include "mite.h"drivers/staging/comedi/drivers/mite.c +1
-1-#define TOP_OF_PAGE (x) ((x)|(~(PAGE_MASK))) +#define TOP_OF_PAGE (x) ((x) | (~(PAGE_MASK)))
It'd be nice to remove superfluous parentheses here too
+#define TOP_OF_PAGE(x) ((x) | ~PAGE_MASK)
Quoted 7 lines · Joe Perches
Quoted 1 line · Philippe Loctaux
Added spaces around | and *, fixing 2 checkpatch checks.
[]
drivers/staging/comedi/drivers/mite.c
Quoted 1 line
drivers/staging/comedi/drivers/mite.c +0
-0[]
Quoted 2 lines
drivers/staging/comedi/drivers/mite.c +0
-0@@ -51,7 +51,7 @@
Quoted 9 lines
drivers/staging/comedi/drivers/mite.c line 54
Quoted 4 lines
drivers/staging/comedi/drivers/mite.c +1
-1#include "mite.h" -#define TOP_OF_PAGE (x) ((x)|(~(PAGE_MASK))) +#define TOP_OF_PAGE (x) ((x) | (~(PAGE_MASK)))It'd be nice to remove superfluous parentheses here too
+#define
TOP_OF_PAGE(x)((x) | ~PAGE_MASK)
Even better: just remove the macro, as it isn't used.
Signature · 2 lines
-=( Ian Abbott @ MEV Ltd. E-mail: <[email protected]> )=- -=( Web: http://www.mev.co.uk/ )=-
Quoted 1 line · Ian Abbott
Even better: just remove the macro, as it isn't used.
How can I do that? I'm asking that because my C knowledge isn't very good :P
--
Philippe Loctaux
[email protected]
Quoted 4 lines · Philippe Loctaux
Quoted 1 line · Ian Abbott
Even better: just remove the macro, as it isn't used.
How can I do that? I'm asking that because my C knowledge isn't very good :P
Are you sure you should be writing kernel patches in that case?
It means, just delete the macro definition.
Signature · 2 lines
-=( Ian Abbott @ MEV Ltd. E-mail: <[email protected]> )=- -=( Web: http://www.mev.co.uk/ )=-
Quoted 6 lines · Philippe Loctaux
Added spaces around | and *, fixing 2 checkpatch checks.
Signed-off-by Philippe Loctaux <[email protected]>--- drivers/staging/comedi/drivers/mite.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
[snip]
drivers/staging/comedi/drivers/mite.c EXPORT_SYMBOL_GPL(mite_free_ring); · line 220
Quoted 7 lines
drivers/staging/comedi/drivers/mite.c +1
-1@@ -216,7 +216,7 @@ EXPORT_SYMBOL_GPL(mite_free_ring);struct mite_channel *mite_request_channel_in_range (struct mite_struct *mite,struct mite_dma_descriptor_ring - *ring,unsigned min_channel, + * ring,unsigned min_channel,unsigned max_channel)
Actually, that one looks like a false positive by the checkpatch tool. I'd expect no space after that '*'. checkpatch has probably got confused by the line-break before the '*'.
It looks a bit ugly anyway. It would look better if there was a line-break before the function name, the same as in "drivers/staging/comedi/drivers/mite.h":
struct mite_channel *
mite_request_channel_in_range(struct mite_struct *mite,
struct mite_dma_descriptor_ring *ring, unsigned min_channel, unsigned max_channel)
Signature · 2 lines
-=( Ian Abbott @ MEV Ltd. E-mail: <[email protected]> )=- -=( Web: http://www.mev.co.uk/ )=-
Quoted 3 lines · Ian Abbott
Actually, that one looks like a false positive by the checkpatch tool. I'd expect no space after that '*'. checkpatch has probably got confused by the line-break before the '*'.
I see, I think I'll end up resending another patch without changing this line, to avoid any bugs or breaking some style rules.
--
Philippe Loctaux
[email protected]