target-mips: Remove unused inline function
PATCH 1/1 target-mips: Remove unused inline function
Function set_HILO is not needed anywhere.
--- target-mips/op_helper.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-)
target-mips/op_helper.c +0 -6
@@ -193,12 +193,6 @@ static inline uint64_t get_HILO (void)return ((uint64_t )(env->active_tc.HI[0 ]) <<32 ) | (uint32_t )env->active_tc.LO[0 ]; } -static inline void set_HILO (uint64_t HILO ) -{ - env->active_tc.LO[0 ] = (int32_t )HILO ; - env->active_tc.HI[0 ] = (int32_t )(HILO >>32 ); -} -static inline void set_HIT0_LO (target_ulong arg1,uint64_t HILO ) { env->active_tc.LO[0 ] = (int32_t )(HILO &0xFFFFFFFF );
Signature · 1 line
1.7.9
Hello Stefan,
Am 17.03.2012 13:00, schrieb Stefan Weil:
Quoted 1 line
Function
set_HILOis not needed anywhere.
Does this cause any warnings? Given the state mips is currently in (TCG patches queuing), I'd suggest to hold this off for a bit, but I don't really mind either way.
Commit message does not mention if this was never used in the first place or became unused during TCG conversion or some other refactoring?
Andreas
Quoted 23 lines
Signed-off-by Stefan Weil <[email protected]>--- target-mips/op_helper.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-)target-mips/op_helper.c +0
-6@@ -193,12 +193,6 @@ static inline uint64_t get_HILO (void)return ((uint64_t )(env->active_tc.HI[0 ]) <<32 ) | (uint32_t )env->active_tc.LO[0 ]; } -static inline void set_HILO (uint64_t HILO ) -{ - env->active_tc.LO[0 ] = (int32_t )HILO ; - env->active_tc.HI[0 ] = (int32_t )(HILO >>32 ); -} -static inline void set_HIT0_LO (target_ulong arg1,uint64_t HILO ) { env->active_tc.LO[0 ] = (int32_t )(HILO &0xFFFFFFFF );
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Quoted 11 lines · Andreas Färber
Hello Stefan,
Am 17.03.2012 13:00, schrieb Stefan Weil:
Quoted 1 line
Function
set_HILOis not needed anywhere.Does this cause any warnings? Given the state mips is currently in (TCG patches queuing), I'd suggest to hold this off for a bit, but I don't really mind either way.
Commit message does not mention if this was never used in the first place or became unused during TCG conversion or some other refactoring?
It doesn't cause any warning on my build here, so there's no strict need for this patch.
I have dropped the patch for now. Please resend if you want to get it in and address Andreas' questions.
Thanks,
Stefan
Am 19.03.2012 13:17, schrieb Stefan Hajnoczi:
Quoted 13 lines · Andreas Färber
Quoted 11 lines
Hello Stefan,
Am 17.03.2012 13:00, schrieb Stefan Weil:
Quoted 1 line
Function
set_HILOis not needed anywhere.Does this cause any warnings? Given the state mips is currently in (TCG patches queuing), I'd suggest to hold this off for a bit, but I don't really mind either way.
Commit message does not mention if this was never used in the first place or became unused during TCG conversion or some other refactoring?
Quoted 8 lines
It doesn't cause any warning on my build here, so there's no strict need for this patch.
I have dropped the patch for now. Please resend if you want to get it in and address Andreas' questions.
Thanks,
Stefan
Hi Andreas, hi Stefan
the function was never used. It should be removed just to keep the code clean and free of unneeded functions. I noticed this function when I looked after the functions which follow (set_HIT0_LO, ...). Those functions are very similar, so I think set_HILO was the copy master for those functions (maybe used in a local code version whic was never committed).
Static inline functions never create a gcc warning when they are unused, as far as I know. Maybe other tools like static code analysers raise a warning.
Cheers,
Stefan
Am 19.03.2012 13:31, schrieb Stefan Weil:
Quoted 19 lines
Am 19.03.2012 13:17, schrieb Stefan Hajnoczi:
Quoted 9 lines
Quoted 7 lines · Andreas Färber
Am 17.03.2012 13:00, schrieb Stefan Weil:
Quoted 1 line
Function
set_HILOis not needed anywhere.Does this cause any warnings? Given the state mips is currently in (TCG patches queuing), I'd suggest to hold this off for a bit, but I don't really mind either way.
Quoted 8 lines
Quoted 2 lines
Commit message does not mention if this was never used in the first place or became unused during TCG conversion or some other refactoring?
It doesn't cause any warning on my build here, so there's no strict need for this patch.
I have dropped the patch for now. Please resend if you want to get it in and address Andreas' questions.
Quoted 6 lines
the function was never used. It should be removed just to keep the code clean and free of unneeded functions. I noticed this function when I looked after the functions which follow (
set_HIT0_LO, ...). Those functions are very similar, so I thinkset_HILOwas the copy master for those functions (maybe used in a local code version whic was never committed).
Could you please check that it is not used by Richard Sandiford's, Khansa Butt's and Jia Liu's patches? Then I'll happily ack.
Quoted 4 lines
Static inline functions never create a gcc warning when they are unused, as far as I know. Maybe other tools like static code analysers raise a warning.
Sure, I was thinking of the static analysis tools you occasionally posted patches for.
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Am 19.03.2012 13:43, schrieb Andreas Färber:
Quoted 27 lines
Am 19.03.2012 13:31, schrieb Stefan Weil:
Quoted 19 lines
Am 19.03.2012 13:17, schrieb Stefan Hajnoczi:
Quoted 9 lines
Quoted 7 lines · Andreas Färber
Am 17.03.2012 13:00, schrieb Stefan Weil:
Quoted 1 line
Function
set_HILOis not needed anywhere.Does this cause any warnings? Given the state mips is currently in (TCG patches queuing), I'd suggest to hold this off for a bit, but I don't really mind either way.
Quoted 8 lines
Quoted 2 lines
Commit message does not mention if this was never used in the first place or became unused during TCG conversion or some other refactoring?
It doesn't cause any warning on my build here, so there's no strict need for this patch.
I have dropped the patch for now. Please resend if you want to get it in and address Andreas' questions.
Quoted 6 lines
the function was never used. It should be removed just to keep the code clean and free of unneeded functions. I noticed this function when I looked after the functions which follow (
set_HIT0_LO, ...). Those functions are very similar, so I thinkset_HILOwas the copy master for those functions (maybe used in a local code version whic was never committed).
Quoted 2 lines
Could you please check that it is not used by Richard Sandiford's, Khansa Butt's and Jia Liu's patches? Then I'll happily ack.
I looked for set_HI_LO in my local qemu-devel mailings from 2011 and 2012 and found only my own patches.
You can also search the QEMU mailing list archive for set_HILO. Try this URL:
http://lists.nongnu.org/archive/cgi-bin/namazu.cgi?query=*set_HI_LO*&submit=Search!&idxname=qemu-devel&max=20&result=normal&sort=score
It also shows no patches which include 'set_HILO' from the people you mentioned.
This patch conflicts with the new one, but it was also sent by me and I knew that I'd have to rebase it:
http://lists.nongnu.org/archive/html/qemu-devel/2012-03/msg00447.html.
It's this patch which made me aware that set_HILO is unused. All that code was added for the V54xx core family and is only used for V54xx (or not used at all).
Quoted 11 lines
Quoted 5 lines
Static inline functions never create a gcc warning when they are unused, as far as I know. Maybe other tools like static code analysers raise a warning.
Sure, I was thinking of the static analysis tools you occasionally posted patches for.
Andreas
Actually, they did complain, but I did not care then:
cppcheck-20110721.log:qemu/target-mips/op_helper.c:1: style: The function 'set_HILO' is never used
My cppcheck-20111029.log lists 1372 functions which are never used in QEMU. Many of those are false positives (for examples caused by the way how QEMU creates helper function names using macros), so I did not care.
Cheers,
Stefan
Am 19.03.2012 14:08, schrieb Stefan Weil:
Quoted 62 lines
Am 19.03.2012 13:43, schrieb Andreas Färber:
Quoted 27 lines
Am 19.03.2012 13:31, schrieb Stefan Weil:
Quoted 19 lines
Am 19.03.2012 13:17, schrieb Stefan Hajnoczi:
Quoted 9 lines
Quoted 7 lines · Andreas Färber
Am 17.03.2012 13:00, schrieb Stefan Weil:
Quoted 1 line
Function
set_HILOis not needed anywhere.Does this cause any warnings? Given the state mips is currently in (TCG patches queuing), I'd suggest to hold this off for a bit, but I don't really mind either way.
Quoted 8 lines
Quoted 2 lines
Commit message does not mention if this was never used in the first place or became unused during TCG conversion or some other refactoring?
It doesn't cause any warning on my build here, so there's no strict need for this patch.
I have dropped the patch for now. Please resend if you want to get it in and address Andreas' questions.
Quoted 6 lines
the function was never used. It should be removed just to keep the code clean and free of unneeded functions. I noticed this function when I looked after the functions which follow (
set_HIT0_LO, ...). Those functions are very similar, so I thinkset_HILOwas the copy master for those functions (maybe used in a local code version whic was never committed).Quoted 2 lines
Could you please check that it is not used by Richard Sandiford's, Khansa Butt's and Jia Liu's patches? Then I'll happily ack.
I looked for
set_HI_LOin my local qemu-devel mailings from 2011 and 2012 and found only my own patches.You can also search the QEMU mailing list archive for
set_HILO. Try this URL:
http://lists.nongnu.org/archive/cgi-bin/namazu.cgi?query=*set_HI_LO*&submit=Search!&idxname=qemu-devel&max=20&result=normal&sort=scoreIt also shows no patches which include '
set_HILO' from the people you mentioned.This patch conflicts with the new one, but it was also sent by me and I knew that I'd have to rebase it:
http://lists.nongnu.org/archive/html/qemu-devel/2012-03/msg00447.html.
It's this patch which made me aware thatset_HILOis unused. All that code was added for the V54xx core family and is only used for V54xx (or not used at all).Quoted 11 lines
Quoted 5 lines
Static inline functions never create a gcc warning when they are unused, as far as I know. Maybe other tools like static code analysers raise a warning.
Sure, I was thinking of the static analysis tools you occasionally posted patches for.
Andreas
Actually, they did complain, but I did not care then:
Quoted 9 lines
cppcheck-20110721.log:qemu/target-mips/op_helper.c:1: style: The function '
set_HILO' is never usedMy cppcheck-20111029.log lists 1372 functions which are never used in QEMU. Many of those are false positives (for examples caused by the way how QEMU creates helper function names using macros), so I did not care.
Cheers,
Stefan
Are there any questions remaining?
I know that a lot of MIPS related patches are waiting for commit, but maybe at least this really trivial one can finally find its way through qemu-trivial.
Cheers,
Stefan
Stefan Hajnoczi
AppliedQuoted 6 lines · Stefan Weil
Function
set_HILOis not needed anywhere.Signed-off-by Stefan Weil <[email protected]>--- target-mips/op_helper.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-)
Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches
Stefan