staging: vt6655: Replace BBvClearFOE by bbvclearfoe
PATCH 1/1 staging: vt6655: Replace BBvClearFOE by bbvclearfoe
This patch fixes the checkpatch issue by replacing BBvClearFOE with bbvclearfoe. Avoid CamelCase: <BBvClearFOE>
--- drivers/staging/vt6655/baseband.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vt6655/baseband.h +1 -1
@@ -58,7 +58,7 @@#define TOP_RATE_2M 0x00200000#define TOP_RATE_1M 0x00100000 -#define BBvClearFOE (dwIoBase) \ +#define bbvclearfoe (dwIoBase) \ BBbWriteEmbedded(dwIoBase, 0xB1, 0)#define BBvSetFOE (dwIoBase) \
Signature · 1 line
2.7.4
Quoted 13 lines · Varsha Rao
This patch fixes the checkpatch issue by replacing BBvClearFOE with bbvclearfoe. Avoid CamelCase: <BBvClearFOE>
Signed-off-by Varsha Rao <[email protected]>--- drivers/staging/vt6655/baseband.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/vt6655/baseband.h +0
-0
drivers/staging/vt6655/baseband.h line 61
Quoted 5 lines
drivers/staging/vt6655/baseband.h +1
-1@@ -58,7 +58,7 @@#define TOP_RATE_2M 0x00200000#define TOP_RATE_1M 0x00100000 -#define BBvClearFOE (dwIoBase) \ +#define bbvclearfoe (dwIoBase) \
Is the macro never used? It is strange to change a definition without at least one use. If there is no use, then the macro can be dropped.
julia
Quoted 13 lines
drivers/staging/vt6655/baseband.h +0
-1BBbWriteEmbedded(dwIoBase, 0xB1, 0)#define BBvSetFOE (dwIoBase) \ --2.7.4
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20161008112506.GA12694%40euri.
For more options, visit https://groups.google.com/d/optout.
Quoted 5 lines
Is the macro never used? It is strange to change a definition without at least one use. If there is no use, then the macro can be dropped.
No,it is not used anywhere else.I have checked it using grep command . I will remove it.
Quoted 9 lines · Varsha Rao
Is the macro never used? It is strange to change a definition without at
Quoted 2 lines
least one use. If there is no use, then the macro can be dropped.
No,it is not used anywhere else.I have checked it using grep command . I will remove it.
On executing make command ,after it's removal gives error.
In file included from drivers/staging/vt6655/device_main.c:53:0:
drivers/staging/vt6655/baseband.h:62:34: error: "0xB1" may not appear
in
macro parameter list
#define BBbWriteEmbedded(iobase, 0xB1, 0)
Quoted 15 lines · Varsha Rao
On Saturday, October 8, 2016 at 11:39:12 PM UTC+5:30, Varsha Rao wrote:
Is the macro never used? It is strange to change a definition without at
least one use. If there is no use, then the macro can be dropped.No,it is not used anywhere else.I have checked it using grep command .
I will remove it.
Quoted 7 lines
On executing make command ,after it's removal gives error.
In file included from
drivers/staging/vt6655/device_main.c:53:0:
drivers/staging/vt6655/baseband.h:62:34: error: "0xB1" may not appear in
macro parameter list
#defineBBbWriteEmbedded(iobase, 0xB1, 0)
Where did this code come from? You should remove the whole definition of the macro, not just the header line.
julia
Quoted 12 lines
--
You received this message because you are subscribed to the Google Groups
"outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/d15336f4-5027-4b19-b3fd- 52f4fac150c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
:
Quoted 16 lines
Quoted 12 lines
Is the macro never used? It is strange to change a definition without at
least one use. If there is no use, then the macro can be dropped.No,it is not used anywhere else.I have checked it using grep
command .
I will remove it.Quoted 4 lines
On executing make command ,after it's removal gives error.
In file included from
drivers/staging/vt6655/device_main.c:53:0:
drivers/staging/vt6655/baseband.h:62:34: error: "0xB1" may not
Quoted 9 lines
appear
Quoted 3 lines
in
macro parameter list
#defineBBbWriteEmbedded(iobase, 0xB1, 0)Where did this code come from? You should remove the whole definition of the macro, not just the header line.
I have tried using grep and gcc -dN -E to find the definition of it.But
couldn't find through them.
Quoted 26 lines · Varsha Rao
:
>
> Is the macro never used? It is strange to change a
> definition without at
> least one use. If there is no use, then the macro > can be dropped.
>
>
> No,it is not used anywhere else.I have checked it using grep
> command .
> I will remove it.
>
>
> On executing make command ,after it's removal gives error.
>
> In file included fromdrivers/staging/vt6655/device_main.c:53:0:
>drivers/staging/vt6655/baseband.h:62:34: error: "0xB1" may not appear
> in
> macro parameter list
> #defineBBbWriteEmbedded(iobase, 0xB1, 0)
Quoted 7 lines
Where did this code come from? You should remove the whole definition of
the macro, not just the header line.I have tried using grep and gcc -dN -E to find the definition of it.But couldn't find through them.
The above code is not a proper macro definition. What is the actual change that you made? You can see this by doing git diff on the file.
julia
Quoted 12 lines
--
You received this message because you are subscribed to the Google Groups
"outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/fd933dbe-c8ef-4f38-ae1c- 7f75a8bab6c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Quoted 6 lines
The above code is not a proper macro definition. What is the actual change that you made? You can see this by doing git diff on the file.
I have posted the patch by making the changes and but git diff won't
give information on from where it is imported . Since it is not macro definition , it has to be defined
somewhere. My question is how to locate the definition of it to remove
the macro completely? For that I have tried using grep and gcc -dN -E but could not locate using them.
Varsha
Quoted 9 lines · Varsha Rao
The above code is not a proper macro definition. What is the actual
change that you made? You can see this by doing git diff on the file.I have posted the patch by making the changes
Posted it where? If it is on the mailing list, I no longer have easy access to it. Please send it again in response to this message.
thanks,
julia
Quoted 20 lines
and but git diff won't
give information on from where it is imported . Since it is not macro definition , it has to be defined
somewhere. My question is how to locate the definition of it to remove the macro completely? For that I have tried using grep and gcc -dN -E but could not locate using them.Varsha
--
You received this message because you are subscribed to the Google Groups
"outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/5a2e45cf-903e-41c4-91d8 -37d45aea9ce7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
This patch fixes the checkpatch issue by replacing BBvClearFOE with bbvclearfoe.
---
drivers/staging/vt6655/baseband.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0
b/drivers/staging/vt6655/baseband.h
index 6d9a936..a732fba 100644
drivers/staging/vt6655/baseband.h +1 -1
@@ -58,7 +58,7 @@#define TOP_RATE_2M 0x00200000#define TOP_RATE_1M 0x00100000 -#define BBvClearFOE (dwIoBase) \ +#define bbvclearfoe (dwIoBase) \ BBbWriteEmbedded(dwIoBase, 0xB1, 0)#define BBvSetFOE (dwIoBase) \
Signature · 1 line
2.7.4
Quoted 20 lines · Varsha Rao
This patch fixes the checkpatch issue by replacing BBvClearFOE with bbvclearfoe.
Signed-off-by Varsha Rao <[email protected]>---
drivers/staging/vt6655/baseband.h | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/vt6655/baseband.h +0
-0@@ -58,7 +58,7 @@ #define TOP_RATE_2M 0x00200000 #define TOP_RATE_1M 0x00100000drivers/staging/vt6655/baseband.h +1
-1-#define BBvClearFOE (dwIoBase) \ +#define bbvclearfoe (dwIoBase) \
Quoted 1 line
BBbWriteEmbedded(dwIoBase,
0xB1, 0)
I think this is what you sent before, and that the macro is never used? I have the impression that what you did wrong is to just remove BBvClearFOE(dwIoBase) and not the entire macro definition (both lines).
julia
Quoted 16 lines
#define BBvSetFOE(dwIoBase) \
--
2.7.4--
You received this message because you are subscribed to the Google Groups
"outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/21e853d5-b5bb-4b00-b1b5- 7ec1a38145f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Quoted 3 lines
I think this is what you sent before, and that the macro is never used?
Yes, this is the same.
Quoted 5 lines
I have the impression that what you did wrong is to just remove BBvClearFOE(dwIoBase) and not the entire macro definition (both lines).
I made a mistake there but my question remains the same like how to
find in what file a macro is stored if it cannot be found by grep or gcc -dN -E?
Greg KH
maintainerOn Thu, Oct 13, 2016 at 05:37:55AM -0700, Varsha Rao wrote:
Please turn off html email in your email client options.
Quoted 7 lines
I think this is what you sent before, and that the macro is never used?
� �� Yes, this is the same.�
Quoted 7 lines
I have the impression that what you did wrong is to just remove BBvClearFOE(dwIoBase) and not the entire macro definition (both lines).
��
� �� I made a mistake there but my question remains the same like how to find in what file a macro is stored if it cannot be found by grep or gcc -dN -E?�
In that case, it is not used, so it can be removed, right?
thanks,
greg k-h
Quoted 7 lines · Varsha Rao
Quoted 2 lines
I think this is what you sent before, and that the macro is never used?
Yes, this is the same.
Quoted 2 lines
Quoted 7 lines
Quoted 3 lines
I have the impression that what you did wrong is to just remove BBvClearFOE(dwIoBase) and not the entire macro definition (both lines).
I made a mistake there but my question remains the same like how to
find in what file a macro is stored if it cannot be found by grep or gcc -dN -E?
What Julia is trying to say, is you are supposed to remove the whole definition, not just a single line. Which means that you need to remove these 2 lines [which is the Macro definition] :
#define bbvclearfoe(dwIoBase) \
BBbWriteEmbedded(dwIoBase, 0xB1, 0)This can be easily seen by git grep. But Git grep shows just the first line of the
definition. If this is the 2nd time you are sending a patch for the same issue then the patch should come out as a v2.
Also, I think there are some other macro(s) in the same file which are not used. They should go away as well.
On a side note, you are supposed to send the replies of mails in a plain text as well.
Quoted 10 lines
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected]. To view this discussion on the web visit
https://groups.google.com/d/msgid/outreachy-kernel/a2bc99d4-a161-429c-a7d6-4e9ba3a8b33b%40googlegroups.com.For more options, visit https://groups.google.com/d/optout.
Signature · 2 lines
Vaishali http://vaishalithakkar.in/
Quoted 4 lines
What Julia is trying to say, is you are supposed to remove the whole
definition,
Quoted 5 lines
not just a single line. Which means that you need to remove these 2 lines [which is the Macro definition] :
#define bbvclearfoe(dwIoBase) \
BBbWriteEmbedded(dwIoBase, 0xB1, 0)
I understood her point.
Quoted 7 lines
This can be easily seen by git grep. But Git grep shows just the first line of the
definition.If this is the 2nd time you are sending a patch for the same issue then the patch should come out as a v2.
No, it is not second time but I just posted the same patch.
Quoted 1 line
Also, I think there are some other macro(s) in the same file which are not
used.
Quoted 1 line
They should go away as well.
I will remove them.
Quoted 2 lines
On a side note, you are supposed to send the replies of mails in a plain text as well.
Quoted 7 lines · Varsha Rao
I think this is what you sent before, and that the macro is never used?
Yes, this is the same.
Quoted 8 lines
I have the impression that what you did wrong is to just remove BBvClearFOE(dwIoBase) and not the entire macro definition (both lines).
I made a mistake there but my question remains the same like how to find in what file a macro is stored if it cannot be found by grep or gcc -dN -E?
Two points:
1. If you made the change that I guess you made, then you moved what was in the body of the macro into the parameter list of the macro. The parameter list of the macro is very restricted. It should only be a lit of variable names, not arbitrary expressions.
2. A macro that is never used just disappears from the preprocessed code. It is not included in the code that is compiled. So it causes no problem to have a macro definition in Linux like:
#define never_used(a,b,c) Hello my name is Julia
The expansion of the macro is not valid C code, and refers to lots of undefined variables, but since they are not used, it doesn't matter.
On the other hand, the patch you sent in the most recent message is different than the code you were showing as erroneous. If the patch you sent is really the thing that you did, then it is possible that you converted a macro that is never used to a macro that actually is used, because it is shadowing a function of the same name. In that case too, you will have references to symbols that might not exist in the kernel.
In any case, the correct approach is to completely remove the definition.
julia
Quoted 12 lines
--
You received this message because you are subscribed to the Google Groups
"outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/a2bc99d4-a161-429c-a7d6- 4e9ba3a8b33b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks for your explanation. I will post the new patch with changes.
Greg KH
maintainerQuoted 11 lines · Varsha Rao
This patch fixes the checkpatch issue by replacing BBvClearFOE with bbvclearfoe.
Signed-off-by Varsha Rao <[email protected]>---
�drivers/staging/vt6655/baseband.h| 2 +-
�1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/vt6655/ renamed from drivers/staging/vt6655/baseband.h +0
-0
Quoted 1 line
baseband.h
Patch is line-wrapped and can not be applied :(
Greg KH
maintainerQuoted 9 lines · Varsha Rao
This patch fixes the checkpatch issue by replacing BBvClearFOE with bbvclearfoe.
Signed-off-by Varsha Rao <[email protected]>---
�drivers/staging/vt6655/baseband.h| 2 +-
�1 file changed, 1 insertion(+), 1 deletion(-)
It's also sent in html format which does not work :(
Quoted 4 lines
It's also sent in html format which does not work :(
Sorry it's not the patch but reply post for Julia.
Greg KH
maintainerQuoted 13 lines · Varsha Rao
This patch fixes the checkpatch issue by replacing BBvClearFOE with bbvclearfoe. Avoid CamelCase: <BBvClearFOE>
Signed-off-by Varsha Rao <[email protected]>--- drivers/staging/vt6655/baseband.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/vt6655/baseband.h +0
-0
drivers/staging/vt6655/baseband.h line 62
Quoted 6 lines
drivers/staging/vt6655/baseband.h +1
-1@@ -58,7 +58,7 @@#define TOP_RATE_2M 0x00200000#define TOP_RATE_1M 0x00100000 -#define BBvClearFOE (dwIoBase) \ +#define bbvclearfoe (dwIoBase) \ BBbWriteEmbedded(dwIoBase, 0xB1, 0)
As this isn't used at all, why not just remove it?
thanks,
greg k-h